The Internet Protocol

advertisement
IP: The Internet Protocol
LAN---Bus Topology

Each computer


is connected to a cable.
Coordinates with others to send a message
BUS
Spring 2002
Computer Networks Applications
Issues in Sharing
Communication Media

Generally, most networks types involve
sharing:



Bus, ring in LANs
High speed backbone in WANs
Granting one party exclusive access may
block all others for intolerable periods of
time;

Spring 2002
Ex: to send a file of 5megabytes over a network
that may transfer 56,000 bits/s will require 12
minutes.
Computer Networks Applications
Solution:

Divide a message in small blocks, called
packets;


Computers take turns in sending packets;
insures fair, prompt access to the shared
resources;


Ex. a packet of 8000 bits is transmitted in 0.143 s
over a network that transfers 56,000 bits/s.
easier to detect and recover from errors
Spring 2002
Computer Networks Applications
Packets Transmission




All computers connected to a network have a unique number,
called address;
Each type of network uses its own format for addresses: from
few digits to as much as 16 digits;
At the beginning of a packet, there is a header which contains
the addresses of the sender and the destination;
The hardware (NIC card) looks at every packet; if its for the
local machines it copies it;
A

Spring 2002
c
D
c
D
B
Computer Networks Applications
C
D
Packets Transmission (cont.)
Packets are not all the same size



Sender and receiver have to agree on how
to specify the beginning and ending of
each frame;

Spring 2002
any size can be sent up to a maximum
Ex: a keystroke can be sent as one individual
packet.
Ex: have dedicated characters for beginning
and end;
Computer Networks Applications
Packets Transmission (cont.)
Packet transmission is very fast:



Spring 2002
Typical LAN transfer ~ large 1000 packets/s
Packet switching systems adapt
automatically as computers start/end
sending data fair access to shared
resources
Most networks, including Internet are a
packet switching system
Computer Networks Applications
Internet: a Collection of
Disparate Networks

Different goals:


Speed, cost, distance;
Different standards for:






Spring 2002
Expected carrier;
Coding bits;
Detecting and recovering from errors;
Protocols for transmitting messages: bus, token
ring,…
Packets sizes, and encoding for the start/end of
packets,…
Types of computer addresses
Computer Networks Applications
Solution: Routers
Router
High speed
connection
Router
Router
Routers: computers design to interconnect different networks
Spring 2002
Computer Networks Applications
Solution: Internet Protocol (IP)


IP hides the details of physical networks
IP specifies:




Packet format;
How routers should forward packets
Define address format
Every computer connected to the
Internet must run IP software
Spring 2002
Computer Networks Applications
The illusion of a single
network
 The internet concept:
(a) the illusion of a
single network that
IP provides;
(b) the underlying
physical structure.
Spring 2002
Computer Networks Applications
Datagrams



A packet following IP specification is called a
datagram;
The header of a datagram contains the
addresses of the sender and the destination;
But, each network type:



defines its own packet format;
Accepts and delivers only packets that adhere to
its own format.
How can IP datagrams be sent across
networks that do not recognize IP format?
Spring 2002
Computer Networks Applications
Datagrams (cont.)



A datagram travels across a given network inside that
network packet;
When the packet arrives at the next router, the router
opens the packet and extracts the datagram;
If the datagram has to be sent to another network,
the router:




Creates a new network packet;
Encloses the datagram inside that packet;
Sends it to the next router along the path;
If the datagram arrived at the destination: the
receiver processes it.
Spring 2002
Computer Networks Applications
Datagram transmission

Spring 2002
Computer Networks Applications
Internet Addressing
To make datagram routing and delivery
possible, each computer is assigned a unique
address, called Internet address or IP
address;
 Each address is a 32-bit binary number;
 To make routing efficient, each address is
divided into two parts: a prefix and a suffix;
 Prefix: identifies the physical network to
which the computer is attached;
 Suffix: identifies each computer attached to
that network.
Spring 2002
Computer Networks Applications

Internet Addressing (cont.)

To insure uniqueness:

two networks cannot be assigned the
same address

network numbers are distributed by a
centralized authority, called Internet Assigned
Number Authority

two computers on the same network
cannot be assigned the same number

Spring 2002
suffixes can be assigned locally without global
coordination
Computer Networks Applications
Dotted decimal notation



Convenient way to express IP addresses
Each 8-bit section represented as a
decimal number;
Uses periods to separate the sections;

Spring 2002
Computer Networks Applications
Forwarding a datagram




Each router along the path, uses the
destination address to determine the next
hop to which it has to be sent.
Each IP router keeps relevant information into
a routing table;
Each entry specifies a destination and the
next hop used to reach it;
Each destination is a network (an internet
contains over 1000 times more hosts than
networks)
Spring 2002
Computer Networks Applications
Routing table---an example

(a) An internet formed by 4 networks and 3 routers;
(b) The conceptual routing table of router 2
Spring 2002
Computer Networks Applications
Address resolution




IP addresses are abstractions provided by software--differ usually from hardware addresses;
Mapping between a hardware address and an IP
address is called address resolution;
Is used by routers/computers when need to send a
packet on the same physical network.
Address resolution techniques:


Spring 2002
Table lookup: mappings are stored in memory, which the
software searches
Message exchange: a computer sends a message that
requests an address binding, and another computer sends a
reply that contains the requested info.
Computer Networks Applications
Address resolution with table
lookup

Spring 2002
Computer Networks Applications
An example trip through an
internet

R1
x
R2
R3
Spring 2002
Computer Networks Applications
Y
Download