Resources‎ > ‎

Internet Overview

Some material adapted from Computer Networking: A Top-Down Approach Featuring the Internet 3rd edition, copyright 2005 J.F Kurose and K.W. Ross, All Rights Reserved.

Internet Architecture

The Internet is made up of edge components, core components, and communication media:
  • Network edge - The network edge consists of applications running on host computers.  Hosts run programs such as email clients, web browsers, email servers, and web servers.  The most popular model for communication on the Internet is the client-server model.  Clients request and receive services from servers that are always on.  In the peer-to-peer (P2P) model, hosts communicate as equals.  A host can typically operate as both a client and a server.
  • Network core - The network core consists of a series of routers that receive messages from sending hosts or other routers and pass them along until they arrive at the receiving host.
  • Communication media - Hosts and routers connect via communication links.  Links may be wired or wireless. 

Internet Service Models

Programs send messages over the Internet by using sockets.  A socket is an input or output stream that allows an application to send or receive messages. Communication via sockets can be reliable, using the Transport Control Protocol (TCP), or unreliable, using the User Datagram Protocol (UDP).  Programs such as email and web browsing use TCP.  Programs such as streaming media, that are time sensitve but can tolerate loss, use UDP.

The Life of a Packet

A message sent by an application is often referred to as a packet. From the programmer's perspective, sending a packet involves the following steps:
  1. Prepare the packet.
  2. Connect to the receiver by using the receiver's Internet Protocol (IP) address to open a socket.
  3. Retrieve the output stream created by the socket.
  4. Push the packet into the output stream.
From the computer's perspective, there are many more steps involved.  If reliable communication is desired, the networking stack must keep track of which packets have been sent and which have been received.  It must also determine the best route a packet should take through the Internet.  Finally, it must determine how to contact the next router along the path to the receiver. 

The Internet protocol stack is comprised of 5 layers.  These layers decompose the complex functionality of the Internet into manageable pieces.
  • Application - The application layer composes messages to be sent to a receiver.
  • Transport - The transport layer ensures that communication is reliable and also ensures that each host not take up more than its fair share of the bandwidth.
  • Network - The network layer determines how packets should be routed.
  • Data Link (or MAC) - The data link layer addresses how neighboring hosts and routers communicate.
  • Physical - The physical layer addresses how bits are sent on the wire.

Protocols and SMTP

Networked entities communicate using a series of protocols.  A protocol defines the format and order of messages used for communication.  The HyperText Transfer Protocol (HTTP) defines the messages exchanged between a web browser and a web server.  To retrieve a web page, you can telnet directly to a server and type GET /<path to page>.  The server will respond with the page, or with a 404 Not Found message.  Following is an example that retrieves my web page:

kir:~ srollins$ telnet www.cs.usfca.edu 80
Trying 138.202.170.2...
Connected to www.cs.usfca.edu.
Escape character is '^]'.
GET /~srollins/index.htm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
  <head>
    <title>Sami Rollins</title>
  </head>
  <body text="#000000" bgcolor="#FFFFFF" link="#660099" vlink="#666699" alink="#FF6600">
...   
  </body>
</html>
Connection closed by foreign host.
kir:~ srollins$

SMTP

There are three main components of the electronic mail system:
  • User agents - The user agent is the mail reader program.  Examples include Outlook, Mac Mail, and Thunderbird.  The agent allows you to compose messages and read messages that are stored on the mail server.
  • Mail servers - Your mail server stores your incoming and outgoing messages. 
  • SMTP - The Simple Mail Transport Protocol is the language your user agent uses to speak to the mail server when sending a message, and it is the language mail servers speak when communicating with one another.
The typical path of an email message is as follows:
  1. The user composes an email message using the user agent.
  2. The agent contacts the user's mail serer and places the message in an outgoing message queue.
  3. The sender's mail server contacts the receiver's mail server and uses SMTP to send the message.
  4. The receiver's mail server places the message into the receiver's inbox.
  5. The receiver's user agent uses a protocol such as the Post Office Protocol (POP) or the Internet Mail Access Protocol (IMAP) to retrieve the message from the server.
A user agent works by opening a connection to an SMTP server and sending a series of messages uses the SMTP protocol.  You can bypass the user agent and communicate directly with the server if you know how to speak the SMTP protocol.  Following is an example session:

kir:~ srollins$ telnet smtp.usfca.edu 25
Trying 138.202.192.17...
Connected to smtp.usfca.edu.
Escape character is '^]'.
220 smtp.usfca.edu ESMTP Postfix
HELO rollins.com
250 smtp.usfca.edu
MAIL FROM: sami@rollins.com
250 Ok
RCPT TO: srollins@cs.usfca.edu
250 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
From: "Sami Rollins" <sami@rollins.com>
To: Sami Rollins <srollins@cs.usfca.edu>
Subject: Hey there
Hey,
This is my message.
Best,
Sami
.
250 Ok: queued as 88ED0994
QUIT
221 Bye
Connection closed by foreign host.
kir:~ srollins$


Comments