If you have multiple WAN links, but the availability of usable subnets is running low, then Cisco has a proprietary solution for you. The ip unnumbered command can be used to connect a point-to-point serial WAN link between two Cisco routers without using any IP addresses. Cool, huh?
To configure the ip unnumbered command, you must have two Cisco routers connected on a point-to-point link via the serial interfaces of the routers and you must have a classful network configured on the two networks you are connecting via the point-to-point serial WAN link. What does all this mean? That is what I will explain to you in this Daily Feature.
Creating unnumbered serial interfaces
The ip unnumbered command was created to help preserve IP subnets when a network already has many subnets in use and you can’t afford to waste a full subnet on a point-to-point network.
With Network Address Translation (NAT) as well as Port Address Translation (PAT), and with the implementation of private IP addresses (i.e., 10.0.0.0), the ip unnumbered command is not as important as in the days where all devices on an internetwork had real Internet IP addresses. However, if a WAN needs to be connected quickly and subnet availability is low, the ip unnumbered command can still be used. (NAT and PAT are used to translate from a private IP address on an internetwork to a “real” Internet IP address when a host on a private IP address needs to send packets to the Internet for HTTP or e-mail services, for example.)
The ip unnumbered command works by borrowing an IP address from another active interface on the router whenever it needs to send a packet out through the serial interface. Ip unnumbered must be working on both sides of the link to send packets successfully.
Figure A shows a router with two LANs connected via a serial link. Since no subnets are available that can be configured on the serial link, the ip unnumbered command will be used to configure the serial link.
|Two class C “real” Internet addresses are configured on both LANs through a serial link (S0).|
One solution that can be used instead of the ip unnumbered command is to configure discontiguous networking. What this means is that two subnets of the same class of network are connected via a different class of network, as shown in Figure B.
|Two class C networks with the same mask are connected via a private class A network with a different mask.|
To connect a discontiguous network, you need to have a routing protocol that supports discontiguous networking, for example, OSPF, RIP v2, and/or EIGRP. These three routing protocols are classless routing protocols that send prefix subnet mask information with their route updates. If you are not running one of these routing protocols, then you need to use the ip unnumbered command instead or use a valid subnet.
Configuring ip unnumbered
This is the simple part of the technology. Once you have your network design correct and you’re ready to implement, you use one simple command: ip unnumbered interface, where interface is the router’s active interface that will be used when an IP address needs to be borrowed.
Here is the configuration for Figure A (I will show the configuration of both 2500A and 2500B routers):
2500A(config-if)#ip address 18.104.22.168 255.255.255.0
2500A(config-if)#interface serial 0
2500A(config-if)#ip unnumbered ethernet 0
2500B(config-if)#ip address 22.214.171.124 255.255.255.0
2500B(config-if)#interface serial 0
2500B(config-if)#ip unnumbered ethernet 0
That’s all there is to it! The keys to success are making sure that you have the same class of IP addresses and masks on both sides of the link and that the interface you are borrowing an IP address from is up and running.
Using ip unnumbered with a VLSM network
If you have a larger network and multiple serial links, the ip unnumbered command can provide a nice solution for point-to-point links in a situation where you cannot run a classless routing protocol. If you are supporting older legacy routers that only run RIP v1, then the ip unnumbered command can be used to support your network until you can redesign the IP scheme, which will provide more /30 networks.
A /30 network is a subnet with a 255.255.255.252 mask, which provides only two hosts, regardless of the class of IP address. This is perfect for a point-to-point serial link that uses only two hosts!
For example, in Figure C, a perfect corporate network is shown.
|Notice that the LANs have a different subnet mask than the serial links.|
Each LAN is using a /27, which is 255.255.255.224, or 30 host addresses per LAN. The serial WAN links are using a 255.255.255.252 or /30,which provides two hosts per subnet.
To make this Variable Length Subnet Mask (VLSM) work, you must use a classless routing protocol. As mentioned, if you do have this network design but are running a classful routing protocol because of older router support, then the ip unnumbered command can solve the problem until your network can be redesigned. (As if that will ever happen!)
Figure D shows how this classful network would work with real IP addresses assigned to each LAN.
|Each LAN is assigned a “real” Internet IP address and all the subnet masks used in the internetwork are the same length (/27).|
RIP would work just fine in Figure D’s network. (OK, besides the obvious bandwidth usages on the slow WAN links!)
The Cisco proprietary ip unnumbered command can help you in a pinch or when you are designing a network that is discontiguous. Cisco created the ip unnumbered command before NAT and PAT were designed and private IP addresses became the norm on most corporate internetworks.
If you are designing an internetwork, it would be best to use a private IP address scheme and use VLSM with a classless routing protocol. However, if this is not possible, Cisco is here for you with the ip unnumbered command.