The Network Layer, also known as Layer 3, is the upper layer of the chained layers. The unit of transmission at this Layer is the packet. The Network Layer is primarily responsible for routing packets across an internetwork. Because the Network Layer implements a packet switching infrastructure, it must also be able to deal with congestion-related issues.
The Network Layer must exist in both end-systems (hosts) and routers (nodes). End-systems must know how to construct a packet, address it appropriately, and initiate transmission correctly. They must also know how to respond to network-generated packets related to congestion control, network failure, etc.
The routers must also be able to generate and receive packets so they can be remotely managed and can exchange network information with out routers. They are also responsible for relaying packets originated by other systems.
Network Layer Functions
The functions of the Network Layer include:
- Routing: Determine the next router in the path to the destination end-system. If the Network Layer protocol defines a virtual circuit network, the Network Layer is responsible for establishing a logical channel across the internetwork prior to data transfer; a procedure also exists to terminate the logical channel. Example of such protocols include X.25's Packet Layer Protocol (PLP), IBM's Path Control Layer (PCL), and (arguably) Multiprotocol Label Switching (MPLS). If the Network Layer implements a datagram network, each packet is routed independently on a hop-by-hop basis. Examples of such protocols include the Internet Protocol (IP), the Internetwork Packet Exchange (IPX), the Datagram Delivery Protocol (DDP), and the VINES Internet Protocol (VIP).
- Addressing: Because the core function of the Network Layer is to convey and deliver packets between end systems and routers in the internetwork, the Network Layer must define an addressing structure that can be used to guide packets to their destination. If the Network Layer protocol defines a virtual circuit network, the Network Layer defines a virtual circuit number that represents particular virtual circuits across the internetwork. If the Network Layer implements a datagram network, the Network Layer address represents individual (or collective) destinations. each packet is routed independently and each packet contains the destination address of the intended recipient.
- Relaying: This function is only present in devices providing a routing function (i.e., routers). These systems must be able to actually move packets from an input port to the appropriate output port based on the address contained in the packet and the routing information collected by the router. If the output port is busy, the router must be able to store packets until the facility is available for use.
- Congestion control: Packet networks are prone to congestion if any given node within the network receives more packets than it can forward on a particular facility. The router must have a strategy for dealing with these events.
- Multiplexing: The Network Layer implements a statistical multiplexing model for forwarding packets onto a facility.
- Fragmentation: Some Network Layer protocols support the fragmentation of packets into smaller packets if they are too large to be conveyed across a given facility. Reassembly could be the responsibility of the destination end system (e.g., IP), or the next router (e.g., VIP).
Historically, the Network Layer provided a significant amount of error control as it was believed that the network infrastructure was unreliable and that the endpoints lacked sufficient intelligence. Today, neither is true. Contemporary Network Layer provide primarily just routing and congestion control. However, modern Network Layer protocols are also concerned with Quality of Service (QoS)
Network Layer Protocols
There are a number of widely deployed Network Layer protocols in the market today. Each has its own characteristics, strengths, and weaknesses. A brief listing of the more common Network Layer protocols is offered below:
- Internet Protocol (IP): Introduced to the ARPANET in the early 1980s, it has since become the core protocol of the Internet and is implemented in most home and business networks as well. It has become, in essence, the Network Layer protocol.
- Internetwork Packet Exchange Protocol (IPX): This protocol was implemented by earlier versions of Novell’s NetWare. NetWare has since been ported over to IP.
- Path Control Layer (PCL): This was the protocol at Layer 3 of IBM's Systems Network Architecture SNA. Although it still exists in the industry, in is increasingly rare.
- Datagram Delivery Protocol (DDP): This was the Network Layer protocol found in Apple's AppleTalk. Apple has long since migrated to the TCP/IP protocol suite.
- VINES Internet Protocol (VIP): This was the Network Layer protocol in Banyan's VINES product. This product is now obsolete.
- Packet Layer Protocol (PLP): This is the Layer 3 protocol in the X.25 recommendation. X.25 is still used in some international venues, so this protocol is still in use.
Routing in the Network Layer
The algorithm depicted on the visual describes the general approach to routing as it is implemented by virtually every Network Layer protocol in use. The algorithm describes how routing is performed both within an end station and by a router. Note that this algorithm is limited to the routing function of the Network Layer; it ignores all of the other Network Layer responsibilities (e.g., fragmentation, congestion control, etc.).
The process begins when some upper layer protocol needs to transmit data to another end station in the internetwork. The upper layer protocol must assemble the data to be transmitted and determine the Network Layer address of the destination end station. The address could be provided by a name server, the user, or an application-maintained table. The specific mechanism is unimportant, but the Network Layer address of the destination must be known. Even a computer cannot “make a call without the telephone number!” This address and the data to be transmitted are passed to the Network Layer in the source end station. In the case of a router, the packet usually arrives from an attached subnetwork.
The Network Layer software begins by assembling a packet. Minimally, the packet must include the Network Layer address of the source end station, the Network Layer address of the destination end station, and the data entity to be transmitted. Most Network Layer protocols add additional protocol control information for use by the Network Layer software at the destination end station.
The next step is to determine if the destination end station is attached to the same subnetwork as the source end station, or if it is attached to a different subnetwork. This is a fairly simple process. The source end station compares the subnetwork component of its own Network Layer address with that of the destination. If they match, the destination end station is local. If they differ, the destination end station is on a different subnetwork.
If the destination is local, its Network Layer address must be mapped to the corresponding MAC address. The destination MAC address is necessary for transmission across the local subnetwork. The Network Layer software in the source end station then passes the packet it has assembled, together with the MAC address of the destination end station, to the MAC Layer. In the MAC Layer, a frame is constructed. The MAC scheme is then invoked to secure access to the subnetwork, and the frame is transmitted to its destination.
If the source determines that the destination is not local, an additional step is needed. The source end station must send the packet to a router in order for the packet to reach its destination. The Network Layer makes a routing decision by taking the Network Layer address of the destination end station (or at least the subnetwork component of that address) and mapping it to the Network Layer address of a router within the local subnetwork.
From this point, the process is much like the process used to send the packet to a local end station. The router’s Network Layer address is mapped to the router’s MAC address, and the packet and MAC address are passed to the MAC Layer. The MAC Layer transmits a frame addressed to the router, containing a packet addressed to the destination end station. When the router receives the packet, it repeats the entire process to determine the next hop in the path to the destination end station.
|<mp3>http://podcast.hill-vt.com/podsnacks/2007q1/network_layer.mp3%7Cdownload</mp3> | Network Layer|
|<mp3>http://podcast.hill-vt.com/podsnacks/2007q1/osi-rm.mp3%7Cdownload</mp3> | OSI Reference Model|