Illustrated TCP/IP Illustrated TCP/IP
by Matthew G. Naugle
Wiley Computer Publishing, John Wiley & Sons, Inc.
ISBN: 0471196568   Pub Date: 11/01/98
  

Previous Table of Contents Next


PartTwo
The Protocol Suiteof TCP/IP

Chapter 73
Masks and Prefixes

Prefix routing has been around a long time. In fact, it is defined in RFC 1338. Prefix routing is the method used on the backbone of the Internet—an IP address is looked at simply as a 32-bit number and a prefix. The prefix is a mask that slides over the IP address to determine its network number. A routing entry in the Internet routing table may simply be 150.0.0.0/8 and a next hop address to the next in-line router to that destination. The router does not care about anything else in the address except that all 150.x.x.x networks are in the indicated direction.

Masks and Prefixes

•  The addresses 210.10.40.0/24 and 210.10.40.0/255.255.255.0 mean the exact same thing.
IP Network
Address Prefix Subnet Mask
128.1.0.0 /16 255.255.0.0
190.1.8.0 /21 255.255.248.0
207.16.16.128 /25 255.255.255.128

A subnet mask and a prefix can be intermixed. In fact, on Cisco routers, you will see the /prefix commonly used throughout their configuration interface.

Throughout this text, I will use both the decimal subnet mask and the prefix; a mask and a prefix are essentially the same thing. For example, a subnet of 255.255.255.0 and a prefix of /24 are the same. To illustrate, you could see an address written as 150.1.0.0/24, which means address 150.1.0.0 subnet 255.255.0.0.

Let’s look at a few subnet examples, starting with address assignment at a company site.


Previous Table of Contents Next