0% found this document useful (0 votes)
12 views3 pages

Understanding IP Routing Processes

The document outlines the process of IP routing, detailing how IP packets are delivered from a sending host to a destination host through routers. It describes the steps involved in routing, including frame processing, de-encapsulation, and encapsulation of packets, as well as the use of routing tables to determine the correct forwarding path. The document also provides examples of local and remote packet delivery, emphasizing the importance of MAC addresses and data-link protocols in the routing process.

Uploaded by

gg7266522206602
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Understanding IP Routing Processes

The document outlines the process of IP routing, detailing how IP packets are delivered from a sending host to a destination host through routers. It describes the steps involved in routing, including frame processing, de-encapsulation, and encapsulation of packets, as well as the use of routing tables to determine the correct forwarding path. The document also provides examples of local and remote packet delivery, emphasizing the importance of MAC addresses and data-link protocols in the routing process.

Uploaded by

gg7266522206602
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CPE310/Computer Networks and Security

▪ B. The frame’s destination data-link address


VIII. IP Routing is the router’s address
• IP routing delivers IP packets from the sending host o 2. If choosing to process the frame at Step 1,
to the destination host. de-encapsulate the packet
• relies on network layer logic for the following: o 3. compare the packet’s destination IP address
o create an IP packet to the routing table, find the route that and the
o forwarding the IP packet to the host’s default outgoing interface
gateway o 4. Encapsulate the packet into a data-link frame
o routers comparing the destination address in appropriate for the outgoing interface, use ARP
the packet to their routing tables to find the next device’s MAC address
o 5. Transmit the frame out the outgoing
• IP routing relies on:
interface
o serial WAN link
o Ethernet WAN links
o Ethernet LANs
o wireless LANs
o and many other data-link and physical layer
standards
• lower-layer devices and protocols move the IP
packets by encapsulating and transmitting the
packets inside frames.

A. IPv4 Routing Process Reference


• a LAN-based host acts as follows: • figure shows a packet arriving from the left,
o Step 1. If the destination is local, send directly: entering a router Ethernet interface, with an IP
▪ Find the destination host’s MAC address destination of host C
using ARP • packet arriving, encapsulated inside an Ethernet
▪ Encapsulate the IP packet in a data-link frame (both header and trailer)
frame • Router R1 processes the frame and packet as shown
o Step 2. If the destination is not local, send to the with the numbers in the figure
default gateway: • Matching the same five-step process described just
▪ Find the default gateway’s MAC address before the figure, as follows:
using ARP o 1. Router R1 received Ethernet frame passes the
▪ Encapsulate the IP packet in a data-link FCS check and the destination Ethernet MAC
frame address is R1’s MAC address, R1 processes the
frame
o 2. R1 de-encapsulates the packet
o 3. R1 compares the IP packet’s destination IP
address to R1’s IP routing table
o 4. R1 encapsulates the IP inside a High-Level
Data Link Control (HDLC) header and trailer.
o 5. R1 transmits the IP packet out the serial link
on the right.

B. An Example of IP Routing
• host A sends a local packet directly to host D
• example uses a case in which host A ([Link])
• for packets to host B, on the other side of a router
sends a packet to host B ([Link])
host A sends the packet to its default router (R1)
• less clutter. For example, host A uses IP address
• host logic began with an IP packet sitting in
memory, a router has some work to do before
getting to that point
• The steps are as follows:
o 1. For each received data-link frame, choose
whether to process the frame. Process it if:
▪ A. The frame has no errors (per the data-
link trailer Frame Check Sequence [FCS]
field).

VIII. IP ROUTING 1
CPE310/Computer Networks and Security
1. Host Forwards the IP Packet to the Default leaving packet
Router (Gateway)
• host A uses some application that sends data to
host B ([Link])
• host A’s logic reduces to the following:
o My IP address/mask is [Link]/24, so my
local subnet contains numbers [Link]–
[Link] 4. Routing Step 3: Choosing Where to Forward
o The destination address is [Link], which is the Packet
clearly not in my subnet. • the router needs to make a choice about where to
o Send the packet to my default gateway, which is forward the packet
set to [Link]. • uses the router’s IP routing table, to compare the
o To send the packet, encapsulate it in an packet’s destination address with the table
Ethernet frame • an IP routing table lists multiple routes, containing
o the destination MAC address be R1’s G0/0 MAC several facts which can be
address (host A’s default gateway) • part of each route is used to match the destination
address, while the rest lists where to send the
packet next

2. Routing Step 1: Decide Whether to Process


the Incoming Frame
• first step in the routing process begins with a
decision of whether a router should process the
frame or silently discard (ignore) the frame
• the router ignores all frames that had bit errors • Figure 16-3 showed R1 has a route for each of the
during transmission by using the data-link FCS field five subnets
• if errors occurred in transmission, router discards • to fully define each subnet, each route lists both the
the frame subnet ID and the subnet mask
• router checks the destination MAC to decide • when matching the destination with the routing
whether the frame is intended for the router table, the router looks at the destination IP address
• a router can receive a frame sent to other unicast ([Link]) and looks at the subnet and mask
MAC address, they should ignore these frames information
• unknown unicast frames, LAN switch floods those • the router can figure out in which of these subnets
frames [Link] resides (the route for subnet
• routers sometimes receive frames with some other [Link]/24).
device’s MAC address listed, it should be ignored • the router uses the forwarding information in the
route to tell where to send the packet next

5. Routing Step 4: Encapsulating the Packet in


a New Frame
• routers cannot forward a packet without first
wrapping a data-link header and trailer around it
(encapsulation).
• host A sends a frame destined for R1’s MAC address
• Point-to-point serial WAN links use either HDLC (the
• after R1 confirms that no errors occurred, R1
default) or PPP as the data-link protocol
confirms that the frame is for R1’s MAC address
• we can ignore any data-link addressing, because
• if all checks have been passed, R1 will process the
serial links have only two devices on the link
frame
• R1 forwards the packet out S0/0/0, after
3. Routing Step 2: De-encapsulation of the IP encapsulating the packet inside an HDLC frame
Packet
• the router no longer needs the data-link header and
trailer, so the router removes and discards them,

VIII. IP ROUTING 2
CPE310/Computer Networks and Security

• sometimes a router forwards packets out an


Ethernet interface
• the router would need to build an Ethernet header
• Ethernet header’s destination MAC address would
need to list the correct value

• example, consider a packet sent by that same PC A


([Link]) but with a destination of PC C
([Link])
• R1 matches a route that tells R1 to forward the
packet out R1’s G0/1/0 Ethernet interface to
[Link] (R3) next
• R1 needs to put R3’s MAC address in the header,
and to do that, R1 uses its IP ARP table information
• if R1 did not have an ARP table entry for [Link],
R1 would use ARP to learn the MAC address

6. Routing Step 5: Transmitting the Frame


• router simply needs to transmit the frame
• router might have to wait, if other frames are
already waiting their turn to exit the interface

VIII. IP ROUTING 3

Common questions

Powered by AI

After de-encapsulation, the router takes the following steps to decide where to forward an IP packet: It checks the destination IP address of the packet against its routing table. The router selects the best matching entry using the longest prefix match algorithm. The entry indicates the next destination or interface for packet egress, including the necessary encapsulation type for the outgoing link, such as Ethernet, HDLC, or PPP. The router then encapsulates the packet into a suitable frame and transmits it through the chosen interface .

Routers differ from regular hosts in their handling of frames because they use additional steps to forward packets between different networks. While a regular host primarily sends packets to its local subnet or default gateway, a router processes incoming frames to decide if it should be de-encapsulated based on MAC address checks and FCS validation. Once de-encapsulated, the router examines the packet's destination IP address against its routing table to determine the appropriate outgoing interface. Finally, routers encapsulate the packet in a new data-link frame specific to the outgoing link type before transmission .

Encapsulation is crucial in the IP routing process because it allows the IP packet to be transmitted over different types of data-link layers, enabling communication across various network media. The encapsulation process varies between interface types; for example, Ethernet interfaces encapsulate packets in Ethernet frames with MAC addresses, while serial interfaces often use encapsulation like HDLC or PPP, which do not include MAC addressing. This ensures the packet is compatible with the physical and data-link layer requirements of the specific transmission medium .

When a LAN-based host transmits an IP packet to a non-local destination, it follows these steps: It first determines that the destination address is not part of its local subnet. The host then sends the packet to its default gateway by encapsulating the IP packet in a data-link frame with the destination MAC address as the default gateway's MAC. The default gateway is usually the router that connects to other subnets or external networks. The host finds the default gateway’s MAC address using Address Resolution Protocol (ARP).

The Frame Check Sequence (FCS) is a field used to detect errors in the transmitted frames. When a router receives a frame, it checks the FCS to determine whether the frame has been corrupted during transmission. Only frames that pass the FCS check, indicating they are error-free, are processed by the router. Frames with errors are discarded, ensuring that only valid frames are propagated through the network .

Address Resolution Protocol (ARP) is used during IP routing to map IP addresses to MAC addresses, which are needed for encapsulating the IP packet in a data-link frame. When a host or router does not have the MAC address of the destination or the next-hop router, they use ARP to request this information from the network. For example, a host will use ARP to find the MAC address of its default gateway, while a router will use ARP to resolve the MAC address of the next-hop device on the route .

Routers handle unknown unicast frames by generally ignoring them since these frames are not addressed to the router's MAC address. This process is necessary to maintain network efficiency and to ensure that the router does not engage in unnecessary processing of frames not intended for it, which could otherwise waste valuable computational resources and bandwidth. LAN switches, instead, are responsible for flooding these unknown unicast frames to all ports to find the frame’s destination .

A router determines the correct MAC address for an Ethernet frame by consulting its ARP table to find the MAC address associated with the next hop's IP address. If the necessary entry is not present in the ARP table, the router will send an ARP request packet on the network to discover the MAC address of the device with the specific IP address. Once the MAC address is obtained, the router encapsulates the IP packet in an Ethernet frame with the destination MAC address set to the one it discovered, ensuring correct delivery .

A router uses HDLC as the encapsulation protocol on point-to-point serial WAN links. For instance, consider a network where routers are connected over a leased serial line. When forwarding a packet, the router de-encapsulates the original LAN frame, selects HDLC as the encapsulation protocol for the serial link, and then re-encapsulates the IP packet into an HDLC frame. This HDLC frame is then transmitted over the serial link towards the next router or towards its final destination .

A router uses the IP routing table to make forwarding decisions by comparing the destination IP address of the received packet with entries in the routing table. The routing table contains multiple routes, each including a subnet ID and subnet mask. By using this information, the router determines the best match subnet for the destination address and then uses the corresponding forwarding information to decide where to send the packet next .

You might also like