IP Addressing, Internet Control Protocols

The network layer establishes a standardized packet format and protocol known as IP (Internet Protocol), featuring a distinctive addressing mechanism called the IP Address. The primary responsibility of the internet layer is to ensure the delivery of IP packets to their intended destinations. Key challenges at this layer include efficient packet routing and congestion avoidance.

Within the network layer, also known as the Internet Layer in the context of TCP/IP, the Internetworking Protocol (IP) is supported. This protocol encompasses four additional supporting protocols: ARPRARP, ICMP, and IGMP, collectively referred to as error reporting protocols. In the upcoming discussions, we will explore each of these protocols in the context of network operations.

Internet Protocol (IP)

The Internet Protocol (IP), part of the TCP/IP protocol stack, serves as the transmission mechanism. It operates as an unreliable and connectionless protocol, offering a best-effort delivery service. The term "best effort" implies that IP does not include error-checking or tracking capabilities.

IP facilitates the transportation of data in packets known as datagrams, each independently conveyed. These datagrams may follow diverse routes, potentially arriving out of sequence or in duplicated form. Importantly, IP does not monitor routes, and it lacks the ability to reorder datagrams upon reaching their destination. This minimalist approach in IP's transmission functions allows users to incorporate only the necessary facilities for a specific application, maximizing efficiency.

Notably, IP has undergone an evolution since its adoption as the official protocol for the Internet in 1983, resulting in six versions. The two main versions currently in use are:

    1. Version 4 (IPv4)
    2. Version 6 (IPv6)

 

Internet Protocol Version 4 (IPv4)

IPv4 employs a packet structure known as a datagram, which comprises a header and a text portion (payload). The header consists of a fixed 20-byte section and an optional part with variable length. Transmission occurs in big-endian order, progressing from left to right, with the high-order bit of the Version field leading the way.

Key aspects of IPv4 can be elucidated through the following points:

  1. IP Addresses: Identifiers assigned to devices on a network.
  2. Address Space: The range of possible IP addresses.
  3. Notations Used: Methods to express IP addresses.
  4. Classful Addressing: A method of dividing IP addresses into classes.
  5. Subnetting: Dividing a larger network into smaller sub-networks.
  6. CIDR (Classless Inter-Domain Routing): A flexible addressing scheme.
  7. NAT (Network Address Translation): A technique to map private to public IP addresses.
  8. IPv4 Header Format: The structure of the header in an IPv4 packet.

i. IP Addresses

Each device, whether a host or router, connected to the Internet possesses an IP address, a unique identifier encoding both its network number and host number. This combination ensures uniqueness, meaning that theoretically, no two machines on the Internet share the same IP address. An IPv4 address, the most common version, comprises 32 bits.

These addresses find applications in the Source and Destination Address fields of IP packets, facilitating the routing of data across networks. It's essential to note that an IP address is not tied to a specific host but rather corresponds to a network interface, representing a distinct point of connection within the broader network infrastructure.

ii. Address Space

Address space refers to the complete set of addresses available within a given protocol. When a protocol employs N bits to define an address, the address space is determined by 2^N, as each bit can take on two distinct values (0 or 1), and N bits can collectively represent 2^N unique values. In the case of IPv4, which utilizes 32-bit addresses, the address space is 2^32, resulting in a total of 4,294,967,296 unique addresses, exceeding 4 billion in number.

iii. Notations

IPv4 addresses are consistently represented in dotted notation, a format that enhances readability. In this notation, Internet addresses are typically expressed in decimal form, with a decimal point (dot) serving as the separator between bytes. Given that each byte, or octet, comprises 8 bits, the values in dotted-decimal notation range from 0 to 255. For example, the IPv4 address 129.11.11.239 is an illustration of this notation.

iv. Classful Addressing

Classful addressing categorizes the IPv4 address space into five distinct classes: A, B, C, D, and E.

Classful addressing: IPv4 NetID and HostID

In classful addressing, an IP address belonging to class A, B, or C is further divided into two components: the network identifier (netID) and the host identifier (hostID). The lengths of these parts vary based on the specific class of the address.

Table: Number of networks and hosts in each class

Class

Number of Network

Number of Hosts

Application

A

128

16,777,216

Unicast

B

16,384

65,536

Unicast

C

2,097,152

256

Unicast

D

1

268,435,456

Multicast

E

1

268,435,456

Reserved

Information on the Number of Networks and Hosts in Each Class:

  • Class A: Supports a large number of networks, each with a vast number of hosts.
  • Class B: Accommodates a moderate number of networks, each supporting a substantial number of hosts.
  • Class C: Provides a large number of networks, but each network supports a relatively smaller number of hosts.

The IP address 0.0.0.0 is utilized by hosts during the booting process.

It's important to note that addresses of form 127.xx.yy.zz are reserved for loopback testing, exclusively processed locally, and treated as incoming packets.

v. Subnetting

Subnetting is a network design technique that enables the division of a larger network into smaller, more manageable parts for internal use while maintaining a cohesive identity when communicating with the external network. This segmentation is achieved through the implementation of a subnet mask by the router, indicating the boundary between the network, subnet number, and individual hosts.

For example, a subnet mask like 255.255.252.0/22 is expressed with "/22" to signify its length of 22 bits. Consider a Class B address where 14 bits are allocated for the network number and 16 bits are reserved for host numbers. In the process of subnetting, some bits from the host number are reallocated to create a subnet number.

In a practical scenario, a Class B network can be subnetted into 64 subnets. If 6 bits from the host ID are designated for subnetting, the available bits are distributed as follows: 14 bits for the network, 6 bits for the subnet, and 10 bits for individual hosts. Subdividing the host bits into 6 allows for 2^6, resulting in 64 possible subnets. Simultaneously, with 10 bits reserved for hosts, there are 2^10, providing 1022 possible hosts (excluding 0 and 1, which are not available). This strategic allocation of bits enhances network management and optimization.

vi. CIDR (Classless Inter-Domain Routing)

Class B addresses are often excessively large for most organizations, while a class C network, with its 256 addresses, proves too limiting. This inefficiency leads to the allocation of Class B addresses to organizations, even when they do not require the entire address space, resulting in significant address space wastage and contributing to its depletion.

To address this challenge, CIDR, or Classless Inter-Domain Routing, presents a solution. The fundamental concept behind CIDR is the allocation of the remaining IP addresses in variable-sized blocks, without adhering to the rigid class-based structure. CIDR facilitates a more flexible and efficient distribution of IP addresses, ensuring that organizations receive an allocation that precisely meets their needs, thereby optimizing the utilization of the available address space and mitigating depletion concerns.

vii. NAT (Network Address Translation)

In response to the scarcity of network addresses in IPv4, the development of IPv6 was initiated. IPv6, with its 128-bit address format, boasts a significantly larger address space of 2^128, surpassing the 2^32 addresses provided by IPv4.

While the transition from IPv4 to IPv6 is underway, it progresses slowly due to challenges such as legacy hardware and its inherent incompatibility with processing IPv6 addresses. To expedite this transition, Network Address Translation (NAT) was introduced. The primary rule governing NAT is that packets containing these addresses should not appear on the internet itself. Three reserved address ranges are designated for NAT:

  1. 10.0.0.0 – 10.255.255.255/8 (16,777,216 hosts)
  2. 172.16.0.0 - 172.31.255.255/12 (1,048,576 hosts)
  3. 192.168.0.0 – 192.168.255.255/16 (65,536 hosts)

Operation:

Internally, each computer within an organization possesses a unique address in the form of 10.x.y.z. However, when a packet leaves the organization, it traverses through a NAT box. This NAT box transforms the internal IP source address (e.g., 10.x.y.z) to the organization's true IP address (e.g., 198.60.42.12), facilitating a seamless transition between internal and external networks.

viii. IP Header

The IPv4 (Internet Protocol) header serves as a crucial component in the structure of data packets. The description of various fields within the IPv4 header is detailed in the following table:

Table: Description of each field of the IPv4 PACKET header

No

Field Name

Description

1

Version

Keeps track of the version of the protocol the datagram belongs to (IPV4 or IPv6)

2

IHL

Used to indicate the length of the Header. The minimum value is 5 and the Maximum value is 15

3

Type of service

Used to distinguish between different classes of service

4

Total length

It includes everything in the datagram—both header and data. The maximum length is 65,535bytes

5

Identification

Used to allow the destination host to identify which datagram a newly arrived fragment belongs to. All the fragments of a datagram contain the same Identification value

6

DF

1-bit field. It stands for Don't Fragment. This signals the routers not to fragment the datagram because the destination is incapable of putting the pieces back together again

7

MF

MF stands for More Fragments. All fragments except the last one have this bit set. It is needed to know when all fragments of a datagram have arrived.

8

Fragment offset

Used to determine the position of the fragment in the current datagram.

9

Time to live

It is a counter used to limit packet lifetimes. It must be decremented on each hop. When it hits zero, the packet is discarded and a warning packet is sent back to the source host.

10

Header checksum

It verifies the Header for errors.

11

Source address

The IP address of the source

12

Destination address

The IP address of the destination

13

Options

Originally, five options were defined:

1. Security: specifies how secret the datagram is.

2. Strict source routing: Gives complete path to be followed

3. Loose source routing :

Gives a list of routers not to be missed

4. Record route: Makes each router append its IP address

5. Timestamp:  Makes each router append its IP address and timestamp

 

Internet Control Protocols

In addition to the fundamental Internet Protocol (IP), several prominent protocols operate within the Internet layer. These protocols play key roles in facilitating communication and managing network operations. The notable protocols include:

  • Address Resolution Protocol (ARP)
  • Reverse Address Resolution Protocol (RARP)
  • Internet Group Message Protocol (IGMP)
  • Internet Control Message Protocol (ICMP)

 

Address Resolution Protocol (ARP)

The Address Resolution Protocol (ARP) serves the crucial function of associating a logical address with a corresponding physical address in computer networks. In the context of a typical local area network (LAN), each device is identified by a physical or station address, usually embedded in the network interface card (NIC). ARP comes into play when the Internet address (IP address) of a node is known, and there is a need to determine its physical address.

In scenarios where one machine communicates with another within the same network, knowledge of the destination's MAC address is essential. However, since the application only provides the destination's IP address, there arises a need for a mechanism to bind the IP address with its corresponding MAC address. ARP seamlessly fulfills this role.

The process involves broadcasting the IP address of the destination node, prompting the destination to relay its MAC address back to the source. The key steps in this process include:

  • Assume the broadcast nature of the LAN.
  • Broadcast the IP address of the destination.
  • The destination responds with its MAC address.
  • The source maintains a cache of IP and MAC address bindings.

While ARP facilitates efficient communication, the potential increase in traffic load due to repeated ARP requests is a concern. To address this, computers utilizing ARP maintains a cache of recently acquired IP-to-MAC address bindings, reducing the need for frequent ARP requests.

Additional refinements include incorporating IP-to-MAC address bindings in special packets to preemptively resolve MAC addresses, broadcasting IP-to-MAC address bindings when new machines join the network, and optimizing communication by eliminating unnecessary ARP packets. These strategies collectively enhance the efficiency and effectiveness of ARP within computer networks.

 

Reverse Address Resolution Protocol (RARP)

The Reverse Address Resolution Protocol (RARP) plays a crucial role in allowing a host to determine its Internet address when it possesses only knowledge of its physical address. This protocol becomes particularly useful during the initial network connection of a computer or when a diskless computer undergoes the booting process.

RARP operates as a protocol that enables a physical machine within a local area network to request the learning of its IP address from a gateway server's Address Resolution Protocol table or cache. This becomes essential in scenarios where the machine lacks a permanently attached disk to store its IP address persistently. To facilitate this, a network administrator establishes a table in the gateway router of the local area network, mapping physical machine addresses (MAC addresses) to corresponding Internet Protocol addresses.

When a new machine is introduced to the network, its RARP client program initiates a request to the RARP server on the router, seeking its assigned IP address. Assuming an entry exists in the router's table, the RARP server responds by furnishing the IP address to the machine, allowing it to store this information for future use.

However, RARP is not without its drawbacks:

  • Operating at a low level, RARP necessitates direct addresses to the network, posing challenges for application programmers in constructing a server.
  • It underutilizes the capabilities of networks like Ethernet, which mandate sending a minimum packet size. The server's reply contains only a single piece of information—the 32-bit Internet address—resulting in less-than-optimal utilization of network resources.

Despite these limitations, RARP serves as a foundational protocol for assigning IP addresses to physical machines, particularly in scenarios where diskless computers or newly connected devices need to establish their network identity.

 

Internet Control Message Protocol (ICMP)

The Internet Control Message Protocol (ICMP) serves as a crucial mechanism for hosts and gateways to communicate notifications of datagram issues back to the original sender. ICMP facilitates the exchange of query and error reporting messages, enabling hosts and gateways to convey control or error-related information.

In the context of the Internet protocol, which provides an unreliable, connectionless datagram service, datagrams traverse from gateway to gateway until they reach one capable of delivering them directly to their final destination. If a gateway encounters difficulties in routing or delivering a datagram or detects abnormal conditions like network congestion, it needs a means to instruct the original source to take corrective actions. ICMP fulfills this role by allowing gateways to send error or control messages to other gateways or hosts.

ICMP serves as a communication channel between the Internet Protocol software on one machine and that on another. It is a specialized message mechanism integrated into the TCP/IP protocols to enable gateways in the internet to report errors or provide information about unexpected circumstances. The IP protocol itself lacks provisions for testing connectivity or learning about failures.

Key points about ICMP:

  • ICMP focuses on reporting error conditions to the original source, leaving it to the source to relate errors to individual application programs and take corrective actions.
  • It allows gateways to report errors but does not fully specify the actions to be taken for each possible error.
  • ICMP communication is restricted to the original source and does not involve intermediate sources.

ICMP messages travel across the internet in the data portion of an IP datagram, routed similarly to datagrams carrying user information. Exceptions are made to error handling procedures for IP datagrams carrying ICMP messages, which are not generated for errors resulting from datagrams carrying ICMP error messages.

 

ICMP Message Format:

  • The format includes three fields: an 8-bit integer message TYPE field identifying the message, an 8-bit CODE field providing additional information, and a 16-bit CHECKSUM field (using the same additive checksum algorithm as IP).
  • ICMP message s reporting errors always include the header and the first 64 data bits of the problematic datagram.
  • Various ICMP message types include:

TYPE FIELD

ICMP MESSAGE TYPE

0

ECHO REPLY

3

DESTINATION UNREACHABLE

4

SOURCE QUENCH

5

REDIRECT(CHANGE A ROUTE)

8

ECHO REQUEST

11

TIME EXCEEDED FOR A DATAGRAM

12

PARAMETER PROBLEM ON A DATAGRAM

13

TIMESTAMP REQUEST

14

TIMESTAMP REPLY

15

INFORMATION REQUEST(OBSOLETE)

16

INFORMATION REPLY(OBSOLETE)

17

ADDRESS MASK REQUEST

18

ADDRESS MASK REPLY TESTING DESTINATION

 

 

Internet Group Message Protocol (IGMP)

The Internet Group Message Protocol (IGMP) plays a vital role in enabling the simultaneous transmission of a message to a designated group of recipients. This communication protocol is employed by hosts and adjacent routers on IPv4 networks to establish multicast group memberships. IGMP is an essential component of IP multicast and proves particularly beneficial for one-to-many networking applications like online streaming video and gaming. It enhances resource efficiency in supporting these types of applications.

 

Key Information about IGMP:

  • IGMP facilitates the establishment of multicast group memberships in IPv4 networks.
  • It is integral to IP multicast and supports one-to-many networking applications.
  • IGMP enhances resource utilization, making it suitable for scenarios such as online streaming video and gaming.

 

Types of Messages in IGMP:

IGMP encompasses three main types of messages, each serving a specific purpose in managing multicast group communication:

  1. Query: IGMP queries are utilized to gather information about the multicast group memberships within a network. There are two types of query messages: general and special.
  2. Membership Report: This message type is sent by hosts to signal their interest in joining a specific multicast group. It plays a crucial role in maintaining accurate group membership information.
  3. Leave Report: When a host intends to leave a multicast group, it sends a leave report to notify the network, ensuring efficient management of group memberships.

By employing IGMP, networks can efficiently handle multicast communication, allowing for the seamless dissemination of information to multiple recipients. This protocol is particularly valuable in optimizing network resources and enhancing the overall performance of multicast applications.

Types of messages in IGMP


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Ok, Go it!