Overview-of-Network-Layer Functions

Overview of Network Layer Functions

Overview of Network Layer Functions Many protocol models have existed over the years, but today the TCP/IP model dominates. And at the network layer of TCP/IP, two options exist for the most protocol around which all other network layer functions revolve: IP version 4 (IPv4) and IP version 6 (IPv6). Both IPv4 and IPv6 define the same sorts of network layer functions, but with different details. This chapter introduces these network layer functions for IPv4, leaving the IPv6 details until Part VIII of this book.

IP focuses on the work of routing data, within the form of IP packets, from the source host to the destination host. IP doesn’t concern itself with the physical transmission of data, instead relying on the lower TCP/IP layers to do the physical transmission of the data. Instead, IP concerns itself with the logical details, instead of physical details, of delivering data. especially , the network layer specifies how packets travel end to finish over a TCP/IP network, even when the packet crosses many various sorts of LAN and WAN links. This first section of the chapter begins a broad discussion of the TCP/IP network layer by watching IP routing and addressing. the 2 topics work together, because IP routing relies on the structure and meaning of IP addresses, and IP addressing was designed with IP routing in mind. Following that, this overview section looks at routing protocols, which let routers learn the information they have to understand to do routing correctly.

Network Layer Routing (Forwarding) Logic

Routers and end-user computers (called hosts during a TCP/IP network) work together to perform IP routing. The host OS (OS) has TCP/IP software, including the software that implements the network layer. Hosts use that software to settle on where to send IP packets, often to a nearby router. Those routers make choices of where to send the IP packet next. Together, the hosts and routers deliver the IP packet to the right destination, as shown within the example in Figure 4-1.

The IP packet, created by PC1, goes from the top of the figure all the way to PC2 at the bottom of the figure. the next few pages discuss the network layer routing logic used by each device along the trail .

Host Forwarding Logic: Send the Packet to the Default Router

In this example, PC1 does some basic analysis, then chooses to send the IP packet to the router so that the router will forward the packet. PC1 analyzes the destination address and realizes that PC2’s address (168.1.1.1) isn’t on the same LAN as PC1. So PC1’s logic tells it to send the packet to a tool whose job it’s to understand where to route data: a nearby router, on the same LAN, called PC1’s default router. To send the IP packet to the default router, the sender sends a data-link frame across the medium to the nearby router; this frame includes the packet within the data portion of the frame. That frame uses data link layer (Layer 2) addressing within the data-link header to make sure that the nearby router receives the frame.

R1 and R2’s Logic: Routing Data Across the Network

All routers use the same general process to route the packet. Each router keeps an IP routing table. This table lists IP address groupings, called IP networks and IP subnets. When a router receives a packet, it compares the packet’s destination IP address to the entries within the routing table and makes a match. This matching entry also lists directions that tell the router where to forward the packet next.

In Figure 4-1, R1 would have matched the destination address (168.1.1.1) to a routing table entry, which in turn told R1 to send the packet to R2 next. Similarly, R2 would have matched a routing table entry that told R2 to send the packet, over an Ethernet over MPLS (EoMPLS) link, to R3 next.

The routing concept works a little like driving down the freeway when approaching a big interchange. You search and see signs for nearby towns, telling you which exits to require to travel to every town. Similarly, the router looks at the IP routing table (the equivalent of the road signs) and directs each packet over the right next LAN or WAN link (the equivalent of a road).

R3’s Logic: Delivering Data to the end Destination

The final router within the path, R3, uses almost the same logic as R1 and R2, but with one minor difference. R3 must forward the packet on to PC2, to not another router. On the surface, that difference seems insignificant. within the next section, once you examine how the network layer uses LANs and WANs, the significance of the difference will become obvious.

Also Read : OSI Networking Model

How Network Layer Routing Uses LANs and WANs

While the network layer routing logic ignores the physical transmission details, the bits still have to be transmitted. to do that work, the network layer logic during a host or router must hand off the packet to the data link layer protocols, which, in turn, ask the physical layer to actually send the data., “Fundamentals of Ethernet LANs,” the data link layer adds the appropriate header and trailer to the packet, creating a frame, before sending the frames over each physical network. The routing process forwards the network layer packet from end to end through the network, while each data-link frame only takes a smaller a part of the trip. Each successive link layer frame moves the packet to the next device that cares network layer logic. In short, the network layer thinks about the larger view of the goal, like “Send this packet to the required next device…,” while the data link layer cares the specifics, like “Encapsulate the packet during a data-link frame and transmit it.” Figure 4-2 points out the key encapsulation logic on each device, using the same examples as shown in Figure 4-1.

Because the routers build new data-link headers and trailers, and since the new headers contain data-link addresses, the PCs and routers must have how to decide what data link addresses to use. An example of how the router determines which data-link address to use is that the IP Address Resolution Protocol (ARP). ARP dynamically learns the data-link address of an IP host connected to a LAN. for example, at the last step, at the bottom of Figure 4-2, Router R3 would use ARP once to learn PC2’s MAC address before sending any packets to PC2.

Routing as covered so far has two main concepts:

The method of routing forwards Layer 3 packets, also called Layer 3 protocol data units (L3 PDU), supported the destination Layer 3 address within the packet.

The routing process uses the data link layer to encapsulate the Layer 3 packets into Layer 2 frames for transmission across each successive data link.

IP Addressing and how Addressing Helps IP Routing

IP defines network layer addresses that identify any host or router interface that connects to a TCP/IP network. the thought basically works sort of a postal address: Any interface that expects to receive IP packets needs an IP address, a bit like you would like a postal address before receiving mail from the postal service.

TCP/IP groups IP addresses together so that IP addresses used on the same physical network are a part of the same group. IP calls these address groups an IP network or an IP subnet. Using that very same postal service analogy, each IP network and IP subnet works sort of a zip code (or within the us , a zipper code). All nearby postal addresses are within the same zip code (ZIP code), while all nearby IP addresses must be within the same IP network or IP subnet.

IP defines specific rules about which IP address should be within the same IP network or IP subnet. Numerically, the addresses within the same group have the same value within the first a part of the addresses. for instance , Figures 4-1 and 4-2 could have used the following conventions:

  1. Hosts on the top Ethernet: Addresses start with 10
  2. Hosts on the R1-R2 serial link: Addresses start with 168.10
  3. Hosts on the R2-R3 EoMPLS link: Addresses start with 168.11
  4. Hosts on the bottom Ethernet: Addresses start with 168.1

It’s similar to the USPS postcode system and how it requires local governments to assign addresses to new buildings. it might be ridiculous to possess two houses next door to every other, whose addresses had different ZIP codes. Similarly, it might be silly to have people that live on opposite sides of the country to possess addresses with the same postcode . Similarly, to form routing more efficient, network layer protocols group addresses, both by their location and by the actual address values. A router can list one routing table entry for every IP network or subnet, rather than one entry for each single IP address.

The routing process also makes use of the IPv4 header, as shown in Figure 4-3. The header lists a 32-bit source IP address, also as a 32-bit destination IP address. The header in fact has other fields, a few of which matter for other discussions during this book. The book will ask this figure as required , but otherwise, be aware of the 20-byte IP header and therefore the existence of the source and destination IP address fields.

Routing Protocols

For routing logic to work on both hosts and routers, each must know something about the TCP/IP internetwork. Hosts got to know the IP address of their default router so that hosts can send packets to remote destinations. Routers, however, got to know routes so that routers know how to forward packets to each and every IP network and IP subnet. Although a network engineer could configure (type) all the specified routes, on every router, most network engineers instead simply enable a routing protocol on all routers. If you enable an equivalent routing protocol on all the routers during a TCP/IP internetwork, with the right settings, the routers will send routing protocol messages to every other. As a result, all the routers will learn routes for all the IP networks and subnets within the TCP/IP internetwork.

Figure 4-4 shows an example, using the same diagram as in Figures 4-1 and 4-2. during this case, IP network 168.1.0.0, which consists of all addresses that begin with 168.1, sits on the Ethernet at rock bottom of the figure. R3, knowing this fact, sends a routing protocol message to R2 (Step 1). R2 learns a route for network 168.1.0.0 as a result, as shown on the left. At Step 2, R2 turns around and sends a routing protocol message to R1 so that R1 now has a route for that same IP network (168.1.0.0).

This concludes the overview of how the TCP/IP network layer works. The rest of this chapter re-examines the key components in more depth.

Questions related to this topic
  1. How do routers know where to send packets?
  2. How do routers send packets along the Internet?
  3. How do packets move through a network?
  4. How are packets transmitted from the source to the destination?

This Blog Article is posted by

Infosavvy, 2nd Floor, Sai Niketan, Chandavalkar Road Opp. Gora Gandhi Hotel, Above Jumbo King, beside Speakwell Institute, Borivali West, Mumbai, Maharashtra 400092

Contact us – www.info-savvy.com

https://g.co/kgs/ttqPpZ

Leave a Comment