IP UNNUMBERED

1、无编号IP(IP unnumbered)用途:
      使用无编号IP是由于IP地址比较紧张,因此在广域网链路汇总地址的分配时通常采起如下3种策略:1。使用VLSM
              2。使用私有地址
        3。使用无编号IP(IP unnumbered)

1。关于VLSM:可变长度子网掩码 (VLSM)   
VLSM提出供了在一个主类(A、B、C类)网络内包含多个子网掩码的能力,以及对一个子网的再进行子网划分的能力。它的优势以下:   
l对IP地址更为有效的使用-若是不采用VLSM,公司将被限制为在一个A、B、C类网络号内只能使用一个子网掩码;   
l就用路由概括的能力更强-VLSM容许在编址计划中有更多的体系分层,所以能够在路由表内进行更好的路由概括。 .若是使用VLSM的话,那么运行的路由协议必须是无类(classless)的, 以便在路由更新中发送掩码。若是是用有类(classful)路由协议的话,路由更新信息将出现错误,这也算使用VLSM时的交换条件吧。

2。关于私有地址:虽然使用VLSM提升了地址利用率,但仍然消耗了1个本能够用于扩展的子网。因此用私有地址能够比使用VLSM更节约地址,由于前者根本就不会消耗任何全球可寻址的IP。在点对点广域网链路上使用了私有地址,由于私有地址不会被INTERNET ROUTER所路由,因此会致使一些限制,如:运行ICMP PING进行排错和远程TELNET等等。
3.关于 IP unnumbered: 前面提到了1。2的限制,在IP unnumbered 的却都没有。IP unnumbered 说白了就是在串口上从另外一个接口上借用一个IP(能够是ETHERNET 或LOOPBACK),所以不须要它本身的地址。而IP unnumbered 的最大诱惑是能够与classful routing protocols一块儿使用(看看刚说过的1)。

    但要使用IP unnumbered 也有2个规则:
            1。接口必须是串口且是点到点链接   
        2。在串口2端"借给"它们地址的局域网接口必须知足2者之一:
            ----- 相同主网不一样子网,但掩码必须相同。   
            ------不一样主网缺省掩码{即未被划分的主网}]     
看下CISCO的官方文档
[url]http://www.cisco.com/warp/public/701/20.html[/url]

IP unnumbered 的限制:不能用PING来测试接口是不是UP的;不能经过一个使用IP unnumbered 的串口来从网络IOS映像中启动;使用IP unnumbered 的借口不支持 IP 安全选项。
具体配置方法:
1:先配置好两台路由器的链接。
2:在两台路由器对连的串口,开启IP unnumbered 功能。
interface s0
ip unnumbered e0
摘几个例子

Configuration Examples

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.

Same Major Net, Different Subnets

Figure 1 shows that on either side of the serial link we have the same major net with different subnets.
20a.gif
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.
20b.gif
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.
20c.gif
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.
20d.gif
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.