拓扑信息
项目要求以及要实现的结果
需求1:SW1、SW2、SW3之间运行RSTP协议,且发送DPDU间隔为4s
SW1作为根桥,并开启根保护
需求2:pc1和pc2接口up之后可以直接上网,同时开启bpdu保护
需求3:R1作为pc1和pc2网关,R5作为pc5网关,SW4作为pc4网关,并把
pc4和pc5划入相应的vlan
需求4:R2、R3、R4之间运行动态路由协议,
但是R1、R2和R3、R5之间不能运行动态路由协议
现象1:pc1和pc2可以互通
现象2:pc1、pc2能够ping通pc3
现象3:pc1、pc2能够ping通10.5.5.254
现象4:pc4和pc5能够互通
现象5:pc1、pc2能够ping通pc5
现象6:pc1、pc2能够ping通pc4
配置
SW1
stp mode rstp stp timer hello 400 stp instance 0 root primary interface GigabitEthernet0/0/1 stp root-protection interface GigabitEthernet0/0/2 stp root-protection interface GigabitEthernet0/0/3 stp root-protection
SW2
stp mode rstp stp timer hello 400 stp bpdu-protection
SW3
stp mode rstp stp timer hello 400 stp bpdu-protection
R1
ip route-static 0.0.0.0 0.0.0.0 10.1.12.2 ip route-static 10.3.3.0 255.255.255.0 10.1.12.2 ip route-static 10.4.4.0 255.255.255.0 10.1.12.2 ip route-static 10.5.5.0 255.255.255.0 10.1.12.2 interface GigabitEthernet0/0/0 ip address 10.1.1.254 255.255.255.0 interface GigabitEthernet0/0/1 ip address 10.1.12.1 255.255.255.0
R2
interface GigabitEthernet0/0/0 ip address 10.1.12.2 255.255.255.0 interface GigabitEthernet0/0/1 ip address 10.1.23.2 255.255.255.0 interface GigabitEthernet0/0/2 ip address 10.1.24.2 255.255.255.0 ospf 1 import-route static area 0.0.0.0 network 10.1.12.0 0.0.0.255 network 10.1.23.0 0.0.0.255 network 10.1.24.0 0.0.0.255 ip route-static 10.1.1.0 255.255.255.0 10.1.12.1
R3
interface GigabitEthernet0/0/0 ip address 10.1.23.3 255.255.255.0 interface GigabitEthernet0/0/1 ip address 10.1.35.3 255.255.255.0 interface GigabitEthernet0/0/2 ip address 10.1.34.3 255.255.255.0 ospf 1 import-route direct import-route static area 0.0.0.0 network 10.1.23.0 0.0.0.255 network 10.1.34.0 0.0.0.255 network 10.1.35.0 0.0.0.255 ip route-static 10.4.4.0 255.255.255.0 10.1.35.5 ip route-static 10.5.5.0 255.255.255.0 10.1.35.5
R4
interface GigabitEthernet0/0/0 ip address 10.1.24.4 255.255.255.0 interface GigabitEthernet0/0/1 ip address 10.1.34.4 255.255.255.0 interface GigabitEthernet0/0/2 ip address 10.3.3.254 255.255.255.0 ospf 1 import-route static area 0.0.0.0 network 10.1.24.0 0.0.0.255 network 10.1.34.0 0.0.0.255 network 10.3.3.0 0.0.0.255 ip route-static 10.1.1.0 255.255.255.0 10.1.24.2
R5
interface GigabitEthernet0/0/0 ip address 10.1.35.5 255.255.255.0 interface GigabitEthernet0/0/1 interface GigabitEthernet0/0/1.1 dot1q termination vid 20 ip address 10.5.5.254 255.255.255.0 arp broadcast enable interface GigabitEthernet0/0/1.2 dot1q termination vid 10 ip address 10.4.4.253 255.255.255.0 arp broadcast enable ip route-static 0.0.0.0 0.0.0.0 10.1.35.3 ip route-static 10.1.1.0 255.255.255.0 10.1.35.3
SW4
vlan batch 10 20 interface Vlanif10 ip address 10.4.4.254 255.255.255.0 interface GigabitEthernet0/0/1 port link-type access port default vlan 10 interface GigabitEthernet0/0/2 port link-type access port default vlan 20 interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 10 20 ip route-static 10.1.1.0 255.255.255.0 10.4.4.253 ip route-static 10.5.5.0 255.255.255.0 10.4.4.253
我的微信
微信号已复制
我的微信
这是我的微信扫一扫