cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1444
Views
18
Helpful
6
Replies

TCP/IP Layers

Abhishek Thomas
Cisco Employee
Cisco Employee

If I open a website for example www.cisco.com, how the traffic flows according to TCP/IP Layers and how the layers interact to each other to accomplish this task ?

2 Accepted Solutions

Accepted Solutions

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hello Abhishek,

You must be aware that encapusaltion happens from top to bottom with TCP/IP layer, Application Layer encapsulated HTTP or HTTPS Data Request into HTTP /HTTPS Data Header, and handled the Header to the Transport Layer for further Processing.

Transports layer works in segments so it encapsulated the HTTP Data Header into Segment (s) adding source and destination TCP ports to the Segment, and sends to Network Layer for further processing.

Network Layer works in logical addressing of segmenst , so it encapsulated the Segment into an IP Packet by adding logical source and destination IP addresses to the packet , and transfer to Data Link layer for frame forwaridng.

Addition of hardware mac and encapsulation of mac address happens in Data Link Layer, Once packet arrives to data link layer it encapsulated the IP Packet  into a Frame  adding source and destination MAC addresses to the Frame with Ethernet Header.

And once frame arrived to physical segments , Its Physical Layer duty to send the frame into medium using standards and communication in  physical Layer happens in stream of bits which are encoded into signals based on type of media (Copper, Fiber, or Wireless).

Hope it Helps..

-GI

Rate if it Helpss

View solution in original post

Hello,

Check this book. It is very nice. It is taught at universities.

http://folk.ntnu.no/nicolaat/uni/KTN%20-%20TTM4100/ktn%20tmm.pdf

View solution in original post

6 Replies 6

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hello Abhishek,

You must be aware that encapusaltion happens from top to bottom with TCP/IP layer, Application Layer encapsulated HTTP or HTTPS Data Request into HTTP /HTTPS Data Header, and handled the Header to the Transport Layer for further Processing.

Transports layer works in segments so it encapsulated the HTTP Data Header into Segment (s) adding source and destination TCP ports to the Segment, and sends to Network Layer for further processing.

Network Layer works in logical addressing of segmenst , so it encapsulated the Segment into an IP Packet by adding logical source and destination IP addresses to the packet , and transfer to Data Link layer for frame forwaridng.

Addition of hardware mac and encapsulation of mac address happens in Data Link Layer, Once packet arrives to data link layer it encapsulated the IP Packet  into a Frame  adding source and destination MAC addresses to the Frame with Ethernet Header.

And once frame arrived to physical segments , Its Physical Layer duty to send the frame into medium using standards and communication in  physical Layer happens in stream of bits which are encoded into signals based on type of media (Copper, Fiber, or Wireless).

Hope it Helps..

-GI

Rate if it Helpss

Just adding to Ganesh answer,

Transporst layer receives data from application layer and chops it into the seqments. Before starting to transfer, client sends a TCP heaer with no payload with SYN flag set and a random sequence number and possibly some options. Server sends a TCP header with SYN AND ACK set and a random seuence number for server side. Then client starts to sending the request while ACK is set.

This is called TCP three-way hand shaking.

Hope it helps,

Masoud

If you want more detail TCP/IP Illustrated Vol 1 is a good source of info.

Thanks everyone for your help.

Hello,

Check this book. It is very nice. It is taught at universities.

http://folk.ntnu.no/nicolaat/uni/KTN%20-%20TTM4100/ktn%20tmm.pdf

barnesp
Level 1
Level 1

This is quite an interesting question!  OK so assuming that you have never been to www.cisco.com. ; The first thing you are likely to do as a client is to generate a DNS query in order to resolve FQDN into an IP address.

DNS uses UDP port 53.  In the worst case this could be forwarded to one of the Internet's root DNS servers - but the vaguries of DNS can be quite complex.  In the end a authoritative answer will be returned.

The client will then initiate a TCP connection to the IP address found above with a destination port of 80. TCP uses a three way handshake to synchronise sequence numbers.  This ensures that lost segments can be recovered. This assumes of course the ARP has done it's work and we know how to encapsulate IP traffic towards our IP default gateway.

It likely that web server will provide a default.htm document which then detail other elements that need to be downloaded. For example pictures, styles sheets etc.  Each element typically requires a new TCP session to be initiated to the web server.

The very best way to understand this process is to install Wireshark (free) on your computer and capture everything that goes on!