May 16, 2008, 9:55 am
T171 You, Your Computer and the Net
Packet Handling
Incoming packets
The process for accepting packets from a network can be listed as:
- Link layer accepts the packets from the network wire (Local Area Network
or modem) and removes any link layer header information (e.g. Ethernet address
information). Each packet is passed to the Network layer.
- Network layer (IP) checks to see if a packet is corrupted and if it is,
discards it. If the packet is error free, the Network layer passes it on
to the Transport layer.
- Transport layer (TCP) checks to see if the packets
have arrived in the order in which they were sent and reassembles them
in the correct order if not. If a packet is missing (e.g. because IP has
rejected it as corrupted) it requests re-transmission. When the complete
set of packets has been assembled, TCP passes them up to the Application
layer.
Outgoing packets
Here is an example of an application using Telnet; a protocol used to log
in to remote computers. This can be achieved a number of ways, but one simple
method is to open your browser and type, for example, telnet://locis.loc.gov
into the Address field and click enter.
This is the address for the United States Library of Congress Information
System.
A sequence of processes ensues, all but one of which are invisible to the
user:
- The browser makes a request to a Domain Name System (DNS) server in order
to map the name locis.loc.gov to a numeric IP address. In this instance
the name is resolved to 193.243.176.32. For more about the resolution of
IP addresses into binary numbers, go here.
- Telnet instructs the transport layer to make a TCP connection to 193.243.176.32
- TCP assigns a port number. This is a software implementation of a channel
for the data exchange. For Telnet this is port number 23.
- TCP creates packets ready for transmission.
- TCP initiates communication with the destination machine (locis.loc.gov)
and gets the port number from it, ready for the transaction.
- TCP places the source and destination port numbers on the packets' headers.
- Packets are passed to the IP layer.
- IP adds the address of both source and destination machines and passes
them down the stack to the link layer.
- Packets are sent from your machine to your ISP's router, which in turn
passes them onto the Internet.
- Packets are transported via a number of routers to locis.loc.gov
- The LoC machine's TCP layer replies in similar fashion.
- Your Telnet program exchanges data with Telnet on LoC's machine about
the kind of display you are using.
- Output is displayed on your Telnet console
Next page » Origins of the Web
Previous page « TCP/IP and packets