Internet Basics
Internet Basics
Internet Basics
1
Background on Internet Technologies
• Evolution of Networking
– Batch Environment - 1950s
• no direct interaction between users and their programs during execution
– Time Sharing - 1960s
• dumb terminals were connected to a central computer system
• Users were able to interact with the computer and could share its information processing
resources
• Marked the beginning of computer communications
– Distributed Processing: use of minicomputers - 1970s
• Users demanded computing closer to their work areas
• Communication between neighbor processors and applications via networks
– WAN and LAN- 1980s
2
LANs
• collection of hosts connected by a high speed network
• designed and developed for communications and
resource sharing in a local work environment (room,
campus, building)
• users can access other networks via bridges and
gateways
PC 1
Printer
PC 2
PC n File Server 3
WANs and Internetworks
• span a large geographic area, cross public property
• often based on services provided by 3rd party companies,
use telephone networks for transmission from one node to
another
• can be used to connect several LANs together
• Routers attached to each LAN filter the network traffic to
and from the WAN
• LANs can also be connected by special modems or
dedicated leased lines
PC 1
Internetwork
Router
PC 2
File Server
PC n 4
Routers
• Special purpose computers used for
interconnecting networks
• Essentially a router receives messages
originating from one network and sends (routes)
them to the other network
• The process of selecting a network over which
to send a message is called routing
• Ex: computers X and Y can communicate via
routers R1, R2 and R3
5
An example
R1
x
R2
R3
Y
6
Internet
7
Packet Switching
• A message is not sent as a single unit, but
broken down into small packets that are
transmitted individually
• Each packet has header that contains the info
about source, destination and the packer number
• Packets may travel on different routes
• May even arrive the destination out of order
• Good for data communication
10
Packet Switches
• A WAN is constructed from many switches
• A switch moves packets from one connection to the other
• A switch is a dedicated computer, with two types of connections
– High-speed connections with other switches; they can be: leased phone
lines, optical fibers, microwave, satellite.
– Low-speed connection: used to connect with an individual computer, or a
LAN.
11
Switched Network
Switch
IP Addressing
Every host on the Internet has a unique IP address.
IP protocol (the one in use now) has 32 bits for an
address. How many hosts total? 232 =
4,294,987,296.
32 bits must be divided into a Network portion and
a Host portion.
Typically written in a "dotted decimal" form:
128.6.10.4
In this case, the network portion is 128.6
The host portion is 10.4
13
Domain Name Services
• Each host on the Internet has its own unique IP address - Who can
remember all of them ?
• DNS gives us a means to map an IP address to a "host name" and vice
versa.
• Host names are typically broken down into 4 or 5 parts:
– 1.A geographic (e.g. country) designation is given at the "highest level":
• uk us ca au fr it dr zw
– 2.An organizational designation may be in place of geographic but can also
appear in combination:
• com edu gov mil org net
– 3.The next level down in the "organizational" level:
• rutgers microsoft pizzahut plannetreebok
– 4.Within an organization, there may be several individual hosts, each with
their own name:
• CIMIC andromeda
14
Domain Name Services (cont’d)
• These parts are assembled from right to left:
– andromeda.rutgers.edu
– www.microsoft.com
– psych.leeds.ed.uk
– www.whitehouse.gov
• Resolving Internet Names using DNS
– Most commonly used IP and host name pairs are kept in a hosts
file. See /etc/hosts
– If not in the hosts file, a primary DNS site is consulted.
– UDP is used to send a DNS Query message to the designated
Name Server on port 53.
– This is done in a logical fashion. e.g. for host names ending in
rutgers.edu, a local Rutgers DNS server can be queried.
15
Domain Name Services (cont’d)
16
Communication Architecture
• Why do we need?
– Communication systems involve heterogeneous
technologies
– change rapidly
– they are complex (addressing, routing, multiplexing, error
control, …)
• How to cope with the above?
– modularization
– standardization
• International Standards Organization (ISO)
developed the Open Systems Interconnection (OSI)
reference model (1974) 17
OSI Reference Model
• Consists of seven layers
• Each layer provides a set of functions to the layers
above and relies on the functions provided by the
layers below
• Each layer communicates with its peer layer on the
other node (protocols)
• The layer boundaries (interfaces) should be designed
in such a way as to minimize the information flow
between the boundaries
• The main idea is to have independent standards for
different layers so that changes to one would not
cause changes in other layers 18
OSI Reference Model (cont’d)
+--------------+ +--------------+
| application |<--------------------->| application |
+--------------+ +--------------+
| presentation |<--------------------->| presentation |
+--------------+ +--------------+
| session |<--------------------->| session |
+--------------+ +--------------+
| transport |<--------------------->| transport |
+--------------+ +---------+ +--------------+
| network |<---->| network |<---->| network |
+--------------+ +---------+ +--------------+
| data link |<---->|data link|<---->| data link |
+--------------+ +---------+ +--------------+
| physical |<---->|physical |<---->| physical |
+--------------+ +---------+ +--------------+
19
OSI Reference Model (cont’d)
User A User B
application application
Higher
presentation presentation Higher
level
session session
level
protocols
protocols
transport transport
network network
Lower
data link data link Lower
level
level
protocols physical physical
protocols
physical medium
20
How layered software works?
• Each layer solves one part of the problem
• To do so, each layer on the sending computer adds information
to the outgoing data
• The same layer in the receiving computer uses the additional
information to process data (for example:checksums in data
layer)
29
How layered software works?
• Layering Principle:
Layer N software on the destination
computer, must receive the exact message
sent by layer N software on the sending
computer.
• For example
– if one layer adds a header, the
corresponding layer has to remove it.
– If one layer encrypts data, the
receiving computer layer has to
decrypt it.
30
Once Again, The purpose of Layers
31
Applications
• Electronic mail
• File transfers (FTP)
• Remote login (TELNET, rlogin)
• Chat
• Bulletin boards and Network News
• Commerce
• Network news
• Networked information discovery and retrieval tools
• Fax over the Internet
• Games
• ….
32
TCP/IP Protocol Stack
Basic protocols
Layer 3 IP
33
TCP/IP Protocol Stack
Infrastructure and Security protocols
ICMP IPSEC
Layer 3 IP ARP RARP
35
• TCP:
TCP/IP(Cont’d)
– manages the assembling of a message into packets that are
transmitted over the Internet and received by a TCP layer that
reassembles the packets into the original message.
• A packet is the unit of data that is routed between an origin
and a destination on the Internet or any other packet-
switched network
• IP
– handles the address part of each packet so that it gets to the
right destination.
36
TCP/IP(Cont’d)
• Uses the client/server model of communication
• Communication is primarily point-to-point:
– Each communication is from one point (or host computer) in
the network to another point or host.
• Higher layer application protocols that use TCP/IP to get to
the Internet
– Hypertext Transfer Protocol (HTTP), File Transfer Protocol
(FTP), Telnet (Telnet), and the Simple Mail Transfer Protocol
(SMTP).
37
TCP
• Adds Port Numbers, packet Sequence Numbers,
Acknowledgement Numbers and other fields to IP addresses
A Port number refers to a specific application running on a host. e.g.
SMTP uses Port 25 while Telnet uses Port 23.
• TCP Header format
– source port number
• source IP address + source port number is a socket: uniquely identifies
sender
– destination port number
• destination IP address + destination port number is a socket: uniquely
identifies receiver
– SYN, ACK flags
– sequence number
– acknowledgement number
38
TCP (cont’d)
• Result is a TCP/IP "stream" - a connection established using
handshake and error detection/control through positive
acknowledgement.
– Three-way handshake:
• 1. A sends a SYN message to B - I'd like to set up a connection and I
will start with sequence number s
• 2. B Replies with a SYN and ACK message to A - Yes I will talk to
you.
• 3. A sends an ACK message to B along with the first piece of data - I
got your ACK so here's the start of my data.
SYN(
initiator A) responder
C K(A)
YN( B), A
S
ACK
(B)
39
TCP (cont’d)
40
User Datagram Protocol (UDP)
Adds Port Numbers to IP addresses
A Port number refers to a specific application running on a host. e.g. SMTP uses Port 25
while Telnet uses Port 23.
UPP header format
– source port number
• source IP address + source port number is a socket: uniquely identifies sender
– destination port number
• destination IP address + destination port number is a socket: uniquely identifies receiver
Also an optional Checksum - Error checking
No handshaking or error control
Also called a "Connectionless" protocol
Often referred to as "Unreliable" - meaning error control can't be relied upon.
Useful for situations where overhead is a concern. Small data requests such as
queries, etc.
41
TCP/UDP Port Numbers and
Services
TCP and UDP add Port Numbers to the IP addresses.
Each port corresponds to a specific application or
service.
Ports 1 - 1024 are generally considered privileged
ports. That is, on UNIX systems, one needs to have
special permissions to run services on these ports.
Above 1024, any port number can be used.
Internet assigned numbers committee agrees on some
standard port numbers.
42
TCP/UDP Port Numbers and Services
(cont’d)
43