防火墙VRF引流
实验拓扑

实验要求:
1内网通,公网通
2.配置easy ip 内网访问公网
3.内外网流量引流到防火墙
实验步骤
1.配置IP,vlan


[SW1]VLAN 10
[SW1-GigabitEthernet0/0/1]p l a
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1-GigabitEthernet0/0/1]q
[SW1-GigabitEthernet0/0/2]p l t
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10

[SW2]vlan 20
[SW2-GigabitEthernet0/0/1]p l a
[SW2-GigabitEthernet0/0/1]port default vlan 20
[SW2-GigabitEthernet0/0/2]p l t
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan 20
[SW3]vlan batch 10 20 30 40 60 70
[SW3-GigabitEthernet0/0/1]p l t
[SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[SW3-GigabitEthernet0/0/2]p l t
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan 20
[SW3-GigabitEthernet0/0/3]p l a
[SW3-GigabitEthernet0/0/3]port default vlan 30
[SW3-GigabitEthernet0/0/4]p l a
[SW3-GigabitEthernet0/0/4]port default vlan 40
[SW3-GigabitEthernet0/0/6]p l a
[SW3-GigabitEthernet0/0/6]port default vlan 60
[SW3-GigabitEthernet0/0/7]p l a
[SW3-GigabitEthernet0/0/7]port default vlan 70
[SW3]ip vpn-instance a
[SW3-vpn-instance-a]ipv4-family
[SW3-vpn-instance-a-af-ipv4]route-distinguisher 1:1
[SW3]ip vpn-instance b
[SW3-vpn-instance-b]ipv4-family
[SW3-vpn-instance-b-af-ipv4]route-distinguisher 1:2
[SW3]ip vpn-instance c
[SW3-vpn-instance-c]ipv4-family
[SW3-vpn-instance-c-af-ipv4]route-distinguisher 1:3
接口加入相应的VPN实例
[SW3]int Vlanif 10
[SW3-Vlanif10]ip binding vpn-instance a
[SW3-Vlanif10]ip add 192.168.1.254 24
[SW3-Vlanif60]ip binding vpn-instance a
ip address 192.168.6.1 255.255.255.0
[SW3-Vlanif20]ip binding vpn-instance b
[SW3-Vlanif20]ip add 192.168.2.254 24
[SW3]int Vlanif 70
[SW3-Vlanif70]ip binding vpn-instance b
[SW3-Vlanif40]ip binding vpn-instance c
[SW3-Vlanif40]ip add 192.168.4.1 24
[SW3-Vlanif30]ip binding vpn-instance c
[SW3-Vlanif30]ip add 192.168.3.1 24

[R2-GigabitEthernet0/0/0]ip add 192.168.4.2 24
[R2-GigabitEthernet0/0/1]ip add 100.1.1.1 24
[R1-GigabitEthernet0/0/0]ip add 100.1.1.2 24
[R1-LoopBack0]ip add 2.2.2.2 32
[DW1-GigabitEthernet1/0/0]ip add 192.168.3.2 24
[DW1-GigabitEthernet1/0/2]ip add 192.168.7.2 24
[DW1-GigabitEthernet1/0/1]ip add 192.168.6.2 24
[DW1]firewall zone trust
[DW1-zone-trust]add int g1/0/0
[DW1-zone-trust]add int g1/0/2
[DW1-zone-trust]add int g1/0/1
公网通
[R2]ip route-static 0.0.0.0 0 100.1.1.2

内网通
[SW3]ospf 1 router-id 1.1.1.1 vpn-instance a
[SW3-ospf-1]a 0
[SW3-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[SW3-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255
[SW3]ospf 2 router-id 2.2.2.2 vpn-instance b
[SW3-ospf-2]a 0
[SW3-ospf-2-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[SW3]ospf 3 router-id 3.3.3.3 vpn-instance c
[SW3-ospf-3]a 0
[SW3-ospf-3-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[SW3-ospf-3-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[SW2]ospf 1 router-id 33.33.33.33
[SW2-ospf-1]a 0
[SW2-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[DW1-ospf-1-area-0.0.0.0]network 192.168.7.0 0.0.0.255
[DW1-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255


、




下发缺省
[SW2-ospf-1]default-route-advertise always
rule permit source 192.168.2.0 0.0.0.255
[SW2-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[SW2-GigabitEthernet0/0/1]nat outbound 2000


DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐


所有评论(0)