华为vrrp热路由备份
要求:实验VRRP热路由备份
Sw1交换机的配置
[sw1]stp enable
[sw1-vlan10]int et0/1
[sw1-Ethernet0/1]port link-type trunk
[sw1-Ethernet0/1]port trunk permit vlan all
Please wait........................................... Done.
[sw1-Ethernet0/1]int et0/2
[sw1-Ethernet0/2]port link-type trunk
[sw1-Ethernet0/2]port trunk permit vlan all
Please wait........................................... Done.
[sw1-Ethernet0/2]speed 10
[sw1-Ethernet0/2]vlan 10
[sw1-vlan10]vlan 20
[sw1-vlan20]vlan 30
[sw1-vlan30]vlan 40
[sw1]int e0/17
[sw1-Ethernet0/17]port link-type trunk
[sw1-Ethernet0/17]port trunk permit vlan all
[sw1-Ethernet0/17]speed 100
[sw1-Ethernet0/17]duplex full
[sw1-Ethernet0/17]int e0/18
[sw1-Ethernet0/18]port link-type trunk
[sw1-Ethernet0/18]port trunk permit vlan all
[sw1-Ethernet0/18]speed 100
[sw1-Ethernet0/18]duplex full
[sw1]link-aggregation e0/17 to e0/18 both
[sw1]int vlan-int 10
[sw1]int vla lan-interface10]ip add 192.168.10.1 255.255.255.0
[sw1-Vlan-interface10]int vlan-int 20
[sw1-Vlan-interface20]ip add 192.168.20.1 255.255.255.0
[sw1-Vlan-interface20]int vlan-int 30
[sw1-Vlan-interface30]ip add 192.168.30.1 255.255.255.0
[sw1-Vlan-interface20]int vlan-int 40
[sw1-Vlan-interface40]ip add 192.168.40.1 255.255.255.0
[sw1]stp root primary
配置热路由vrrp
[sw1]inter Vlan-interface 10
[sw1-Vlan-interface10]vrrp vrid 10 virtual-ip 192.168.10.254
[sw1-Vlan-interface10]vrrp vrid 10 priority 120
[sw1]int Vlan-interface 20
[sw1-Vlan-interface20]vrrp vrid 20 virtual-ip 192.168.20.254
[sw1-Vlan-interface20]vrrp vrid 20 priority 120
[sw1]int Vlan-interface 30
[sw1-Vlan-interface30]vrrp vrid 30 virtual-ip 192.168.30.254
[sw1-Vlan-interface30]quit
[sw1]int Vlan-interface 40
[sw1-Vlan-interface40]vrrp vrid 40 virtual-ip 192.168.40.254
Sw2配置
[sw2]stp enable
[sw2-vlan10]int et0/1
[sw2-Ethernet0/1]port link-type trunk
[sw2-Ethernet0/1]port trunk permit vlan all
Please wait........................................... Done.
[sw2-Ethernet0/1]int et0/2
[sw2-Ethernet0/2]port link-type trunk
[sw2-Ethernet0/2]port trunk permit vlan all
Please wait........................................... Done.
[sw2-Ethernet0/2]speed 10
[sw2-Ethernet0/2]vlan 10
[sw2-vlan10]vlan 20
[sw2-vlan20]vlan 30
[sw2-vlan30]vlan 40
[sw2]int e0/17
[sw2-Ethernet0/17]port link-type trunk
[sw2-Ethernet0/17]port trunk permit vlan all
[sw2-Ethernet0/17]speed 100
[sw2-Ethernet0/17]duplex full
[sw2-Ethernet0/17]int e0/18
[sw2-Ethernet0/18]port link-type trunk
[sw2-Ethernet0/18]port trunk permit vlan all
[sw2-Ethernet0/18]speed 100
[sw2-Ethernet0/18]duplex full
[sw2]link-aggregation e0/17 to e0/18 both
[sw2]int vlan-int 10
[sw2]int vla lan-interface10]ip add 192.168.10.2 255.255.255.0
[sw2-Vlan-interface10]int vlan-int 20
[sw2-Vlan-interface20]ip add 192.168.20.2 255.255.255.0
[sw2-Vlan-interface20]int vlan-int 30
[sw2-Vlan-interface30]ip add 192.168.30.2 255.255.255.0
[sw2-Vlan-interface20]int vlan-int 40
[sw2-Vlan-interface40]ip add 192.168.40.2 255.255.255.0
热路由vrrp的配置
[sw2]inter Vlan-interface 10
[sw2-Vlan-interface10]vrrp vrid 10 virtual-ip 192.168.10.254
[sw2]int Vlan-interface 20
[sw2-Vlan-interface20]vrrp vrid 20 virtual-ip 192.168.20.254
[sw2]int Vlan-interface 30
[sw2-Vlan-interface30]vrrp vrid 30 virtual-ip 192.168.30.254
[sw2-Vlan-interface30]vrrp vrid 30 priority 120
[sw2-Vlan-interface30]quit
[sw2]int Vlan-interface 40
[sw2-Vlan-interface40]vrrp vrid 40 virtual-ip 192.168.40.254
[sw2-Vlan-interface40]vrrp vrid 40 priority 120
查看VRRP配置
Sw3配置
[sw3]stp enable
[sw3]stp mode rstp
[sw3]inter e0/1
[sw3-Ethernet0/1]port link-type trunk
[sw3-Ethernet0/1]port trunk permit vlan all
[sw3]inter e0/2
[sw3-Ethernet0/2]port link-type trunk
[sw3-Ethernet0/2]port trunk permit vlan all
Sw4交换机的配置
[sw4]stp enable
[sw4]stp mode rstp
[sw4]inter e0/1
[sw4-Ethernet0/1]port link-type trunk
[sw4-Ethernet0/1]port trunk permit vlan all
[sw4]inter e0/2
[sw4-Ethernet0/2]port link-type trunk
[sw4-Ethernet0/2]port trunk permit vlan all
用vlan20的主机ping vlan30的主机
路由追踪查看
用vlan30的主机ping vlan20的主机并查看追踪路由