What is layer 3 networking- Network Layer

July 22, 2023

Layer 3, also known as the Network Layer, occupies the third position in both the OSI (Open Systems Interconnection) model and the TCP/IP model of the Internet Protocol Suite. Its main purpose is to facilitate communication and data transfer among diverse networks. This layer handles tasks such as logical addressing, routing, and forwarding data packets from their source to their destination across interconnected networks.

 

Network Layer Overview:

The network layer plays a vital role as the foundation of the internet. A significant portion of internet communication relies on the internet protocol (IP). The data unit used in this layer is called a packet, and its main responsibility lies with IP to efficiently deliver these packets across the network, utilizing the IP addresses found in the packet headers. These headers contain both the source address, representing the packet's origin, and the destination address, indicating its intended endpoint.

The Network Layer's protocol data unit (PDU) is known as a packet, which contains the essential information for successful data delivery.

 

IP Version and Protocol Field: 

The IP packet header includes a version field, which specifies the IP version in use, either IPv4 or IPv6. This distinction is essential for proper compatibility and routing across the internet. Additionally, the protocol field within the header identifies the Layer 4 protocol utilized within the Network Layer packets.

 

Time to Live (TTL) Function: 

The Time to Live (TTL) feature in the IP packet header prevents packets from endlessly circulating in the network. The TTL value is not expressed in time but rather as a hop count. Each time a packet passes through a router, the TTL count decreases by one. When the TTL value reaches zero, the packet is discarded to avoid perpetuating network congestion.

The network layer primarily focuses on address-related tasks, although it also performs encapsulation similar to other layers.

 

IP Addresses and Subnet Masks:

IP addresses and subnet masks can be expressed in binary format, such as 11000000.10101000.00000001.00001010. The initial three segments, 11000000.10101000.00000001, indicate the network portion, while the last segment, 00001010, signifies the host part of the address.

 

IPv4 Classful Addressing:

IPv4 addresses consist of a total of 4,294,967,296 unique addresses. To manage this vast number efficiently, they are categorized into five classes: A, B, C, D, and E. 

  1. Class A addresses span from 0 to 127 and have three parts designated for the host portion.
  2. Class B addresses range from 128 to 191 and are divided into one part for the network and two parts for the host.
  3. Class C addresses cover the range from 192 to 223 and consist of two parts for the network and one part for the host.

 

Public and Private IP Addresses:

In addition to the classes, IP addresses are further categorized into public and private addresses. This distinction helps in identifying which IPs are accessible from and to the internet.

 

Private IP Address:

Private IP addresses are non-routable to the internet but can be freely used within local networks. They do not exist or function outside of these internal networks. In order to enable communication with the internet, private IP addresses are masked or translated into a limited set of public IP addresses. This process, known as Network Address Translation (NAT), allows multiple devices in a private network to share a smaller pool of public IP addresses when accessing the internet.

 

Public IP Addresses

The allocation of public IP addresses varies depending on the continent and region, which is managed by Regional Internet Registries (RIRs). Established in 1992, RIRs are responsible for the registration, allocation, and administration of public IP addresses and Autonomous Systems (AS) on a global scale. Currently, there are five RIRs: AFRINIC, APNIC, ARIN, LACNIC, and RIPE NCC, each serving different geographical areas.

 

IPv4 and IPv6:

IPv6 was developed as an enhancement to overcome the limitations of IPv4. It employs a 128-bit address space, which vastly expands the number of available IP addresses. This abundance of addresses enables direct routing, rendering the concept of private addresses and the need for Network Address Translation (NAT) obsolete. Additionally, IPv6's streamlined header contains fewer fields compared to IPv4, simplifying network equipment operations for IPv6.

 

IPv4, with its 32-bit address format, has a limited address pool, which prompted the development of IPv6 with its 128-bit address space. IPv4 addresses are represented in decimal format, grouped in octets and separated by periods, whereas IPv6 addresses are written in hexadecimal format, with values separated by colons, following the "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx" pattern.

 

Conclusion

While IPv6 may be more complex for humans to handle due to its length and hexadecimal representation, it offers significant advantages for machines, such as an enormous address space and improved network efficiency. This makes IPv6 the preferred solution to sustain the continued growth and demands of the internet.

Stay Tuned

The best articles, links, and news delivered once a week to your inbox.

DMCA.com Protection Status