Transcript WB_IP-1

CS4550
Computer Networks II
IP : internet protocol,
part 1: history, basic function, names
and addresses, ARP
read Feit chapter 5 to 8
IP topics
 brief
history (1)
 basic
function (1)
 names
and addresses (1)
 packet
format (2)
 packet
routing, routing tables (2)
 lnternet
Control Message Protocol (2)
 routing
(calculation) : RIP, OSPF (2)
 IPv6
: the IP of the future (2)
Internet : history
 ARPAnet
- 1st packet switched network, 1969
 Larry Roberts - packet switching, ARPAnet
 BBN - built first IMPs
 1970s - ARPAnet grew rapidly
 ethernet - PARC, Robert Metcalf 1970s
 token ring, IBM - 1970s
 TCP/IP - Vint Cerf - about 1980
 ref: Where wizards stay up late, Hafner and
Lyon, Simon & Shuster
IP : basic function
 provides
a connectionless, best-effort data
delivery service to transport layer or
applications. Packet delivery not guaranteed.
 Makes use of underlying networks
technologies (LANs, WANs).
 interfaces between transport layer
(TCP,UDP,etc.) and the network interface
(ethernet, token ring, FDDI, WAN)
--> IP is the “workhorse” of the Internet; the
“glue” that connects many networks
IP : basics
 runs
in routers (gateways, layer 3 switches)
and hosts (end systems; computers).
 routers
are network switches which connect
networks to other networks. (generally
software). [aka gateways]
 transport
layer (TCP,UDP) - run in hosts only,
not in routers. Interfaces to IP.
TCP/IP internet
IP
TCP/IP
IP
WAN
TCP/IP
IP
IP
WAN
TCP/IP
...
TCP/IP protocol suite
telnet, FTP, etc.
apps
TCP
ICMP
ARP
TFTP, other apps.
UDP
IP
LAN/WAN
media
IGMP
RARP
IP : names and addresses
 need
unique name for every host
 hierarchical
naming structure used
 top
level names assigned by InterNIC
registration service (Herndon, VA)
 lower
level names assigned by organizations
ex: cs.nps.navy.mil
mil is the top level domain, assigned by InterNIC
; navy next level, nps next, etc.
IP : names and addresses
 some
top level domains -edu - colleges & universities
gov - US fed. gov’t agencies
com - commercial organizations in US
net - internet service organizations
org - non profit institutions
mil - U S military
countries --> jp, uk,fr, mx, de, etc.
IP : names and addresses
 name
- series of labels, dots -bellcore.com
www.apple.com
taurus.cs.nps.navy.mil
 label can have up to 63 characters, and up to
255 characters in a name
 worldwide naming tree -- root is top; domain is
a node of the tree and its subtree
IP : names and addresses
 IP
address : a 32 bit number, which is assigned
to each “host” (computer) on an IP internet.
 switching
nodes in the internet - routers - also
must have IP addresses.
 the
IP address actually is assigned to the
interface point on the network, not the node
itself .... analogous to street and house number
for a home address
IP : names and addresses
 IP
address - 2 main parts, netid and hostid
 each part can be 1,2 or 3 bytes (class)
 first few bits indicate which class applies
 Class A : netid 1 byte, host id 3 bytes
 Class B : 2 and 2
 Class C : 3 and 1
netid
hostid
IP : names and addresses
 dotted
decimal notation --> 131.120.1.60
 formats -> 0 (A), 10 (B), 11(C) ... in decimal, if
1st byte : 0-127 --> A, 128-191 --> B, 192-223 -> C.
 additional classes :
D, 224-239, for multicasting
E, 240-255, reserved.
 some address blocks reserved for networks not
connected to the Internet
IP : names and addresses
 how
many possible IP addresses, total?
 how
many class A net addresses exist? B? C?
 how
many hosts are possible for each class A?
B? C?
 is
this an efficient method of assigning address
classes in the Internet?
IP : names and addresses
 suppose
your organization (eg, NPS) has a
class B address; you don’t have 1 big network
of 64K hosts; you have numerous smaller
networks, mostly LANs.
 further
-- 65,000 is far too many hosts for a
LAN or even a LAN internet, anyway....
 how
these be separated into smaller, more
manageable networks?
IP : names and addresses --subnets
 the
host space can be divided further into a
subnet part and a host part (or system part).
 example: NPS is 131.120.X.Y.... we can make X
(3rd byte) the subnet id, and the rest (4th byte)
the host id.
 This gives room for ~255 subnets of up to 255
hosts each.... “131.120.1” is one of the CS dept
subnets...
names and addresses : subnets
131.120.10
Divided into 4 LANS
with
Subnet mask
131.120.1
255.255.255.192
131.120.20
131.120.5
NPS: 131.120
names and addresses : subnets
 these
different networks are connected by
routers, and the NPS network is connected to
the “outside” by a router.
 how do the routers “know” which part is the
subnet and hostid part?
--> subnet mask - a 32 bit string of bits; 1s
correspond to the netid part (network and
subnet), 0s to the system (host) part
IP AND SUBNETMASK = subnet address
names and addresses : subnets
some bit patterns are reserved for special
purposes (e.g. broadcasting) , so --127.0.0.1 loopback
255.255.255.255 broadcast on local LAN
 netid,
hostid(subnetid) -- should not be all 0s or
 netid,
hostid(subnetid) -- must be at least 2 bits
all 1s
names and addresses : multihoming
 recall
that IP address has 2 parts, the netid and
hostid
 routers, and sometimes hosts, may be
connected to more than one network; which
netid is the correct one?
--> both; the IP address corresponds to the
network interface, not simply to the host itself.
(think of a house on a corner....)
 similarly, a host connected to 2 networks may
be structured as a router
names and addresses
 IP
runs on top of ethernet LANs, TR LANs, etc.
These rout packets according to a different
address, the MAC address (not the IP address).
How can IP rout packets on these networks?
--> must determine the MAC address which
corresponds to a given IP address
ARP, address resolution protocol
ARP :address resolution protocol
 purpose
: obtain MAC (hardware) address of a
machine, given its IP address.
which MAC address has IP address 127.54.3.4?
IP
MAC
ARP :address resolution protocol
IP frame “fits” into the frame of the underlying
network... (“wrapper”)
MAC DA,SA
IP frame
INFO
CSMA/CD frame
ARP :address resolution protocol
input : IP address, i ;
output : MAC address, m;
data structure : ARP table: list of (i,m) pairs;
begin
1. search ARP table for i ;
if found, return (m)
else broadcast ARP request (i );
2. wait for ARP reply (m);
3. when reply received, update ARP table (i,m) &
return (m).
end
ARP :address resolution protocol
 “broadcast
request” - a LAN broadcast packet,
contains the ARP packet (below)
(field lengths shown in bytes)
2
2
1 1
lengths
2
6*
ARP msg type
(request,reply)
IP/upper layer type
MAC hardware type
4
6*
4
src/dest IP address
src/dest MAC address
** ethernet length, may vary with
other protocols
ARP :address resolution protocol
 receiver
part of ARP : upon receipt of an ARP
request,
if the destination IP address is MA (my address),
then
1. update my ARP table, as appropriate, and
2. send ARP reply.
Comments on ARP,Reverse ARP
(RARP)
 ARP
- most systems allow system
administrator to view table, make manual
entries, or update table from file
 Try : arp -a command from a school terminal
 RARP
 purpose
: to find out ones own IP address, from the
MAC address. Similar procedure.
 useful for diskless workstations, however -- now
being replaced by BOOTP and/or DHCP (dynamic
host configuration protocol). These provide more
info than RARP.