An experimental tool
eNSP
Two experimental topology
Three experimental purposes
1. LSW1 is the main route for the 192.168.10.0/24 network segment, and the backup route for the 192.168.20.0/24 network segment
2. LSW2 is the main route of the 192.168.20.0/24 network segment, and the backup route of the 192.168.10.0/24 network segment
3. When the main route of one of the network segments is disconnected, the VRRP protocol backup route is automatically enabled
Four experimental steps
1.1 PC1 configuration
1.2 PC2 configuration
2. LSW3 configuration
[SW3]v b 10 20
[SW3]int e0/0/1
[SW3-Ethernet0/0/1]p l a
[SW3-Ethernet0/0/1]p d v 10
[SW3]int e0/0/2
[SW3-Ethernet0/0/2]p l a
[SW3-Ethernet0/0/2]p d v 20
[SW3-Ethernet0/0/2]int g0/0/1
[SW3-GigabitEthernet0/0/1]p l t
[SW3-GigabitEthernet0/0/1]p t a v a
[SW3]int g0/0/2
[SW3-GigabitEthernet0/0/2]p l t
[SW3-GigabitEthernet0/0/2]p t a v a
3.1 Configuration of RSW1 Layer 3 Switch
划分VLAN
[RSW1]v b 10 20 100
配置接口
[RSW1]int g0/0/2
[RSW1-GigabitEthernet0/0/2]p l t
[RSW1-GigabitEthernet0/0/2]p t a v a
[RSW1-GigabitEthernet0/0/2]int g0/0/1
[RSW1-GigabitEthernet0/0/1]p l a
[RSW1-GigabitEthernet0/0/1]p d v 100
进入逻辑接口配置IP地址
[RSW1-GigabitEthernet0/0/1]int vlanif 10
[RSW1-Vlanif10]ip add 192.168.10.10 24
[RSW1-Vlanif10]int vlanif 20
[RSW1-Vlanif20]ip add 192.168.20.10 24
[RSW1-Vlanif20]int vlanif 100
[RSW1-Vlanif100]ip add 11.0.0.2 30
VRRP协议
[RSW1]int vlanif 10
[RSW1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1 #虚拟路由器IP地址
[RSW1-Vlanif10]vrrp vrid 1 priority 120 #VRRP优先级设置
[RSW1-Vlanif10]vrrp vrid 1 track interface g0/0/1 #监控RSW1的g0/0/1接口
[RSW1-Vlanif10]vrrp vrid 1 track interface g0/0/2 #监控RSW1的g0/0/2接口
VRRP备用路由
[RSW1]int Vlanif 20
[RSW1-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1
[RSW1-Vlanif20]vrrp vrid 2 priority 115 #VRRP优先级低于主路由器
默认路由
[RSW1]ip route-static 0.0.0.0 0.0.0.0 11.0.0.1 #边缘路由器配置默认路由
3.2 RSW2 configuration of Layer 3 switch
划分VLAN
[RSW2]v b 10 20 100
配置接口
[RSW2]int g0/0/2
[RSW2-GigabitEthernet0/0/2]p l t
[RSW2-GigabitEthernet0/0/2]p t a v a
[RSW2-GigabitEthernet0/0/2]int g0/0/1
[RSW2-GigabitEthernet0/0/1]p l a
[RSW2-GigabitEthernet0/0/1]p d v 100
[RSW2-GigabitEthernet0/0/2]int vlanif 10
[RSW2-Vlanif10]ip add 192.168.10.20 24
进入逻辑接口配置IP地址
[RSW2-GigabitEthernet0/0/1]int vlanif 10
[RSW2-Vlanif10]ip add 192.168.10.20 24
[RSW2-Vlanif10]int vlanif 20
[RSW2-Vlanif20]ip add 192.168.20.20 24
[RSW2-Vlanif20]int vlanif 100
[RSW2-Vlanif100]ip add 12.0.0.2 30
VRRP备用路由
[RSW2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
[RSW2-Vlanif10]vrrp vrid 1 priority 115
VRRP主路由
[RSW2-Vlanif10]int vlanif 20
[RSW2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1
[RSW2-Vlanif20]vrrp vrid 2 priority 120
[RSW2-Vlanif20]vrrp vrid 2 track interface GigabitEthernet 0/0/1
[RSW2-Vlanif20]vrrp vrid 2 track interface GigabitEthernet 0/0/2
默认路由
[RSW2]ip route-static 0.0.0.0 0.0.0.0 12.0.0.1
4 Router R1 configuration
接口IP地址配置
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 11.0.0.1 30
[R1-GigabitEthernet0/0/0]un sh
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 12.0.0.1 30
[R1-GigabitEthernet0/0/1]un sh
[R1-GigabitEthernet0/0/1]int loo 0
[R1-LoopBack0]ip add 1.1.1.1 24
浮动路由
[R1]ip route-static 192.168.10.0 255.255.255.0 12.0.0.2 preference 70
[R1]ip route-static 192.168.20.0 255.255.255.0 11.0.0.2 preference 70
[R1]ip route-static 192.168.20.0 255.255.255.0 12.0.0.2
[R1]ip route-static 192.168.10.0 255.255.255.0 11.0.0.2
5 Test connection to
PC1ping loopback 0 interface
message data
PC2 ping loopback 0 interface
packet data
When the 11.0.0.0/30 network segment is down, it
can still be pinged.
ICMP packets are found by capturing packets from the g0/0/2 interface of RSW2
. So far, the experiment is over.