防火墙旁路部署经典使用案例

在这里插入图片描述

1、下面两台电脑模拟两个部门的vlan
2、最终效果是两个部门不能互通,但都能上网ping通8.8.8.8,两个部门都能绕行旁挂防火墙
3、全网跑ospf 区域0
4、两个vpn实例对应两个部门的vlan,路由表相互隔离,互不影响

R1配置 :

dis current-configuration

interface GigabitEthernet0/0/0
ip address 10.1.200.2 255.255.255.252

interface LoopBack0
ip address 8.8.8.8 255.255.255.255

ospf 1 router-id 8.8.8.8
default-route-advertise always
import-route direct
area 0.0.0.0
network 10.1.200.2 0.0.0.0

lsw1配置

dis current-configuration

vlan batch 10 20 31 to 34 200

dhcp enable

ip vpn-instance pr
ipv4-family
route-distinguisher 65001:2

ip vpn-instance rd
ipv4-family
route-distinguisher 65001:1

interface Vlanif10
ip binding vpn-instance rd
ip address 192.168.10.254 255.255.255.0
dhcp select interface

interface Vlanif20
ip binding vpn-instance pr
ip address 192.168.20.254 255.255.255.0
dhcp select interface

interface Vlanif31
ip binding vpn-instance rd
ip address 100.1.31.1 255.255.255.252

interface Vlanif32
ip binding vpn-instance pr
ip address 100.1.32.1 255.255.255.252

interface Vlanif33
ip address 100.1.33.1 255.255.255.252

interface Vlanif34
ip address 100.1.34.1 255.255.255.252

interface Vlanif200
ip address 10.1.200.1 255.255.255.252

interface MEth0/0/1

interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 31 to 34
mode lacp-static

interface GigabitEthernet0/0/1
eth-trunk 1

interface GigabitEthernet0/0/2
eth-trunk 1

interface GigabitEthernet0/0/3
port link-type access
port default vlan 10

interface GigabitEthernet0/0/4
port link-type access
port default vlan 200

interface GigabitEthernet0/0/5
port link-type access
port default vlan 20

ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.1.200.1 0.0.0.0
network 100.1.34.1 0.0.0.0
network 100.1.33.1 0.0.0.0

ospf 2 router-id 1.1.1.1 vpn-instance rd
area 0.0.0.0
network 100.1.31.1 0.0.0.0
network 192.168.10.0 0.0.0.255

ospf 3 router-id 2.2.2.2 vpn-instance pr
area 0.0.0.0
network 100.1.32.1 0.0.0.0
network 192.168.20.0 0.0.0.255

防火墙配置

dis current-configuration

vlan batch 31 to 34

ip vpn-instance pr
ipv4-family
route-distinguisher 65002:2

ip vpn-instance rd
ipv4-family
route-distinguisher 65002:1

interface Vlanif31
ip binding vpn-instance rd
ip address 100.1.31.2 255.255.255.252

interface Vlanif32
ip binding vpn-instance pr
ip address 100.1.32.2 255.255.255.252

interface Vlanif33
ip binding vpn-instance rd
ip address 100.1.33.2 255.255.255.252

interface Vlanif34
ip binding vpn-instance pr
ip address 100.1.34.2 255.255.255.252

interface Eth-Trunk1
portswitch
port link-type trunk
port trunk allow-pass vlan 31 to 34
mode lacp-static

interface GigabitEthernet1/0/0
undo shutdown
eth-trunk 1

interface GigabitEthernet1/0/1
undo shutdown
eth-trunk 1

firewall zone local
set priority 100

firewall zone trust
set priority 85
add interface Vlanif31
add interface Vlanif32

firewall zone untrust
set priority 5
add interface Vlanif33
add interface Vlanif34

ospf 1 router-id 6.6.6.6 vpn-instance rd
area 0.0.0.0
network 100.1.31.2 0.0.0.0
network 100.1.33.2 0.0.0.0

ospf 2 router-id 7.7.7.7 vpn-instance pr
area 0.0.0.0
network 100.1.32.2 0.0.0.0
network 100.1.34.2 0.0.0.0

security-policy
rule name ospf
source-zone local
source-zone trust
source-zone untrust
destination-zone local
destination-zone trust
destination-zone untrust
service ospf
action permit

rule name rd
source-zone trust
destination-zone untrust
source-address 192.168.10.0 mask 255.255.255.0
action permit

rule name pr
source-zone trust
destination-zone untrust
source-address 192.168.20.0 mask 255.255.255.0
action permit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

项目工程师余工

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值