闫辉 发表于 2020-11-16 17:23:35

思科实验:STP生成树实验

https://upload-images.jianshu.io/upload_images/24325874-d5d72dc6bb15bb01.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


实验准备:将SW1、2、 3的链路接口做中继接口SW1:启用VTP,修改域名为CCIE,vtp版本2,模式为server,开启VTP pruning来做一个优化现在做好之后SW2 SW3已经同步了,模式都为server,把SW3改为client客户端模式,SW1:创建2个vlan,vlan 10的流量通过左边走,vlan 20通过右边走,实现负载均衡SW2: VTPServer模式SW3: ClientServer模式SW1的接口配置
https://upload-images.jianshu.io/upload_images/24325874-14c83cb7dfae629e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


SW2的接口配置
https://upload-images.jianshu.io/upload_images/24325874-366dc4c7642034ec.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


SW3的接口配置
https://upload-images.jianshu.io/upload_images/24325874-e18c2100d88a4ef6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


SW1验证trunk信息
https://upload-images.jianshu.io/upload_images/24325874-86e94b6a86a62cb5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


SW1创建VTPsw1(config)#vtp domain CCIE域名CCIEsw1(config)#vtp version 2版本2
https://upload-images.jianshu.io/upload_images/24325874-e40d52cc74414332.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


sw1(config)#vtp mode server                            VTP模式改为server模式sw1(config)#vtp pruning开启vtp修剪
https://upload-images.jianshu.io/upload_images/24325874-1ecaac9f4e6c1dab.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


SW2创建VTP,因为需求上sw2也是server模式。
https://upload-images.jianshu.io/upload_images/24325874-86f0d99da2332233.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


SW3创建VTP
https://upload-images.jianshu.io/upload_images/24325874-aa97fe1e56a9a1f1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


SW3的VTP模式为客户端模式
https://upload-images.jianshu.io/upload_images/24325874-7834af387574fffc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


VTP配置完成,在SW1创建两个VLAN,vlan100 vlan200
https://upload-images.jianshu.io/upload_images/24325874-a78bb9f8f2943515.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


SW3验证:VLAN已经同步。
https://upload-images.jianshu.io/upload_images/24325874-23206a4be56bd4b7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


现在在SW1上面查看一下STP生成树中有哪些进程(思科交换机默认开启stp)SW1#show spanning-tree
https://upload-images.jianshu.io/upload_images/24325874-8aaef014a46b1ee8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240


上图信息:一共是3个进程vlan 1vlan 10vlan 20                  (没有截图下面的,太长了哈哈)Spanning tree enabled protocol IEEE                  表示使用的哪个版本STP协议 为STP 802.1D                     802.1D显示IEEE,802.1w显示 RSTP,802.1S显示MSTP(图上显示的是IEEE)Root IDPriority    32769Address   aabb.cc00.1000                             Address背板MAC地址,   This bridge is the root                        根桥Hello Time   2 secMax Age 20 secForward Delay 15 sec根桥的一系列参数,Priority BID优先级为32769,默认是32768+扩展系统ID 1.This bridge is the root说我这台switch就是关于这个实例的根桥,既然我是根桥,那么Bridge ID是一样的。如果不是根桥 上面就是根桥的 BID信息 下面就是我自身BId信息,Interface :              包含接口的所有信息role:             端口信息为desg指的是指定端口STS工作状态:       是FWDCost:100:100代表该接口为10M      (万兆 是2千兆是4   百兆是 19十兆 是 100)Proi.nbr: 为port ID, 前面为优先级值   后面为接口编号Type:        接口所连接的链路的类型,P2P为全双工,shr 为半双工。802.1d中没有这个概念,在802.1W出现的,用于描述交换机的双工模式默认情况下交换机的默认参数一致。根桥选举:在所有参数一样的情况下,比的是背板MAC地址。SW1的背板MAC地址比别人小,在默认所有进程中肯定是根桥,正常情况下组网,应该让高配性能较好的交换机来做根桥。
页: [1]
查看完整版本: 思科实验:STP生成树实验