Sunday 8 September 2019

IPv4 Addressing Complete Tutorial | IPV4 Types

IPv4 Addressing Complete Tutorial | IPV4 Types 


In this article we will describe the structure of an IPv4 Addressing and explain the public, private and reserved IPv4 addresses.

What is the IPv4 Address?

Hosts, servers and network devices use binary addressing, which consist of numbers 0 and 1, called bits.


  • They consist of a 32-bit string, divided into four sections called octets.
  • Each octet contains 8 bits (or 1 byte) separated by a period.

Working with binary numbers can be challenging. To make this easier, IPv4 addresses are usually expressed by dotted decimal notation.

STRUCTURE OF AN IPV4 ADDRESS

It is important to understand binary notation to determine if two hosts are on the same network.


  • Network and host portions
  • Network and host portions


The bits within the network portion of the address must be identical for all devices that reside on the same network. The bits within the host portion of the address must be unique to identify a specific host within a network. If two hosts have the same bit pattern in the specified network portion of the 32-bit sequence, those two hosts reside on the same network.

But how do the hosts know what portion of the 32 bits identifies the network and what portion identifies the host? That is the function of the subnet mask .

What is the Subnet Mask?

The subnet mask is used to determine the network portion of an IP address.
The 1 in the subnet mask identifies the network portion , while the 0 identify the host portion. To identify the network and host portions of an IPv4 address, the subnet mask is compared with the IPv4 address bit by bit, from left to right. The actual process used to identify the network portion and the host portion is called AND.

LOGICAL AND

To identify the network address of an IPv4 host, the logical AND operation is used for the IPv4 address, bit by bit, with the subnet mask. The use of the AND operation between the address and the subnet mask produces the network address. To demonstrate how AND is used to detect a network address, think of a host with IPv4 address 192.168.10.10 and subnet mask 255.255.255.0. In the following image, the IPv4 host address and the conversion to binary address are shown. Also the binary address of the host subnet mask.

In the sections highlighted in yellow, the AND bits that produced a binary 1 in the AND Results row are identified. All other bit comparisons produce 0 binaries. Notice how the last octet no longer has binary 1 bits. Finally, the resulting network address 192.168.10.0 255.255.255.0 is displayed . Therefore, host 192.168.10.10 is on the 192.168.10.0 network 255.255.255.0.

PREFIX LENGTH

The prefix length is the number of bits set to 1 in the subnet mask. It is written by the "slash notation", that is, a "/" followed by the number of bits set to 1. Therefore, count the number of bits in the subnet mask and put a slash first.


Network. Host & Broadcast Addresses

Each network address contains (or identifies) host addresses and a broadcast address, as described below:

Network address: 

The address and subnet mask refer to a network. All hosts within the network share the same network address. The host portion consists only of zeros. (192.168.10.0/24)

Host addresses: 

Unique IP addresses assigned to hosts and devices. The host portion always contains zeros and some combined, but never zeros or only ones.


First host address: First host IP address available on the network. The host portion always consists of all zeros, except the last number, which is a one. (192.168.10.1/24)
Last host address: Last host IP address available on the network. The host portion always consists of all numbers one, except the last. That is a zero. (192.168.10.254/24)

Broadcast address: 

A special address that communicates with all hosts in a network. for example, when a host sends a packet to the IPv4 network broadcast address, and all other hosts in the network receive the packet. The broadcast address uses the highest address in the network range. The host portion consists only of ones. (192.168.10.255/24)

The concepts discussed in this topic are essential to understand IPv4 addressing. Make sure you understand how a network address identifies a network portion and a host portion using the subnet mask or prefix length and the AND operation. You should also take note of the different types of network addresses within a network.

Unicast, Broadcast & Multicask IPV4

In an IPv4 network, hosts can communicate in three different ways:

Unicast IPv4 Address: 

The process by which a packet from a host is sent to an individual host.

Broadcast IPv4 Address :

The process by which a packet from one host is sent to all hosts in the network. The broadcast can be directed or limited: A targeted broadcast is sent to all hosts of a specific network and a limited broadcast is sent to 255.255.255.255. Routers do not forward limited broadcasts.

Multicast IPv4 Address

Send a packet from a host to a selected group of hosts on the same network or on a different network.
IPv4 reserved the addresses from 224.0.0.0 to 239.255.255.255 as a multicast range (reserved for multicast only in the local network).

TYPES OF IPV4 ADDRESSES

Following are the main types of IPv4 addressing 

Public IPv4 addresses

These are addresses that are routed globally between ISP routers. There are blocks of addresses called private addresses that most organizations use to assign IPv4 addresses to internal hosts.

Private IPv4 Addresses:

  • 10.0.0.0/8 or 10.0.0.0 to 10.255.255.255
  • 172.16.0.0/12 or 172.16.0.0 to 172.31.255.255
  • 192.168.0.0/16 or 192.168.0.0 to 192.168.255.25
Private addresses within these address blocks are not allowed on the Internet and must be filtered (discarded) by Internet routers

IPv4 Addresses of Special Users

There are special addresses that can be assigned to hosts, but with restrictions on how these hosts can interact within the network.

  • Network and broadcast addresses : it is not possible to assign the first or last address of each network to hosts.
  • Loopback addresses : 127.0.0.1 to 127.255.255.254 (127.0.0.0 / 8), is a special address that hosts use to direct traffic to themselves
  • Link-local address or addresses with automatic private IP address assignment (APIPA): addresses 169.254.0.1 to 169.254.255.254 (169.254.0.0/16) can be automatically assigned to the local host.
  • TEST-NET addresses: the addresses from 192.0.2.0 to 192.0.2.255 (192.0.2.0/24) are reserved for teaching and learning purposes, and are used in document and network examples.
  • Experimental addresses: addresses from 240.0.0.0 to 255.255.255.254 are indicated as reserved.

IPv4 Address Classes

In 1981, Internet IPv4 addresses were assigned through classy addressing , as defined in RFC 790 , Assigned Numbers. Clients were assigned a network address based on one of three classes: A, B, or C. RFC divided the unicast ranges into specific classes called:


  1. Class A (0.0.0.0/8 to 127.0.0.0/8) : designed to support extremely large networks, with more than 16 million host addresses . It used a fixed / 8 prefix where the first octet indicated the network address and the remaining three octets were for host addresses.
  2. Class B (128.0.0.0 / 16 to 191.255.0.0 / 16) : designed to meet the need for moderate to large-sized networks, with up to 65,000 host addresses . It used a fixed / 16 prefix where the two higher value octets indicated the network address and the remaining two octets were for host addresses.
  3. Class C (192.0.0.0 / 24 to 223.255.255.0 / 24) : designed to support small networks with a maximum of 254 hosts . It used a fixed / 24 prefix where the first three octets indicated the network and the remaining octet was for host addresses.




No comments:

Post a Comment