![ospf](https://i-blog.csdnimg.cn/blog_migrate/3002ae31dee87ea37ff07a170a592812.gif)
拓扑图
1
、配置路由器各个端口的
IP
地址,命令参数如下:
路由器
Router1
各端口
IP
配置如下:
Router1>en
Router1#conf t
Router1(config)#int fa0/0
Router1(config-if)#ip address <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />10.0.1.1 255.255.255.0
Router1(config-if)#no shutdown
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Router1(config-if)#int s2/0
Router1(config-if)#ip address 10.0.2.1 255.255.255.0
Router1(config-if)#clock rate 56000
Router1(config-if)#no shutdown
路由器
Router2
各端口
IP
配置如下:
Router2(config)#int fa0/0
Router2(config-if)#ip address 10.0.3.1 255.255.255.0
Router2(config-if)#no shutdown
Router2(config-if)#int s2/0
Router2(config-if)#ip address 10.0.4.1 255.255.255.0
Router2(config-if)#clock rate 56000
Router2(config-if)#no shutdown
Router2(config-if)#int s3/0
Router2(config-if)#ip address 10.0.2.2 255.255.255.0
Router2(config-if)#no shutdown
Router2(config-if)#^Z
Router2#copy run start
路由器
Router3
各端口
IP
配置如下:
Router3(config)#int fa0/0
Router3(config-if)#ip address 10.0.5.1 255.255.255.0
Router3(config-if)#no shutdown
Router3(config-if)#int s2/0
Router3(config-if)#ip address 10.0.4.2 255.255.255.0
Router3(config-if)#no shutdown
Router3(config-if)#int s3/0
Router3(config-if)#ip address 10.0.6.1 255.255.255.0
Router3(config-if)#clock rate 56000
Router3(config-if)#no shutdown
Router3(config-if)#^Z
Router3#copy run start
路由器
Router4
各端口
IP
配置如下:
Router4(config)#int fa0/0
Router4(config-if)#ip address 10.0.7.1 255.255.255.0
Router4(config-if)#no shutdown
Router4(config-if)#int s2/0
Router4(config-if)#ip address 10.0.6.2 255.255.255.0
Router4(config-if)#no shutdown
Router4(config-if)#^Z
Router4#copy run start
2.
在路由器上分别配置EIGRP协议
Router1:
Router1(config)#router eigrp 100
Router1(config-router)#network 10.0.1.0 0.0.0.255
Router1(config-router)#network 10.0.2.0 0.0.0.255
Router1(config-router)#network 10.0.2.0 0.0.0.255
Router2:
Router2(config)#router eigrp 100
Router2(config-router)#network 10.0.2.0 0.0.0.255
Router2(config-router)#network 10.0.3.0 0.0.0.255
Router2(config-router)#network 10.0.4.0 0.0.0.255
Router3:
Router3(config)#router eigrp 100
Router3(config-router)#network 10.0.4.0 0.0.0.255
Router3(config-router)#network 10.0.5.0 0.0.0.255
Router3(config-router)#network 10.0.6.0 0.0.0.255
Router4:
Router4(config)#router eigrp 100
Router4(config-router)#network 10.0.6.0 0.0.0.255
Router4(config-router)#network 10.0.7.0 0.0.0.255
配置完成后,4PC均能相互ping通,EIGRP运行正常。
转载于:https://blog.51cto.com/recordtrip/105066