cisco综合实验(vlan、vtp、mst、stp、hrsp、dhcp、dhcp中继等)

一个cisco的经典实验,拓扑图如下:

     R8做为出口路由器,与isp相连,使用拨号上网,内部两台核心交换机switch9和switch10,三台接入交换机。

     办公区划分为vlan 1(管理vlan),vlan40 ,vlan50,vlan60,vlan70,vlan90.服务器区为vlan80,提供dhcp服务。

ip地址如下:

vlan1   10.100.1.0/24    vlan40 10.100.40.0/24    vlan50 10.100.50.0/24   

vlan60 10.100.60.0/24    vlan70 10.100.70.0/24  vlan80 10.100.80.0/24 

vlan90 10.100.90.0/24

     两台核心交换机之间互联起以太网信道,两台核心交换机为vtp模式为server,接入交换机vtp模式为clinet。交换机开启mst(多生成树协议),mst1中有vlan40,50,60,mst2中有vlan70,80,90。核心交换机switch9为mst1的主根桥,为mst2的备份根桥,核心交换机switch10为mst2的主根桥,mst1的备份根桥。

两台核心交换机配置hrsp,当一台出现故障,能自动切换到另一台。

服务区中一台路由器模拟dhcp服务器,可以向vlan50,60,70,80,90提供dhcp服务。

 

r8的配置

version 15.7

hostname R8
!
no ip domain lookup
ip cef
!
interface Ethernet0/0  连接switch10
 ip address 10.10.50.1 255.255.255.0
 ip nat inside  开启inside的nat转换 
 ip virtual-reassembly in
 duplex auto
!
interface Ethernet0/1  连接switch9
 ip address 10.10.80.1 255.255.255.0
 ip nat inside  开启inside的nat转换
 ip virtual-reassembly in
 duplex auto
!
interface Ethernet0/3
 no ip address
 duplex auto
 pppoe enable group global
 pppoe-client dial-pool-number 1

interface Dialer0
 mtu 1492
 ip address negotiated
 ip nat outside  拨号接口为nat的outside 
 ip virtual-reassembly in
 encapsulation ppp
 ip tcp adjust-mss 1450
 dialer pool 1
 dialer-group 1
 ppp chap hostname cisco
 ppp chap password 0 cisco
!
router ospf 1   开启ospf,宣告内部直连的两条路由
 network 10.10.50.0 0.0.0.255 area 0
 network 10.10.80.0 0.0.0.255 area 0
!
ip forward-protocol nd
!
ip nat inside source list nat-out interface Dialer0 overload 开启源ip地址转换
ip route 0.0.0.0 0.0.0.0 Dialer0   默认路由从拨号接口出去
!
ip access-list extended nat-out    扩展访问列表,nat源ip转换的地址
 permit ip 10.10.80.0 0.0.0.255 any
 permit ip 10.10.50.0 0.0.0.255 any
 permit ip 10.100.1.0 0.0.0.255 any
 permit ip 10.100.40.0 0.0.0.255 any
 permit ip 10.100.50.0 0.0.0.255 any
 permit ip 10.100.60.0 0.0.0.255 any
 permit ip 10.100.70.0 0.0.0.255 any
 permit ip 10.100.80.0 0.0.0.255 any
 permit ip 10.100.90.0 0.0.0.255 any
!

核心交换机switch9的配置

sw9(config-if)#do show run

version 15.2
!
hostname sw9
!
no ip domain-lookup
ip cef
no ipv6 cef
!
spanning-tree mode mst  开启mst,多生成树协议
spanning-tree extend system-id   开启扩展id
!
spanning-tree mst configuration
 name cisco    mst的名字
 revision 1     mst的版本
 instance 1 vlan 40, 50, 60  vlan40,50,60划入 instance 1中
 instance 2 vlan 70, 80, 90  vlan70,80,90划入 instance 2中
!
spanning-tree mst 1 priority 0    设置本交机switch9关于mst1的网桥的优先级为0,必定成为mst1的根桥
spanning-tree mst 2 priority 28672 设置本交换机switch9关于mst2的网桥的优先级,成为mst2的备份根桥

track 1 interface GigabitEthernet0/0 line-protocol   设置监控连接路由的端口,当端口down时,hrsp的优先级就会减少20,备份根桥就为成为主根桥
!
interface Port-channel8  连接switch9和10的中继链路
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet0/0
 no switchport   开启三层接口模式,连接路由器r8
 ip address 10.10.80.9 255.255.255.0
 negotiation auto
!
interface GigabitEthernet0/1  以太网信道channe-group8的接口
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
 channel-group 8 mode on
!
interface GigabitEthernet0/2 以太网信道channe-group8的接口
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
 channel-group 8 mode on
!
interface GigabitEthernet1/0 连服务器区交换机
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 negotiation auto
!
interface GigabitEthernet1/2 连接入交换区switch11
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
!
interface GigabitEthernet1/3  连接入交换区switch12
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 negotiation auto

 

 

interface Vlan1
 ip address 10.100.1.252 255.255.255.0
!
interface Vlan40
 ip address 10.100.40.252 255.255.255.0
 ip helper-address 10.100.80.1   开启dhcp中继,帮助下面pc向dhcp服务器80.1申请ip
 standby 40 ip 10.100.40.254  开启hrsp,hrsp虚拟ip为10.100.42.254做为下面pc的网关
 standby 40 priority 120     设置优先级为120
 standby 40 preempt                      开启抢占功能,当down掉后,接口又up时,能把主根桥抢回来
 standby 40 track 1 decrement 20  开启track功能,监控连接r8路由的接口g0/0,当此接口down掉时,优先级减少20为100(120-20),此时优级先级小于备份根桥的优先级110,又因开启抢占功能,此交换机主根桥被switch10抢占,成为备份根桥。
!
interface Vlan50
 ip address 10.100.50.252 255.255.255.0
 ip helper-address 10.100.80.1
 standby 50 ip 10.100.50.254
 standby 50 priority 120
 standby 50 preempt
 standby 50 track 1 decrement 20
!
interface Vlan60
 ip address 10.100.60.252 255.255.255.0
 ip helper-address 10.100.80.1
 standby 60 ip 10.100.60.254
 standby 60 priority 120
 standby 60 preempt
 standby 60 track 1 decrement 20
!
interface Vlan70
 ip address 10.100.70.252 255.255.255.0
 ip helper-address 10.100.80.1
 standby 70 ip 10.100.70.254
 standby 70 priority 110
 standby 70 preempt
 standby 70 track 1 decrement 20
!
interface Vlan80
 ip address 10.100.80.252 255.255.255.0
 ip helper-address 10.100.80.1
 standby 80 ip 10.100.80.254
 standby 80 priority 110
 standby 80 preempt
 standby 80 track 1 decrement 20
!
interface Vlan90
 ip address 10.100.90.252 255.255.255.0
 ip helper-address 10.100.80.1
 standby 90 ip 10.100.90.254
 standby 90 priority 110
 standby 90 preempt
 standby 90 track 1 decrement 20
!
router ospf 1  开启ospf路由协议,宣告直连路由
 network 10.10.80.0 0.0.0.255 area 0
 network 10.100.1.0 0.0.0.255 area 0
 network 10.100.40.0 0.0.0.255 area 0
 network 10.100.50.0 0.0.0.255 area 0
 network 10.100.60.0 0.0.0.255 area 0
 network 10.100.70.0 0.0.0.255 area 0
 network 10.100.80.0 0.0.0.255 area 0
 network 10.100.90.0 0.0.0.255 area 0
!
ip route 0.0.0.0 0.0.0.0 10.10.80.1 默认路由下一跳为r8的e0/1接口

 

 

 

 

switch10上的配置

sw10(config-if)#do show run
!
version 15.2

hostname sw10
!
no ip domain-lookup
!
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
 name cisco
 revision 1
 instance 1 vlan 40, 50, 60
 instance 2 vlan 70, 80, 90
!
spanning-tree mst 1 priority 28672
spanning-tree mst 2 priority 0
!
track 1 interface GigabitEthernet0/0 line-protocol
!
interface Port-channel8
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet0/0
 no switchport
 ip address 10.10.50.10 255.255.255.0
 negotiation auto
!
interface GigabitEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
 channel-group 8 mode on
!
interface GigabitEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
 channel-group 8 mode on
!
interface GigabitEthernet0/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 negotiation auto
!
interface GigabitEthernet1/0
 negotiation auto
!
interface GigabitEthernet1/1
 negotiation auto
!
interface GigabitEthernet1/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 negotiation auto
!
interface GigabitEthernet1/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
!
interface Vlan1
 ip address 10.100.1.253 255.255.255.0
!
interface Vlan40
 ip address 10.100.40.253 255.255.255.0
 ip helper-address 10.100.80.1
 standby 40 ip 10.100.40.254
 standby 40 priority 110
 standby 40 preempt
 standby 40 track 1 decrement 20
!
interface Vlan50
 ip address 10.100.50.253 255.255.255.0
 ip helper-address 10.100.80.1
 standby 0 track 1 decrement 20
 standby 50 ip 10.100.50.254
 standby 50 priority 110
 standby 50 preempt
!
interface Vlan60
 ip address 10.100.60.253 255.255.255.0
 ip helper-address 10.100.80.1
 standby 60 ip 10.100.60.254
 standby 60 priority 110
 standby 60 preempt
 standby 60 track 1 decrement 20
!
interface Vlan70
 ip address 10.100.70.253 255.255.255.0
 ip helper-address 10.100.80.1
 standby 70 ip 10.100.70.254
 standby 70 priority 120
 standby 70 preempt
 standby 70 track 1 decrement 20
!
interface Vlan80
 ip address 10.100.80.253 255.255.255.0
 ip helper-address 10.100.80.1
 standby 80 ip 10.100.80.254
 standby 80 priority 120
 standby 80 preempt
 standby 80 track 1 decrement 20
!
interface Vlan90
 ip address 10.100.90.253 255.255.255.0
 ip helper-address 10.100.80.1
 standby 90 ip 10.100.90.254
 standby 90 priority 120
 standby 90 preempt
 standby 90 track 1 decrement 20
!
router ospf 1
 network 10.10.50.0 0.0.0.255 area 0
 network 10.100.1.0 0.0.0.255 area 0
 network 10.100.40.0 0.0.0.255 area 0
 network 10.100.50.0 0.0.0.255 area 0
 network 10.100.60.0 0.0.0.255 area 0
 network 10.100.70.0 0.0.0.255 area 0
 network 10.100.80.0 0.0.0.255 area 0
 network 10.100.90.0 0.0.0.255 area 0
!
ip route 0.0.0.0 0.0.0.0 10.10.50.1

 

 

 

 

 

 

 

 

 

 

 

switch11上配置

sw11#show run

version 15.2

hostname sw11
!
no ip domain-lookup
!
spanning-tree mode mst
spanning-tree extend system-id
spanning-tree uplinkfast
!
spanning-tree mst configuration  接入交换机上也要配mst
 name cisco
 revision 1
 instance 1 vlan 40, 50, 60
 instance 2 vlan 70, 80, 90
!
interface GigabitEthernet0/0
 switchport access vlan 40
 switchport mode access
 negotiation auto
!
interface GigabitEthernet0/1
 switchport access vlan 90
 switchport mode access
 negotiation auto
!
interface GigabitEthernet0/2
 switchport mode access
 negotiation auto
!
interface GigabitEthernet1/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
!
interface GigabitEthernet1/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
!
interface Vlan1
 ip address 10.100.1.11 255.255.255.0

 

 

switch12上配置

Switch12#show run

version 15.2

hostname Switch12
!
no ip domain-lookup
ip cef

spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
 name cisco
 revision 1
 instance 1 vlan 40, 50, 60
 instance 2 vlan 70, 80, 90
!
interface GigabitEthernet0/0
 switchport mode access
 negotiation auto
!
interface GigabitEthernet0/1
 switchport access vlan 40
 switchport mode access
 negotiation auto
!
interface GigabitEthernet1/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 negotiation auto
!
interface GigabitEthernet1/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 negotiation auto

 

 

服务器区交换机配置

switch-server#show run

version 15.2

hostname switch-server

!
spanning-tree mode mst
spanning-tree extend system-id
spanning-tree uplinkfast
!
spanning-tree mst configuration
 name cisco
 revision 1
 instance 1 vlan 40, 50, 60
 instance 2 vlan 70, 80, 90
!
interface GigabitEthernet0/0  连接dhcp服务器
 switchport access vlan 80
 switchport mode access
 negotiation auto
!
interface GigabitEthernet0/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 negotiation auto
!
interface GigabitEthernet1/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 negotiation auto

 

dhcp服务器配置

dhcp-server#show run

version 15.7
hostname dhcp-server
!
no ip routing  关闭路由功能,当成主机
!  dhcp中排除的地址
ip dhcp excluded-address 10.100.80.1
ip dhcp excluded-address 10.100.80.252 10.100.80.254
ip dhcp excluded-address 10.100.90.252 10.100.90.254
ip dhcp excluded-address 10.100.70.252 10.100.70.254
ip dhcp excluded-address 10.100.60.252 10.100.60.254
ip dhcp excluded-address 10.100.50.252 10.100.50.254
ip dhcp excluded-address 10.100.40.252 10.100.40.254
ip dhcp excluded-address 10.100.90.1
ip dhcp excluded-address 10.100.70.1
ip dhcp excluded-address 10.100.60.1
ip dhcp excluded-address 10.100.50.1
ip dhcp excluded-address 10.100.40.1
!
ip dhcp pool 80  80网段地址池
 network 10.100.80.0 255.255.255.0   
 default-router 10.100.80.254  网关
 dns-server 10.100.80.254   dns
 lease 0 1          租期1小时
!
ip dhcp pool 90
 network 10.100.90.0 255.255.255.0
 default-router 10.100.90.254
 dns-server 10.100.90.254
 lease 0 1
!
ip dhcp pool 70
 network 10.100.70.0 255.255.255.0
 default-router 10.100.70.254
 dns-server 10.100.70.254
 lease 0 1
!
ip dhcp pool 60
 network 10.100.60.0 255.255.255.0
 default-router 10.100.60.254
 dns-server 10.100.60.254
 lease 0 1
!
ip dhcp pool 50
 network 10.100.50.0 255.255.255.0
 default-router 10.100.50.254
 dns-server 10.100.50.254
 lease 0 1
!
ip dhcp pool 40
 network 10.100.40.0 255.255.255.0
 default-router 10.100.40.254
 dns-server 10.100.40.254
 lease 0 1
!
no ip domain lookup
!
interface Ethernet0/0
 ip address 10.100.80.1 255.255.255.0
 no ip route-cache
 duplex auto
!
ip default-gateway 10.100.80.254  网关为hrsp虚拟的80.254

 

 

 

 

验证:

正常情况,switch9为mst1主根桥,mst2的备份根桥,switch10为mst2的主根桥,mst1的备份根桥,如下

sw9#show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Vl40        40   120 P Active  local           10.100.40.253   10.100.40.254
Vl50        50   120 P Active  local           10.100.50.253   10.100.50.254
Vl60        60   120 P Active  local           10.100.60.253   10.100.60.254
Vl70        70   110 P Standby 10.100.70.253   local           10.100.70.254
Vl80        80   110 P Standby 10.100.80.253   local           10.100.80.254
Vl90        90   110 P Standby 10.100.90.253   local           10.100.90.254

sw10#show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Vl40        40   110 P Standby 10.100.40.252   local           10.100.40.254
Vl50        50   110 P Standby 10.100.50.252   local           10.100.50.254
Vl60        60   110 P Standby 10.100.60.252   local           10.100.60.254
Vl70        70   120 P Active  local           10.100.70.252   10.100.70.254
Vl80        80   120 P Active  local           10.100.80.252   10.100.80.254
Vl90        90   120 P Active  local           10.100.90.252   10.100.90.254

 

当switch9连接r8的接口g0/0  down掉时,理论上switch9监控g0/0,当g0/0口down时,mst1的优先级减少20为100(120-20),这就造成switch9上mst1的优先级小于swithc10上的mst1的优先级,会被swithc10抢去mst1的主根桥,看下是不是这个情况

sw9(config)#int g0/0
sw9(config-if)#shut
sw9(config-if)#
*Apr 20 06:56:46.078: %TRACK-6-STATE: 1 interface Gi0/0 line-protocol Up -> Down
sw9(config-if)#
*Apr 20 06:56:46.094: %OSPF-5-ADJCHG: Process 1, Nbr 10.10.80.1 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Apr 20 06:56:46.282: %HSRP-5-STATECHANGE: Vlan60 Grp 60 state Active -> Speak
sw9(config-if)#
*Apr 20 06:56:47.267: %HSRP-5-STATECHANGE: Vlan50 Grp 50 state Active -> Speak
*Apr 20 06:56:47.551: %HSRP-5-STATECHANGE: Vlan40 Grp 40 state Active -> Speak
*Apr 20 06:56:48.052: %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to administratively down
sw9(config-if)#
*Apr 20 06:56:49.052: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down
sw9(config-if)#do show
*Apr 20 06:56:56.721: %HSRP-5-STATECHANGE: Vlan60 Grp 60 state Speak -> Standby
sw9(config-if)#do show stand
% Ambiguous command:  "do show stand"
sw9(config-if)#do show stand
*Apr 20 06:56:57.904: %HSRP-5-STATECHANGE: Vlan50 Grp 50 state Speak -> Standby
*Apr 20 06:56:58.795: %HSRP-5-STATECHANGE: Vlan40 Grp 40 state Speak -> Standby
sw9(config-if)#do show stand brief
                     P indicates configured to preempt.
                     |
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Vl40        40   100 P Standby 10.100.40.253   local           10.100.40.254
Vl50        50   100 P Standby 10.100.50.253   local           10.100.50.254
Vl60        60   100 P Standby 10.100.60.253   local           10.100.60.254
Vl70        70   90  P Standby 10.100.70.253   local           10.100.70.254
Vl80        80   90  P Standby 10.100.80.253   local           10.100.80.254
Vl90        90   90  P Standby 10.100.90.253   local           10.100.90.254

 

sw10#show stand br
                     P indicates configured to preempt.
                     |
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Vl40        40   110 P Active  local           10.100.40.252   10.100.40.254
Vl50        50   110 P Active  local           10.100.50.252   10.100.50.254
Vl60        60   110 P Active  local           10.100.60.252   10.100.60.254
Vl70        70   120 P Active  local           10.100.70.252   10.100.70.254
Vl80        80   120 P Active  local           10.100.80.252   10.100.80.254
Vl90        90   120 P Active  local           10.100.90.252   10.100.90.254

果然如理论分析一样。

现在把switch9的 g0/0口up起来,理论上,优先级会加20加回到120,高于switch10关于 mst1的优先级,应该把主根桥抢回来了,看以下结果:

sw9(config-if)#no shut
*Apr 20 07:02:10.290: %TRACK-6-STATE: 1 interface Gi0/0 line-protocol Down -> Up
sw9(config-if)#
*Apr 20 07:02:10.399: %HSRP-5-STATECHANGE: Vlan40 Grp 40 state Standby -> Active
*Apr 20 07:02:10.921: %HSRP-5-STATECHANGE: Vlan60 Grp 60 state Standby -> Active
sw9(config-if)#
*Apr 20 07:02:11.312: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to up
*Apr 20 07:02:12.313: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
sw9(config-if)#
*Apr 20 07:02:12.392: %HSRP-5-STATECHANGE: Vlan50 Grp 50 state Standby -> Active
sw9(config-if)#show stand
*Apr 20 07:02:17.069: %OSPF-5-ADJCHG: Process 1, Nbr 10.10.80.1 on GigabitEthernet0/0 from LOADING to FULL, Loading Done

sw9(config-if)#do show stand br
                     P indicates configured to preempt.
                     |
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Vl40        40   120 P Active  local           10.100.40.253   10.100.40.254
Vl50        50   120 P Active  local           10.100.50.253   10.100.50.254
Vl60        60   120 P Active  local           10.100.60.253   10.100.60.254
Vl70        70   110 P Standby 10.100.70.253   local           10.100.70.254
Vl80        80   110 P Standby 10.100.80.253   local           10.100.80.254
Vl90        90   110 P Standby 10.100.90.253   local           10.100.90.254

sw10#show stand br
                     P indicates configured to preempt.
                     |
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Vl40        40   110 P Standby 10.100.40.252   local           10.100.40.254
Vl50        50   110 P Standby 10.100.50.252   local           10.100.50.254
Vl60        60   110 P Standby 10.100.60.252   local           10.100.60.254
Vl70        70   120 P Active  local           10.100.70.252   10.100.70.254
Vl80        80   120 P Active  local           10.100.80.252   10.100.80.254
Vl90        90   120 P Active  local           10.100.90.252   10.100.90.254

 

接入交换机switch12上g0/1口接入vlan40,看能不能动态获取ip


PC17> dhcp -r
DORA IP 10.100.40.2/24 GW 10.100.40.254  从dhcp服务器获取到了ip

PC17> ping 10.10.10.2    ping外网也能通

84 bytes from 10.10.10.2 icmp_seq=1 ttl=251 time=7.918 ms
84 bytes from 10.10.10.2 icmp_seq=2 ttl=251 time=7.397 ms
84 bytes from 10.10.10.2 icmp_seq=3 ttl=251 time=6.705 ms
84 bytes from 10.10.10.2 icmp_seq=4 ttl=251 time=7.392 ms
84 bytes from 10.10.10.2 icmp_seq=5 ttl=251 time=7.112 ms

PC17>

接入交换机switch12上g0/1口接入vlan90,看能不能动态获取ip

PC17> dhcp -r
DORA IP 10.100.90.3/24 GW 10.100.90.254

PC17> show ip

NAME        : PC17[1]
IP/MASK     : 10.100.90.3/24
GATEWAY     : 10.100.90.254
DNS         : 10.100.90.254
DHCP SERVER : 10.100.80.1
DHCP LEASE  : 3594, 3600/1800/3150
MAC         : 00:50:79:66:68:11
LPORT       : 20000
RHOST:PORT  : 127.0.0.1:30000
MTU         : 1500

PC17> ping 10.10.10.2

84 bytes from 10.10.10.2 icmp_seq=1 ttl=251 time=7.457 ms
84 bytes from 10.10.10.2 icmp_seq=2 ttl=251 time=6.876 ms
84 bytes from 10.10.10.2 icmp_seq=3 ttl=251 time=6.318 ms
84 bytes from 10.10.10.2 icmp_seq=4 ttl=251 time=7.631 ms
84 bytes from 10.10.10.2 icmp_seq=5 ttl=251 time=7.150 ms


都是正常的。ping   vlan40网段的ip,看能正常能信不

PC17> ping 10.100.40.3

84 bytes from 10.100.40.3 icmp_seq=1 ttl=63 time=21.817 ms
84 bytes from 10.100.40.3 icmp_seq=2 ttl=63 time=12.875 ms
84 bytes from 10.100.40.3 icmp_seq=3 ttl=63 time=13.652 ms
84 bytes from 10.100.40.3 icmp_seq=4 ttl=63 time=11.687 ms
84 bytes from 10.100.40.3 icmp_seq=5 ttl=63 time=14.259 ms


也是没有问题的。

switch9上生成树的信息

sw9#SHOW SPanning-tree MST 1

##### MST1    vlans mapped:   40,50,60
Bridge        address 5000.0009.0000  priority      1     (0 sysid 1)
Root          this switch for MST1

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi1/0            Desg FWD 20000     128.5    P2p
Gi1/2            Desg FWD 20000     128.7    P2p
Gi1/3            Desg FWD 20000     128.8    P2p
Po8              Desg FWD 10000     128.65   P2p

sw9#SHOW SPanning-tree MST 2

##### MST2    vlans mapped:   70,80,90
Bridge        address 5000.0009.0000  priority      28674 (28672 sysid 2)
Root          address 5000.000a.0000  priority      2     (0 sysid 2)
              port    Po8             cost          10000     rem hops 19

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi1/0            Desg FWD 20000     128.5    P2p
Gi1/2            Desg FWD 20000     128.7    P2p
Gi1/3            Desg FWD 20000     128.8    P2p
Po8              Root FWD 10000     128.65   P2p

switch10上生成树的信息

sw10#show spanning-tree mst

##### MST0    vlans mapped:   1-39,41-49,51-59,61-69,71-79,81-89,91-4094
Bridge        address 5000.000a.0000  priority      32768 (32768 sysid 0)
Root          address 5000.0009.0000  priority      32768 (32768 sysid 0)
              port    Po8             path cost     0
Regional Root address 5000.0009.0000  priority      32768 (32768 sysid 0)
                                      internal cost 10000     rem hops 19
Operational   hello time 2 , forward delay 15, max age 20, txholdcount 6
Configured    hello time 2 , forward delay 15, max age 20, max hops    20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/3            Desg FWD 20000     128.4    P2p
Gi1/0            Desg FWD 20000     128.5    P2p
Gi1/1            Desg FWD 20000     128.6    P2p
Gi1/2            Desg FWD 20000     128.7    P2p
Gi1/3            Desg FWD 20000     128.8    P2p
Po8              Root FWD 10000     128.65   P2p

##### MST1    vlans mapped:   40,50,60
Bridge        address 5000.000a.0000  priority      28673 (28672 sysid 1)
Root          address 5000.0009.0000  priority      1     (0 sysid 1)
              port    Po8             cost          10000     rem hops 19

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/3            Desg FWD 20000     128.4    P2p
Gi1/2            Desg FWD 20000     128.7    P2p
Gi1/3            Desg FWD 20000     128.8    P2p
Po8              Root FWD 10000     128.65   P2p
##### MST2    vlans mapped:   70,80,90
Bridge        address 5000.000a.0000  priority      2     (0 sysid 2)
Root          this switch for MST2

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/3            Desg FWD 20000     128.4    P2p
Gi1/2            Desg FWD 20000     128.7    P2p
Gi1/3            Desg FWD 20000     128.8    P2p
Po8              Desg FWD 10000     128.65   P2p

 

MST0是起生成树mst时默认就会生成的,默认情况下,所有vlan都属于mst0,mst0不能被删除。当有其它生成树协议pvst,pvst+时,与其它生成树的交互也是通过mst0。

此条目发表在cisco分类目录,贴了, , , , , 标签。将固定链接加入收藏夹。