ospf
                                                            拓扑图
    
1、配置路由器各个端口的IP地址,命令参数如下:
路由器Router1各端口IP配置如下:
Router1>en
Router1#conf t
Router1(config)#int fa0/0
Router1(config-if)#ip address 10.0.1.1 255.255.255.0
Router1(config-if)#no shutdown
 
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
            
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运行正常。