SW3 IP 的 配 置 Sysname sw3 int e0/1/1 ip add 192.168.50.2 24 int e0/1/0 ip add 192.168.60.1 24 int e0/1/2 ip add 192.168.70.1 24 OSPF 协 议 配 置 ospf 1 router-id 6.6.6.6 area 2 network 192.168.50.0 0.0.0.255 network 192.168.60.0 0.0.0.255 ospf 1 import-route direct //在OSPF协议下引入直连路由信息 import-route rip //在OSPF协议下引入RIP路由信息 asbr-summary 192.168.0.0 21 //在ASBR下配置路由聚合 RIP 协 议 配 置 5.R3
Rip //启动RIP协议 un summary //关闭自动汇总 version 2 //开启版本2 network 192.168.70.0 default-route originate cost 5 //发布缺省路由信息
R3 IP 的 配 置 OSPF 协议 配 置 6.R5
R5 IP 的 配置 Sysname r5 int e0/1/0 ip add 192.168.70.2 24 interface LoopBack 1 ip address 192.168.1.2 32 interface LoopBack 2 ip address 192.168.2.2 32 interface LoopBack 3 ip address 192.168.3.2 32 interface LoopBack 4 ip address 192.168.4.2 32 Sysname R3 int e0/1/0 ip add 192.168.60.2 24 interface LoopBack 5 ip address 192.168.5.2 32 ospf 1 router-id 7.7.7.7 area 2 network 192.168.60.0 0.0.0.255 network 192.168.5.0 静态路由 ip route-static 0.0.0.0 0 192.168.70.1
RIP 协议 配 置 rip un summary version 2 network 192.168.70.0 network 192.168.1.0 network 192.168.2.0 network 192.168.3.0 network 192.168.4.0 7.R2
R2 IP 的 配 置 int e0/1/1 ip add 192.168.30.2 24 int e0/1/0 ip add 192.168.40.2 24 int s0/2/1 ip add 192.168.90.1 24 ospf cost 100 int s0/2/0 ip add 192.168.80.1 24 ospf cost 10 OSPF 协 议 配 置 ospf 1 router-id 4.4.4.4 area 0 network 192.168.30.0 0.0.0.255 network 192.168.40.0 0.0.0.255 area 1 network 192.168.80.0 0.0.0.255 network 192.168.90.0 0.0.0.255
stub 8.R4
R4 IP 的 配 置 Sysname R4 int s0/2/1 ip add 192.168.90.2 24 ospf cost 100 int s0/2/0 ip add 192.168.80.2 24 ospf cost 10 interface LoopBack 6 ip address 192.168.6.1 32 interface LoopBack 7 ip address 192.168.7.1 32 OSPF 协 议 配 置
ospf 1 router-id 5.5.5.5 area 1 network 192.168.80.0 0.0.0.255 network 192.168.90.0 0.0.0.255 network 192.168.6.0 0.0.0.255 network 192.168.7.0 0.0.0.255 stub 七. 实验调试结果:
1.全网的行政部的PC互通测试,全网互通。 行政部PC5 ping 行政部PC1 行政部PC5 ping 行政部PC2 行政部PC5 ping 行政部PC3 行政部PC5 ping 行政部PC4