交换机_vrrp+mstp配置实例交换机 vrrp+mstp配置实例
一、 组网需求
1、switch a 、switch b选用两台锐捷的s5750 ;switch c 、shwich d 选用锐捷的 s3750和s3760 2、全网共有两个业务vlan ,为 vlan 10 、vlan 20
3、switch a 、switch b 都分别对两vlan起用两vrrp组,实现两组的业务的负载分担和备份。 4、switch a、switch b、switch c、switch d 都起用 mstp多生成数协议,并且所有设备都属于同一个mst域,且实例映射一致(vlan 10映射实例1、vlan 20映射实例2 其他vlan映射默认实例0)。
5、Vlan 10业务以switch a为根桥; vlan 20业务以switch b为根桥;实现阻断网络环路,并能实现不同vlan数据流负载分担功能。
二、 组网图
三、 配置步骤
Switch a配置: s1#show run
Building configuration...
Current configuration : 1651 bytes !
version RGNOS 10.2.00(2), Release(29287)(Tue Dec 25 20:39:14 CST 2007 -ngcf49) hostname s1
co-operate enable !
vlan 1 !
vlan 10 !
vlan 20 ! !
no service password-encryption !
spanning-tree 开启生成树(默认为mstp)
spanning-tree mst configuration 进入mst配置模式 revision 1 指定MST revision number 为1 name region1 指定mst配置名称
instance 0 vlan 1-9, 11-19, 21-4094 缺省情况下vlan都属于实例0 instance 1 vlan 10 手工指定vlan10属于实例1 instance 2 vlan 20 手工指定vlan20属于实例2
spanning-tree mst 1 priority 0 指定实例1的优先级为0(为根桥) spanning-tree mst 2 priority 4096 指定实例2的优先级为4096 interface GigabitEthernet 0/1
switchport access vlan 10 配置g0/1属于vlan10 !
interface GigabitEthernet 0/2
switchport access vlan 20 配置g0/2属于vlan 20 !
interface GigabitEthernet 0/3 !
interface GigabitEthernet 0/24 设置g0/24为trunk接口且允许vlan10/20通过 switchport mode trunk !
interface VLAN 10 创建vlan 10 svi接口 ip address 192.168.10.1 255.255.255.0 配置ip地址
vrrp 1 priority 120 配置vrrp组1 优先级为120
vrrp 1 ip 192.168.10.254 配置vrrp组 1虚拟ip地址为 192.168.10.254 !
interface VLAN 20 创建vlan 20 svi接口 ip address 192.168.20.1 255.255.255.0 配置ip地址
vrrp 2 ip 192.168.20.254 配置vrrp组 2虚拟ip地址为 192.168.20.254
默认vrrp组的优先级为100默认不显示 !
line con 0 line vty 0 4 login
s1#show vlan
VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------
1 VLAN0001 STATIC Gi0/3, Gi0/4, Gi0/5, Gi0/6 Gi0/7, Gi0/8, Gi0/9, Gi0/10 Gi0/11, Gi0/12, Gi0/13, Gi0/14 Gi0/15, Gi0/16, Gi0/17, Gi0/18 Gi0/19, Gi0/20, Gi0/21, Gi0/22 Gi0/23, Gi0/24 10 VLAN0010 STATIC Gi0/1, Gi0/24 20 VLAN0020 STATIC Gi0/2, Gi0/24
Switch b配置: s2#show run
Building configuration...
Current configuration : 1607 bytes
version RGNOS 10.2.00(2), Release(27932)(Thu Dec 13 10:32:09 CST 2007 -ngcf31) hostname s2 vlan 1 !
vlan 10 !
vlan 20 !
no service password-encryption !
spanning-tree
spanning-tree mst configuration revision 1 name region1
instance 0 vlan 1-9, 11-19, 21-4094 instance 1 vlan 10 instance 2 vlan 20
spanning-tree mst 1 priority 4096 spanning-tree mst 2 priority 0 interface GigabitEthernet 0/1 switchport access vlan 10 !
interface GigabitEthernet 0/2 switchport access vlan 20 !
interface GigabitEthernet 0/24 switchport mode trunk !
interface VLAN 10