Chapter 6 : Network Layer

       This chapter focuses on the role of the network layer. It examines how it divides networks into groups of hosts to manage the flow of data packets within a network. It also covers how communication between networks is facilitated. This communication between networks is called routing.

The Network Layer

      The network layer, or OSI Layer 3, provides services to allow end devices to exchange data across the network. To accomplish this end-to-end transport, the network layer uses four basic processes:

  • Addressing end devices – End devices must be configured with a unique IP address for identification on the network.
  • Encapsulation – The network layer encapsulates the protocol data unit (PDU) from the transport layer into a packet. The encapsulation process adds IP header information, such as the IP address of the source (sending) and destination (receiving) hosts.
  • 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 the best path 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 router a packet crosses 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. 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

Network Layer Protocols

     There are several network layer protocols in existence. However, as shown in the figure, there are only two network layer protocols that are commonly implemented:

  • Internet Protocol version 4 (IPv4)
  • Internet Protocol version 6 (IPv6)

Note: Legacy network layer protocols are not shown in the figure and are not discussed in this course.

Characteristics of IP

ch61

Connectionless – no connection with the destination is established before sending data packets

Best Effors – IP is inherently unreliable because packet delivery is not guaranteed

Media Independent – operation is independent of the medium (i.e., copper, fiber optic, or wireless) carrying the data

IPv4 Packet Header

ch62

Significant fields in the IPv4 header include:

  • Version – Contains a 4-bit binary value set to 0100 that identifies this as an IP version 4 packet.
  • Differentiated Services or DiffServ (DS) – Formerly called the Type of Service (ToS) field, the DS field is an 8-bit field used to determine the priority of each packet. The six most significant bits of the DiffServ field is the Differentiated Services Code Point (DSCP) and the last two bits are the Explicit Congestion Notification (ECN) bits.
  • Time-to-Live (TTL) – Contains an 8-bit binary value that is used to limit the lifetime of a packet. The packet sender sets the initial TTL value, and it is decreased by one each time the packet is processed by a router. If the TTL field decrements to zero, the router discards the packet and sends an Internet Control Message Protocol (ICMP) Time Exceeded message to the source IP address.
  • Protocol – Field is used to identify the next level protocol. This 8-bit binary value indicates the data payload type that the packet is carrying, which enables the network layer to pass the data to the appropriate upper-layer protocol. Common values include ICMP (1), TCP (6), and UDP (17).
  • Source IPv4 Address – Contains a 32-bit binary value that represents the source IPv4 address of the packet. The source IPv4 address is always a unicast address.
  • Destination IPv4 Address – Contains a 32-bit binary value that represents the destination IPv4 address of the packet. The destination IPv4 address is a unicast, multicast, or broadcast address.

Limitations of IPv4

 IPv4 still has three major issues:

  • IP address depletion – IPv4 has a limited number of unique public IPv4 addresses available. Although there are approximately 4 billion IPv4 addresses, the increasing number of new IP-enabled devices, always-on connections, and the potential growth of less-developed regions have increased the need for more addresses.
  • Internet routing table expansion – A routing table is used by routers to make best path determinations. As the number of servers connected to the Internet increases, so too does the number of network routes. These IPv4 routes consume a great deal of memory and processor resources on Internet routers.
  • Lack of end-to-end connectivity – Network Address Translation (NAT) is a technology commonly implemented within IPv4 networks. NAT provides a way for multiple devices to share a single public IPv4 address. However, because the public IPv4 address is shared, the IPv4 address of an internal network host is hidden. This can be problematic for technologies that require end-to-end connectivity.

Introducing IPv6

ch63

       IPv6 overcomes the limitations of IPv4 and is a powerful enhancement with features that better suit current and foreseeable network demands.

Improvements that IPv6 provides include:

  • Increased address space – IPv6 addresses are based on 128-bit hierarchical addressing as opposed to IPv4 with 32 bits.
  • Improved packet handling – The IPv6 header has been simplified with fewer fields.
  • Eliminates the need for NAT – With such a large number of public IPv6 addresses, NAT between a private IPv4 address and a public IPv4 is not needed. This avoids some of the NAT-induced application problems experienced by applications requiring end-to-end connectivity.

IPv6 Packet Header

ch64.PNG

The fields in the IPv6 packet header include:

  • Version – This field contains a 4-bit binary value set to 0110 that identifies this as an IP version 6 packet.
  • Traffic Class – This 8-bit field is equivalent to the IPv4 Differentiated Services (DS) field.
  • Flow Label – This 20-bit field suggests that all packets with the same flow label receive the same type of handling by routers.
  • Payload Length – This 16-bit field indicates the length of the data portion or payload of the IPv6 packet.
  • Next Header – This 8-bit field is equivalent to the IPv4 Protocol field. It indicates the data payload type that the packet is carrying, enabling the network layer to pass the data to the appropriate upper-layer protocol.
  • Hop Limit – This 8-bit field replaces the IPv4 TTL field. This value is decremented by a value of 1 by each router that forwards the packet. When the counter reaches 0, the packet is discarded, and an ICMPv6 Time Exceeded message is forwarded to the sending host, indicating that the packet did not reach its destination because the hop limit was exceeded.
  • Source IPv6 Address – This 128-bit field identifies the IPv6 address of the sending host.
  • Destination IPv6 Address – This 128-bit field identifies the IPv6 address of the receiving host.

Host Forwarding Decision

ch65.PNG

       Another role of the network layer is to direct packets between hosts. A host can send a packet to:

  • Itself – A host can ping itself by sending a packet to a special IPv4 address of 127.0.0.1, which is referred to as the loopback interface. Pinging the loopback interface tests the TCP/IP protocol stack on the host.
  • Local host – This is a host on the same local network as the sending host. The hosts share the same network address.
  • Remote host – This is a host on a remote network. The hosts do not share the same network address.

Host Routing Tables

       On a Windows host, the route print or netstat -rcommand can be used to display the host routing table. Both commands generate the same output.

       Entering the netstat -r command or the equivalent route print command, displays three sections related to the current TCP/IP network connections:

  • Interface List – Lists the Media Access Control (MAC) address and assigned interface number of every network-capable interface on the host, including Ethernet, Wi-Fi, and Bluetooth adapters.
  • IPv4 Route Table – Lists all known IPv4 routes, including direct connections, local network, and local default routes.
  • IPv6 Route Table – Lists all known IPv6 routes, including direct connections, local network, and local default routes.

A Router is a Computer

There are many types of infrastructure routers available. In fact, Cisco routers are designed to address the needs of many different types of businesses and networks:

  • Branch – Teleworkers, small businesses, and medium-size branch sites. Includes Cisco Integrated Services Routers (ISR) G2 (2nd generation).
  • WAN – Large businesses, organizations, and enterprises. Includes the Cisco Catalyst Series Switches and the Cisco Aggregation Services Routers (ASR).
  • Service Provider – Large service providers. Includes Cisco ASR, Cisco CRS-3 Carrier Routing System, and 7600 Series routers.

Regardless of their function, size or complexity, all router models are essentially computers. Just like computers, tablets, and smart devices, routers also require:

  • Central processing units (CPU).
  • Operating systems (OS).
  • Memory consisting of random-access memory (RAM), read-only memory (ROM), nonvolatile random-access memory (NVRAM), and flash.

Router Memory

A router has access to volatile or non-volatile memory storage. Volatile memory requires continual power to maintain its information. When the router is powered down or restarted, the content is erased and lost. Non-volatile memory retains its information even when a device is rebooted.

Specifically, a Cisco router uses four types of memory:

  • RAM – This is volatile memory used in Cisco routers to store applications, processes, and data needed to be executed by the CPU. Cisco routers use a fast type of RAM called synchronous dynamic random access memory (SDRAM). Click RAM in the figure to view more information.
  • ROM – This non-volatile memory is used to store crucial operational instructions and a limited IOS. Specifically, ROM is firmware embedded on an integrated circuit inside the router which can only be altered by Cisco. Click ROM in the figure to view more information.
  • NVRAM – This is non-volatile memory is used as the permanent storage for the startup configuration file (startup-config).
  • Flash – This non-volatile computer memory used as permanent storage for the IOS and other system related files such as log files, voice configuration files, HTML files, backup configurations, and more. When a router is rebooted, the IOS is copied from flash into RAM.

Basic Switch Configuration Steps

ch66

ch67
Figure 1

       Before we begin configuring a router, review the initial switch configuration tasks listed in Figure 1. Figure 2 displays a sample configuration.

ch68

ch69
Figure 2

Configure Router Interfaces

There are many different types of interfaces available on Cisco routers. In this example, the Cisco 1941 router is equipped with:

  • Two Gigabit Ethernet interfaces – GigabitEthernet 0/0 (G0/0) and GigabitEthernet 0/1 (G0/1)
  • A serial WAN interface card (WIC) consisting of two interfaces – Serial 0/0/0 (S0/0/0) and Serial 0/0/1 (S0/0/1)

 

One thought on “Chapter 6 : Network Layer

Leave a comment