This layer provides services to allow end devices exchange data across the network.
Four basic Processes:
- Addressing end devices – In the same way that a phone has a unique telephone number, end devices must be configured with a unique IP address for identification on the network. An end device with a configured IP address is referred to as a host.
- Encapsulation – The network layer receives a protocol data unit (PDU) from the transport layer. In a process called encapsulation, the network layer adds IP header information, such as the IP address of the source (sending) and destination (receiving) hosts. After header information is added to the PDU, the PDU is called a packet.There are several network layer protocols in existence; however, only the following two are commonly implemented as show in the figure:
- Internet Protocol version 4 (IPv4)
- Internet Protocol version 6 (IPv6)
Other legacy network layer protocols that are not widely used include:
- Novell Internetwork Packet Exchange (IPX)
- Connectionless Network Service (CLNS/DECNet)
- Routing – The network layer provides services to direct packets to a destination host on another network. To travel to other networks, the packet must be processed by a router. The role of the router is to select paths for and direct packets toward the destination host in a process known as routing. A packet may cross many intermediary devices before reaching the destination host. Each route the packet takes to reach the destination host is called a hop.
- De-encapsulation – When the packet arrives at the network layer of the destination host, the host checks the IP header of the packet. If the destination IP address within the header matches its own IP address, the IP header is removed from the packet. This process of removing headers from lower layers is known as de-encapsulation. After the packet is de-encapsulated by the network layer, the resulting Layer 4 PDU is passed up to the appropriate service at the transport layer.
The basic characteristics of IP
- Connectionless – IP is connectionless, meaning that no dedicated end-to-end connection is created before data is sent. Connectionless communication is conceptually similar to sending a letter to someone without notifying the recipient in advance.
- Senders are unaware whether destination devices are present and functional when sending packets.
- They are unaware if the destination receives the packet, or if they are able to access and read the packet.
- Best Effort (unreliable) – Packet delivery is not guaranteed.
- no information that can be processed to inform the sender whether delivery was successful.
- no synchronization data included in the packet header for tracking the order of packet delivery.
- no acknowledgments of packet delivery with IP.
- no error control data to track whether packets were delivered without corruption.
As a result, IP functions very efficiently! If out-of-order or missing packets create problems for the application using the data, then upper layer services, such as TCP, must resolve these issues.
- Media Independent – IP operates independently of the media that carry the data at lower layers of the protocol stack. Any individual IP packet can be communicated electrically over cable, as optical signals over fiber, or wirelessly as radio signals.
There is, however, one major characteristic of the media that the network layer considers: the maximum size of the PDU that each medium can transport. This characteristic is referred to as the maximum transmission unit (MTU).