Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname route0
route0(config)#int f0/0
route0(config-if)#ip ad 192.168.1.1 255.255.255.0
route0(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
route0(config-if)#int s2/0
route0(config-if)#ip ad 192.168.2.1 255.255.255.0
route0(config-if)#no sh
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
route1(config)#int s2/0
route1(config-if)#ip ad 192.168.2.2 255.255.255.0
route1(config-if)#no sh
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
route1(config-if)#int s3/0
route1(config-if)#ip ad 192.168.3.1 255.255.255.0
route1(config-if)#no sh
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname route2
route2(config)#int f0/0
route2(config-if)#ip ad 192.168.4.1 255.255.255.0
route2(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
route2(config-if)#int s3/0
route2(config-if)#ip ad 192.168.3.2 255.255.255.0
route2(config-if)#no sh
%LINK-5-CHANGED: Interface Serial3/0, changed state to up
route2(config-if)#exit
route0(config)#route rip
route0(config-router)#network 192.168.1.0
route0(config-router)#network 192.168.2.0
route0(config-router)#version 2
route0(config-router)#no auto-summary
route0(config-router)#exit
route1(config)#router rip
route1(config-router)#network 192.168.2.0
route1(config-router)#network 192.168.3.0
route1(config-router)#version 2
route1(config-router)#no auto-summary
route1(config-router)#exit
route2(config)#router rip
route2(config-router)#network 192.168.3.0
route2(config-router)#network 192.168.4.0
route2(config-router)#version 2
route2(config-router)#no auto-summary
route2(config-router)#exit
OK网络连接正常!
转载于:https://blog.51cto.com/9103824/2371744