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.
相關文章
相關標籤/搜索