Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
What is an Unnumbered Interface?
IP and IP Unnumbered
Configuration Examples
Same Major Net, Different Subnets
Different Major Nets, No Subnets
Major Net with Subnet, Major Net with No Subnet
Two Different Major Nets and Their Respective Subnets
Introduction
This document explains the concept of IP unnumbered, and provides several configuration examples for reference. The ip unnumbered configuration command allows you to enable IP processing on a serial interface without assigning it an explicit IP address. The ip unnumbered interface can "borrow" the IP address of another interface already configured on the router, which conserves network and address space.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
This document is not restricted to specific software and hardware versions.
Conventions
For more information on document conventions, refer to Cisco Technical Tips Conventions.
What is an Unnumbered Interface?
Consider the network shown below. Router A has a serial interface S0 and an Ethernet interface E0.
Router A's Ethernet 0 interface can be configured with an IP address as shown below:
interface Ethernet0 ip address 172.16.10.254 255.255.255.0
Logically, to enable IP on interface S0, you would need to configure a unique IP address on it. However, it is also possible to enable IP on the Serial interface and bring it up without assigning a unique IP address to it. This is done by borrowing an IP address already configured on one of the router's other interfaces. To do this, the ip unnumbered interface mode command is used as shown below.
interface Serial 0 ip unnumbered Ethernet 0
The ip unnumbered <type> <number> interface mode command borrows the IP address from the specified interface to the interface on which the command has been configured. Use of the ip unnumbered command results in the IP address being shared by two interfaces. Thus, in our example, the IP address which was configured on the Ethernet interface is also assigned to the Serial interface, and both interfaces involved function normally. This can be verified using the output of the show ip interface brief command, as shown below:
RouterA# show ip interface brief Interface IP-Address OK? Method Status Protocol Ethernet0 172.16.10.254 YES manual up up Serial0 172.16.10.254 YES manual up up
As you can see from the output of the show ip interface brief command above, the serial interface has an IP address identical to that of the Ethernet interface, and both interfaces are fully functional. The interface that borrows its address from one of the router's other functional interfaces is called the "unnumbered interface". In our example, Serial 0 is the unnumbered interface.
The only real disadvantage that the unnumbered interface suffers from is that it is unavailable for remote testing and management. You should also remember that the unnumbered interface should borrow its address from an interface that is up and running. If the unnumbered interface is pointing to an interface that is not functional (that is, which does not show "Interface status UP", "Protocol UP"), the unnumbered interface does not work. This is precisely why it is recommended that the unnumbered interface point to a loopback interface since loopbacks do not fail. Finally, remember that the ip unnumbered command works on point-to-point interfaces only. When you configure the command on the Multiaccess interface (that is, Ethernet) or the loopback interface, the following messages are displayed:
RouterA(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
IP and IP Unnumbered
On a Cisco router, every interface connecting to a network segment must belong to a unique subnet. Directly connected routers have interfaces connecting to the same network segment and are assigned IP addresses from the same subnet. If a router needs to send data to a network that is not directly connected, it looks in its routing table and forwards the packet to the next directly connected hop toward the destination. If there is no route in the routing table, the router forwards the packet to its gateway of last resort. When a router that is directly connected to the final destination receives the packet, it delivers the packet directly to the end host.
The IP routing table contains either subnet routes or major network routes. Each route has one or more directly attached next hop address(es). Subnet routes are aggregated or summarized by default at major network boundaries in order to reduce the size of the routing table.
Note: The aggregation scheme discussed above assumes a traditional distance-vector routing protocol such as Routing Information Protocol (RIP) or Interior Gateway Routing Protocol (IGRP).
Let's consider assigning IP addresses to the interfaces of a router using a class B network that has been subnetted using eight bits of subnetting. Every interface requires a unique subnet. Although each point-to-point serial connection has only two end points to address, if we assign an entire subnet to each serial interface, we use 254 available addresses for each interface where only two addresses are needed. If we use IP unnumbered on each serial interface, we save address space; the address of a LAN interface is "borrowed" and used as the source address for routing updates and packets sourced from the serial interface. In this way, address space is conserved. IP unnumbered only makes sense for point-to-point links.
A router receiving a routing update installs the source address of the update as the next hop in its routing table. Normally, the next hop is a directly-connected network node. This is no longer the case if we use IP unnumbered because each serial interface "borrows" their IP address from a different LAN interface, each in a different subnet and possibly in a different major network. When IP unnumbered is configured, routes learned through the IP unnumbered interface have the interface as the next hop instead of the source address of the routing update. Thus we avoid an invalid next hop address problem due to the source of the routing update coming from a next hop that is not directly connected.
Configuration Examples
Note: The information in these configuration examples is based on Cisco IOS® 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.
Figure 1 – 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 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.
Different Major Nets, No Subnets
Figure 2 shows that on either side of the serial link we have different major nets and no subnets.
Figure 2 - Network Diagram
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
Major Net with Subnet, Major Net with No Subnet
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
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.
Two Different Major Nets and Their Respective Subnets
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.