cs 3505 the internet and the info highway ip : internet protocol
TRANSCRIPT
![Page 1: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/1.jpg)
CS 3505CS 3505 the internet and the info the internet and the info
highwayhighwayIP : internet protocolIP : internet protocol
![Page 2: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/2.jpg)
IP topicsIP topics brief history
basic function
names and addresses
packet format
packet routing, routing tables
IPv6 : the IP of the future
![Page 3: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/3.jpg)
Internet : historyInternet : 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
![Page 4: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/4.jpg)
IP : basic functionIP : basic function
provides connectionless, best-effort data delivery service to TCP/UDP/apps. Packet delivery not guaranteed.
Makes use of underlying networks (LANs/ WANs)
interface between transport layer (TCP,UDP) and the network interface (ethernet, token ring, FDDI, WAN)--> “workhorse” of Internet; “glue” that connects many networks
![Page 5: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/5.jpg)
IP : basicsIP : basics
runs in routers (gateways, layer 3 switches) and hosts (end systems; computers).
routers are network switches which connect networks to other networks (and other routers). Mostly software. [AKA gateways]
transport layer (TCP,UDP) - run in hosts only, not in routers. Interface to IP.
![Page 6: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/6.jpg)
TCP/IP internet TCP/IP internet
WAN
IP
WAN
IP
IP
IP ...TCP/IP
TCP/IP
TCP/IP
![Page 7: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/7.jpg)
TCP/IP protocol suiteTCP/IP protocol suite
IP
TCP UDP
LAN/WAN
media
IGMPICMP
RARPARP
telnet, FTP, etc. TFTP, other apps.apps
![Page 8: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/8.jpg)
IP : names and addressesIP : names and addresses
need unique name for every host
hierarchical naming structure
top level names assigned by InterNIC registration service
lower level names assigned by organization
ex: cs.nps.navy.mil
mil is the top level domain ; navy next level, nps next, etc.
![Page 9: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/9.jpg)
IP : names and addressesIP : names and addresses
some top level domains --edu - colleges & universitiesgov - US fed. gov’t agenciescom - commercial organizations in USnet - internet service organizationsorg - non profit institutionsmil - U S militarycountries --> jp, uk,fr, mx, de, etc.
![Page 10: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/10.jpg)
IP : names and addressesIP : names and addresses
name - series of labels, dots --bellcore.comwww.apple.comcs.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
![Page 11: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/11.jpg)
IP addressIP address
IP address : 32 bit number, 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 interface point on the network, not the node itself .... analogous to street and house number for a home address
![Page 12: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/12.jpg)
IP : names and addressesIP : 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 : 1 and 3
netid hostid
![Page 13: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/13.jpg)
IP : names and addressesIP : 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 multicastingE, 240-255, reserved.
some address blocks reserved for networks not connected to the Internet
![Page 14: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/14.jpg)
IP : names and addressesIP : names and addresses
how many possible IP addresses, total?
how many class A 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?
![Page 15: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/15.jpg)
IP : names and addressesIP : 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 -- 64K is far too many hosts for a LAN or even a LAN internet, anyway....
how these be separated into smaller, more manageable networks?
![Page 16: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/16.jpg)
IP addresses - subnetsIP 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...
![Page 17: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/17.jpg)
names and addresses : subnetsnames and addresses : subnets
131.120.1 131.120.10
131.120.5
131.120.20
NPS: 131.120
![Page 18: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/18.jpg)
names and addresses : subnetsnames 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
![Page 19: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/19.jpg)
names and addresses : subnetsnames and addresses : subnets
some bit patterns are reserved for special purposes (e.g. broadcasting) , so ---
netid, hostid(subnetid) -- should not be all 0s or all 1s
netid, hostid(subnetid) -- must be at least 2 bits
![Page 20: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/20.jpg)
IP addresses : multihomingIP 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
![Page 21: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/21.jpg)
names and addressesnames 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
![Page 22: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/22.jpg)
ARP :address resolution protocolARP :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?
IPMAC
![Page 23: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/23.jpg)
ARP :address resolution protocolARP :address resolution protocol
IP frame “fits” into the frame of the underlying network... (“wrapper”)
IP frame
CSMA/CD frame
INFO
MAC DA,SA
![Page 24: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/24.jpg)
ARP :address resolution protocolARP :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
![Page 25: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/25.jpg)
ARP :address resolution protocolARP :address resolution protocol
“broadcast request” - a LAN broadcast packet, contains the ARP packet (below)
2 2 1 1 2 6* 4 6* 4
src/dest MAC address
src/dest IP address
MAC hardware type
IP/upper layer type
lengthsARP msg type(request,reply)
(field lengths shown in bytes)
** ethernet length, may vary with
other protocols
![Page 26: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/26.jpg)
ARP :address resolution protocolARP :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.
![Page 27: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/27.jpg)
IP packet formatIP packet format
source IP address
destination IP address
options, (if any)
DATA
0 15 16 31
total length
identification
protocol header checksumTTL
fragment offset
vers. HLEN
flags
3 4 7 8 10
pre. TOS
![Page 28: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/28.jpg)
IP packet - explanationIP packet - explanation
version -- currently 4; next - 6. HLEN - header length; 20 to 60 bytes. total length - packet length in bytes. precedence (3 bits) - designed for
priority, but no standard procedure for this; little used.
TOS - type of service TTL - time to live (die). Standard
specified seconds, but in practice - router hops.
![Page 29: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/29.jpg)
IP packet - explanationIP packet - explanation
ID - numbers each datagram sent by a host. ( fragmentation/reassembly)
flags - 3 bits. DF, don’t fragment; MF, more fragments. (1st bit unused=0).
frag offset - ( fragmentation/reassembly)
protocol - indicates TCP, UDP, etc.
header checksum - done on header only; recomputed at each hop.
![Page 30: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/30.jpg)
IP routing IP routing
routing mechanism - the mechanics of routing; simply, IP routs packets according to a routing table, in memory.
routing policy - how the paths in the networking are calculated- i.e., how the entries in the table are determined. Two separate procedures.
mechanism - differs slightly, depending on whether in a host or a router; simpler for hosts.
![Page 31: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/31.jpg)
IP routingIP routing
basic IP routing mechanism:
given an IP DA (destination IP address),
1. search table for complete IP DA; if found, send to next hop indicated.
2. search table for network ID; if found, send to next hop indicated.
3. search for default entry; if found, send to next hop indicated.
4. discard the packet.
![Page 32: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/32.jpg)
IP routing : in a host IP routing : in a host
IP (in host) receives packets to send from TCP, UDP, ICMP, IGMP.
upon receipt of a packet to send, IP will 1. check mask (determine net/host parts).
2. if destination directly connected (point-to-point link/ same subnet), then send packet to it.
3. otherwise, send packet to the default router (routing table).
![Page 33: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/33.jpg)
IP routing : in a hostIP routing : in a host
fundamental difference : a host never forwards a packet; IP packets received not for this host are discarded.
note : if sending to a host on same subnet (e.g.
ethernet), the MAC address corresponds to the IP DA;
if sending to default router, the MAC/hardware DA is the router’s, while the IP DA is that of the final destination.
![Page 34: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/34.jpg)
IP routing : in a hostIP routing : in a host
routing table
IP (host)
TCP, UDP, etc.
get next hop
NW interface
input queue
this IP DA or
broadcast packet?
yes
nobit bucket
![Page 35: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/35.jpg)
IP routing : in routersIP routing : in routers
Same basic algorithm as stated, but :
routing tables bigger, generally ;
more overhead in maintaining routing tables, exchanging information with other routers;
more network interfaces, generally ; usually at least 2 (hosts may have only 1)
forward packets received onto other routers. (fundamental difference)
![Page 36: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/36.jpg)
IP routing : in routersIP routing : in routers
routing table
IP (router)
TCP, UDP, etc.
get next hop
NW interfaces
input queue
this IP DA or
broadcast packet?
yes
no
![Page 37: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/37.jpg)
IP routing tables IP routing tables
series of entries which contain
destination - IP address of distant location (either network or host)
gateway(router) - IP address of router to send the packet to
flags - 5 of these which give additional info
refcnt - number of active uses
use - number of packets sent this route
interface - the outgoing interface for this route; (e.g., ethernet, a direct link, etc. )
![Page 38: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/38.jpg)
IP routing IP routing
routing mechanism - the mechanics of routing -- discussed previously
routing policy - how the paths in the network are calculated-- there is no single required routing policy on the Internet-- DV and LS routing already discussed
-- some specific IP policies to follow
![Page 39: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/39.jpg)
IP routing mechanism (review)IP routing mechanism (review)
given an IP DA (destination IP address),
1. search table for complete IP DA; if found, send to next hop indicated.
2. search table for network ID; if found, send to next hop indicated.
3. search for default entry; if found, send to next hop indicated.
4. discard the packet.
![Page 40: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/40.jpg)
autonomous systemsautonomous systems
a piece of the Internet unified by a routing policy
“somebody’s network” early def: a collection of subnetworks and
hosts, interconnected by routes
new def: a connected group of 1 or more IP prefixes ... which has a SINGLE and CLEARLY DEFINED routing policy
![Page 41: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/41.jpg)
autonomous systemsautonomous systems
routing within ASs is done by IGPs, or interior gateway protocols; chosen by the controlling organization
routing between ASs is done by EGPs, or exterior gateway protocols
![Page 42: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/42.jpg)
AS
AS
ASRIPIGRP
EIGRP
EGP
![Page 43: CS 3505 the internet and the info highway IP : internet protocol](https://reader030.vdocuments.site/reader030/viewer/2022032722/56649f425503460f94c62704/html5/thumbnails/43.jpg)
OSPF : open shortest path firstOSPF : open shortest path first
link state protocol, developed by IETF; non proprietary
low overhead; updates report changes rather than everything
quick detection of topology changes, rapid updating after changes
traffic splitting over multiple paths subnet masks supported authentication supported widely used, refinements will continue