Download TCP/IP Networking: Understanding the Interactions of Protocols with an Example and more Slides Internet and Information Access in PDF only on Docsity!
TCP/IP Networking
An Example
1
Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example intents to motivate the study of the TCP/IP protocols.
A simple TCP/IP Example
- A user on host argon.tcpip-lab.edu (“ Argon ”) makes a web access to URL http://neon.tcpip-lab.edu/index.html.
- What actually happens in the network?
HTTP Request
4
GET /index.html HTTP/1. Accept: image/gif, / Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4. Host: neon.tcpip-lab.edu Connection: Keep-Alive
HTTP Response
5
HTTP/1.1 200 OK Date: Sat, 25 May 2002 21:10:32 GMT Server: Apache/1.3.19 (Unix) Last-Modified: Sat, 25 May 2002 20:51:33 GMT ETag: "56497-51-3ceff955" Accept-Ranges: bytes Content-Length: 81 Keep-Alive: timeout=15, max= Connection: Keep-Alive Content-Type: text/html
Internet Lab Click here for the Internet Lab webpage.
- How does the HTTP request get from Argon to Neon?
Resolving hostnames and port
numbers
- Since TCP does not work with hostnames and also does not know how to find the HTTP server program at Neon, two things must happen: 1. The name “neon.tcpip-lab.edu” must be translated into a 32-bit IP address. 2. The HTTP server at Neon must be identified by a 16-bit port number.
Translating a hostname into an IP
address
- The translation of the hostname neon.tcpip-lab.edu into an IP address is done via a database lookup
- The distributed database used is called the Domain Name System (DNS)
- All machines on the Internet have an IP address: argon.tcpip-lab.eduneon.tcpip-lab.edu 128.143.137.144128.143.71.
8
HTTP client DNS Server
argon.tcpip-lab.edu 128.143.136.
neon.tcpip-lab.edu 128.143.71.
Requesting a TCP Connection
- The HTTP client at argon.tcpip-lab.edu requests the TCP client to establish a connection to port 80 of the machine with address 128.141.71.
10
HTTP client
TCP client
argon.tcpip-lab.edu
Establish a TCP connection to port 80 of 128.143.71.
Invoking the IP Protocol
- The TCP client at Argon sends a request to establish a connection to port 80 at Neon
- This is done by asking its local IP module to send an IP datagram to 128.143.71.
- (The data portion of the IP datagram contains the request to open a connection)^11
TCP client
argon.tcpip-lab.edu
IP
Send an IP datagram to 128.143.71.
Docsity.com
The route from Argon to Neon
- Note that the gateway has a different name for each of its interfaces. (^) Docsity.com 13
Finding the MAC address of the gateway
- To send an IP datagram to Router137, Argon puts the IP datagram in an Ethernet frame, and transmits the frame.
- However, Ethernet uses different addresses, so-called Media Access Control (MAC) addresses (also called: physical address, hardware address)
- Therefore, Argon must first translate the IP address 128.143.137.1 into a MAC address.
- The translation of addressed is performed viaDocsity.com^14
Invoking the device driver
- The IP module at Argon , tells its Ethernet device driver to send an Ethernet frame to address 00:e0:f9:23:a8:
16
argon.tcpip-lab.edu IP module
Ethernet
Send an Ethernet frame to 00:e0:f9:23:a8:
Sending an Ethernet frame
- The Ethernet device driver of Argon sends the Ethernet frame to the Ethernet network interface card (NIC)
- The NIC sends the frame onto the wire
Another lookup of a MAC address
- The router needs to find the MAC address of Neon.
- Again, ARP is invoked, to translate the IP address of Neon ( 128.143.71.21) into the MAC address of neon (00:20:af:03:98:28).
Invoking the device driver at the router
- The IP protocol at Router71 , tells its Ethernet device driver to send an Ethernet frame to address 00:20:af:03:98:
20
router71.tcpip-lab.edu IP module
Ethernet
Send a frame to 00:20:af:03:98: