Dat ak om m unik asjon høst en 2002 Forelesning nr 5, m andag 16. sept em ber Chapt er 4, Net w ork Layer and Rout ing Datakom høsten 2002 1
Øvingsoppgaver ] Oppgaver 1 CIDR og subnetting ] IP Address : 193.69.136.0 ] Address Class : Classless / 25 ] Network Address : 193.69.136.0 ] A) ] Du skal dele nettet i to subnett. Hva blir: \ Subnet id-er \ Subnet Mask \ Subnet bit mask \ Subnet Bits \ Host Bits \ Hosts per Subnet Datakom høsten 2002 2
Øvingsoppgaver ] Øvingsoppgave 2 ] Du skal dele nettet i oppgave 1 I 8 subnett. Hva blir: \ Subnet id-er \ Subnet Mask \ Subnet bit mask \ Subnet Bits \ Host Bits \ Hosts per Subnet Datakom høsten 2002 3
Øvingsoppgaver ] Oppgave 3 \ IP Address : 176.85.36.0 \ Address Class : Classless / 23 \ Network Address : 176.85.36.0 \ Du skal dele nettet i 4 subnett. Hva blir: [ Subnet id-er [ Subnet Mask [ Subnet bit mask [ Subnet Bits [ Host Bits [ Hosts per Subnet Datakom høsten 2002 4
Virt ual c irc uit s source-to-dest path behaves much like telephone circuit \ performance-wise \ network actions along source-to-dest path ] call setup, teardown for each call before data can flow ] each packet carries VC identifier (not destination host ID) ] every router on source-dest path maintains state for each passing connection \ transport-layer connection only involved two end systems ] link, router resources (bandwidth, buffers) may be allocated to VC \ to get circuit-like perf. Datakom høsten 2002 5
Virt ual c irc uit s: signaling prot oc ols ] used to setup, maintain teardown VC ] used in ATM, frame-relay, X.25 ] not used in today s Internet applicat ion t r anspor t net wor k dat a link physical 5. Dat a f low begins 6. Receive dat a 4. Call connect ed 3. Accept call 1. I nit iat e call 2. incoming call applicat ion t r anspor t net wor k dat a link physical Datakom høsten 2002 6
Dat agram net w ork s: t he Int ernet m odel ] no call setup at network layer ] routers: no state about end-to-end connections \ no network-level concept of connection ] packets forwarded using destination host address \ packets between same source-dest pair may take different paths applicat ion t r anspor t net wor k dat a link physical 1. Send dat a 2. Receive dat a applicat ion t r anspor t net wor k dat a link physical Datakom høsten 2002 7
Net w ork layer servic e m odels: Network Architecture Service Model Bandwidth Guarantees? Loss Order Timing Congestion feedback Internet ATM ATM ATM ATM best effort CBR VBR ABR UBR none constant rate guaranteed rate guaranteed minimum none no yes yes no no no yes yes yes yes no yes yes no no no (inferred via loss) no congestion no congestion yes no Datakom høsten 2002 8
DHCP: Dynam ic Host Configurat ion Prot oc ol Goal: allow host to dynamically obtain its IP address from network server when it joins network Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an on Support for mobile users who want to join network (more shortly) DHCP overview: \ host broadcasts DHCP discover msg \ DHCP server responds with DHCP offer msg \ host requests IP address: DHCP request msg \ DHCP server sends address: DHCP ack msg Datakom høsten 2002 9
DHCP c lient -server sc enario A 223.1.1.1 DHCP server 223.1.2.1 B 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.1.3 223.1.3.27 223.1.3.1 223.1.3.2 E arriving DHCP client needs address in this network Datakom høsten 2002 10
DHCP c lient -server sc enario DHCP ser ver : 223.1.2.5 '+&3GLVFRYHU src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 ar r iving client t ime '+&3UHTXHVW '+&3RIIHU src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs '+&3$&. src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs Datakom høsten 2002 11
Rout ing Rout ing pr ot ocol Goal: det er mine good pat h (sequence of r out er s) t hr u net wor k f r om sour ce t o dest. Graph abstraction for routing algorithms: ] graph nodes are routers ] graph edges are physical links \ link cost: delay, $ cost, or congestion level A 1 2 5 B 2 D 3 1 3 ] good path: C E \ typically means minimum cost path 1 \ other def s possible 5 2 F Datakom høsten 2002 12
Rout ing Algorit hm c lassific at ion Global or decentralized information? Global: ] all routers have complete topology, link cost info ] link state algorithms Decentralized: ] router knows physicallyconnected neighbors, link costs to neighbors ] iterative process of computation, exchange of info with neighbors ] distance vector algorithms Static or dynamic? Static: ] routes change slowly over time Dynamic: ] routes change more quickly \ periodic update \ in response to link cost changes Datakom høsten 2002 13
Hierarc hic al Rout ing Our routing study thus far - idealization ] all routers identical ] network flat not true in practice scale: with 200 million destinations: ] can t store all dest s in routing tables! ] routing table exchange would swamp links! administrative autonomy ] internet = network of networks ] each network admin may want to control routing in its own network Datakom høsten 2002 14
Hierarc hic al Rout ing ] aggregate routers into regions, autonomous systems (AS) ] routers in same AS run same routing protocol \ intra-as routing protocol \ routers in different AS can run different intra-as routing protocol gat eway r out er s ] special routers in AS ] run intra-as routing protocol with all other routers in AS ] also responsible for routing to destinations outside AS \ run inter-as routing protocol with other gateway routers Datakom høsten 2002 15
Int ra-as and Int er-as rout ing a C C.b b d A A.a a b A.c c B.a a B c b Gat eways: per f or m int er -AS r out ing amongst t hemselves per f or m int r a-as r out er s wit h ot her r out er s in t heir AS int er -AS, int r a-as r out ing in gat eway A.c net wor k layer link layer physical layer Datakom høsten 2002 16
Int ra-as and Int er-as rout ing a Host h1 C C.b b A.a I nt er -AS r out ing bet ween A and B A.c a d A b c I nt r a-as r out ing wit hin AS A B.a a B c b Host h2 I nt r a-as r out ing wit hin AS B ] We ll examine specific inter-as and intra-as Internet routing protocols shortly Datakom høsten 2002 17
Rout ing in t he Int ernet ] The Global Internet consists of Autonomous Systems (AS) interconnected with each other: \ 6WXE$6: small corporation: one connection to other AS s \ 0XOWLKRPHG$6: large corporation (no transit): multiple connections to other AS s \ 7UDQVLW$6: provider, hooking many AS s together ] Two-level routing: \,QWUD$6 administrator responsible for choice of routing algorithm within network \,QWHU$6 unique standard for inter-as routing: BGP Datakom høsten 2002 18
Int ernet AS Hierarc hy I nt r a-as bor der (ext er ior gat eway) r out er s I nt er -AS int er ior (gat eway) r out er s Datakom høsten 2002 19
Int ra-as Rout ing ] Also known as Interior Gateway Protocols (IGP) ] Most common Intra-AS routing protocols: \ RIP: Routing Information Protocol \ OSPF: Open Shortest Path First \ IGRP: Interior Gateway Routing Protocol (Cisco proprietary) Datakom høsten 2002 20
RIP ( Rout ing Inform at ion Prot oc ol) ] Distance vector algorithm ] Included in BSD-UNIX Distribution in 1982 ] Distance metric: # of hops (max = 15 hops) \ Can you guess why? ] Distance vectors: exchanged among neighbors every 30 sec via Response Message (also called DGYHUWLVHPHQW) ] Each advertisement: list of up to 25 destination nets within AS Datakom høsten 2002 21
RIP: Ex am ple w x y A D B z 'HVWLQDWLRQ1HWZRUN C 1H[W5RXWHU1XPRIKRSVWRGHVW Z $ \ % ] % [ ««Rout ing t able in D Datakom høsten 2002 22
RIP: Ex am ple 'HVW1H[WKRSV Z [ ] & ««$GYHUWLVHPHQW IURP$WR' w x y A D B z 'HVWLQDWLRQ1HWZRUN C 1H[W5RXWHU1XPRIKRSVWRGHVW Z $ \ % ] %$ [ ««Rout ing t able in D Datakom høsten 2002 23
RIP: Link Failure and Rec overy If no advertisement heard after 180 sec --> neighbor/link declared dead \ routes via neighbor invalidated \ new advertisements sent to neighbors \ neighbors in turn send out new advertisements (if tables changed) \ link failure info quickly propagates to entire net \ poison reverse used to prevent ping-pong loops (infinite distance = 16 hops) Datakom høsten 2002 24
RIP Table proc essing ] RIP routing tables managed by DSSOLFDWLRQOHYHO process called route-d (daemon) ] advertisements sent in UDP packets, periodically repeated r out ed r out ed Tr anspr t (UDP) net wor k f or war ding (I P) t able link physical f or war ding t able Tr anspr t (UDP) net wor k (I P) link physical Datakom høsten 2002 25
RIP Table ex am ple (c ont inued) Router: giroflee.eurocom.fr 'HVWLQDWLRQ*DWHZD\)ODJV5HI8VH,QWHUIDFH 8+OR 8ID 8OH 8TDD 8OH GHIDXOW8* ] Three attached class C networks (LANs) ] Router only knows routes to attached LANs ] Default router used to go up ] Route multicast address: 224.0.0.0 ] Loopback interface (for debugging) Datakom høsten 2002 26
Rout e print (net st at rn) Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.121 20 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 192.168.1.0 255.255.255.0 192.168.1.121 192.168.1.121 20 192.168.1.121 255.255.255.255 127.0.0.1 127.0.0.1 20 192.168.1.255 255.255.255.255 192.168.1.121 192.168.1.121 20 193.69.136.0 255.255.255.0 192.168.1.1 192.168.1.121 1 193.69.137.0 255.255.255.0 192.168.1.1 192.168.1.121 1 224.0.0.0 240.0.0.0 192.168.1.121 192.168.1.121 20 255.255.255.255 255.255.255.255 192.168.1.121 192.168.1.121 1 Default Gateway: 192.168.1.1 Persistent Routes: None Datakom høsten 2002 27
OSPF (Open Short est Pat h First ) ] open : publicly available ] Uses Link State algorithm \ LS packet dissemination \ Topology map at each node \ Route computation using Dijkstra s algorithm ] OSPF advertisement carries one entry per neighbor router ] Advertisements disseminated to entire AS (via flooding) \ Carried in OSPF messages directly over IP (rather than TCP or UDP Datakom høsten 2002 28
OSPF advanc ed feat ures (not in RIP) ] Security: all OSPF messages authenticated (to prevent malicious intrusion) ] Multiple same-cost paths allowed (only one path in RIP) ] For each link, multiple cost metrics for different TOS (e.g., satellite link cost set low for best effort; high for real time) ] Integrated uni- and multicast support: \ Multicast OSPF (MOSPF) uses same topology data base as OSPF ] Hierarchical OSPF in large domains. Datakom høsten 2002 29
Hierarc hic al OSPF Datakom høsten 2002 30
Hierarc hic al OSPF ] Two-level hierarchy: local area, backbone. \ Link-state advertisements only in area \ each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. ] $UHDERUGHUURXWHUV summarize distances to nets in own area, advertise to other Area Border routers. ] %DFNERQHURXWHUV run OSPF routing limited to backbone. ] %RXQGDU\URXWHUV connect to other AS s. Datakom høsten 2002 31
Int er-as rout ing in t he Int ernet : BGP R4 R5 R3 BGP AS3 AS1 (RI P int r a-as r out ing) R1 BGP R2 AS2 (OSPF int ra-as r out ing) (OSPF int ra-as r out ing) )LJXUHQHZ BGP use for inter-domain routing Datakom høsten 2002 32
Int ernet int er-as rout ing: BGP ] BGP (Border Gateway Protocol): the de facto standard ] 3DWK9HFWRU protocol: \ similar to Distance Vector protocol \ each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of AS s) to destination \ BGP routes to networks (ASs), not individual hosts \ E.g., Gateway X may send its path to dest. Z: Path (X,Z) = X,Y1,Y2,Y3,,Z Datakom høsten 2002 33
BGP m essages ] BGP messages exchanged using TCP. ] BGP messages: \ OPEN: opens TCP connection to peer and authenticates sender \ UPDATE: advertises new path (or withdraws old) \ KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request \ NOTIFICATION: reports errors in previous msg; also used to close connection Datakom høsten 2002 34
Why different Int ra- and Int er-as rout ing? Policy: ] Inter-AS: admin wants control over how its traffic routed, who routes through its net. ] Intra-AS: single admin, so no policy decisions needed Scale: ] hierarchical routing saves table size, reduced update traffic 3HUIRUPDQFH: ] Intra-AS: can focus on performance ] Inter-AS: policy may dominate over performance Datakom høsten 2002 35