Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    IP Addressing Overview

    This topic provides an overview of IP addressing in general and includes a discussion of Classless Interdomain Routing (CIDR), which your router fully supports.

    Physical and Logical Addresses

    Physical node addresses are used at the network access layer to identify physical devices in a network. For example, each Ethernet controller comes from the manufacturer with a physical address, called a media access control (MAC) address.

    IP implements a system of logical host addresses called IP addresses. The IP addresses are used by the internetwork and higher layers to identify devices and to perform internetwork routing. The Address Resolution Protocol (ARP) enables IP to identify the physical (MAC) address that matches a given IP address. You can use ARP only on Ethernet and bridged IP 1483 interfaces.

    IP is used by all protocols in the layers above and below it to deliver data. This means that all TCP/IP data flows through IP when it is sent and received, regardless of its final destination.

    Internet Addresses

    Internet addressing uses a 32-bit address field. The bits in this address field are numbered 0 to 31. The 32-bit address field consists of two parts: a network number and a host number whose boundaries are defined based on the class of IP address. Hosts attached to the same network must share a common prefix designating their network number.

    Four types of IP classes lend themselves to different network configurations, depending on the desired ratio of networks to hosts. Figure 1 shows the format of IP address classes.

    Figure 1: IP Address Classes

    IP Address Classes
    • Class A—The leading bit is set to 0, a 7-bit number, and a 24-bit local host address. Up to 125 class A networks can be defined, with up to 16,777,214 hosts per network.
    • Class B—The two highest-order bits are set to 1 and 0, a 14-bit network number, and a 16-bit local host address. Up to 16,382 class B networks can be defined, with up to 65,534 hosts per network.
    • Class C—The three leading bits are set to 1, 1, and 0, a 21-bit network number, and an 8-bit local host address. Up to 2,097,152 class C networks can be defined, with up to 254 hosts per network.
    • Class D—The four highest-order bits are set to 1, 1, 1, and 0. Class D is used as a multicast address.

    Subnetwork Mask Format Options

    Most commands allow you to specify IPv4 subnetwork masks in one of two ways: dotted decimal or prefix length notation.

    Note: Protocol commands that use a reverse mask format (for example, RIP) cannot use the prefix notation format. Use the command-line interface (CLI) help to verify if a command supports the /N prefix notation.

    Dotted decimal notation expresses IP addresses and masks in dotted quads - four octets separated by dots (A.B.C.D). In this format, each octet in the address or mask is represented as a decimal number and the dots are used as octet separators.

    For example, an IP address and subnetwork mask in dotted decimal notation would appear as follows:

    10.10.24.6 255.255.0.0

    Prefix length notation (often called network prefix format) allows for more efficient allocation of IP addresses than the old Class A, B, and C address scheme. The prefix length is the number of leftmost contiguous bits equal to 1 in the subnetwork mask. This format appears immediately following the dotted decimal IP address using a /N format.

    Note: You can issue the network prefix with or without a space between the IP address and the network prefix (/N).

    For example, the same IP address and subnetwork mask mentioned above would appear as follows using /N format:

    10.10.24.6/16
    or
    10.10.24.6 /16

    The following sections describe each subnetwork mask addressing method in more detail:

    Subnet Addressing

    A subnet is a subset of a class A, B, or C network. Subnets cannot be used with class D (multicast) addresses.

    A network mask is used to separate the network information from the host information about an IP address. Figure 2 shows the network mask 255.0.0.0 applied to network 10.0.0.0. The mask in binary notation is a series of 1s followed by a series of contiguous 0s. The 1s represent the network number; the 0s represent the host number. The sample address splits the IP address 10.0.0.1 into a network portion of 10 and a host portion of 0.0.1.

    Note: The router supports a 31-bit mask on point-to-point links. This means that the IP address 1.2.3.4 255.255.255.254 is valid. A point-to-point link in which only one end supports the use of 31-bit prefixes may not operate correctly.

    Figure 2: Basic Network Masking

    Basic Network Masking

    Classes A, B, and C have the following natural masks, which define the network and host portions of each class:

    • Class A natural mask 255.0.0.
    • Class B natural mask 255.255.0.0
    • Class C natural mask 255.255.255.0

    The use of masks can divide networks into subnetworks by extending the network portion of the address into the host portion. Subnetting increases the number of subnetworks and reduces the number of hosts.

    For example, a network of the form 10.0.0.0 accommodates one physical segment with about 16 million hosts on it. Figure 3 shows how the mask 255.255.0.0. is applied to network 10.0.0.0. The mask divides the IP address 10.0.0.1 into a network portion of 10, a subnet portion of 0, and a host portion of 0.1. The mask has borrowed a portion of the host space and has applied it to the network space. The network space of the class 10 has increased from a single network 10.0.0.0 to 256 subnetworks, ranging from 10.0.0.0 to 10.255.0.0. This process decreases the number of hosts per subnet from 16,777,216 to 65,536.

    Figure 3: Subnetting

    Subnetting

    Classless Addressing with CIDR

    CIDR is a system of addressing that improves the scaling factor of routing in the Internet. CIDR does not use an implicit mask based on the class of network. In CIDR, an IP network is represented by a prefix, which is an IP address and an indication of the leftmost contiguous significant bits within this address.

    For example, without CIDR, the class C network address 192.56.0.0 would be an illegal address. With CIDR, the address becomes valid with the notation: 192.56.0.0/16. The /16 indicates that 16 bits of mask are being used (counting from the far left). This would be similar to an address 198.32.0.0. with a mask of 255.255.0.0.

    A network is called a supernet when the prefix boundary contains fewer bits than the network’s natural mask. For example, a class C network 192.56.10.0 has a natural mask of 255.255.255.0. The representation 192.56.0.0/16 has a shorter mask than the natural mask (16 is less than 24), so it is a supernet.

    Figure 4 shows how CIDR can reduce the number of entries globally in Internet routing tables. A service provider has a group of customers with class C addresses that begin with 192.56. Despite this relationship, the service provider announces each of the networks individually into the global Internet routing mesh.

    Figure 4: Routing With and Without CIDR

    Routing With and Without CIDR

    Published: 2014-08-13