interface Ethernet0ip address 172.16.10.254 255.255.255.0
interface Serial 0ip unnumbered Ethernet 0
RouterA# show ip interface brief Interface IP-Address OK? Method Status ProtocolEthernet0 172.16.10.254 YES manual up upSerial0 172.16.10.254 YES manual up up
IP 和未编号 IPRouterA(config)# int e0 RouterA(config-if)# ip unnumbered serial 0 Point-to-point (non-multi-access) interfaces only RouterA(config-if)# ip unnumbered loopback 0 Point-to-point (non-multi-access) interfaces only
路由器 1.1.1.1 | 路由器 2.2.2.2 |
Current configuration:interface Ethernet0 ip address 171.68.178.196 255.255.255.192 interface Serial0 ip unnumbered Ethernet0router igrp 10 network 171.68.0.0 | Current configuration:interface Ethernet 0 ip address 171.68.179.1 255.255.255.192 interface Serial 0 ip unnumbered Ethernet0 router igrp 10 network 171.68.0.0 |
不同的主网,没有子网Router 1.1.1.1# show ip route171.68.0.0/26 is subnetted, 3 subnetsI 171.68.179.0 [100/8976] via 171.68.179.1, 00:00:02, Serial0C 171.68.178.192 is directly connected, Ethernet0I 171.68.0.0 [100/8976] via 171.68.179.1, 00:00:02, Serial0Router 1.1.1.1# ping 171.68.179.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 171.68.179.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/30/32 msRouter 2.2.2.2# show ip route171.68.0.0/26 is subnetted, 3 subnetsC 171.68.179.0 is directly connected, Ethernet0I 171.68.178.192 [100/8976] via 171.68.178.196, 00:00:02, Serial0I 171.68.0.0 [100/8976] via 171.68.178.196, 00:00:02, Serial0Router 2.2.2.2# ping 171.68.178.196Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 171.68.178.196, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 ms在此场景中,有关子网的路由信息被正确维护。
路由器 1.1.1.1 | 路由器 2.2.2.2 |
Current configuration:interface Ethernet0 ip address 171.68.178.196 255.255.0.0 interface Serial0 ip unnumbered Ethernet0 router igrp 10 network 171.68.0.0 | Current configuration:interface Ethernet 0 ip address 172.68.1.1 255.255.0.0 interface Serial 0 ip unnumbered Ethernet0 router igrp 10 network 172.68.0.0 |
带有子网的主网,没有子网的主网Router 1.1.1.1# show ip routeC 171.68.0.0/16 is directly connected, Ethernet0I 172.68.0.0/16 [100/8976] via 172.68.1.1, 00:01:26, Serial0Router 1.1.1.1# ping 172.68.1.1Sending 5, 100-byte ICMP Echos to 172.68.1.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 msRouter 2.2.2.2# show ip routeI 171.68.0.0/16 [100/8976] via 171.68.178.196, 00:00:21, Serial0C 172.68.0.0/16 is directly connected, Ethernet0Router 2.2.2.2# ping 171.68.178.196Sending 5, 100-byte ICMP Echos to 171.68.178.196, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
路由器 1.1.1.1 | 路由器 2.2.2.2 |
Current configuration:interface Ethernet0 ip address 171.68.178.196 255.255.255.192interface Serial0 ip unnumbered Ethernet0 router igrp 10 network 171.68.0.0 | Current configuration:interface Ethernet 0 ip address 172.68.1.1 255.255.0.0interface Serial 0 ip unnumbered Ethernet0 router igrp 10 network 172.68.0.0 |
路由器 1.1.1.1 | 路由器 2.2.2.2 |
Current configuration:interface Ethernet0 ip address 171.68.178.196 255.255.255.192 interface Serial0 ip unnumbered Ethernet0 router igrp 10 network 171.68.0.0 | Current configuration:interface Ethernet 0 ip address 172.68.1.1 255.255.255.192 interface Serial 0 ip unnumbered Ethernet0 router igrp 10 network 172.68.0.0 |
Router 1.1.1.1# show ip route171.68.0.0/26 is subnetted, 1 subnetsC 171.68.178.192 is directly connected, Ethernet0172.68.0.0/16 is variably subnetted, 2 subnets, 2 masksI 172.68.0.0/16 [100/8976] via 172.68.1.1, 00:00:02, Serial0I 172.68.1.0/32 [100/8976] via 172.68.1.1, 00:00:02, Serial0Router 1.1.1.1# ping 172.68.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.68.1.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/81/280 msRouter 2.2.2.2# show ip route171.68.0.0/16 is variably subnetted, 2 subnets, 2 masksI 171.68.178.192/32 [100/8976] via 171.68.178.196, 00:00:22, Serial0I 171.68.0.0/16 [100/8976] via 171.68.178.196, 00:00:22, Serial0172.68.0.0/26 is subnetted, 1 subnetsC 172.68.1.0 is directly connected, Ethernet0Router 2.2.2.2# ping 171.68.178.196Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 171.68.178.196, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms