View on GitHub

Notes

reference notes

Network Layer Characteristics

The Network Layer

To accomplish end-to-end communications across network boundaries, network layer protocols perform four basic operations:

IP Encapsulation

IP encapsulates the transport layer (the layer just above the network layer) segment or other data by adding an IP header.

The IP header is used to deliver the packet to the destination host.

The process of encapsulating data layer by layer enables the services at the different layers to develop and scale without affecting the other layers.

Characteristics of IP

These are the basic characteristics of IP:

Connectionless

IP is connectionless, meaning that no dedicated end-to-end connection is created by IP before data is sent.

Connectionless communication is conceptually similar to sending a letter to someone without notifying the recipient in advance.

IP requires no initial exchange of control information to establish an end-to-end connection before packets are forwarded.

Best Effort

IP also does not require additional fields in the header to maintain an established connection. This process greatly reduces the overhead of IP.

However, with no pre-established end-to-end connection, senders are unaware whether destination devices are present and functional when sending packets, nor are they aware if the destination receives the packet, or if the destination device is able to access and read the packet.

IP does not guarantee that all sent packets will be received. Other protocols manage the process of tracking packets and ensuring their delivery.

Media Independent

IP operates independently of the media that carry the data at lower layers of the protocol stack.

The OSI data link layer is responsible for taking an IP packet and preparing it for transmission over the communications medium. This means that the delivery of IP packets is not limited to any particular medium.

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).

Part of the control communication between the data link layer and the network layer is the establishment of a maximum size for the packet.

The data link layer passes the MTU value up to the network layer. The network layer then determines how large packets can be.

fragmentation: splitting up an IP packet when forwarding it from one medium to another medium with a smaller MTU.

IPv4 Packet

IPv4 Packet Header

The IPv4 packet header is used to ensure that this packet is delivered to its next stop on the way to its destination end device.

IPv4 Packet Header Fields

Significant fields in the IPv4 header include the following:

IPv6 Packet

Limitations of IPv4

Three major issues:

IPv6 Overview

mprovements that IPv6 provides include the following:

IPv6 Packet Header

The fields in the IPv6 packet header include the following:

Unlike IPv4, routers do not fragment routed IPv6 packets.

How a Host Routes

Host Forwarding Decision

The source host must be able to direct the packet to the destination host. To do this, host end devices create their own routing table. This topic discusses how end devices use routing tables.

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

The router connected to the local network segment is referred to as the default gateway.

Default Gateway

On a network, a default gateway is usually a router with these features:

A Host Routes to the Default Gateway

In IPv4, the host receives the IPv4 address of the default gateway either dynamically from Dynamic Host Configuration Protocol (DHCP) or configured manually.

In IPv6, the router advertises the default gateway address or the host can be configured manually.

Host Routing Tables

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

Introduction to Routing

Router Packet Forwarding Decision

where to send the packet. If the destination host is on a remote network, the packet is forwarded to the default gateway, which is usually the local router.

When the packet arrives on the router interface:

IP Router Routing Table

The routing table stores three types of route entries:

A router can learn about remote networks in one of two ways:

Static Routing

Static routes are route entries that are manually configured.

Static routing has the following characteristics:

Dynamic Routing

A dynamic routing protocol allows the routers to automatically learn about remote networks, including a default route, from other routers.

If there is a change in the network topology, routers share this information using the dynamic routing protocol and automatically update their routing tables.

Dynamic routing protocols include

The dynamic routing protocol will automatically do as follows:

Introduction to an IPv4 Routing Table

The show ip route privileged EXEC mode command is used to view the IPv4 routing table on a Cisco IOS router. The example shows the IPv4 routing table of router R1. At the beginning of each routing table entry is a code that is used to identify the type of route or how the route was learned. Common route sources (codes) include these: