拓扑:

p_w_picpath

需求:

vtp模式为transparent,vtp domain为CCIE

创建vlan10,20

交换机互联口配置为IEEE 802.1Q

SW1为VLAN10的root bridge,VLAN20的backup root bridge

SW2为VLAN20的root bridge,VLAN10的backup root bridge

SW1:VLAN10为HSRP组1的Active Router,VLAN20为HSRP组2的Standby Router

SW2:VLAN20为HSRP组2的Active Router,VLAN10为HSRP组1的Standby Router

当ISP1链路失效时,流量切换到ISP2

R1:

interface FastEthernet0/0
ip address 202.1.1.1 255.255.255.0
speed 100
full-duplex
!
interface FastEthernet0/1
ip address 64.1.1.1 255.255.255.0
speed 100
full-duplex

SW1:

panning-tree vlan 10 priority 8192
spanning-tree vlan 20 priority 16384
vtp domain CCIE
vtp mode transparent
!
!
vlan 10,20
!
!
track 10 rtr 1
!
interface FastEthernet1/1
switchport trunk allowed vlan 1,2,10,1002-1005
switchport mode trunk
!
interface FastEthernet1/2
switchport trunk allowed vlan 1,2,20,1002-1005
switchport mode trunk
!
interface FastEthernet1/15
no switchport
ip address 202.1.1.2 255.255.255.0
duplex full
speed 100
!
interface Vlan1
no ip address
!
interface Vlan10
ip address 10.1.1.1 255.255.255.0
standby 1 ip 10.1.1.254
standby 1 timers msec 200 1
standby 1 priority 105
standby 1 preempt delay minimum 20
standby 1 authentication md5 key-string cisco
standby 1 track FastEthernet1/15
standby 1 track 10 decrement 10
!
interface Vlan20
ip address 20.1.1.1 255.255.255.0
standby 1 ip 20.1.1.254
standby 1 preempt delay minimum 20
standby 1 authentication md5 key-string cisco
!        
ip sla 1
icmp-echo 202.1.1.1 source-interface FastEthernet1/15
frequency 5
ip sla schedule 1 life forever start-time now

SW2:

spanning-tree vlan 10 priority 16384
spanning-tree vlan 20 priority 8192
vtp domain CCIE
vtp mode transparent
!
!
vlan 10,20
!
!
track 10 rtr 1
!
interface FastEthernet1/1
switchport trunk allowed vlan 1,2,20,1002-1005
switchport mode trunk
!
interface FastEthernet1/2
switchport trunk allowed vlan 1,2,10,1002-1005
switchport mode trunk
!
interface FastEthernet1/15
no switchport
ip address 64.1.1.2 255.255.255.0
duplex full
speed 100
!
interface Vlan1
no ip address
!
interface Vlan10
ip address 10.1.1.2 255.255.255.0
standby 1 ip 10.1.1.254
standby 1 preempt delay minimum 20
standby 1 authentication md5 key-string cisco
!
interface Vlan20
ip address 20.1.1.2 255.255.255.0
standby 1 ip 20.1.1.254
standby 1 timers msec 200 1
standby 1 priority 105
standby 1 preempt delay minimum 20
standby 1 authentication md5 key-string cisco
standby 1 track FastEthernet1/15
standby 1 track 10 decrement 10
!
ip sla 1
icmp-echo 64.1.1.1 source-interface FastEthernet1/15
frequency 5
ip sla schedule 1 life forever start-time now

SW3:

vtp domain CCIE
vtp mode transparent
!
!
vlan 10
!
interface FastEthernet1/0
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
switchport mode trunk

SW4:

vtp domain CCIE
vtp mode transparent
!
!
vlan 20
!
interface FastEthernet1/0
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
switchport mode trunk

p_w_picpath

p_w_picpath

p_w_picpath

p_w_picpath

p_w_picpath

p_w_picpath