Title: 2.4 IPv4 Addressing
Course: Information and Communication Technology: Module B > Section: Section 2 - Network Addressing Basics

2.4.1 IP Addressing

All Internet Protocol (IP) addresses are assigned hierarchically. The Internet Assigned Numbers Authority (IANA) is the organization responsible for global IP addressing systems. They give addresses to the six Regional Internet Registries (RIRs). The RIRs, in turn, give the addresses to Internet Services Providers (ISPs) who give us, the end users, addresses.

The American Registry for Internet Numbers (ARIN) manages IP addressing in the United State.

2.4.2 Binary Review

When designing digital circuits, binary numbers are listed in a counting sequence. This makes it easy for the designer to track individual input combinations and their meanings in a particular design.
We increase a binary count the same way we increase a decimal count, one value at a time. In addition, just as the number of digits determines the largest decimal number one may represent, the number of bits determines the largest binary number one may represent.
For example, using three decimal digits, you can count from zero (000) to 999, which represents one thousand unique decimal values or 104.
Each bit in a binary number has a numerical value or weight based on its position in the sequence. This, again, is similar to the decimal system. For example, the decimal number 234 reads four times one, plus three times ten, plus two times one hundred (4x1 + 3x10 + 2x100). The weight of each decimal position increases by ten for every decimal position to the left.
In the binary system, the weight doubles for every binary position to the left.

2^7 | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

The value of the rightmost bit position is always 1 or 2^0. The value of the next position to the left is 2 or 2^1. Moving further left, the weights of the positions are 2^2 = 4, 2^3 = 8, 2^4 = 16, 2^5 = 32, 2^6 = 64, 2^7= 128 and so on. Using this knowledge, we can easily count in a binary sequence and have a method for relating the numerical values of binary and decimal numbers. For example, the decimal value of the eight-bit binary number 11010011 is found by adding the binary weights of each bit position with a 1 (we ignore the zero bits).

A binary 11010011 in decimal is equal to (1x1) + (1x2) + (0x4) + (0x8) + (1x16) + (0x32) + (1x64) + (1x128) = 211

2.4.3 IPv4

Internet Protocol version 4 (IPv4) was the first version of the protocol to be widely deployed. It is at the core of standards-based internetworking methods of the Internet. It is still the most widely- deployed Internet Layer protocol.

IPV4 uses a best model for packet delivery which means there are no guarantees packets will be reassembled in the proper order or even get delivered. These aspects, plus others, are addressed by Transmission Control Protocol (TCP).

IPv4 uses 32-bit address divided into four groups of eight (octets) separated by a period (dot) known as dotted decimal notation. An IP address can be divided into two parts: the network identifier is the most significant bits (1st octet) and the host identifier is the rest of the address known as classful networking. The system defines five classes, A, B, C, D, and E.

A, B, and C are viable addresses used by the public internet. Class D was allocated for multicast addressing and Class E was reserved for experimental use. This seriously limited the number of addresses that could be assigned. We will only be working with classful networking in this curriculum.

To overcome this limitation, two systems were developed:

- The variable-length subnet mask (VLSM) which is a technique that allows networks to be divide into an IP address space of subnets of different sizes. VLSM breaks down IP addresses into subnets or smaller groups, and allocates them according to the individual need on a network. It can also be called classless IP addressing.

- Classless Inter-Domain Routing (CIDR) was designed to permit repartitioning of any address space so that smaller or larger blocks of addresses could be allocated to users making the allocation fit the individual or company, thus increasing the number of addresses available.

Even with all of this, IPv4 address exhaustion occurred early in 2011. The only ipv4 addresses still available are those purchased by service providers. When they are gone, the Internet as we know it will be full. But because of its widespread use, it will be around for a while. It is not expected to shut down until January 1, 2020.

2.4.4 IPv4

To communicate, your computer must know three things:

- its IP address—Its unique identifier on the network and internet
- its subnet mask—The size of the network
- its default gateway—The way to get to the internet

As an introduction to addressing, we will only discuss classful addressing. Class A, B, and C are the three routable classes.  "Routable" means they can cross the Internet.

When written in binary number format, the most significant (farthest to the left) bit of a Class A address is always 0. An example of a Class A IP address is 84.95.44.15. The decimal number 84 has been assigned by the American Registry of Internet Number (ARIN). The internal administrators of the network assign the remaining 24 bits.

You can quickly identify a Class A network by looking at the first octet of its IP address, which will range from 0-126 as represented by 00000000 (128) - 01111111 (191) in binary. (127 does start with a 0 bit, but 127 is a reserved address that cannot be used for any device).

This addressing scheme is very similar to mailing a letter. The zip code or “network portion” will get the letter to the right city. The street address or “host portion” will get the letter to the right house.

All Class A IP addresses use only the first 8 bits to identify the network part of the address. The remaining three octets can be used for the host portion of the address. Every network that uses a Class A IP address can have assigned up to 2-to-the-power-of-24 (2^24), or 16,777,216 possible IP addresses to devices that are attached to its network. Two addresses are subtracted because there are two addresses that cannot be assigned to a host: the network address and the broadcast address.

2.4.5 IPv4

An easy way to recognize whether a device is part of a Class B network is to look at the first octet of its IP address. Class B IP addresses always have values ranging from 128 to 191 in their first octet. The first 2 bits of a Class B address are always 10 (one and zero) because all Class B addresses (128-191) are represented by 10000000 (128) - 10111111 (191) in binary.

An example of a Class B IP address is 155.18.3.128. The first two octets identify the network number assigned by ARIN. The internal administrators of the network assign the remaining 16 bits. Looking at the first octet allows you to determine other classes. Class B IP addresses always have values ranging from 128 to 191 in the first octet.

All Class B IP addresses use the first 16 bits for the network portion of the address. The two remaining octets of the IP address can be used for the host portion of the address. Every network that uses a Class B IP address has up to 2-to-the-power-of-16 (2^16) or 65,536 possible IP addresses available for devices attached to that network.

2.4.6 IPv4

An easy way to recognize a Class C network address is to look at the first octet of the IP address. Class C IP addresses always have values ranging from 192 to 223 in their first octet. The first 3 bits of a Class C address are always 110 (one, one and zero) because all Class C addresses (192-223) are represented by 11000000 (192)- 11011111 (223) in binary.

An example of a Class C IP address is 201.110.213.28. The first three octets identify the network number assigned by ARIN. The internal administrators of the network assign the remaining 8 bits. An easy way to recognize whether a device is part of a Class C network is to look at the first octet of its IP address. Class C IP addresses always have values ranging from 192 to 223 in their first octet.

All Class C IP addresses use the first 24 bits to identify the network portion of the address. Only the last octet of a Class C IP address can be used for the host portion of the address. Every network that uses a Class C IP address can have assigned up to 2-to-the-power-of-8 (2^8) or 256 possible IP addresses to devices that are attached to the network.

2.4.7 IPv4

It is important to be able to recognize each class and know the network/host formula.

N = Network number that is assigned by the American Registry for Internet Numbers (ARIN).
H = Host number that is assigned by the network administrator.

2.4.8 IPv4

An IP address that ends with binary 0s in all host bits is reserved for the network or wire address. This mean it is the lowest IP address on the network and cannot be assigned to any device. A router uses a network's network IP address when it forwards data on the Internet. Therefore, a Class B network number such as 176.10.0.0 is the network IP address of a network with a device address of 176.10.2.5.

The first two octets in a Class B network address are assigned by ARIN and are network numbers that will not change for any IP address on that network. The last two octets contain 0s, because those 16 bits are for host numbers, and are used for devices that are attached to the network. The IP address in the example (176.10.0.0) is reserved for the entire network address. It will never be used as an address for any device that is attached to that network.

2.4.9 IPv4

If you want to send data to all of the devices on any given network, you need to use a broadcast address. A broadcast occurs when a source sends out data to all devices on a network. To ensure that all of the devices on the network pay attention to the broadcast, the sender must use a destination IP address that all of them can recognize and will pick up. Broadcast IP addresses end with binary 1s in the entire host part of the address. A Class B address would have a broadcast of 176.10.255.255. This address cannot be assigned to any specific device on the network.

The decimal numbers that fill the first two octets in this Class B network address are assigned and are network numbers that will not change for any IP address on that network. The last two octets contain all 1s making it the last address on the network—or the broadcast address. The broadcast IP address in the example (176.10.255.255) is reserved for the entire network address. It will never be used as an address for any device that is attached to that network.

2.4.10 IPv4

Network Number and Broadcast Address:

- All 0’s in the host address is the network number.
- All 1’s in the host address is the broadcast address.
- These two addresses can never be used when assigning IP’s.
- When finding the number of useable host addresses in a network, you will always subtract 2 (network & broadcast).

Please complete assignment 2.4.1 in the lab manual.