430 likes | 594 Views
CS 3505 the internet and the info highway IP : internet protocol. brief history basic function names and addresses packet format packet routing, routing tables IPv6 : the IP of the future. IP topics. Internet : history. ARPAnet - 1st packet switched network, 1969
E N D
CS 3505the internet and the info highwayIP : internet protocol
brief history basic function names and addresses packet format packet routing, routing tables IPv6 : the IP of the future IP topics
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
IP : basic function • provides connectionless, best-effortdata 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
IP : 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.
TCP/IP internet ... TCP/IP IP IP WAN TCP/IP IP WAN IP TCP/IP
TCP/IP protocol suite telnet, FTP, etc. apps TFTP, other apps. TCP UDP ICMP IP IGMP RARP ARP LAN/WAN media
IP : 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.
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 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 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
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 : 1 and 3 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 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 -- 64K is far too many hosts for a LAN or even a LAN internet, anyway.... • how these be separated into smaller, more manageable networks?
IP 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 131.120.1 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
names 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
IP 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 ARPaddress 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”) IP frame MAC DA,SA 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 2 6* 4 6* 4 lengths ARP msg type (request,reply) src/dest IP address src/dest MAC address IP/upper layer type ** ethernet length, may vary with other protocols MAC hardware type
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.
IP packet format 0 3 4 15 16 31 7 8 10 source IP address total length vers. TOS HLEN pre. identification fragment offset flags TTL protocol header checksum destination IP address options, (if any) DATA
IP 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.
IP 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.
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.
IP 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.
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).
IP 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.
IP routing : in a host TCP, UDP, etc. routing table yes get next hop this IP DA or broadcast packet? no bit bucket input queue IP (host) NW interface
IP 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)
IP routing : in routers TCP, UDP, etc. routing table yes get next hop this IP DA or broadcast packet? no input queue IP (router) NW interfaces
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. )
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
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.
autonomous 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
autonomous 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
AS AS IGRP EGP RIP AS EIGRP
OSPF : 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