具体配置方法: 1:先配置好两台路由器的连接。 2:在两台路由器对连的串口,开启IP unnumbered 功能。 interface s0 ip unnumbered e0 摘几个例子 Note: The information in these configuration examples is based on Cisco IOS?/SUP> Software version 12.2(10b) and was tested on Cisco 2500 series routers. Let us look at four different sample configurations for IP unnumbered. Note: We could have used loopback interfaces instead of ethernet interfaces. Figure 1 shows that on either side of the serial link we have the same major net with different subnets. Figure 1 – Network Diagram Different Major Nets, No Subnets Router 1.1.1.1 | Router 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 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 route 171.68.0.0/26 is subnetted, 3 subnets I 171.68.179.0 [100/8976] via 171.68.179.1, 00:00:02, Serial0 C 171.68.178.192 is directly connected, Ethernet0 I 171.68.0.0 [100/8976] via 171.68.179.1, 00:00:02, Serial0 Router 1.1.1.1# ping 171.68.179.1 Type 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 ms Router 2.2.2.2# show ip route 171.68.0.0/26 is subnetted, 3 subnets C 171.68.179.0 is directly connected, Ethernet0 I 171.68.178.192 [100/8976] via 171.68.178.196, 00:00:02, Serial0 I 171.68.0.0 [100/8976] via 171.68.178.196, 00:00:02, Serial0 Router 2.2.2.2# ping 171.68.178.196 Type 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 The route information about subnets is correctly maintained in this scenario. Figure 2 shows that on either side of the serial link we have different major nets and no subnets. Figure 2 - Network Diagram Major Net with Subnet, Major Net with No Subnet Router 1.1.1.1 | Router 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 route C 171.68.0.0/16 is directly connected, Ethernet0 I 172.68.0.0/16 [100/8976] via 172.68.1.1, 00:01:26, Serial0 Router 1.1.1.1# ping 172.68.1.1 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 = 28/28/28 ms Router 2.2.2.2# show ip route I 171.68.0.0/16 [100/8976] via 171.68.178.196, 00:00:21, Serial0 C 172.68.0.0/16 is directly connected, Ethernet0 Router 2.2.2.2# ping 171.68.178.196 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/29/32 ms Figure 3 shows that on one side of the serial link we have a major net with a subnet, and on the other side a major net with no subnet. Figure 3 – Network Diagram Two Different Major Nets and Their Respective Subnets Router 1.1.1.1 | Router 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.0.0 interface Serial 0 ip unnumbered Ethernet0 router igrp 10 network 172.68.0.0 | Router 1.1.1.1# show ip route 171.68.0.0/26 is subnetted, 1 subnets C 171.68.178.192 is directly connected, Ethernet0 I 172.68.0.0/16 [100/8976] via 172.68.1.1, 00:00:03, Serial0 Router 1.1.1.1# ping 172.68.1.1 Type 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 = 28/31/32 ms Router 2.2.2.2# show ip route 171.68.0.0/16 is variably subnetted, 2 subnets, 2 masks I 171.68.178.192/32 [100/8976] via 171.68.178.196, 00:00:48, Serial0 I 171.68.0.0/16 [100/8976] via 171.68.178.196, 00:00:48, Serial0 C 172.68.0.0/16 is directly connected, Ethernet0 Router 2.2.2.2# ping 171.68.178.196 Type 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/29/32 ms Note: Prior to Cisco IOS software version 11.0(2), you are required to put a static route for the majornet 171.68.0.0/16 in Router 2.2.2.2. In this scenario, the subnet information gets lost since it's treated as a host route. In Cisco IOS software version 11.0(2) and higher, Interior Gateway Routing Protocol (IGRP) and Routing Information Protocol (RIP) fix this problem by sending the summary route for the majornet across the unnumbered point-to-point links. Figure 4 shows that on both sides of the serial link we have two different major nets with respective subnets. Figure 4 – Network Diagram Router 1.1.1.1 | Router 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 route 171.68.0.0/26 is subnetted, 1 subnets C 171.68.178.192 is directly connected, Ethernet0 172.68.0.0/16 is variably subnetted, 2 subnets, 2 masks I 172.68.0.0/16 [100/8976] via 172.68.1.1, 00:00:02, Serial0 I 172.68.1.0/32 [100/8976] via 172.68.1.1, 00:00:02, Serial0 Router 1.1.1.1# ping 172.68.1.1 Type 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 ms Router 2.2.2.2# show ip route 171.68.0.0/16 is variably subnetted, 2 subnets, 2 masks I 171.68.178.192/32 [100/8976] via 171.68.178.196, 00:00:22, Serial0 I 171.68.0.0/16 [100/8976] via 171.68.178.196, 00:00:22, Serial0 172.68.0.0/26 is subnetted, 1 subnets C 172.68.1.0 is directly connected, Ethernet0 Router 2.2.2.2# ping 171.68.178.196 Type 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 Note: In Cisco IOS software versions earlier than 11.0(2), you are required to put a static route for the majornet 171.68.0.0/16 in Router 2.2.2.2 and 172.68.0.0/16 in Router 1.1.1.1. In this scenario, the subnet information gets lost since it's treated as a host route. In Cisco IOS software version 11.0(2) and later, IGRP and RIP fix this problem by sending the summary route for the majornet across the unnumbered point-to-point links. |