VRRP配置实例
mstp加vrrp的实验例子
mstp加vrrp的实验例子(原创实用版)目录1.MSTP 和 VRRP 的概述2.MSTP 加 VRRP 的实验环境搭建3.实验步骤和过程4.实验结果及分析5.实验结论和展望正文一、MSTP 和 VRRP 的概述1.MSTP(Multiple Spanning Tree Protocol):多实例生成树协议,用于在多个 VLAN(虚拟局域网)之间实现生成树保护。
2.VRRP(Virtual Router Redundancy Protocol):虚拟路由器冗余协议,用于提高网络设备的可靠性和冗余性。
二、MSTP 加 VRRP 的实验环境搭建1.设备:两台路由器(Router1 和 Router2),一台交换机(Switch)2.接口:Router1 的接口 G0/0/1 和 G0/0/2 分别连接到 Switch 的接口 1 和 2;Router2 的接口 G0/0/1 和 G0/0/2 分别连接到Switch 的接口 3 和 4。
3.配置:为每个接口分配不同的 VLAN,如 G0/0/1 为 VLAN10,G0/0/2 为 VLAN20。
三、实验步骤和过程1.在 Router1 上配置 MSTP 和 VRRP:a.配置 MSTP:在 Router1 上启用 MSTP,将 G0/0/1 和 G0/0/2 分别配置为 MSTP 的实例 1 和实例 2。
b.配置 VRRP:在 Router1 上启用 VRRP,将 G0/0/1 和 G0/0/2 分别配置为 VRRP 的虚拟路由器 1 和虚拟路由器 2。
2.在 Router2 上配置 MSTP 和 VRRP:a.配置 MSTP:在 Router2 上启用 MSTP,将 G0/0/1 和 G0/0/2 分别配置为 MSTP 的实例 1 和实例 2。
b.配置 VRRP:在 Router2 上启用 VRRP,将 G0/0/1 和 G0/0/2 分别配置为 VRRP 的虚拟路由器 1 和虚拟路由器 2。
VRRP配置实例
VRRP配置及多备份VRRP配置实例中兴通讯数据用服部钱月玫1 VRRP概念介绍VRRP全称是虚拟路由器冗余协议(Virtual Router Redundancy Protocol)。
为了理解VRRP,首先需要确定下列术语:●VRRP路由器:运行VRRP协议的路由器。
该路由器可以是一个或多个虚拟路由器。
●虚拟路由器:一个由VRRP协议管理的抽象对象,作为一个共享LAN内主机的缺省路由器。
它由一个虚拟路由器标识符(VRID)和同一LAN中一组关联IP地址组成。
一个VRRP路由器可以备份一个或多个虚拟路由器。
●IP地址所有者:将局域网的接口地址作为虚拟路由器的IP地址的路由器。
当运行时,该路由器将响应寻址到该IP地址的数据包。
●主虚拟路由器:该VRRP路由器将承担下列任务:转发那些寻址到与虚拟路由器关联的IP地址的数据包,应答对该IP地址的ARP请求。
注意,如果存在IP地址所有者,那么该所有者总是主虚拟路由器。
●备份虚拟路由器:一组可用的VRRP路由器,当主虚拟路由器失效后将承担主虚拟路由器的转发功能。
2 VRRP的工作机制VRRP把在同一个广播域中的多个路由器接口编为一组,形成一个虚拟路由器,并为其分配一个IP地址,作为虚拟路由器的接口地址。
虚拟路由器的接口地址既可以是其中一个路由器接口的地址,也可以是第三方地址。
如果使用路由器的接口地址作为VRRP虚拟地址,则拥有这个IP地址的路由器作为主用路由器,其他路由器作为备份。
如果采用第三方地址,则优先级高的路由器成为主用路由器;如果两路由器优先级相同,则谁先发VRRP 报文,谁就成为主用。
如图1所示,在这个广播域中的主机中,把虚拟路由器的IP地址设为网关。
当主用路由器发生故障时,将在备用路由器中选择优先级最高的路由器接替它的工作,这对于域中的主机来说没有任何影响。
只有当这个VRRP组中所有的路由器都不能正常工作时,该域中的主机才不能与外界通信。
但是,又有这样一个问题出现,如果VRRP组中主用路由器的上行链路断开,它的状态是不会改变的,还是Master,此时该域中的主机路由还是走此路由器,但因为其上行链路断开,导致该域的主机无法正常与外界通信。
10-可靠性配置举例-H3C_S12500_VRRP典型配置举例
H3C S12500 VRRP典型配置举例Copyright © 2014 杭州华三通信技术有限公司版权所有,保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。
本文档中的信息可能变动,恕不另行通知。
目录1 简介 (1)2 配置前提 (1)3 VRRP单备份组配置举例 (1)3.1 组网需求 (1)3.2 配置思路 (2)3.3 使用版本 (2)3.4 配置注意事项 (2)3.5 配置步骤 (2)3.6 验证配置 (4)3.7 配置文件 (5)4 VRRP多备份组配置举例 (6)4.1 组网需求 (6)4.2 配置思路 (7)4.3 使用版本 (7)4.4 配置注意事项 (8)4.5 配置步骤 (8)4.6 验证配置 (11)4.7 配置文件 (14)5 VRRP负载均衡模式配置举例 (16)5.1 组网需求 (16)5.2 配置思路 (17)5.3 使用版本 (17)5.4 配置注意事项 (17)5.5 配置步骤 (18)5.5.1 Device A的配置 (18)5.5.2 Device B的配置 (19)5.5.3 Device C的配置 (20)5.5.4 验证配置 (21)5.5.5 配置文件 (27)6 相关资料 (28)1 简介本文档介绍VRRP的配置举例。
2 配置前提本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。
如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解VRRP、STP和IPsec特性。
3 VRRP单备份组配置举例3.1 组网需求如图1所示,Host A所在网络的出口处部署了两台网关设备。
现要求使用VRRP主备备份功能,将这两台设备组成一台虚拟路由器,作为Host A的缺省网关。
双核心(MSTP+VRRP)的拓扑实现和配置实例
双核心(MSTP+VRRP)的拓扑实现和配置实例1 配置VRRP在实验拓扑图中,由于有多条链路产生环路,所以我们在实验初始时一定要将某些端口堵塞(初始化时已将RG-S35B的f0/1-4四个端口堵塞,在配置完毕进行测试时才可以打开).否则产生环路后,会发现设备的cpu利用率会达到100%(使用命令show cpu查看)。
RG-S35A(config)#interface vlan 10RG-S35A(config-if)#ip address 192.168.10.254 255.255.255.0 !配置VLAN10的IP 地址RG-S35A(config-if)#standby 1 ip 192.168.10.250 !配置虚拟IPRG-S35A(config-if)#standby 1 preempt!设为抢占模式RG-S35A(config-if)#standby 1 priority 254 !VLAN10的standby优先级设为254RG-S35A(config-if)#exitRG-S35A(config)#interface vlan 20 !VLAN20的standby不设优先级,默认为100RG-S35A(config-if)#ip address 192.168.20.253 255.255.255.0 !配置VLAN20的IP 地址RG-S35A(config-if)#standby 2 ip 192.168.20.250 !配置虚拟IPRG-S35A(config-if)#standby 2 preempt !设为抢占模式RG-S35A(config-if)#exitRG-S35A(config)#interface vlan 30RG-S35A(config-if)#ip address 192.168.30.254 255.255.255.0 !配置VLAN30的IP 地址RG-S35A(config-if)#standby 3 ip 192.168.30.250 !配置虚拟IPRG-S35A(config-if)#standby 3 preempt !设为抢占模式RG-S35A(config-if)#standby 3 priority 254 !VLAN30的standby优先级设为254RG-S35A(config-if)#exitRG-S35A(config)#interface vlan 40 !VLAN20的standby不设优先级,默认为100RG-S35A(config-if)#ip address 192.168.40.253 255.255.255.0 !配置VLAN40的IP 地址RG-S35A(config-if)#standby 4 ip 192.168.40.250 !配置虚拟IPRG-S35A(config-if)#stand 4 preempt !设为抢占模式RG-S35A(config-if)#exitRG-S35A(config)#exitRG-S35B把vlan20 40 设置为standby 2、4 priority 2542 配置RG-S35A与RG-S35B的端口聚合理论上,35A和35B的f0/3和f0/4端口不需要设置为trunk口,但是我们习惯上都设为trunk(已在前面做好了配置)。
企业内网规划【DHCP+VRRP+MSTP+端口镜像+TELNET+SNMP】真实案例
企业内网规划【DHCP+VRRP+MSTP+端口镜像+TELNET+SNMP】真实案例内网中所有交换机都是采用双线连接,这样保证任何一条线路中断后,相关交换机下挂业务20秒就可恢复,业务不中断或者中断时间很短暂,这对企业来说是非常重要的。
路由器配置如下:修改路由器名称XXXISP地址ip address 1.56.76.19 255.255.255.0description WAN连接HeXin_01交换机ip address 192.168.1.1 255.255.255.0description LAN_HeXin_01毗连HeXin_02交流机ip address 192.168.2.1 255.255.255.0description LAN_HeXin_02建立静态路由ip route-static 172.16.0.0 255.255.248.0 192.168.1.2ip route-static 172.16.0.0 255.255.248.0 192.168.2.2核心交换机01配置如下:点窜中心交流机称号XXX_01建立VLANvlan batch 2 to 7 100 120创建MSTPstp instance 0 root primarystp instance 1 root secondary实例1映照VLANstp region-configurationinstance 1 vlan 5 to 7active region-configuration毗连路由器VLANvlan 100description LAN To WAN启用DHCPdhcp enable创建网关interface Vlanif 2ip address 172.16.0.1 24 quitinterface Vlanif 3ip address 172.16.1.1 24 quitinterface Vlanif 4ip address 172.16.2.1 24 quitinterface Vlanif 5ip address 172.16.3.1 24 quitinterface Vlanif 6ip address 172.16.4.1 24 quitinterface Vlanif 7ip address 172.16.5.1 24 创建DHCP服务器interface vlan 3dhcp select interfacedhcp server excluded-ip-address 172.16.8.2 172.16.8.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1 quitinterface vlan 4dhcp select interfacedhcp server excluded-ip-address 172.16.16.2 172.16.16.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1quitinterface vlan 5dhcp select interfacedhcp server excluded-ip-address 172.16.24.2 172.16.24.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1quitinterface vlan 6dhcp select interfacedhcp server excluded-ip-address 172.16.24.2 172.16.24.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1quitinterface vlan 7dhcp select interfacedhcp server excluded-ip-address 172.16.24.2 172.16.24.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1quit创建VRRP组interface Vlanif2vrrp vrid 2 virtual-ip 172.16.0.254vrrp vrid 2 priority 180interface Vlanif3vrrp vrid 3 virtual-ip 172.16.1.100vrrp vrid 3 priority 180interface Vlanif4vrrp vrid 4 virtual-ip 172.16.2.100interface Vlanif5vrrp vrid 5 virtual-ip 172.16.3.100interface Vlanif6vrrp vrid 6 virtual-ip 172.16.4.100vrrp vrid 6 priority 180interface Vlanif7vrrp vrid 7 virtual-ip 172.16.5.100给外网VLAN100配置IP interface Vlanif100ip address 192.168.1.2 255.255.255.0 创建端口汇聚interface Eth-Trunk0port link-type trunkport trunk allow-pass vlan 2 to 4094 port link-type accessport default vlan 100port-mirroring to observe-port 1 both 建立观察口port link-type trunkport trunk allow-pass vlan 2 to 4094 毗连财政部交流机port link-type trunkport trunk allow-pass vlan 2 to 4094 毗连人事部交流机port link-type trunkport trunk allow-pass vlan 2 to 4094心跳线Aeth-trunk 0心跳线Beth-trunk 0创建静态路由ip route-static 0.0.0.0 0.0.0.0 192.168.1.1ip route-static 0.0.0.0 0.0.0.0 192.168.2.1给管理VLAN配置IPip address 192.168.120.1 255.255.255.0中心交流机02配置以下:修改核心交换机名称XXX_02创建VLANvlan batch 2 to 7 101 120创建MSTPstp instance 0 root primarystp instance 1 root secondary毗连路由器VLANvlan 101description LAN To WAN 启用DHCPdhcp enable创建网关interface Vlanif 2ip address 172.16.0.1 24 quitinterface Vlanif 3ip address 172.16.1.1 24 quitinterface Vlanif 4ip address 172.16.2.1 24 quitinterface Vlanif 5ip address 172.16.3.1 24 quitinterface Vlanif 6ip address 172.16.4.1 24 quitinterface Vlanif 7ip address 172.16.5.1 24quit建立DHCP效劳器interface vlan 3dhcp select interfacedhcp server excluded-ip-address 172.16.1.2 172.16.1.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1 quitinterface vlan 4dhcp select interfacedhcp server excluded-ip-address 172.16.2.2 172.16.2.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1 quitinterface vlan 5dhcp select interfacedhcp server excluded-ip-address 172.16.3.2 172.16.3.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1 quitinterface vlan 6dhcp select interfacedhcp server excluded-ip-address 172.16.4.2 172.16.4.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1 quitinterface vlan 7dhcp select interfacedhcp server excluded-ip-address 172.16.5.2 172.16.5.101dhcp server dns-list 218.30.19.40 61.134.1.4dhcp server lease day 1 quit建立VRRP组interface Vlanif2vrrp vrid 2 virtual-ip 172.16.0.254interface Vlanif3vrrp vrid 3 virtual-ip 172.16.1.101interface Vlanif4vrrp vrid 4 virtual-ip 172.16.2.101vrrp vrid 4 priority 180interface Vlanif5vrrp vrid 5 virtual-ip 172.16.3.101vrrp vrid 5 priority 180interface Vlanif6vrrp vrid 6 virtual-ip 172.16.4.101 interface Vlanif7vrrp vrid 7 virtual-ip 172.16.5.101 vrrp vrid 7 priority 180给外网VLAN101配置IP interface Vlanif101ip address 192.168.2.2 255.255.255.0 description LAN To WAN创建端口汇聚interface Eth-Trunk0port link-type trunkport trunk allow-pass vlan 2 to 4094 quitport link-type accessport default vlan 101port-mirroring to observe-port 1 both 建立观察口port link-type trunkport trunk allow-pass vlan 2 to 4094 quit毗连产物开辟部交流机port link-type trunkport trunk allow-pass vlan 2 to 4094连接财务部交换机port link-type trunkport trunk allow-pass vlan 2 to 4094心跳线Aeth-trunk 0心跳线Beth-trunk 0建立静态路由ip route-static 0.0.0.0 0.0.0.0 192.168.2.1ip route-static 0.0.0.0 0.0.0.0 192.168.1.1给办理VLAN配置IPip address 192.168.120.2 255.255.255.0启用Telnet效劳、变动近程登录端口并配置用户名及登录暗码:XXX server enableXXX server port 5500先执行上面2条命令,选择Yuser-interface maximum-vty 15user-interface vty 0 14shellidle-timeout 20screen-length 30history-XXX max-size 20XXX-mode aaauser privilege level 15quitaaalocal-user admin password cipher local-user admin service-typeXXX 3quit启用SNMP效劳并配置只读整体字符串:trap2000:snmp-agent community read trap2000snmp-agent sys-info version allXXX产品开发部交换机配置如下:修改交换机名称XXX创建VLANvlan batch 2 4划分VLANport link-type accessport default vlan 2port link-type accessport default vlan 4port link-type trunkport trunk allow-pass vlan 2 to 4094 port link-type trunkport trunk allow-pass vlan 2 to 4094 账务部交换机配置如下:点窜交流机称号XXX建立VLANvlan batch 6 to 7划分VLANport link-type accessport default vlan 6port link-type accessport default vlan 7port link-type trunkport trunk allow-pass vlan 2 to 4094 port link-type trunkport trunk allow-pass vlan 2 to 4094 人事部交流机配置以下:修改交换机名称XXX创建VLANvlan batch 3 5分别VLANport link-type accessport default vlan 3port link-type accessport default vlan 5port link-type trunkport trunk allow-pass vlan 2 to 4094 port link-type trunk。
华为VRRP原理和配置课件
VRRP常见问题二:抢占模是指两台或多台路由器同时尝试成为主路由 器,导致网络不稳定。
02 03
详细描述
在VRRP中,抢占模式用于确定当主路由器出现故障时, 哪台路由器将接管成为新的主路由器。如果两台或多台路 由器同时尝试成为主路由器,就会产生抢占模式冲突,导 致网络不稳定。
[Huawei-vrrp-vrid-virtual-router-id] interface GigabitEthernet 0/0/1
[Huawei-vrrp-vrid-virtual-router-idGigabitEthernet0/0/1] vrrp vrid virtual-router-id authentication mode password authenticationpassword
VRRP的特点和优势
高可用性
通过配置多个路由器为 备用,确保网络连接的 高可用性,避免单点故
障。
负载均衡
VRRP可以实现多个路由 器的负载均衡,提高网
络性能。
配置简单
VRRP的配置相对简单, 只需在相关设备上配置
几个参数即可实现。
兼容性好
VRRP协议被广泛应用于 各种网络设备,具有良 好的兼容性和互操作性
VRRP的优先级和抢占模式
优先级
每个设备都有一个优先级值,用于确 定哪个设备成为主设备。优先级值越 高,成为主设备的可能性越大。
抢占模式
当一个设备的优先级高于当前主设备 的优先级时,该设备将抢占成为主设 备。抢占模式可以开启或关闭,以控 制设备的角色变化。
VRRP的虚拟IP地址配置
虚拟IP地址
在VRRP组中配置一个虚拟IP地址,用于代表该组。当主设备出现故障时,备 用设备将接管该虚拟IP地址。
H3C_VRRP配置举例
[S9500-A-Vlan-interface2] vrrp vrid 1 virtual-ip 2.1.1.3 [S9500-A-Vlan-interface2] interface vlan 3
2 适用版本
软件版本:S9500-CMW310-R1628版本及以后升级版本(R2126及以上版本不支 持) 硬件版本:S9500交换机全系列硬件版本
3 注意事项
z 同一 VRRP 备份组多个备份的路由器之间,VRRP 组握手时间必须一致,否 则 VRRP 组状态会异常;
z 同一 VRRP 备份组之间 VRRP 的工作方式必须相同,都为抢占模式,或者都 为非抢占模式;
第1页, 共12页
VRRP配置举例
图1-2 虚拟路由器示意图
虚拟的交换机拥有自己的IP地址10.100.10.1(这个IP地址可以和备份组内的某个 交换机的接口地址相同),备份组内的交换机也有自己的IP地址(如Master的IP地 址为10.100.10.2,Backup的IP地址为10.100.10.3)。局域网内的主机仅仅知道这 个虚拟路由器的IP地址10.100.10.1(通常被称为备份组的虚拟IP地址),而不知 道 具 体 的 Master 交 换 机 的 IP 地 址 10.100.10.2 以 及 Backup 交 换 机 的 IP 地 址 10.100.10.3。局域网内的主机将自己的缺省路由下一跳设置为该虚拟路由器的IP 地址10.100.10.1。于是,网络内的主机就通过这个虚拟的交换机与其它网络进行 通信。当备份组内的Master交换机不能正常工作时,备份组内的其它Backup交换 机将接替不能正常工作的Master交换机成为新的Master交换机,继续向网络内的主 机提供路由服务,从而实现网络内的主机不间断地与外部网络进行通信。
华为交换机VRRP配置实例收集(转)
华为交换机VRRP配置实例收集(转)⽰例图:其实说⽩了就是做线路冗余,达到热备切换。
组⽹需求:楼层1和楼层2分别通过两条线路做冗余接⼊交换机(本⽰例只考虑vrrp,暂不考虑其他⽅⾯)。
当其中⼀段链路故障时,能通过另外⼀条链路传输。
配置信息:<lsw9>dis cu#sysname lsw9#vlan batch 10 20#stp mode stp#interface Ethernet0/0/2port link-type accessport default vlan 10#interface Ethernet0/0/3port link-type accessport default vlan 20#interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20#interface GigabitEthernet0/0/2 port link-type trunkport trunk allow-pass vlan 10 20 stp instance 0 cost 200000000 #return<lsw9>--------------------------<lsw11>dis cu#sysname lsw11#vlan batch 30#stp mode stp#interface Ethernet0/0/2port link-type accessport default vlan 30#interface Ethernet0/0/3port link-type accessport default vlan 30#interface GigabitEthernet0/0/1 port link-type trunkport trunk allow-pass vlan 30 stp instance 0 cost 200000000 #interface GigabitEthernet0/0/2 port link-type trunkport trunk allow-pass vlan 30 #return<lsw11>-------------------------<lsw7>dis cu#sysname lsw7#vlan batch 10 20 30 100#stp mode stp#interface Vlanif1#interface Vlanif10description to 1 Lip address 10.155.10.254 255.255.255.0vrrp vrid 1 virtual-ip 10.155.10.252vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode timer delay 20#interface Vlanif20ip address 10.155.20.254 255.255.255.0vrrp vrid 1 virtual-ip 10.155.20.252vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode timer delay 20#interface Vlanif30description to 5 Lip address 10.156.40.254 255.255.255.0ip address 10.156.30.254 255.255.255.0 sub vrrp vrid 1 virtual-ip 10.156.30.252vrrp vrid 2 virtual-ip 10.156.40.252vrrp vrid 2 priority 120vrrp vrid 2 preempt-mode timer delay 20#interface Vlanif100ip address 10.10.10.1 255.255.255.0#interface MEth0/0/1#interface GigabitEthernet0/0/1port link-type accessport default vlan 100#interface GigabitEthernet0/0/11port link-type trunkport trunk pvid vlan 100port trunk allow-pass vlan 2 to 4094#interface GigabitEthernet0/0/21port link-type trunkport trunk allow-pass vlan 30#ospf 1area 0.0.0.0network 10.10.10.0 0.0.0.255network 10.155.0.0 0.0.255.255network 10.156.0.0 0.0.255.255#return--------------------------------------<lsw8>dis cu#sysname lsw8#vlan batch 10 20 30 200#stp mode stp#interface Vlanif1#interface Vlanif10description to 1 Lip address 10.155.10.253 255.255.255.0vrrp vrid 1 virtual-ip 10.155.10.252#interface Vlanif20description to 1 Lip address 10.155.20.253 255.255.255.0vrrp vrid 1 virtual-ip 10.155.20.252#interface Vlanif30description to 5 Lip address 10.156.30.253 255.255.255.0ip address 10.156.40.253 255.255.255.0 sub vrrp vrid 1 virtual-ip 10.156.30.252vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode timer delay 20vrrp vrid 2 virtual-ip 10.156.40.252#interface Vlanif200ip address 10.10.20.1 255.255.255.0#interface MEth0/0/1#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 20#interface GigabitEthernet0/0/12port hybrid pvid vlan 200port hybrid tagged vlan 1 to 4094#interface GigabitEthernet0/0/22port link-type trunkport trunk allow-pass vlan 30#ospf 1area 0.0.0.0network 10.155.0.0 0.0.255.255network 10.156.0.0 0.0.255.255network 10.10.20.0 0.0.0.255#return<lsw8>-----------------<R4>dis cu#sysname R4#stp instance 0 root primarystp enable#interface GigabitEthernet0/0/1ip address 10.10.10.254 255.255.255.0 stp enable#interface GigabitEthernet0/0/2ip address 10.10.20.254 255.255.255.0 stp enable#interface GigabitEthernet0/0/3ip address 61.128.128.6 255.255.255.0 #return<R4>参考:(以上内容转⾃此篇⽂章)。
思科交换机+vrrp+mstp配置实例
交换机vrrp加mstp配置实例一、组网需求1、switch a 、switch b选用两台锐捷的s5750 ;switch c 、shwich d 选用锐捷的s3750和s37602、全网共有两个业务vlan ,为vlan 10 、vlan 203、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 runBuilding configuration...Current configuration : 1651 bytes!version RGNOS 10.2.00(2), Release(29287)(Tue Dec 25 20:39:14 CST 2007 -ngcf49) hostname s1co-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 为1name region1 指定mst配置名称instance 0 vlan 1-9, 11-19, 21-4094 缺省情况下vlan都属于实例0instance 1 vlan 10 手工指定vlan10属于实例1instance 2 vlan 20 手工指定vlan20属于实例2spanning-tree mst 1 priority 0 指定实例1的优先级为0(为根桥)spanning-tree mst 2 priority 4096 指定实例2的优先级为4096interface GigabitEthernet 0/1switchport access vlan 10 配置g0/1属于vlan10!interface GigabitEthernet 0/2switchport 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 优先级为120vrrp 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 0line vty 0 4logins1#show vlanVLAN Name Status Ports---- -------------------------------- --------- ----------------------------------1 VLAN0001 STATIC Gi0/3, Gi0/4, Gi0/5, Gi0/6Gi0/7, Gi0/8, Gi0/9, Gi0/10Gi0/11, Gi0/12, Gi0/13, Gi0/14Gi0/15, Gi0/16, Gi0/17, Gi0/18Gi0/19, Gi0/20, Gi0/21, Gi0/22Gi0/23, Gi0/2410 VLAN0010 STATIC Gi0/1, Gi0/2420 VLAN0020 STATIC Gi0/2, Gi0/24Switch b配置:s2#show runBuilding 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-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 4096spanning-tree mst 2 priority 0interface GigabitEthernet 0/1switchport access vlan 10!interface GigabitEthernet 0/2switchport access vlan 20!..interface GigabitEthernet 0/24switchport mode trunk!interface VLAN 10ip address 192.168.10.2 255.255.255.0vrrp 1 ip 192.168.10.254!interface VLAN 20ip address 192.168.20.2 255.255.255.0vrrp 2 priority 120vrrp 2 ip 192.168.20.254!line con 0line vty 0 4login!!ends2#show vlanVLAN Name Status Ports---- -------------------------------- --------- -----------------------------------1 VLAN0001 STATIC Gi0/3, Gi0/4, Gi0/5, Gi0/6Gi0/7, Gi0/8, Gi0/9, Gi0/10Gi0/11, Gi0/12, Gi0/13, Gi0/14Gi0/15, Gi0/16, Gi0/17, Gi0/18Gi0/19, Gi0/20, Gi0/21, Gi0/22Gi0/23, Gi0/2410 VLAN0010 STATIC Gi0/1, Gi0/2420 VLAN0020 STATIC Gi0/2, Gi0/24Switch c配置:s3#show runBuilding configuration...Current configuration : 1540 bytes!version RGNOS 10.2.00(2), Release(28794)(Fri Dec 21 09:27:15 CST 2007 -ngcf32) hostname s3!vlan 1!vlan 10!!service password-encryption!spanning-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 0spanning-tree mst 2 priority 4096interface FastEthernet 0/1switchport access vlan 10!interface FastEthernet 0/2switchport access vlan 10!..interface GigabitEthernet 0/25!interface GigabitEthernet 0/26!interface GigabitEthernet 0/27!interface GigabitEthernet 0/28!interface VLAN 10ip address 192.168.10.3 255.255.255.0!ip route 0.0.0.0 0.0.0.0 192.168.10.254!!line con 0line vty 0 4loginSwitch d配置:s4#show runBuilding configuration...Current configuration : 1066 bytes!version RGNOS 10.2.00(2), Release(27932)(Thu Dec 13 10:31:41 CST 2007 -ngcf32) hostname s4!vlan 1!vlan 20!!no service password-encryption!spanning-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 4096spanning-tree mst 2 priority 0interface GigabitEthernet 0/1switchport access vlan 20!interface GigabitEthernet 0/2switchport access vlan 20!..interface GigabitEthernet 0/12!interface VLAN 20ip address 192.168.20.3 255.255.255.0!!!!ip route 0.0.0.0 0.0.0.0 192.168.20.254!!line con 0line vty 0 4login!四、查看vrrp、mstp信息Switch a 信息:s1#show vrrp 查看vrrp 信息VLAN 10 - Group 1State is MasterVirtual IP address is 192.168.10.254 configuredVirtual MAC address is 0000.5e00.0101Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 120Master Router is 192.168.10.1 (local), priority is 120Master Advertisement interval is 1 secMaster Down interval is 3 secVLAN 20 - Group 2State is BackupVirtual IP address is 192.168.20.254 configuredVirtual MAC address is 0000.5e00.0102Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 100Master Router is 192.168.20.2 , priority is 120Master Advertisement interval is 1 secMaster Down interval is 3 secs1#s1#s1#s1#show spanning-tree interface gigabitEthernet 0/1 查看g0/1接口stp状态信息PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 6 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8001 PortForwardTransitions : 5 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :1002.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 4 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPorts1#s1#s1#show spanning-tree interface gigabitEthernet 0/2 查看g0/2接口stp状态信息PortAdminPortFast : DisabledPortOperPortFast : DisabledPortAdminAutoEdge : EnabledPortOperAutoEdge : DisabledPortAdminLinkType : autoPortOperLinkType : point-to-pointPortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :8000.00d0.f836.ed70PortDesignatedPort : 8002PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70PortDesignatedPort : 8002PortForwardTransitions : 4PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : discardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :0002.00d0.f8d7.ae12PortDesignatedPort : 8002PortForwardTransitions : 3PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : alternatePorts1#s1#s1#show spanning-tree interface gigabitEthernet 0/24 g0/24接口stp状态信息PortAdminPortFast : DisabledPortOperPortFast : DisabledPortAdminAutoEdge : EnabledPortOperAutoEdge : DisabledPortAdminLinkType : autoPortOperLinkType : point-to-pointPortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :8000.001a.a909.8fe0PortDesignatedPort : 8018PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : rootPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70PortDesignatedPort : 8018PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 4PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : rootPorts1#Switch b 信息:s2#show vrrpVLAN 10 - Group 1State is BackupVirtual IP address is 192.168.10.254 configured Virtual MAC address is 0000.5e00.0101 Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 100Master Router is 192.168.10.1 , priority is 120 Master Advertisement interval is 1 secMaster Down interval is 3 secVLAN 20 - Group 2State is MasterVirtual IP address is 192.168.20.254 configured Virtual MAC address is 0000.5e00.0102 Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 120Master Router is 192.168.20.2 (local), priority is 120 Master Advertisement interval is 1 secMaster Down interval is 3 secs2#s2#s2#s2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/1PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPorts2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :1001.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPorts2#s2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/24 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 1PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : discardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70 PortDesignatedPort : 8018 PortForwardTransitions : 1PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : alternatePort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPorts2#Switch c 信息:s3#show spanning-tree interface fastEthernet 0/1 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : discardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : alternatePort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : discardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :1002.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 0 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : alternatePorts3#s3#s3#s3#s3#show spanning-tree interface fastEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPorts3#Switch d 信息:s4#show spanning-tree interface gigabitEthernet 0/1 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPort###### MST 1 vlans mapped :10PortState : discardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :1001.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : alternatePort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPorts4#s4#s4#s4#show spanning-tree interface gigabitEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : discardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.00d0.f836.ed70 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : alternatePort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f836.ed70 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.00d0.f8d7.ae12 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPorts4#FAQ:1.1 RSTP和MSTP配合为什么有问题1.1.1 原因分析由于RSTP/MSTP的指定端口快速迁移机制,即接收到下游的agreement报文才能进行快速迁移。
思科交换机vrrpmstp配置实例
思科交换机vrrpmstp配置实例一、组网需求1、witcha、witchb选用两台锐捷的5750;witchc、hwichd选用锐捷的3750和37602、全网共有两个业务vlan,为vlan10、vlan203、Switcha、witchb都分别对两vlan起用两vrrp组,实现两组的业务的负载分担和备份。
4、Switcha、witchb、witchc、witchd都起用mtp多生成数协议,并且所有设备都属于同一个mt域,且实例映射一致(vlan10映射实例1、vlan20映射实例2其他vlan映射默认实例0)。
5、Vlan10业务以witcha为根桥;vlan20业务以witchb为根桥;实现阻断网络环路,并能实现不同vlan数据流负载分担功能。
二、组网图三、配置步骤Switcha配置:1#howrunBuildingconfiguration...Currentconfiguration:1651byte!verionRGNOS10.2.00(2),Releae(29287)(TueDec2520:39:14CST2007-ngcf49)hotname1co-operateenable!!!vlan1!vlan10!vlan20!!noervicepaword-encryption!panning-tree开启生成树(默认为mtp)panning-treemtconfiguration进入mt配置模式reviion1指定MSTreviionnumber为1nameregion1指定mt配置名称intance0vlan1-9,11-19,21-4094缺省情况下vlan都属于实例0intance1vlan10手工指定vlan10属于实例1intance2vlan20手工指定vlan20属于实例2panning-treemt1priority0指定实例1的优先级为0(为根桥)panning-treemt2priority4096指定实例2的优先级为4096interfaceGigabitEthernet0/1witchportaccevlan10配置g0/1属于vlan10! interfaceGigabitEthernet0/2witchportaccevlan20配置g0/2属于vlan20!interfaceGigabitEthernet0/3!..interfaceGigabitEthernet0/24设置g0/24为trunk接口且允许vlan10/20通过witchportmodetrunk!interfaceVLAN10创建vlan10vi接口ipaddre192.168.10.1255.255.255.0配置ip地址vrrp1priority120配置vrrp组1优先级为120vrrp1ip192.168.10.254配置vrrp组1虚拟ip地址为192.168.10.254!interfaceVLAN20创建vlan20vi接口ipaddre192.168.20.1255.255.255.0配置ip地址vrrp2ip192.168.20.254配置vrrp组2虚拟ip地址为192.168.20.254默认vrrp组的优先级为100默认不显示!linecon0linevty04login1#howvlanVLANNameStatuPort-------------------------------------------------------------------------------1VLAN0001STATICGi0/3,Gi0/4,Gi0/5,Gi0/6Gi0/7,Gi0/8,Gi0/9,Gi0/10Gi0/11,Gi0/12,Gi0/13,Gi0/14Gi0/15,Gi0/16,Gi0/17,Gi0/18Gi0/19,Gi0/20,Gi0/21,Gi0/22Gi0/23,Gi0/2410VLAN0010STATICGi0/1,Gi0/2420VLAN0020STATICGi0/2,Gi0/24Switchb配置:2#howrunBuildingconfiguration...Currentconfiguration:1607byte!verionRGNOS10.2.00(2),Releae(27932)(ThuDec1310:32:09CST2007-ngcf31)hotname2!!!vlan1!vlan10!vlan20!!noervicepaword-encryption!panning-treepanning-treemtconfigurationreviion1nameregion1intance0vlan1-9,11-19,21-4094intance1vlan10intance2vlan20panning-treemt1priority4096panning-treemt2priority0interfaceGigabitEthernet0/1witchportaccevlan10!interfaceGigabitEthernet0/2witchportaccevlan20!..interfaceGigabitEthernet0/24witchportmodetrunk! interfaceVLAN10ipaddre192.168.10.2255.255.255.0vrrp1ip192.168.10.254!interfaceVLAN20ipaddre192.168.20.2255.255.255.0vrrp2priority120vrrp2ip192.168.20.254!linecon0linevty04login!!end2#howvlanVLANNameStatuPort--------------------------------------------------------------------------------1VLAN0001STATICGi0/3,Gi0/4,Gi0/5,Gi0/6Gi0/7,Gi0/8,Gi0/9,Gi0/10Gi0/11,Gi0/12,Gi0/13,Gi0/14Gi0/15,Gi0/16,Gi0/17,Gi0/18Gi0/19,Gi0/20,Gi0/21,Gi0/22Gi0/23,Gi0/2410VLAN0010STATICGi0/1,Gi0/2420VLAN0020STATICGi0/2,Gi0/24Switchc配置:3#howrunBuildingconfiguration...Currentconfiguration:1540byte!verionRGNOS10.2.00(2),Releae(28794)(FriDec2109:27:15CST2007-ngcf32)hotname3!vlan10!!ervicepaword-encryption!panning-treepanning-treemtconfigurationreviion1nameregion1intance0vlan1-9,11-19,21-4094intance1vlan10intance2vlan20 panning-treemt1priority0panning-treemt2priority4096interfaceFatEthernet0/1witchportaccevlan10!interfaceFatEthernet0/2witchportaccevlan10!..interfaceGigabitEthernet0/25!interfaceGigabitEthernet0/26!interfaceGigabitEthernet0/27!interfaceGigabitEthernet0/28!interfaceVLAN10ipaddre192.168.10.3255.255.255.0!iproute0.0.0.00.0.0.0192.168.10.254!!linecon0linevty04loginSwitchd配置:Buildingconfiguration...Currentconfiguration:1066byte!verionRGNOS10.2.00(2),Releae(27932)(ThuDec1310:31:41CST2007-ngcf32)hotname4!vlan1!vlan20!!noervicepaword-encryption!panning-treepanning-treemtconfigurationreviion1nameregion1intance0vlan1-9,11-19,21-4094intance1vlan10intance2vlan20panning-treemt1priority4096panning-treemt2priority0interfaceGigabitEthernet0/1witchportaccevlan20!interfaceGigabitEthernet0/2witchportaccevlan20!..interfaceGigabitEthernet0/12!interfaceVLAN20ipaddre192.168.20.3255.255.255.0!!!!iproute0.0.0.00.0.0.0192.168.20.254!!linecon0linevty04login!四、查看vrrp、mtp信息Switcha信息:1#howvrrp查看vrrp信息VLAN10-Group1StateiMaterVirtualIPaddrei192.168.10.254configuredVirtualMACaddrei0000. 5e00.0101Advertiementintervali1ecPreemptionienabledmindelayi0ecP riorityi120MaterRouteri192.168.10.1(local),priorityi120MaterAdvertiemen tintervali1ecMaterDownintervali3ecVLAN20-Group2StateiBackup VirtualIPaddrei192.168.20.254configuredVirtualMACaddrei0000. 5e00.0102Advertiementintervali1ecPreemptionienabledmindelayi0ecP riorityi100MaterRouteri192.168.20.2,priorityi120MaterAdvertiementinterv ali1ecMaterDownintervali3ec1#1#1#1#howpanning-treeinterfacegigabitEthernet0/1查看g0/1接口tp 状态信息PortAdminPortFat:DiabledPortOperPortFat:DiabledPortAdminAuto Edge:EnabledPortOperAutoEdge:DiabledPortAdminLinkType:auto PortOperLinkType:point-to-pointPortBPDUGuard:DiabledPortBPDUFilter:Diabled######MST0vlanmapped:1-9,11-19,21-4094PortState:forwardingPortPriority:128PortDeignatedRoot:8000.001a.a909.8fe0PortDeignatedCot:0PortDeignatedBridge:8000.00d0.f836.ed70PortDeignatedPort:800 1PortForwardTranition:6PortAdminPathCot:200000PortOperPathCot:20 0000PortRole:deignatedPort######MST1vlanmapped:10PortState:forwardingPortPriority:128 PortDeignatedRoot:0001.00d0.f823.ef82PortDeignatedCot:0PortDeignatedBridge:0001.00d0.f823.ef82PortDeignatedPort:800 1PortForwardTranition:5PortAdminPathCot:200000PortOperPathCot:20 0000PortRole:rootPort######MST2vlanmapped:20PortState:forwardingPortPriority:128 PortDeignatedRoot:0002.001a.a909.8fe0PortDeignatedCot:0PortDeignatedBridge:1002.00d0.f836.ed70PortDeignatedPort:800 1PortForwardTranition:4PortAdminPathCot:200000PortOperPathCot:20 0000PortRole:deignatedPort1#1#1#howpanning-treeinterfacegigabitEthernet0/2查看g0/2接口tp 状态信息PortAdminPortFat:DiabledPortOperPortFat:DiabledPortAdminAuto Edge:EnabledPortOperAutoEdge:DiabledPortAdminLinkType:auto PortOperLinkType:point-to-pointPortBPDUGuard:DiabledPortBPDUFilter:Diabled######MST0vlanmapped:1-9,11-19,21-4094PortState:forwardingPortPriority:128PortDeignatedRoot:8000.001a.a909.8fe0PortDeignatedCot:0PortDeignatedBridge:8000.00d0.f836.ed70PortDeignatedPort:800 2PortForwardTranition:5PortAdminPathCot:20000PortOperPathCot:200 00PortRole:deignatedPort######MST1vlanmapped:10PortState:forwardingPortPriority:128 PortDeignatedRoot:0001.00d0.f823.ef82PortDeignatedCot:0PortDeignatedBridge:0001.00d0.f836.ed70PortDeignatedPort:800 2PortForwardTranition:4PortAdminPathCot:20000PortOperPathCot:200 00PortRole:deignatedPort######MST2vlanmapped:20PortState:dicardingPortPriority:128 PortDeignatedRoot:0002.001a.a909.8fe0PortDeignatedCot:0 PortDeignatedBridge:0002.00d0.f8d7.ae12PortDeignatedPort:8002 PortForwardTranition:3PortAdminPathCot:20000PortOperPathCot: 20000PortRole:alternatePort1#1#1#howpanning-treeinterfacegigabitEthernet0/24g0/24接口tp状态信息PortAdminPortFat:DiabledPortOperPortFat:DiabledPortAdminAuto Edge:EnabledPortOperAutoEdge:DiabledPortAdminLinkType:auto PortOperLinkType:point-to-pointPortBPDUGuard:DiabledPortBPDUFilter:Diabled######MST0vlanmapped:1-9,11-19,21-4094PortState:forwardingPortPriority:128PortDeignatedRoot:8000.001a.a909.8fe0PortDeignatedCot:0PortDeignatedBridge:8000.001a.a909.8fe0PortDeignatedPort:801 8PortForwardTranition:5PortAdminPathCot:20000PortOperPathCot:200 00PortRole:rootPort######MST1vlanmapped:10PortState:forwardingPortPriority:128 PortDeignatedRoot:0001.00d0.f823.ef82PortDeignatedCot:0PortDeignatedBridge:0001.00d0.f836.ed70PortDeignatedPort:801 8PortForwardTranition:5PortAdminPathCot:20000PortOperPathCot:200 00PortRole:deignatedPort######MST2vlanmapped:20PortState:forwardingPortPriority:128 PortDeignatedRoot:0002.001a.a909.8fe0PortDeignatedCot:0PortDeignatedBridge:0002.001a.a909.8fe0PortDeignatedPort:801 8PortForwardTranition:4PortAdminPathCot:20000PortOperPathCot:200 00PortRole:rootPort1#Switchb信息:2#howvrrpVLAN10-Group1StateiBackupVirtualIPaddrei192.168.10.254configuredVirtualMACaddrei0000. 5e00.0101Advertiementintervali1ecPreemptionienabledmindelayi0ecP riorityi100MaterRouteri192.168.10.1,priorityi120MaterAdvertiementinterv ali1ecMaterDownintervali3ecVLAN20-Group2StateiMaterVirtualIPaddrei192.168.20.254configuredVirtualMACaddrei0000. 5e00.0102Advertiementintervali1ecPreemptionienabledmindelayi0ecP riorityi120MaterRouteri192.168.20.2(local),priorityi120MaterAdvertiemen tintervali1ecMaterDownintervali3ec2#2#2#2#2#2#2#howpanning-treeinterfacegigabitEthernet0/1PortAdminPortFat:DiabledPortOperPortFat:DiabledPortAdminAuto Edge:EnabledPortOperAutoEdge:DiabledPortAdminLinkType:auto PortOperLinkType:point-to-pointPortBPDUGuard:DiabledPortBPDUFilter:Diabled######MST0vlanmapped:1-9,11-19,21-4094PortState:forwardingPortPriority:128PortDeignatedRoot:8000.001a.a909.8fe0PortDeignatedCot:0PortDeignatedBridge:8000.001a.a909.8fe0PortDeignatedPort:800 1PortForwardTranition:1PortAdminPathCot:200000PortOperPathCot:20 0000PortRole:deignatedPort######MST1vlanmapped:10PortState:forwardingPortPriority:128 PortDeignatedRoot:0001.00d0.f823.ef82PortDeignatedCot:0PortDeignatedBridge:0001.00d0.f823.ef82PortDeignatedPort:800 2PortForwardTranition:2PortAdminPathCot:200000PortOperPathCot:20 0000PortRole:rootPort######MST2vlanmapped:20PortState:forwardingPortPriority:128PortDeignatedBridge:0002.001a.a909.8fe0PortDeignatedPort:800 1PortForwardTranition:1PortAdminPathCot:200000PortOperPathCot:20 0000PortRole:deignatedPort2#2#2#2#howpanning-treeinterfacegigabitEthernet0/2PortAdminPortFat:DiabledPortOperPortFat:DiabledPortAdminAuto Edge:EnabledPortOperAutoEdge:DiabledPortAdminLinkType:auto PortOperLinkType:point-to-pointPortBPDUGuard:DiabledPortBPDUFilter:Diabled######MST0vlanmapped:1-9,11-19,21-4094PortState:forwardingPortPriority:128PortDeignatedRoot:8000.001a.a909.8fe0PortDeignatedCot:0PortDeignatedBridge:8000.001a.a909.8fe0PortDeignatedPort:800 2PortForwardTranition:1PortAdminPathCot:20000PortOperPathCot:200 00PortRole:deignatedPort######MST1vlanmapped:10PortState:forwardingPortPriority:128 PortDeignatedRoot:0001.00d0.f823.ef82PortDeignatedCot:0PortDeignatedBridge:1001.001a.a909.8fe0PortDeignatedPort:800 2PortForwardTranition:2PortAdminPathCot:20000PortOperPathCot:200 00PortRole:deignatedPort######MST2vlanmapped:20PortState:forwardingPortPriority:128PortDeignatedBridge:0002.001a.a909.8fe0PortDeignatedPort:800 2PortForwardTranition:1PortAdminPathCot:20000PortOperPathCot:200 00PortRole:deignatedPort2#2#2#2#2#howpanning-treeinterfacegigabitEthernet0/24PortAdminPortFat:DiabledPortOperPortFat:DiabledPortAdminAuto Edge:EnabledPortOperAutoEdge:DiabledPortAdminLinkType:auto PortOperLinkType:point-to-pointPortBPDUGuard:DiabledPortBPDUFilter:Diabled######MST0vlanmapped:1-9,11-19,21-4094PortState:forwardingPortPriority:128PortDeignatedRoot:8000.001a.a909.8fe0PortDeignatedCot:0PortDeignatedBridge:8000.001a.a909.8fe0PortDeignatedPort:801 8PortForwardTranition:1PortAdminPathCot:20000PortOperPathCot:200 00PortRole:deignatedPort######MST1vlanmapped:10PortState:dicardingPortPriority:128 PortDeignatedRoot:0001.00d0.f823.ef82PortDeignatedCot:0PortDeignatedBridge:0001.00d0.f836.ed70PortDeignatedPort:801 8PortForwardTranition:1PortAdminPathCot:20000PortOperPathCot:200 00PortRole:alternatePort。
dhcp+mstp+vrrp实验
dhcp+mstp+vrrp实验一、VLAN配置SW3配置sy sw3un in envlan batch 10 20 30 40interface g0/0/3port link-type accessport default vlan 10qinterface g0/0/4port link-type accessport default vlan 20SW4配置sy sw4un in envlan batch 10 20 30 40interface g0/0/3port link-type accessport default vlan 30qinterface g0/0/4port link-type accessport default vlan 40q二、Trunk配置SW3配置interface g0/0/1port link-type trunkport trunk allow-pass vlan 10 20interface g0/0/2port link-type trunkport trunk allow-pass vlan 10 20SW4配置interface g0/0/1port link-type trunkport trunk allow-pass vlan 30 40qinterface g0/0/2port link-type trunkport trunk allow-pass vlan 30 40q三、链路聚合SW1和SW2之间我们用两根网线,做成链路聚合。
SW1配置[hxsw1]int Eth-Trunk 1[hxsw1-Eth-Trunk1]mode lacp-static[hxsw1-Eth-Trunk1]trunkport g0/0/2[hxsw1-Eth-Trunk1]trunkport g0/0/3SW2配置[hxsw2]int Eth-Trunk 1[hxsw2-Eth-Trunk1]mode lacp-static[hxsw2-Eth-Trunk1]trunkport g0/0/1[hxsw2-Eth-Trunk1]trunkport g0/0/3[hxsw2-Eth-Trunk1]配置trunk,允许所有vlan通过sw1[sw1]int Eth-Trunk 1[sw1-Eth-Trunk1]port link-type trunk[sw1-Eth-Trunk1]port trunk allow-pass vlan 10 20 30 40Sw2[sw2]int Eth-Trunk 1[sw2-Eth-Trunk1]port link-type trunk[sw2-Eth-Trunk1]port trunk allow-pass vlan 10 20 30 40四、MSTP配置公共配置以下步骤必须在所有的有冗余的交换机上做,stp region-configurationregion-name pokes01 #域名pokes01revision-level 1 #修订好统一为1instance 1 vlan 10 20 #将vlan10/20映射到实例1里面instance 2 vlan 30 40active region-configuration #激活才能生效qSW1配置[sw1]stp instance 1 root primary #将SW1作为实例1的根桥[sw1]stp instance 2 root secondary #将SW1作为实例2的备份根桥SW2配置[sw2]stp instance 1 root secondary[sw2]stp instance 2 root primary五、VRRP配置sw1配置interface Vlanif10ip address 192.168.10.253 255.255.255.0 vrrp vrid 10 virtual-ip 192.168.10.1vrrp vrid 10 priority 120interface Vlanif20ip address 192.168.20.253 255.255.255.0 vrrp vrid 20 virtual-ip 192.168.20.1vrrp vrid 20 priority 120interface Vlanif30ip address 192.168.30.253 255.255.255.0 vrrp vrid 30 virtual-ip 192.168.30.1interface Vlanif40ip address 192.168.40.253 255.255.255.0 vrrp vrid 40 virtual-ip 192.168.40.1sw2配置interface Vlanif10ip address 192.168.10.254 255.255.255.0 vrrp vrid 10 virtual-ip 192.168.10.1interface Vlanif20ip address 192.168.20.254 255.255.255.0 vrrp vrid 20 virtual-ip 192.168.20.1interface Vlanif30ip address 192.168.30.254 255.255.255.0 vrrp vrid 30 virtual-ip 192.168.30.1vrrp vrid 30 priority 120interface Vlanif40ip address 192.168.40.254 255.255.255.0 vrrp vrid 40 virtual-ip 192.168.40.1vrrp vrid 40 priority 120六、DHCP配置以下步骤在sw1、sw2一样[sw1]dhcp enable[sw1]ip pool vlan_10 #创建地址池[sw1]network 192.168.10.0 mask 24[sw1]gateway-list 192.168.10.254 #创建网关[sw1]dns-list 223.5.5.5 #创建dns[sw1-Vlanif10]int Vlanif 10[sw1-Vlanif10]dhcp select global[sw1]ip pool vlan_20 #创建地址池[sw1]network 192.168.20.0 mask 24[sw1]gateway-list 192.168.20.254 #创建网关[sw1]dns-list 223.5.5.5 #创建dns[sw1-Vlanif10]int Vlanif 20[sw1-Vlanif10]dhcp select global[sw1]ip pool vlan_30 #创建地址池[sw1]network 192.168.30.0 mask 24[sw1]gateway-list 192.168.30.254 #创建网关[sw1]dns-list 223.5.5.5 #创建dns[sw1-Vlanif10]int Vlanif 30[sw1-Vlanif10]dhcp select global[sw1]ip pool vlan_40 #创建地址池[sw1]network 192.168.40.0 mask 24[sw1]gateway-list 192.168.40.254 #创建网关[sw1]dns-list 223.5.5.5 #创建dns[sw1-Vlanif10]int Vlanif 40[sw1-Vlanif10]dhcp select global。
VRRP+MSTP详解
vrrp+mstp配置实例1.switch a 、switch b选用两台锐捷的s5750 ;switch c 、shwich d 选2.用锐捷的s3750和s37603.全网共有两个业务vlan ,为vlan 10 、vlan 204.Switch a 、switch b 都分别对两vlan起用两vrrp组,实现两组的业务的负载分担和备份。
5.Switch a、switch b、switch c、switch d 都起用mstp多生成数协议,并且所有设备都属于同一个mst域,且实例映射一致(vlan 10映射实例1、vlan 20映射实例2 其他vlan映射默认实例0)。
6.Vlan 10业务以switch a为根桥;vlan 20业务以switch b为根桥;实现阻断网络环路,并能实现不同vlan数据流负载分担功能。
SW A与SW B配置基本相同第一步:开启生成树MSTP协议第二步:进入生成树配置模式,定义实例,修订号(不理解就当学号),名称(相当于学生名字)第三步:指定实例的优先级第四步:为不同的VLAN划分地址,而且对VLAN的优先级进行设置,以及转换虚拟路由地址SW C 与SW D 配置第一步:开启生成树MSTP协议第二步:进入生成树配置模式,定义实例,修订号(不理解就当学号),名称(相当于学生名字)第三步:指定实例的优先级部分命令如下生成树类spanning-tree 开启生成树(默认为mstp)spanning-tree mst configuration 进入mst配置模式revision 1 指定MST revision number 为1name region1 指定mst配置名称instance 0 vlan 1-9, 11-19, 21-4094 缺省情况下vlan都属于实例0instance 1 vlan 10 手工指定vlan10属于实例1instance 2 vlan 20 手工指定vlan20属于实例2spanning-tree mst 1 priority 0 指定实例1的优先级为0(为根桥)spanning-tree mst 2 priority 4096 指定实例2的优先级为4096VLAN优先级类及转换的IP地址interface VLAN 10 创建vlan 10 svi接口ip address 192.168.10.1 255.255.255.0 配置ip地址vrrp 1 priority 120 配置vrrp组1 优先级为120vrrp 1 ip 192.168.10.254 配置vrrp组1虚拟ip地址为192.168.10.254查看信息show vrrp 查看vrrp 信息show spanning-tree interface gigabitEthernet 0/1 查看g0/1接口stp状态信息链路聚合第一步:F0/23 、F0/24 加入Port-group 1inter range fa 0/23 -24port-group 1第二步:将AG1设为Trunkinter aggregateport 1switchport mode trunk。
锐捷交换机VRRP配置说明
step 1 step 2 step 3
命令
configure teminal Interface interface-id Standby [group-number] ip ip-address
含义 进入全局配置模式 进入接口配置模式,并指定要打开 VRRP 功能的接口号 创建一个 VRRP 虚拟机,并指定虚拟机的 ID 和 IP 地址 z (可选)group-number:属于该接口的 VRRP 虚拟机
2 . 主路由器选出后,其它路由器作为备份路由器,并通过主路由器发出的VRRP报文监测主路由器的状态。当 主路由器正常工作时,它会每隔一段时间发送一个VRRP多播报文,称为广告报文,以通知备份路由器,主路由器处 于正常工作状态。如果组内的备份路由器长时间没有接收到来自主路由器的报文,则将自己状态转为Master 。当 组内有多台备份路由器时,重复1的竞选过程。通过这样一个过程就会将优先级最大的路由器选成新的主路由器, 从而实现VRRP的备份功能。
VRRP
本章描述 VRRP 的基本原理,应用方式以及如何配置 VRRP 路由冗余功能
本章包括以下内容
理解 VRRP 配置 VRRP VRRP 信息显示
理解 VRRP
本节描述了 VRRP 的原理和典型应用模型 随着Internet的发展,人们对网络可靠性,安全性的要求越来越高。对于终端用户来说,希望时时与网络其 他部分保持通信。虚拟路由器冗余协议VRRP 提供一种方法,能够保证终端用户与网络的联系可靠而不中断。VRRP 的应用实际上是对网络可靠性和安全性的要求的一种体现。
VRRP 路由冗余功能只能在三层接口上打开,三层接口包括以下几种类型 z SVI(Switch virtual interface) z Routed port z L3 Aggregate Port
Juniper路由器配置vrrp
Juniper路由器配置vrrp1、VRRP命令格式vrrp-group group-number {(accept-data | no-accept-data); advertise-interval seconds; authentication-type authentication; authentication-key key;fast-interval milliseconds;(preempt | no-preempt) {hold-time seconds;}priority number;track {interface interface-name priority-cost cost; }virtual-address [ addresses ];}2、VRRP配置实例Router Afe-0/0/1 {unit 0 {family inet {address 10.10.11.2/24 {vrrp-group 10 {virtual-address 10.10.11.1;priority 105;accept-data;}}}}}Router Bfe-0/0/1 {unit 0 {family inet {address 10.10.11.3/24 {vrrp-group 10 {virtual-address 10.10.11.1;priority 150;accept-data;}}}}}3、查看VRRP配置admin@RouterA # show vrrp detailPhysical interface: fe-0/0/1, Unit: 0, Address: 10.10.11.2/24 Index: 65, SNMP ifIndex: 31, VRRP-Traps: disabledInterface state: up, Group: 10, State: backupPriority: 105, Advertisement interval: 1, Authentication type: none Preempt: yes, Accept-data mode: yes, VIP count: 1, VIP: 10.10.11.1 Dead timer: 2.921s, Master priority: 150, Master router: 10.10.11.3Virtual router uptime: 00:21:53Tracking: disabledadmin@RouterB>show vrrp detailPhysical interface: fe-0/0/1, Unit: 0, Address: 10.10.11.3/24 Index: 65, SNMP ifIndex: 25, VRRP-Traps: disabledInterface state: up, Group: 10, State: masterPriority: 150, Advertisement interval: 1, Authentication type: none Preempt: yes, Accept-data mode: no, VIP count: 1, VIP: 10.10.11.1 Advertisement timer: 0.779s, Master router: 10.10.11.3Virtual router uptime: 00:20:41, Master router uptime: 00:20:37 Virtual MAC: 00:00:5e:00:01:0aTracking: disabled注意加入accept-data 参数允许相应对vip 的ICMP 响应。
mstp加vrrp的实验例子
mstp加vrrp的实验例子
以下是一个使用MSTP和VRRP的实验例子:
设备1和设备2之间连接了多个交换机,其中设备1运行VRRP,并且是虚拟路由器组的主机,设备2是备用主机。
步骤:
1. 配置设备1上的VRRP:
- 为虚拟路由器组配置一个组ID和虚拟IP地址。
- 设置设备1为虚拟路由器组的主机,优先级较高。
- 配置其他参数,如优先级、优先级降级的阈值等。
2. 配置MSTP:
- 配置多个VLAN,并且将它们绑定到MSTP实例上。
- 在每个交换机上启用MSTP,并设置实例根桥和桥优先级。
- 配置MSTP的端口优先级,用于控制MSTP的选举。
3. 设置MSTP的根桥:
- 在所有交换机上使用根桥优先级来选择根桥。
- 所有其他交换机通过MSTP协议来确定每个VLAN的根桥。
4. 设置VRRP虚拟路由器组的VIP下的MSTP实例的根桥:
- 在虚拟路由器组的VIP所属的MSTP实例上,设置根桥优
先级为最低。
- 这将确保VRRP主机上的MSTP实例被选为根桥。
5. 配置设备2上的VRRP:
- 配置相同的组ID和虚拟IP地址。
- 设置设备2为备用主机。
- 配置优先级较低,以确保设备1成为主机。
6. 测试:
- 断开设备1和设备2之间的连接,观察VRRP主机的切换过程。
- 在交换机上查看MSTP实例的状态,确保根桥已更改,以维持虚拟路由器的正常工作。
通过使用MSTP和VRRP,可以实现对网络中的故障进行快速检测和恢复,提高网络的可靠性和冗余性。
VRRP配置实例
路由器VRRP配置1拓扑图说明VRRP配置RouterA和 RouterB之间做VRRP,对内体现为vrrp虚拟路由器IP,做为虚拟网关,RouterA 为主设备,允许抢占,RouterB为从设备,实现路由器的热备份。
PC1和PC2主机的网关设置为VRRP虚拟网关地址192.168.1.3。
2主备和负载分担配置A、『两台路由器主备的配置流程』问题1为什么需要要VRRP通常一个网络内的所有主机都设置一条缺省路由,主机发往外部网络的报文将通过缺省路由发往该网关设备,从而实现了主机与外部网络的通信。
当该设备发生故障时,本网段内所有以此设备为缺省路由下一跳的主机将断掉与外部的通信。
VRRP就是为解决上述问题而提出的。
问题2 VRRP的组成和基本工作原理VRRP可以将局域网的一组路由器(包括一个Master即活动路由器和若干个Backup即备份路由器)组织成一个虚拟路由器,这组路由器被称为一个备份组。
虚拟的路由器拥有自己的真实IP地址,备份组内的路由器也有自己的IP地址。
局域网内的主机仅仅知道这个虚拟路由器的IP地址(通常被称为备份组的虚拟IP地址),而不知道具体的Master路由器的IP地址以及Backup路由器的IP地址。
局域网内的主机将自己的缺省路由下一跳设置为该虚拟路由器的IP地址。
于是,网络内的主机就通过这个虚拟的路由器与其它网络进行通信。
当备份组内的Master路由器不能正常工作时,备份组内的其它Backup路由器将接替不能正常工作的Master路由器成为新的Master路由器,继续向网络内的主机提供路由服务,从而实现网络内的主机不间断地与外部网络进行通信。
[RouterA 相关配置]*****IP地址和路由配置略*****VRRP配置1.创建VRRP组10,虚拟网关为192.168.1.3RouterA(config)#interface FastEthernet0/0RouterA(config-if)#vrrp 10 ip 192.168.1.32. 设置VRRP组优先级为120,缺省为100RouterA(config-if)#vrrp 10 priority 1203. 设置为抢占模式RouterA(config-if)#vrrp preempt[RouterB 相关配置]*****IP地址和路由配置略*****VRRP配置1.创建VRRP组10,虚拟网关为192.168.1.3RouterB(config)#interface FastEthernet0/0RouterB(config-if)#vrrp 10 ip 192.168.1.32. 设置VRRP组优先级为100,缺省为100RouterB(config-if)#vrrp 10 priority 1003. 设置为抢占模式RouterB(config-if)#vrrp preempt【switchC相关配置】SwitchC在这里起端口汇聚作用,同时允许RouterA和RouterB发送心跳报文,可以不配置任何数据。
华为h3c经典VRRP综合组网配置举例
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
路由器VRRP配置
1拓扑图说明
VRRP配置
RouterA和 RouterB之间做VRRP,对内体现为vrrp虚拟路由器IP,做为虚拟网关,RouterA 为主设备,允许抢占,RouterB为从设备,实现路由器的热备份。
PC1和PC2主机的网关设置为VRRP虚拟网关地址192.168.1.3。
2主备和负载分担配置
A、『两台路由器主备的配置流程』
问题1为什么需要要VRRP
通常一个网络内的所有主机都设置一条缺省路由,主机发往外部网络的报文将通过缺省路由发往该网关设备,从而实现了主机与外部网络的通信。
当该设备发生故障时,本网段内所有以此设备为缺省路由下一跳的主机将断掉与外部的通信。
VRRP就是为解决上述问题而提出的。
问题2 VRRP的组成和基本工作原理
VRRP可以将局域网的一组路由器(包括一个Master即活动路由器和若干个Backup即备份路由器)组织成一个虚拟路由器,这组路由器被称为一个备份组。
虚拟的路由器拥有自己的真实IP地址,备份组内的路由器也有自己的IP地址。
局域网内的主机仅仅知道这个虚拟路由器的IP地址(通常被称为备份组的虚拟IP地址),而不知道具体的Master路由器的IP地址以及Backup路由器的IP地址。
局域网内的主机将自己的缺省路由下一跳设置为该虚拟路由器的IP地址。
于是,网络内的主机就通过这个虚拟的路由器与其它网络进行通信。
当备份组内的Master路由器不能正常工作时,备份组内的其它Backup路由器将接替不能正常工作的Master路由器成为新的Master路由器,继续向网络内的主机提供路由服务,从而实现网络内的主机不间断地与外部网络进行通信。
[RouterA 相关配置]
*****IP地址和路由配置略*****
VRRP配置
1.创建VRRP组10,虚拟网关为19
2.168.1.3
RouterA(config)#interface FastEthernet0/0
RouterA(config-if)#vrrp 10 ip 192.168.1.3
2. 设置VRRP组优先级为120,缺省为100
RouterA(config-if)#vrrp 10 priority 120
3. 设置为抢占模式
RouterA(config-if)#vrrp preempt
[RouterB 相关配置]
*****IP地址和路由配置略*****
VRRP配置
1.创建VRRP组10,虚拟网关为192.168.1.3
RouterB(config)#interface FastEthernet0/0
RouterB(config-if)#vrrp 10 ip 192.168.1.3
2. 设置VRRP组优先级为100,缺省为100
RouterB(config-if)#vrrp 10 priority 100
3. 设置为抢占模式
RouterB(config-if)#vrrp preempt
【switchC相关配置】
SwitchC在这里起端口汇聚作用,同时允许RouterA和RouterB发送心跳报文,可以不配置任何数据。
【内部主机相关配置】
内部主机都将默认网关指向虚拟网关192.168.1.3
B、【两台路由器负载分担的配置流程】
原理:
通过多备份组设置可以实现负荷分担。
如路由器A作为备份组1的Master,同时又兼职备份组2的备份路由器,而路由器B正相反,作为备份组2的Master,并兼职备份组1的备份路由器。
而内部主机,一部分主机使用备份组1作网关,另一部分主机使用备份组2作为网关。
这样,以达到分担数据流,而又相互备份的目的。
配置简要说明:
配置基本同上,只不过要配两组备份组,比如组10和组20,且对内部主机体现为两个虚拟路由器IP地址。
在路由器上配置完成以后,SwitchC下面的用户可以部分以VRRP组10的虚拟地址为网关,一部分用户以VRRP组20的虚拟地址为网关,从而实现负载分担。