3-Understanding How IP Packets Are Routed Back
Transcript of 3-Understanding How IP Packets Are Routed Back
-
8/12/2019 3-Understanding How IP Packets Are Routed Back
1/6
ccnahub.com http://www.ccnahub.com/ip-fundamentals/how-ip-packets-are-route
Understanding How IP Packets are Routed Back
UnderstandingHow IP Packets are Routed BackArticle covers the following CCNA/ICND1 Exam Topics:
Under Operation of IP Data Networks:
1. Predict the data flow between two hosts across a network.
2. Select the components required to meet a given network specification.
3. Recognize the purpose and functions of various network devices such as Routers, Switches, Bridges, and Hubs.
Under IP Routing Technologies:
1. Differentiate methods of routing and routing protocols such Static vs. Dynamic.
Recommended Study Plan:
1. Download the ICND1v2 Exam Topics Sheet from Cisco Website.
2. Follow the Steps and the Articles under IP Networks Fundamentals by order.
3. Or Start with Packet Flow Across the Network Article.
Average Time Required Studying this Article: 1 Hour
Routing Back IP Packets:
How the Web-Server replied back the homepage of ccnahub.com to PC1?
http://www.ccnahub.com/ip-fundamentals/understanding-packet-flow-across-the-network/http://www.ccnahub.com/ccna-routing-and-switching/understanding-ip-fundamentals/http://www.ccnahub.com/ip-fundamentals/how-ip-packets-are-routed/http://www.ccnahub.com/ -
8/12/2019 3-Understanding How IP Packets Are Routed Back
2/6
*To MAP the steps, print or open the upper figure in different Window.
Step 1 Servers Downstream: Started with Web-Servers HTTPService ready to respond www.ccnahub.com
homepage to PC1s Browser.
Application Layer Downstream: Creates and encapsulates the application requests or data with any required
Application Layer headers, and handle it the Transport Layer for segmentations.
That is:Web-servers HTTP service at the application layer, creates and encapsulates the application data with
HTTP (OK message) inside a header followed by part of the contents of a web page as data, therefore, PC1s
browser can browse the Web page and retrieve the data.
Transport Layer Downstream: Receives the HTTP Header with the OK Message and Data, encapsulates the
Header and data supplied by the Application Layer inside a TCP or UDP header forming a Segment, adds destinatio
and source port to the segment, and finally handle the segment to the Network layer for packing procedure.
http://www.ccnahub.com/ip-fundamentals/understanding-application-layer-protocols-and-services/ -
8/12/2019 3-Understanding How IP Packets Are Routed Back
3/6
That is:Web-servers Transport Layer receives and encapsulates the Header and data supplied by Web-Servers
Application Layer inside TCP header forming a segment (1), adds back the PC1s Web Browser dynamic TCP Port
(5480) as destination port (2), adds its HTTP service TCP static port (80) as source port (3), and finally handles the
segment to the Network Layer for packing procedure (4).
Network Layer Downstream: Receives and encapsulates any TCP or UDP header supplied by the Transport lay
inside an IP Header forming an IP packet, adds a destination and source IP addresses to the IP packet, and finally
routes the IP packet using outgoing NIC or interface through the Data-Link Layer.
That is:Web-servers Network Layer receives and encapsulates the TCP header inside an IP header forming an IP
Packet (1), adds PC1s IP address (192.168.1.100) as destination IP Address (2), adds its IP address (172.16.10.20
as source IP Address (3), and finally routes the IP packet using web-servers NIC as outgoing interface through the
Data-Link layer (4).
Data-Link Layer Downstream using Ethernet NIC: Receives and encapsulates the IP Packet inside an Etherne
Header and Trailer forming a Frame, Ethernet is used, adds destination and source MAC addresses to the Frame
based on Address Resolution Protocol (ARP) table, and finally forwards the Frame to the next-hop using the device
outgoing NIC or interface through the physical layer:
That is:Web-servers Data-Link Layer receives and encapsulates the IP packet inside an Ethernet Header andTrailer forming a Frame (1), adds a destination MAC addressof R1s f0/0 LAN interface (1001.1111.1111) as next-ho
(2), adds the web-servers NIC source MAC address (1001.3333.3333) as sender (3), and forwards the Frame using
web-servers NIC as outgoing interface through the Physical layer (4).
Physical Layer Downstream: Receives and converts the frame to bits, encodes the bits into signals based on th
type of media used (Copper, Fiber, or Wireless), and transmits the signals one at a time using the devices outgoing
NIC or interface through the media used.
That is:Web-servers Physical Layer receives and converts the frame to bits (1), since Ethernet Copper cable is
used, encodes the bits into electrical signals (2), and finally transmits the electrical signals one at a time using web-
servers outgoing NIC interface, through the physical cable heading to R1 (3).
Step 2 R1s Upstream using Ethernet LAN:
Physical Layer:Receives the signals from Web-servers Physical layer through R1s f0/0 interface and de-encodes
each electrical signal as bit stream (1), reassemble each bit stream as frame (2), and handle each frame to the Data
Link Layer (3).
Data-link Layer: Receives the frames and applies Frame Check Sequence (FCS) on each frame for any error (1), i
no errors found, it de-encapsulates each frame contents (2), strips (discards) any MAC addresses used with its
Header and Trailer (3), and Handles ONLY the IP packet to the Network Layer (4).
Network Layer:Receives and reads the IP Packets destination and source IP addresses (1), compares destination
IP (192.168.1.100) to known IP routes or subnets by reading the Routing Table Entries to analyze 192.168.1.100s
subnet Bingo! 192.1681.0/24 Subnet found, which includes addresses 192.168.1.1 through 192.168.1.254 (3), No
the Routing decision:the subnets route states: 192.168.1.0 via 10.50.10.2 using serial0/0 interface as outgoing
interface (4), and routes the IP packet using s0/0 interface as outgoing interface through the Data-link Layer (5).
Note:192.168.1.0 via 10.50.10.2 using serial0/0 >>>10.50.10.2 is R2s IP address which is the next Router, and
serial 0/0belongs to R1 as outgoing interface.
Data-link Layer R1s Downstream using Serial Port:Receives and encapsulates the IP packet inside PPP
Header and Trailer forming a NEW Frame (1), and forwards the NEW Frame using R1s s0/0 as outgoing interface
http://www.ccnahub.com/ip-fundamentals/understading-data-link-layer-encapsulation/http://www.ccnahub.com/ip-fundamentals/understanding-mac-address/ -
8/12/2019 3-Understanding How IP Packets Are Routed Back
4/6
through the Physical layer (2).
Physical Layer:Physical Layer receives and converts the frames to bits (1), since serial copper cable is used,
encodes the bits into electrical signals (2), and transmits the electrical signals one at a time using R1s s0/0 outgoing
interface, through the serial link heading to R2 (3).
Step 3 R2s Upstream using Serial Port:
Physical Layer: Receives the signals from R1s Physical layer through R2s s0/0 interface and de-encodes each
electrical signal as bit stream (1), reassemble each bit stream as frame (2), and handle each frame to the Data-LinkLayer (3).
Data-link Layer: Receives the frames and applies Frame Check Sequence (FCS) on each frame for any error (1), i
no errors found, it de-encapsulates each frame contents (2), strips (discards) any PPP or HDLCwith its Header and
Trailer (3), and Handles ONLY the IP packet to the Network Layer (4).
Network Layer:Receives and reads the IP Packets destination and source IP addresses (1), compares destination
IP (192.168.1.100) to known IP routes or subnets by reading the Routing Table Entries to analyze 192.168.1.100s
subnet Bingo! 192.168.1.0/24 Subnet found, which includes addresses 192.168.1.1 through 192.168.1.254 (3),
Now the Routing decision:the subnets route states: 192.168.1.0 via 10.50.10.1 using f0/0 interface as outgoing
interface (4), and routes the IP packet using f0/0 interface as outgoing interface through the Data-link Layer for furthrouting (5).
Note: 192.168.1.0 via 10.50.10.1 using f0/0>>> 10.50.10.1 is R3s IP address which is the next router, and f0/0
belongs to R2 as outgoing interface.
Data-link Layer R2s Downstream using Ethernet WAN port: Receives and encapsulates the IP packet inside
Ethernet Header and Trailer forming a NEW Frame (1), adds new destination MAC address of R3s f0/0
(3001.1111.1111) as next-hop based on ARP cache table (2), adds new source MAC address of R2s f0/0
(2001.2222.2222) interface as a sender (3), and forwards the the Frame using R2s f0/0 as outgoing interface throug
the Physical layer (4).
Physical Layer: Physical Layer receives and converts the frames to bits (1), since Ethernet copper cable is used,
encodes the bits into electrical signals (2), and transmits the electrical signals one at a time using R2s f0/0 outgoing
interface, through the EoMPLSlink heading to R3 (3).
Step 4 R3s Upstream using Ethernet WAN Port:
Physical Layer:Receives the signals from R2s Physical layer through R3s f0/0 interface and de-encodes each
electrical signal as bit stream (1), reassemble each bit stream as frame (2), and handle each frame to the Data-Link
Layer (3).
Data-link Layer: Receives the frames and applies Frame Check Sequence (FCS) on each frame for any error (1), i
no errors found, it de-encapsulates each frame contents (2), strips (discards) any MAC addresses with its Header a
Trailer (3), and Handles ONLY the IP packet to the Network Layer (4).
Network Layer: Receives and reads the IP Packets destination and source IP addresses (1), compares destination
IP (192.168.1.100) to known IP routes or subnets by reading the Routing Table Entries to analyze 192.168.1.100s
subnet Bingo! 192.168.1.0/24 Subnet found, which includes addresses 192.168.1.1 through 192.168.1.254 (3),
Now the Routing decision:the subnets route states: 192.168.1.0 is directly connected using f0/1 interface as
outgoing interface (4), and routes the IP packet using f0/1 interface as outgoing interface through the Data-link Laye
(5).
Note: 192.168.1.0 is directly connected using f0/1 >>>directly connected, meaning, there are no more routers
http://www.ccnahub.com/ip-fundamentals/understanding-eompls-wan-technology/http://www.ccnahub.com/ip-fundamentals/understading-data-link-layer-encapsulation/ -
8/12/2019 3-Understanding How IP Packets Are Routed Back
5/6
the middle to route to for this subnet, since this route connected directly to R3, and f0/1belongs to R3 as outgoing
LAN interface.
Data-link Layer:Receives and encapsulates the IP packet inside Ethernet Header and Trailer forming a NEW Fram
(1), adds new destination MAC address of PC1s NIC (3001.3333.3333) as next-hop based on ARP cache table (2),
adds new source MAC address of R3s f0/0 (3001.2222.2222) interface as a sender (3), and forwards the frame usi
R3s f0/1 as outgoing interface through the Physical layer (4).
Physical Layer: Physical Layer receives and converts the frames to bits (1), since Ethernet copper cable is used,
encodes the bits into electrical signals (2), and transmits the electrical signals one at a time using R3s f0/1 outgoing
interface, through the LAN network heading to PC1 (3).
Step 5 - IP Packet hits its final destination using PC1s Upstream NIC:
PC1s Physical Layer:Receives the signals from R3s Physical layer through R3s f0/1 interface and de-encode
each electrical signal as bit stream (1), reassemble each bit stream as frame (2), and handles each frame to the
upper layer Data-Link Layer (3).
PC1s Data-link Layer: Receives the frames from the physical layer and applies Frame Check Sequence (FCS) on
each frame for any error (1), if no errors found, it de-encapsulates each frame contents (2), strips (discards) any
Ethernet MAC addresses with its Header and Trailer (3), and Handles ONLY the IP Packet to the upper layer Network Layer (3).
PC1s Network Layer:Receives and reads the IP Packets destination and source IP addresses (1), compares its
destination IP (192.168.1.100) to its IP Address and found out that it is the same IP address as the PC1s IP addres
Bingo!, the IP packet reached its final destination (2), it de-encapsulates the IP Packet and handle the Segment to
the upper layer Transport layer (3).
PC1s Transport Layer: Receives and de-encapsulates the segments supplied by the Network Layer, analyze any
destination TCP or UDP source port numbers, and finally handle the Data to the Application Layers services based
on the TCP or UPD destination port Number used inside the segment.
That is:PC1s Transport Layer receives and de-encapsulates the segments supplied by Network Layer (1), analyze
the segments destination TCP or UPD port fields (2), based on segments destination port number analysis, transpo
Layer decides that this port is TCP port type number 5480 (3) , based on this port number, it handles the Data heade
to the Web Browser where previously requested a web page using a dynamic port 5480 to view the ccnahub.com
homepage Data.
PC1s Application Layer:receives any headers that include data from the lower layer Transport Layer, and have
its application services process any data based on the port numbers was analyzed previously by the Transport Laye
That is:PC1s Web Browser Processed the Data since it was meant to its dynamic TCP port 5480, and found out it
an OK Message Reply from the Web-Server that hosts www.ccnahub.com to view www.ccnahub.com homepage.
*At this point a TCP Handshakebetween PC1 and the Web-Server is complete, and a NEW TCP Sockethas been
formed between these 2 network devices to exchange Data.
*Please Note:that most Routers do NOT deal with either Transport Layer Nor Application layer! Starting at the
Physical layer and up to ONLY the Network layer,Routers receive the Frame then the IP Packet as Upstream, then
Routers route the IP Packets through Data Link Layerusing NEW Frames with New Hardware Addressthat is
suitable to medium used as Downstream to the Next-Hop.
Media Access Control (MAC) Address
http://www.ccnahub.com/ip-fundamentals/understanding-mac-address/http://www.ccnahub.com/ip-fundamentals/understading-data-link-layer-encapsulation/http://www.ccnahub.com/ip-fundamentals/understanding-multiplexing-tcp-and-udp-sockets/http://www.ccnahub.com/ip-fundamentals/understanding-tcp-and-udp/ -
8/12/2019 3-Understanding How IP Packets Are Routed Back
6/6
The upper figure showed how the Web-Server replied to PC1 with almost everything the same at the request stage
except:
1. The Port numbers are flipped on the reply stage
2. The IP address are flipped on the reply stage
3. The MAC addresses get stripped out on the upstream (discarded) at each routing device, and replaced by BRAN
NEW MAC addresses at the downstream. Basically, it is the handling process of the IP Packet between 2 network
devices connected to each other till the IP Packet get delivered to its final destination.
Next: Understanding Ethernet Standards
Go to top
About Imad Daou
He is the founder of CCNA HUB, a CCNA Training HUB to help CCNA students get certified. Imad has more than 10years of IT experience as Field Service and Consulting Engineer. A+, Network+, Server+, Security+, Storage+, HP,
Dell, and IBM Hardware Certified. He's a Professional SMB IT Consultant.
Facebook Twitter Linkedin Google
Copyright secured by Digiprove 2013 Imad DaouSome Rights Reserved
Original content here is published under these license terms: X
LicenseType: Attribution, Share Alike
LicenseSummary:
You may copy this content, create derivative work from it, and re-publish it, provided you include anovert attribution to the author(s) and the re-publication must itself be under the terms of this license orsimilar.
LicenseURL:
http://creativecommons.org/licenses/by-sa/3.0/
http://creativecommons.org/licenses/by-sa/3.0/http://dprv_displaylicense%28%272093%27%29/http://www.digiprove.com/prove_compliance.aspx?id=P465205https://plus.google.com/+Ccnahubhttps://www.linkedin.com/in/emaddaouhttps://twitter.com/ccnahubhttps://www.facebook.com/ccnahubhttp://www.ccnahub.com/http://www.ccnahub.com/author/imad-daou/http://www.ccnahub.com/ip-fundamentals/how-ip-packets-are-routed/#http://www.ccnahub.com/ip-fundamentals/understanding-ethernet-standards/