Variable Length Subnet Masks

Unlike RIP and IGRP, EIGRP updates carry subnet mask information. The network architect now has the responsibility of using addresses wisely. Reviewing TraderMary’s configuration, a mask of 255.255.255.0 on the serial links is wasteful: there are only two devices on the link, so a 24-bit mask will waste 252 addresses. A 30-bit mask (255.255.255.252) allows two usable IP addresses in each subnet, which fits a serial line exactly.

Let’s say that the network architect decided to subdivide 172.16.250.0 using a 30-bit mask for use on up to 64 possible subnets. The subnets that thus become available are:

  1. 172.16.250.0

  2. 172.16.250.4

  3. 172.16.250.8

  4. ...

  1. 172.16.250.252

The serial links in TraderMary’s network can be readdressed using these subnets:

hostname NewYork
...
interface Ethernet0
ip address 172.16.1.1 255.255.255.0
!
interface Ethernet1
ip address 192.168.1.1 255.255.255.0
!
interface Serial0
description New York to Chicago link
ip address 172.16.250.1 255.255.255.252
!
interface Serial1
description New York to Ames link
bandwidth 56
ip address 172.16.250.5 255.255.255.252
...
router eigrp 10
network 172.16.0.0


hostname Chicago
...
interface Ethernet0
ip address 172.16.50.1 255.255.255.0
!
interface Serial0
description Chicago to New York link
ip address 172.16.250.2 255.255.255.252
!
interface Serial1
description Chicago to Ames link
ip address 172.16.250.9 255.255.255.0
...

router eigrp 10
network 172.16.0.0


hostname Ames
...
interface Ethernet0
ip address 172.16.100.1 255.255.255.0
!
interface Serial0
description Ames to Chicago link
ip address 172.16.250.10 255.255.255.0
!
interface Serial1
description Ames to New York link
bandwidth 56
ip address 172.16.250.6 255.255.255.0
...

router eigrp 10
network 172.16.0.0

NewYork’s routing table now looks like this:

NewYork#sh ip route
...
     172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
D       172.16.250.8/30 [90/2681856] via 172.16.250.2, 00:18:54, Serial0
C       172.16.250.0/30 is directly connected, Serial0
C       172.16.250.4/30 is directly connected, Serial1
D       172.16.50.0/24 [90/2195456] via 172.16.250.2, 00:18:54, Serial00
C       172.16.1.0/24 is directly connected, Ethernet0
D       172.16.100.0/24 [90/2707456] via 172.16.250.2, 00:18:54, Serial0
C    192.168.1.0/24 is directly connected, Ethernet1

Note that each route is now accompanied by its mask. When 172.16.0.0 had uniform masking, the routing table did not show the mask.

Further, let’s say that Casablanca is a small office with only a dozen people on the staff. We may safely assign Casablanca a mask of 255.255.255.192 (a limit of 62 usable addresses). Forward-thinking is important when assigning addresses. When running IGRP, the network architect may have had the foresight to assign addresses from the beginning of the range. Excess addresses should not be squandered, such as by randomly choosing addresses for hosts. A general rule is to start assigning addresses from the beginning or the bottom of an address range. When a site is shrinking, again keep all addresses at one end.

Using subnet masks that reflect the size of the host population conserves addresses. Put on your plate only as much as you will eat.

Get IP Routing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.