Private networks, Subnet masks – Cisco ASA 5505 User Manual

Page 1884

Advertising
background image

B-2

Cisco ASA 5500 Series Configuration Guide using the CLI

Appendix B Addresses, Protocols, and Ports

IPv4 Addresses and Subnet Masks

Class B addresses (128.0.xxx.xxx through 191.255.xxx.xxx) use the first two octets as the network
prefix.

Class C addresses (192.0.0.xxx through 223.255.255.xxx) use the first three octets as the network
prefix.

Because Class A addresses have 16,777,214 host addresses, and Class B addresses 65,534 hosts, you can
use subnet masking to break these huge networks into smaller subnets.

Private Networks

If you need large numbers of addresses on your network, and they do not need to be routed on the
Internet, you can use private IP addresses that the Internet Assigned Numbers Authority (IANA)
recommends (see RFC 1918). The following address ranges are designated as private networks that
should not be advertised:

10.0.0.0 through 10.255.255.255

172.16.0.0 through 172.31.255.255

192.168.0.0 through 192.168.255.255

Subnet Masks

A subnet mask lets you convert a single Class A, B, or C network into multiple networks. With a subnet
mask, you can create an extended network prefix that adds bits from the host number to the network
prefix. For example, a Class C network prefix always consists of the first three octets of the IP address.
But a Class C extended network prefix uses part of the fourth octet as well.

Subnet masking is easy to understand if you use binary notation instead of dotted decimal. The bits in
the subnet mask have a one-to-one correspondence with the Internet address:

The bits are set to 1 if the corresponding bit in the IP address is part of the extended network prefix.

The bits are set to 0 if the bit is part of the host number.

Example 1: If you have the Class B address 129.10.0.0 and you want to use the entire third octet as part
of the extended network prefix instead of the host number, then you must specify a subnet mask of
11111111.11111111.11111111.00000000. This subnet mask converts the Class B address into the
equivalent of a Class C address, where the host number consists of the last octet only.

Example 2: If you want to use only part of the third octet for the extended network prefix, then you must
specify a subnet mask like 11111111.11111111.11111000.00000000, which uses only 5 bits of the third
octet for the extended network prefix.

You can write a subnet mask as a dotted-decimal mask or as a /bits (“slash bits”) mask. In Example 1,
for a dotted-decimal mask, you convert each binary octet into a decimal number: 255.255.255.0. For a
/bits mask, you add the number of 1s: /24. In Example 2, the decimal number is 255.255.248.0 and the
/bits is /21.

You can also supernet multiple Class C networks into a larger network by using part of the third octet
for the extended network prefix. For example, 192.168.0.0/20.

This section includes the following topics:

Determining the Subnet Mask, page B-3

Determining the Address to Use with the Subnet Mask, page B-3

Advertising