网络安全 当前位置:首页 > 计算机学习 > 网络知识 > 网络安全>正文

STP VTP HSRP 构建一个冗余的网络推荐

【网络安全】 2018-01-26本文已影响

\

?

不可转载

sorry? 刚睡醒.想编辑 一下给误删了.

使用的是2950.所以在交换机SW1 SW2 的f 0/5 没有封装 dot1q(默认).

R3 没有静态路由.这个拓扑只保障了到网关的负载均衡与冗余备份.没有写连接外网.SW1<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />?switch > enableswitch # configure terminalswitch (config) # hostname sw1sw1 (config) # vtp domain ciscosw1 (config) # vtp mode serversw1 (config) # vtp password ciscosw1 (config) # exitsw1 # vlan databasesw1 (vlan) # vlan 2sw1 (vlan) # vlan 3sw1 (vlan) # exitsw1 # configure terminalsw1 (config) # interface range fastethernet? 0/1 - 5sw1 (config-if) # switchport mode trunksw1 (config-if) # no shutdownsw1 (config-if) # interface range fastethernet 0/3 - 4sw1 (config-if) # channel-group 1 mode onsw1 (config-if) # exitsw1 (config) # spanning-tree vlan 2 root primarysw1 (config) # spanning-tree vlan 3 root secondbysw1 (config) # exitsw1 #?SW 2switch > enableswitch # configure terminalswitch (config) # hostname sw 2sw2 (config) # vtp domain ciscosw2 (config) # vtp mode serversw2 (config) # vtp password ciscosw2 (config) # interface range fastethernet? 0/1 - 5sw2 (config-if) # switchport mode trunksw2 (config-if) # no shutdownsw2 (config-if) # interface range fastethernet 0/3 - 4sw2 (config-if) # channel-group 1 mode onsw2 (config-if) # exitsw2 (config) # spanning-tree vlan 3 root primarysw2 (config)# spanning-tree vlan 2 root? secondbysw2 (config) # exitsw2 #SW 3?switch > enableswitch # configure terminalswitch (config) # hostname sw 3sw3 (config) # vtp domain ciscosw3 (config) # vtp mode clientsw3 (config) # vtp password ciscosw3 (config) # interface range fastethernet? 0/1 - 2sw3 (config-if) # switchport mode trunksw3 (config-if) # no shutdownsw3 (config-if) # interface fastethernet 0/3sw3 (config-if) # switchport mode accesssw3 (config-if) # switchport access vlan 2sw3 (config-if) # spanning-tree portfastsw3 (config-if) # interface fastethernet 0/4sw3 (config-if) # switchport mode accesssw3 (config-if) # switchport access vlan 3sw3 (config-if) # spanning-tree portfastsw3 (config-if) # exitsw3 (config) # spanning-tree uplinkfastsw3 (config) # spanning-tree vlan3sw3 (config) # spanning-tree vlan2sw3 (config) # exitsw3 #?SW 4?switch > enableswitch # configure terminalswitch (config) # hostname sw 4sw4 (config) # vtp domain ciscosw4 (config) # vtp mode clientsw4 (config) # vtp password ciscosw4 (config) # interface range fastethernet? 0/1 - 2sw4 (config-if) # switchport mode trunksw4 (config-if) # no shutdownsw4 (config-if) # interface fastethernet 0/3sw4 (config-if) # switchport mode accesssw4 (config-if) # switchport access vlan 2sw4 (config-if) # spanning-tree portfastsw4 (config-if) # interface fastethernet 0/4sw4 (config-if) # switchport mode accesssw4 (config-if) # switchport access vlan 3sw4 (config-if) # spanning –tree portfastsw4 (config-if) # exitsw4 (config) # spanning-tree uplinkfastsw4 (config) # spanning-tree vlan3sw4 (config) # spanning-tree vlan2sw4 (config) # exitsw4 #??R1 router > enablerouter # configure terminalrouter (config) # hostname r1r1 (config) # interface fastethernet 0/0.1r1 (config-subif) # ip add 192.168.2.254 255.255.255.0r1 (config-subif) # encapsulation dot1q 2r1 (config-subif) # standby 2 ip 192.168.2.1r1 (config-subif) # standby 2 priority 105r1 (config-subif) # standby 2 preempetr1 (config-subif) # standby 2 track fastethernet 0/1r1 (config-subif) # interface fastethernet 0/0.2r1 (config-subif) # ip add 192.168.3.254 255.255.255.0r1 (config-subif) # encapsulation dot1q 3r1 (config-subif) # standby 3 ip 192.168.3.1r1 (config-subif) # standby 3 preempetr1 (config-subif) # standby 3 track fastethernet 0/1r1 (config-if) # interface fastethernet 0/0r1 (config-if) # no shutdownr1 (config-if) # interface fastethernet 0/1r1 (config-if) # ip add 192.168.4.2 255.255.255.0r1 (config-if) # no shutdownr1 (config-if) # exitr1 (config) # exitr1 #?R2?router > enablerouter # configure terminalrouter (config) # hostname r2r2 (config) # interface fastethernet 0/0.1r2 (config-subif) # ip add 192.168.2.253 255.255.255.0r2 (config-subif) # encapsulation dot1q 2r2 (config-subif) # standby 2 ip 192.168.2.1r2 (config-subif) # standby 2 preempetr2 (config-subif) # standby 2 track fastethernet 0/1r2 (config-subif) # interface fastethernet 0/0.2r2 (config-subif) # ip add 192.168.3.253 255.255.255.0r2 (config-subif) # encapsulation dot1q 3r2 (config-subif) # standby 3 priority 105r2 (config-subif) # standby 3 preempetr2 (config-subif) # standby 3 ip 192.168.3.1r2 (config-subif) # standby 3 track fastethernet 0/1r2 (config-if) # interface fastethernet 0/0r2 (config-if) # no shutdownr2 (config-if) # interface fastethernet 0/1r2 (config-if) # ip add 192.168.5.2 255.255.255.0r2 (config-if) # no shutdownr2 (config-if) # exitr2 (config) # exitr2 #?R3?router > enablerouter # configure terminalrouter (config) # hostname r3r3 (config) # interface thernet 0/0r3 (config-if) # ip add 192.168.4.1 255.255.255.0r3 (config-if) # no shutdownr3 (config) # interface ethernet 0/1r3 (config-if) # ip add 192.168.5.1 255.255.255.0r3 (config-if) # no shutdownr3 (config-if) # exitr3 (config) # exitr3 #

?

?版权声明:原创作品,如需转载,请注明出处。否则将追究法律责任

本站所有资源均来自于68学习网蜘蛛爬取结果,如您发现侵权、违法、存在不和谐内容,告知本站一律删除

本站不以盈利为目的,全站资源仅供学习爱好使用。本站站长邮箱:luo689up@foxmail.com

备案号:闽ICP备15018334号-2

©68学习网  2016-2017版权所有     站点地图

回到顶部