H3C基礎(chǔ)VRRP+MSTP+OSPF配置
HCLHub練習(xí)
http://hclhub.h3c.com/project/5081/summary/master
HCLHub答案
http://hclhub.h3c.com/project/5082/summary/master
?命令
R1
sys
sysna R1
int g0/0/0
ip add 172.16.10.2 24
int g0/0/1
ip add 172.16.20.2 24
int loop0
ip add 1.1.1.1 32
ospf 1
area 0
network 172.16.10.0 0.0.0.255
network 172.16.20.0 0.0.0.255
network 1.1.1.1 0.0.0.0
SW1
sys
sysna SW1
vlan 10
vlan 20
int vlan 10
int vlan 20
int range g1/0/1 to g1/0/4
port link-type trunk
port trunk permit vlan 10 20
stp re
reg? mstp
inst 1 vlan 10
inst 2? vlan 20
?active region-configuration
stp instance 1 root primary
?stp instance 2 root secondary
int vlan 10
ip add 192.168.10.252 24
?vrrp vrid 10 virtual-ip 192.168.10.254
?vrrp vrid 10 priority 120
vrrp vrid 10 preempt-mode delay 500
?vrrp vrid 10 track 1 priority reduced 50
int vlan 20
ip add 192.168.20.252 24
?vrrp vrid 20 virtual-ip 192.168.20.254
track 1 interface? GigabitEthernet1/0/24
vlan 100
int vlan 100
ip add 172.16.10.1 24
int g1/0/24
port acc vlan 100
route-policy abc permit node 5
?if-match ip address prefix-list abc
?
?ip prefix-list abc index 10 permit 192.168.20.0 24
ospf 1
?import-route direct route-policy abc
area 0
network 172.16.10.0 0.0.0.255
network 192.168.10.0 0.0.0.255
SW2
sys
sysna SW2
vlan 10
vlan 20
int vlan 10
int vlan 20
int range g1/0/1 to g1/0/4
port link-type trunk
port trunk permit vlan 10 20
stp re
reg? mstp
inst 1 vlan 10
inst 2? vlan 20
?active region-configuration
stp instance 2 root primary
?stp instance 1 root secondary
int vlan 10
ip add 192.168.10.253 24
?vrrp vrid 10 virtual-ip 192.168.10.254
int vlan 20
ip add 192.168.20.253 24
?vrrp vrid 20 virtual-ip 192.168.20.254
?vrrp vrid 20 priority 120
vrrp vrid 20 preempt-mode delay 500
?vrrp vrid 20 track 1 priority reduced 50
track 1 interface? GigabitEthernet1/0/24
vlan 200
int vlan 200
ip add 172.16.20.1 24
int g1/0/24
port acc vlan 200
route-policy abc permit node 5
?if-match ip address prefix-list abc
?
?ip prefix-list abc index 10 permit 192.168.10.0 24
ospf 1
?import-route direct route-policy abc
?area 0.0.0.0
? network 172.16.20.0 0.0.0.255
? network 192.168.20.0 0.0.0.255
SW3
sys
sysna SW3
vlan 10
vlan 20
stp region-configuration
region-name mstp
?instance 1 vlan 10
?instance 2 vlan 20
?active region-configuration
int range g1/0/3 to g1/0/4
port link-type trunk
port trunk permit vlan 10 20
int range g1/0/1?
port acc vlan 10
int range g1/0/2
port acc vlan 20
SW4
sys
sysna SW4
vlan 10
vlan 20
stp region-configuration
region-name mstp
?instance 1 vlan 10
?instance 2 vlan 20
?active region-configuration
int range g1/0/3 to g1/0/4
port link-type trunk
port trunk permit vlan 10 20
int range g1/0/1?
port acc vlan 10
int range g1/0/1?
port acc vlan 20