CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Models, Protocols, and Standards Section
- Understanding TCP/IP and OSI Models
- Understanding Packet Flow Across the Network Part1
- Understanding Packet Flow Across the Network Part2
- Understanding Ethernet LAN Standards
- Understanding Ethernet MAC Addresses
- Understanding WAN Technologies
- Understanding Data Link Layer Encapsulation
- Understanding EoMPLS WAN Technology
- Understanding IP Routing Process Concept
- Understanding Web Browser DNS Lookup
- Understanding ARP Broadcast Message
- Understanding TCP and UDP Protocols
- Understanding TCP and UDP Multiplexing
- Understanding Application Layer Services
- Understanding Quality of Service Concept

Understanding Packet Flow Across the Network Part2 will complete the Packet’s flow process. Part1 showed you how PC1’s TCP/IP Stack requested a web page from ccnahub.com’s Web Server, hence generated one way Packets across the network. Part2 will show you how the web server received, processed, and responded back to PC1 with the web page in question, therefore, completed the HTTP request and generated the second round of IP Packets across the network.
Table of Contents
Web Server Responding to PC1 HTTP Request
To MAP the steps, print or open the following image in different Window.
Starting with Web-Server’s HTTP Service responding to PC1’s Browser with ccnahub.com’s homepage.
Application Layer – Downstream: Creates and encapsulates the application requests or data with any required Application Layer headers, and handle it the Transport Layer for segmentation.
That is: Web-server’s 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, PC1’s 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 destination and source port to the segment, and finally handle the segment to the Network layer for packing procedure.
That is: Web-server’s Transport Layer receives and encapsulates the Header and data supplied by Web-Server’s Application Layer inside TCP header forming a segment (1), adds back the PC1’s 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 layer 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-server’s Network Layer receives and encapsulates the TCP header inside an IP header forming an IP Packet (1), adds PC1’s 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-server’s 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 Ethernet 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’s outgoing NIC or interface through the physical layer:
That is: Web-server’s Data-Link Layer receives and encapsulates the IP packet inside an Ethernet Header and Trailer forming a Frame (1), adds a destination MAC address of R1’s f0/0 LAN interface (1001.1111.1111) as next-hop (2), adds the web-server’s NIC source MAC address (1001.3333.3333) as sender (3), and forwards the Frame using web-server’s 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 the type of media used (Copper, Fiber, or Wireless), and transmits the signals one at a time using the device’s outgoing NIC or interface through the media used.
That is: Web-server’s 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-server’s outgoing NIC interface, through the physical cable heading to R1 (3).
Step 2: R1’s Upstream Ethernet LAN Port
Physical Layer: Receives the signals from Web-server’s Physical layer through R1’s 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), if 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 Packet’s 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.100’s 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 subnet’s 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 R2’s IP address which is the next Router, and serial 0/0 belongs to R1 as outgoing interface.
Data-link Layer – R1’s 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 R1’s s0/0 as outgoing interface 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 R1’s s0/0 outgoing interface, through the serial link heading to R2 (3).
Step 3: R2’s Upstream Serial WAN Port
Physical Layer: Receives the signals from R1’s Physical layer through R2’s 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-Link Layer (3).
Data-link Layer: Receives the frames 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 PPP or HDLC with its Header and Trailer (3), and Handles ONLY the IP packet to the Network Layer (4).
Network Layer: Receives and reads the IP Packet’s 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.100’s 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 subnet’s 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 further routing (5).
Note: 192.168.1.0 via 10.50.10.1 using f0/0 >>> 10.50.10.1 is R3’s IP address which is the next router, and f0/0 belongs to R2 as outgoing interface.
Data-link Layer – R2’s 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 R3’s f0/0 (3001.1111.1111) as next-hop based on ARP cache table (2), adds new source MAC address of R2’s f0/0 (2001.2222.2222) interface as a sender (3), and forwards the the Frame using R2’s f0/0 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 R2’s f0/0 outgoing interface, through the EoMPLS link heading to R3 (3).
Step 4: R3’s Upstream Ethernet WAN Port
Physical Layer: Receives the signals from R2’s Physical layer through R3’s 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), if no errors found, it de-encapsulates each frame contents (2), strips (discards) any MAC addresses with its Header and Trailer (3), and Handles ONLY the IP packet to the Network Layer (4).
Network Layer: Receives and reads the IP Packet’s 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.100’s 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 subnet’s 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 Layer (5).
Note: 192.168.1.0 is directly connected using f0/1 >>> directly connected, meaning, there are no more routers in the middle to route to for this subnet, since this route connected directly to R3, and f0/1 belongs to R3 as outgoing LAN interface.
Data-link Layer: Receives and encapsulates the IP packet inside Ethernet Header and Trailer forming a NEW Frame (1), adds new destination MAC address of PC1’s NIC (3001.3333.3333) as next-hop based on ARP cache table (2), adds new source MAC address of R3’s f0/0 (3001.2222.2222) interface as a sender (3), and forwards the frame using R3’s 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 R3’s f0/1 outgoing interface, through the LAN network heading to PC1 (3).
Step 5: IP Packet arrived at its final destination
PC1’s Physical Layer: Receives the signals from R3’s Physical layer through R3’s 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).
PC1’s 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).
PC1’s Network Layer: Receives and reads the IP Packet’s destination and source IP addresses (1), compares its destination IP (192.168.1.100) to it’s IP Address and found out that it is the same IP address as the PC1’s IP address – 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).
PC1’s 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 Layer’s services based on the TCP or UPD destination port Number used inside the segment.
That is: PC1’s Transport Layer receives and de-encapsulates the segments supplied by Network Layer (1), analyzes the segment’s destination TCP or UPD port fields (2), based on segment’s destination port number analysis, transport Layer decides that this port is TCP port type number 5480 (3) , based on this port number, it handles the Data header to the Web Browser where previously requested a web page using a dynamic port 5480 to view the ccnahub.com homepage Data.
PC1’s Application Layer: receives any headers that include data from the lower layer – Transport Layer, and have it’s application services process any data based on the port numbers was analyzed previously by the Transport Layer.
That is: PC1’s Web Browser Processed the Data since it was meant to its dynamic TCP port 5480, and found out it is an OK Message Reply from the Web-Server that hosts www.ccnahub.com to view www.ccnahub.com homepage.
At this point, the TCP Handshake process between PC1 and the Web-Server is complete, and a NEW TCP Socket has been formed between these 2 network devices to exchange Data.
Note: that most Routers do NOT deal with either Transport Layer Nor Application layer! Most Routers deal with Physical layer up to ONLY the Network layer. Meaning, Routers receive the Frame and its IP Packet through the Upstream; then Routers route back the IP Packets through the Data Link Layer again using NEW Frames with New Hardware Address that is suitable to the medium being used on the Downstream link which would be heading to the Next-Hop.
Media Access Control (MAC) Address
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) since every network device got it’s own unique MAC or Hardware address, the MAC or Hardware address on each routing device at the upstream process get stripped out (discarded), finally, 4) at the downstream, the frame will be assigned a New MAC or Hardware address heading to the next hop.
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.
Subject Related
By Wikipedia Traffic Flow | Novel Docs | Oracle Docs | Cisco Forum Packet Flow | Juniper Docs Packet Flow | Introduction To Network | Practical Packet | Computer Network | Introduction to Networking | Who is Running the Internet | Networking Self-Teaching Guide
CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Models, Protocols, and Standards Section
- Understanding TCP/IP and OSI Models
- Understanding Packet Flow Across the Network Part1
- Understanding Packet Flow Across the Network Part2
- Understanding Ethernet LAN Standards
- Understanding Ethernet MAC Addresses
- Understanding WAN Technologies
- Understanding Data Link Layer Encapsulation
- Understanding EoMPLS WAN Technology
- Understanding IP Routing Process Concept
- Understanding Web Browser DNS Lookup
- Understanding ARP Broadcast Message
- Understanding TCP and UDP Protocols
- Understanding TCP and UDP Multiplexing
- Understanding Application Layer Services
- Understanding Quality of Service Concept
Good article. I will be dealing with a few of these issues as well..