Lesson 4 | The Network Layer |
Objective | Responsibilities of the Network Layer in the TCP/IP Protocol |
Responsibilities of the Network Layer in the TCP/IP Protocol
In the TCP/IP protocol stack, the Network Layer, also commonly known as the Internet Layer, serves as a critical component that governs data transmission across multiple networks. The Network Layer's primary responsibilities are outlined below:
- Packet Routing: The Network Layer is responsible for routing packets from their source to their destination. This process often involves transmitting packets across multiple interconnected networks—hence, the name "Internet." The Internet Protocol (IP), a core component of this layer, defines how this routing works.
- Addressing: The Network Layer is also in charge of defining and managing IP addresses. Every device on a TCP/IP network is assigned a unique IP address, which is used to identify the device and route packets to it. The current version of the IP, IPv6, uses 128-bit addresses, offering a massive number of unique addresses to accommodate all the devices connected to the internet.
- Packet Fragmentation and Reassembly: The Network Layer handles the fragmentation and reassembly of packets. When a packet is too large to be transmitted over a particular network, the Network Layer breaks it into smaller fragments. These fragments are then reassembled at the destination.
- Error Reporting and Diagnostics: The Internet Control Message Protocol (ICMP) is another important component of the Network Layer. ICMP is used for error reporting and diagnostics. For example, if a router cannot route a packet because the destination network is unreachable, it uses ICMP to send an error message back to the source of the packet.
- Gateway Encapsulation: The Network Layer is responsible for encapsulating IP packets into the frames required by the specific network technology being used (Ethernet, Wi-Fi, etc.), as well as extracting IP packets from these frames when they are received. This is typically managed by the Network Interface (or Link) Layer but the Network Layer oversees the process to ensure that the IP packet is correctly encapsulated and addressed for its journey over the network.
The Network Layer plays a vital role in the TCP/IP protocol stack, bridging the gap between abstract data communication concepts and the physical realities of networked communication. By handling tasks like packet routing, IP addressing, fragmentation, error reporting, and encapsulation, the Network Layer ensures that data can be reliably transmitted across complex, interconnected networks like the internet.
IP Layer
Question: What are the responsibilities of the network layer in the TCP/IP protocol?
Under TCP/IP, the network layer is called the
IP layer. The network layer is responsible for moving data between machines across the boundaries of physical networks. For example, the IP layer is responsible for moving data off the office ethernet, across the company network
backbone[1], and out onto the Internet.
The key capability added by the network layer is routing. Routing is the process that directs information among a choice of paths based on the intended destination. In the case of TCP/IP, routing is based on IP addresses. The network layer ensures that data intended for a machine with a specified IP address arrives at its destination. The routing problem is extremely important, and is usually handled by computers specially designed to make routing decisions.
These special-purpose computers are called
routers[2].
What are the Components that make up the Network Layer
The network layer in the OSI (Open Systems Interconnection) model consists of the following components:
- Routers: Devices that route and forward data packets based on their network layer address.
- Switches: Devices that connect multiple devices and allow communication by forwarding data based on the physical address.
- Firewalls: Devices that regulate access to the network and secure it from unauthorized access or malicious activity.
- Network Address Translation (NAT): Technology that enables private IP addresses to be translated into public IP addresses for communication over the internet.
- Virtual Private Network (VPN): Technology that allows for secure communication over the public internet by creating a virtual private network.
- IP Addresses: A unique numerical identifier assigned to each device connected to the network.
- Network Routing Protocols: Algorithms that determine the best path for data packets to travel from source to destination. Examples include OSPF, BGP, and EIGRP.
The Network Layer
The network or internetwork layer is of great interest to us. For packet networks such as TCP/IP, it provides an interoperable packet format that can use different types of link-layer networks for connectivity. The layer also includes an addressing scheme for hosts and routing algorithms that choose where packets go when sent from one machine to another. Above layer 3 we find protocols that are (at least in theory) implemented only by end hosts, including the transport layer. Also of great interest to us, it provides a flow of data between sessions and can be quite complex, depending on the types of services it provides (e.g., reliable delivery on a packet network that might drop data). Sessions represent ongoing interactions between applications (i.e. cookies are used with a Web browser during a Web login session), and session-layer protocols may provide capabilities such as connection initiation and restart, plus checkpointing (saving work that has been accomplished so far). Above the session layer we find the presentation layer, which is responsible for format conversions and standard encodings for information. As we shall see, the Internet protocols do not include a formal session or presentation protocol layer, so these functions are implemented by applications if needed. The top layer is the application layer. Applications usually implement their own application-layer protocols, and these are the ones most visible to users.
There is a wide variety of application-layer protocols, and programmers are constantly inventing new ones. Consequently, the application layer is where there is the greatest amount of innovation and where new capabilities are developed and deployed.
[1]Backbone: The top level in a hierarchical network. Stub networks and transit networks which connect to the same backbone are guaranteed to be interconnected.
[2]Router: A device used to connect networks of different types, such as those using different architectures and protocols. Routers work at the Network layer of the OSI model.
This means they can switch and route packets across multiple networks. They do this by exchanging protocol-specific information between separate networks. Routers determine the best path for sending data and filter broadcast traffic to the local segment.