LectureLecture 12.12. IntroductionIntroduction toto IPIP RoutingRouting G.Bianchi, G.Neglia, V.Mancuso WhyWhy introduction?introduction? ÎRouting: very complex issue Öneed in-depth study Öentire books on routing Îour scope: Ögive a flavour of basic routing structure and messaging Ögive an high-level overview of IP routing protocols G.Bianchi, G.Neglia, V.Mancuso RoutingRouting 131.175.21.2 131.175.21.3 143.67.1.4 143.67.1.9 131.175.21.1 143.67.1.4 131.175.21.2 208.11.3.3 131.175.21.2 ???? Router: must be capable of 208.11.3.2 addressing every IP network G.Bianchi, G.Neglia, V.Mancuso RoutingRouting TableTable Destination network Next router ………… ………… 131.175.0.0 144.21.32.4 ………… ………… G.Bianchi, G.Neglia, V.Mancuso RoutingRouting tabletable 10000.32 20000.5 20000.6 30000.12 30000.7 40000.8 Net 40000 Net Net Net 10000 R1 20000 R2 30000 R3 Net 50000 R2 routing table Destination Network Next Hop ROUTING TABLE: Other nets 20000 Direct fwd Î Router NEEDS to know 30000 Direct fwd which direction to forward the datagram 10000 20000.5 Ö to let it reach the final 40000 30000.7 destination 50000 30000.7 Î But DOES NOT NEED to default 20000.5 know the detailed path! Ö It stores only the NEXT Three cases: 1) direct forwarding HOP router. 2) Indirect forwarding (explicit) 3) Indirect forwarding via default router (when available) G.Bianchi, G.Neglia, V.Mancuso DefaultDefault routeroute ÎFrequent in small and medium size networks Ögenerally administrator sends to router of higher network hierarchy Öe.g. our 131.175.15.254 (tlc) router defaults to elet router, which defaults to polimi, which defaults to Cilea router ÎLarge networks (class B sized) should default only when strictly necessary Öto avoid traffic increase and suboptimal router ÎTOP LEVEL ROUTING DOMAINS Ömaintain routing information to most Internet sites, and do not use any default route Ö5 in 1993: NFSNET, CIX, NSI, SprintLink, EBONE G.Bianchi, G.Neglia, V.Mancuso RoutingRouting operationoperation assume router with IP address X 1) extract destination IP (Y) from datagram 2) if Source Route Option, forward accordingly 3) if Y==X, deliver packet to specified protocol 4) decrease TTL; if TTL=0 throw away datagram and send ICMP “time expired” message 5) if X.and.Netmask==Y.and.Netmask, direct forwarding of datagram (use ARP) 6) extract next hop router from routing table, and forward packet to next router 7) If no next hop, forward to default router 8) if no default route, declare route error and send notification via ICMP G.Bianchi, G.Neglia, V.Mancuso ICMPICMP hosthost andand NetworkNetwork unreachableunreachable errorserrors ICMP type 3 errors, codes 0 (network) and 1 (host) ÎHost unreachable Önetwork found, but packet could not be delivered to host ÎNetwork unreachable Öroute error (network not found in routing table) G.Bianchi, G.Neglia, V.Mancuso TypicalTypical redirectionredirection casecase Campus address host ???? No route info for this address: go to default router R1 Router R1 Router R2 (to the Internet) (to campus network) Clearly, host should have used R2 immediately… G.Bianchi, G.Neglia, V.Mancuso redirectredirect ÎR1 operation Ölooks up routing table, and determine that R2 is the proper path Öin the mean time, it realizes that packet comes from same interface on R2 network Öthis makes R1 understand that redirection is possible Öthus sends a ICMP redirect error message ÎHost: Öwhen receiving a redirect message, it updates its routing table Öbasically, host LEARNS from redirects (easier task for admin that does not need to correctly configure all hosts)! G.Bianchi, G.Neglia, V.Mancuso ICMPICMP redirectredirect 07 815 31 Type (5) Code (0-3) Checksum Router IP address that should be used IP Header + first 8 bytes IP of original datagram data REDIRECT CODES 0 Redirect for network The only one used in practice 1 Redirect for host 2 Redirect for TOS and network 3 Redirect for TOS and host - Only routers may use redirect (other routers are assumed to be informed by full-fledged routing protocol, and not by occasional redirects!! - redirect must be addressed to hosts (not routers) - network redirection hard to be used (without netmask info!) G.Bianchi, G.Neglia, V.Mancuso HostHost routingrouting tabletable creationcreation ÎManual creation Îvia router solicitation ICMP message ICMP router solicitation (type 10) ICMP router advertisement (type 9) Router solicitation: asks who are the routers connected Router advertisement: return router list and preference preference: when multiple routers are connected to the same network preference values configured by administrator G.Bianchi, G.Neglia, V.Mancuso StaticStatic versusversus dynamicdynamic routingrouting ÎStatic routing Öbased on static routing table entries Æentered manually Æchanged via ICMP redirects ÎFine when Önetwork small Ösingle connection point to other networks Öno alternative paths toward destinations ÎNot fine when one of above conditions fails G.Bianchi, G.Neglia, V.Mancuso DynamicDynamic (adaptive)(adaptive) routingrouting AllAll IPIP routingrouting protocolsprotocols areare dynamicdynamic ÎRouting table entries change in time, depending on Ölink failures Æwhen a link is down, you need to avoid it! Önetwork topology changes Æwhen a new backbone added, use it! ÖTraffic load and congestion Æwhen a link is less loaded, use it 2.failure 1.old path 3.new path G.Bianchi, G.Neglia, V.Mancuso DynamicDynamic routingrouting ÎRequirement: ÖInformation exchange among routers is required, to dynamically update routing table Æextra load Æneed for inter-routing message formats ÎRisks Öoscillation Ætoo fast adaptation procedures Öinefficiency Ætoo slow adaptation to changed situation Öloops G.Bianchi, G.Neglia, V.Mancuso AutonomousAutonomous SystemsSystems aa keykey conceptconcept forfor TheThe InternetInternet Î Internet organized as a collection of Autonomous Systems (ASs) AS 1 Î each AS normally administered by a single entity Î each AS selects its own routing protocol to AS 2 allow inter-router communication within the AS ÎInterior Gateway Protocol (IGP) ÖIntra-Domain routing protocol Öwithin an AS ÎExterior Gateway Protocol (EGP) ÖInter-Domain routing protocol AS 3 Öamong different ASs G.Bianchi, G.Neglia, V.Mancuso BorderBorder routersrouters ÎRouting within AS is AS 4 arbitrary chosen by AS administrator IGP Îbut there must be one or AS 1 more border routers in charge of communicating to IGP the external world its AS 2 internal routing IGP information (data collected EGP by the IGP used) IGP ÎBorder routers are the only entitled to exchange EGP information AS 3 G.Bianchi, G.Neglia, V.Mancuso IPIP routingrouting protocolsprotocols ÎIGPs AS 1 ÖHELLO ÖRIP1 ÖRIP2 RIP ÖOSPF (1 & 2) AS 2 ÖIS-IS ÖIGRP, EIGRP BGP-4 proprietary OSPF (CISCO) BGP-4 Ö… RIP-2 ÎEGPs BGP-4 ÖEGP Æyes: Same name of entire protocol class! AS 3 ÖBGP-4 G.Bianchi, G.Neglia, V.Mancuso RIP Routing Information Protocol and distance vector protocols in general G.Bianchi, G.Neglia, V.Mancuso RoutingRouting InformationInformation ProtocolProtocol ÎMost widely used Öand most criticized… ÎOfficial specification: RFC 1058 (1988) Öbut used from several years before ÎUses UDP to exchange messages Öwell known UDP port = 520 IP datagram UDP datagram UDP IP header header RIP message G.Bianchi, G.Neglia, V.Mancuso RIPRIP messagemessage 0 7 8 15 16 31 Command (1-6) Version (1) 0 Address family (2) 0 IP address 0 20 bytes 0 Metric Up to 24 more routes with same 20 bytes format Command: 1=request; 2=reply (3-6 obsolete or non documented) Address family: 2=IP addresses metric: distance of emitting router from the specified IP address in number of hops (valid from 1 to 15; 16=infinite) G.Bianchi, G.Neglia, V.Mancuso MessageMessage sizesize Ö8 UDP header Ö4 bytes RIP header Ö20 bytes x up to 25 entries Îtotal: maximum of 512 bytes UDP datagram Î25 entries: too little to transfer an entire routing table Ömore than 1 UDP datagram generally needed G.Bianchi, G.Neglia, V.Mancuso InitializationInitialization ÎWhen routing daemon started, send special RIP request on every interface Öcommand = 1 (request) Öaddress family = 0 (instead of 2) Ömetric set to 16 (infinite) ÎThis asks for complete routing table from all connected routers Öallows to discover adjacent routers! G.Bianchi, G.Neglia, V.Mancuso OperationOperation afterafter initializationinitialization ÎRequest: Öasks for response relative to specific IP addresses listed in the request message ÎResponse: Öreturn list of IP addresses with associated metric Öif router does not have a route to the specified destination, returns 16 ÎRegular update: Örouters send part (or all) of their table every 30s to adjacent routers Öa router deletes (set metric to 16) an entry from its routing table if not refreshed within 6 cycles (180s) Ædeletion after additional 60s to ensure propagation of entry invalidation Îtriggered update: Öupon change of metric for a route (transmits only entries changed) G.Bianchi, G.Neglia, V.Mancuso RIPRIP 22 ÎDoes not change the protocol operation Îsimply adds information in the all 0s fields of the RIP message ÎIt is designed to maintain full compatibility with RIP routers Öal least if they don’t get confused from the non 0 entries G.Bianchi, G.Neglia, V.Mancuso RIPRIP 22 messagemessage formatformat 0 7 8 15 16 31 Command (1-6) Version (2) routing domain Address family (2) Route tag IP address Subnet mask 20 bytes Next hop IP address Metric Up to 24 more routes with same 20 bytes format Most important modification: subnet mask (allows use with VLSM and CIDR) Next hop address: specifies where packet should be
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages62 Page
-
File Size-