1 / 34

Dynamic Routing

Dynamic Routing. Dynamic Routing occurs when routers talk to adjacent routers, informing each other of what networks each router is currently connected to the routers communicate using a routing protocol

Download Presentation

Dynamic Routing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Routing • Dynamic Routing occurs when routers talk to adjacent routers, informing each other of what networks each router is currently connected to • the routers communicate using a routing protocol • the process on the router that is running the routing protocol is usually called a routing daemon • Dynamic routing does not change the way the kernel performs routing at the IP layer. What changes is where the information comes from that is placed into the routing table. Dynamic Routing

  2. Routing in the Internet • The Global Internet consists of Autonomous Systems (AS) interconnected with each other: • Stub AS: small corporation • Multihomed AS: large corporation (no transit) • Transit AS: provider • Two-level routing: • Intra-AS: administrator is responsible for choice • Inter-AS: unique standard Dynamic Routing

  3. Internet AS Hierarchy Dynamic Routing

  4. Intra-AS Routing • Also known as Interior Gateway Protocols (IGP) • Most common IGPs: • RIP: Routing Information Protocol • OSPF: Open Shortest Path First • IGRP: Interior Gateway Routing Protocol Dynamic Routing

  5. Exterior Gateway Protocols • Exterior gateway protocols (EGPs), or inter-domain routing protocols, are used between routers in different autonomous systems. • The predominant EGP has been EGP. A newer EGP is the Border Gateway Protocol (BGP). Dynamic Routing

  6. Unix Routing Daemons • Unix systems often run the routing daemon routed. It is provided with almost every implementation of TCP/IP. • routed communicates using only RIP. It is designed for small to medium-size networks. • An alternative program is gated which supports both IGPs and EGPs. Dynamic Routing

  7. Routing Information Protocol (RIP) • Distance vector type scheme • Included in BSD-UNIX Distribution in 1982 • Distance metric: # of hops (max = 15 hops) • Distance vector: exchanged every 30 sec via a Response Message (also called Advertisement) • Each Advertisement contains up to 25 destination nets Dynamic Routing

  8. RIP • RIP messages are carried in UDP datagrams. The official specification for RIP is RFC1058 Dynamic Routing

  9. RIP Message Fields • A command of 1 is a request, and 2 is a reply. There are other obsolete commands (2 and 3), and two undocumented ones: poll(5) and poll-entry(6). • A request asks the other system for all or part of its routing table. A reply contains all of part of the sender's routing table. • The version is normally 1. Dynamic Routing

  10. RIP Address Entries • The next 20 bytes specify the address family, an IP address, and an associated metric. RIP metrics are hop counts. • Up to 25 routes can be advertised in a message. This keeps the size of the RIP message to 504 bytes which is less than 512. • With a limit of 25 routes per message, multiple messages are often required to send an entire routing table. Dynamic Routing

  11. RIP Initialization • When the daemon starts it determines all of the interfaces that are up and sends a request packet out each interface, asking for the other router's complete routing table • This request packet has a command of 1 but the address family is set to 0 and the metric is set to 16. This is a special request that asks for a complete routing table from the other end Dynamic Routing

  12. RIP Operation • Request received • If the request is the special case, then the entire routing table is sent to the requestor. Otherwise each entry in the request is processed: • if we have a route to the specified address, set the metric to our value, else set the metric to 16. The response is returned. • Response received • The response is validated and may update the routing table. New entries can be added,existing entries can be modified, or existing entries can be deleted Dynamic Routing

  13. Other Operations • Regular routing updates • Every 30 seconds, all or part of the router's entire routing table is sent to every neighbor router • Triggered updates • Whenever the metric for a route changes, the entire table need not be sent, only those entries that have changed must be transmitted • Each route has a timeout. If a route has not been updated for 3 minutes, that route's metric is set to infinity (16) and marked for deletion. Dynamic Routing

  14. RIP Hop Counts • The metrics used by RIP are hop counts. The hop count for all directly connected interfaces is 1. • If an adjacent router advertises a route to another network with a hop count of 1, then our metric for that network is 2, since we have to send a packet to that router to get to the network. • As each router sends its routing tables to its neighbors, a route can be determined to each network within the AS. Dynamic Routing

  15. RIP Example Dynamic Routing

  16. RIP Hop Counts • As each router sends its routing tables to its neighbors, a route can be determined to each network within the AS. • If there are multiple paths within the AS from a router to a network, the router selects the path with the smallest hop count and ignores the other paths. Dynamic Routing

  17. RIP Example Dynamic Routing

  18. RIP Problems • As simple as all this sounds, there are pitfalls. • RIP has no knowledge of subnet addressing • RIP takes a long time to stabilize after the failure of a router or a link. There are many subtle details in the implementation of RIP that must be followed (see RFC1058 for details) • The use of hop count as the routing metric omits other variables that should be taken into consideration • The maximum hop count of 15 limits the sizes of networks on which RIP can be used. Dynamic Routing

  19. RIP-2 • RFC1388 defines newer extensions to RIP, and the result is normally called RIP-2 Dynamic Routing

  20. RIP-2 Fields • The routing domain is an identifier of the routing domain to which this packet belongs. • The route tag exists to support exterior gateway protocols. It carries an autonomous number for EGP and BGP. • A simple authentication scheme is provided • RIP-2 supports multicasting in addition to broadcasting. Dynamic Routing

  21. OSPF • OSPF is a newer alternative to RIP as an interior gateway protocol. It overcomes all the limitations of RIP. OSPF version 2 is described in RFC1247. • OSPF is a link-state protocol, as opposed to RIP, which is distance-vector protocol • OSPF is different from RIP in that OSPF uses IP directly. That is, it does not use UDP or TCP Dynamic Routing

  22. Link State Protocols • In a link-state protocol a router does not exchange distances with its neighbors. Instead each router actively tests the status of its link to each of its neighbors, sends this information to its neighbors, which then propagate it throughout the AS. • Each router uses the link-state information to build a complete routing table. • A link-state protocol will always converge faster than a distance-vector protocol. Dynamic Routing

  23. Benefits of OSPF • OSPF can calculate a separate set of routes for each IP type-of-service • Each interface is assigned a dimensionless cost. • When several equal-cost based routes to a destination exist, OSPF distributes traffic equally among the routes • OSPF supports subnets: a subnet mask is associated with each advertised route Dynamic Routing

  24. Benefits of OSPF • Point-to-point links between routers do not need an IP address at each end. These are called unnumbered networks • A simple authentication scheme can be used. A cleartext password can be specified, similar to the RIP-2 scheme • OSPF uses multicasting, instead of broadcasting, to reduce load on systems not participating in OSPF Dynamic Routing

  25. Inter-AS routing Dynamic Routing

  26. Inter-AS routing • BGP (Border Gateway Protocol): the de facto standard • Path Vector protocol: and extension of Distance Vector • Each Border Gateway broadcast to neighbors (peers) the entire path (ie, sequence of ASs) to destination • For example, Gateway X may store the following path to destination Z: Path (X,Z) = X,Y1,Y2,Y3,…,Z Dynamic Routing

  27. Inter-AS routing • Now, suppose X send its path to peer W • W may or may not select the path offered by X, because of cost, policy or loop prevention reasons. • If W selects the path advertised by X, then: Path (W,Z) = w, Path (X,Z) • Note: path selection based not so much on cost (eg,# of AS hops), but mostly on administrative and policy issues (e.g., do not route packets through competitor’s AS) Dynamic Routing

  28. Inter-AS routing (cont) • Peers exchange BGP messages using TCP. • OPEN msg opens TCP connection to peer and authenticates sender • UPDATE msg advertises new path (or withdraws old) • KEEPALIVE msg keeps connection alive in absence of UPDATES; it also serves as ACK to an OPEN request • NOTIFICATION msg reports errors in previous msg; also used to close a connection Dynamic Routing

  29. Why different Intra- and Inter-AS routing ? • Policy: Inter is concerned with policies (which provider we must select/avoid, etc). Intra is contained in a single organization, so, no policy decisions necessary • Scale: Inter provides an extra level of routing table size and routing update traffic reduction above the Intra layer • Performance: Intra is focused on performance metrics; needs to keep costs low. In Inter it is difficult to propagate performance metrics efficiently (latency, privacy etc). Besides, policy related information is more meaningful. Dynamic Routing

  30. Classless Inter-domain Routing • The shortage of class B addresses requires sites with multiple networks to now obtain multiple class C network IDs, instead of a single class B network ID • Although this solves the problem of running out of class B addresses, it introduces another problem: every class C network requires a routing table entry Dynamic Routing

  31. CDIR • CDIR, also called supernetting, is a way to prevent an explosion in the size of the Internet routing tables. It is described in RFC1518 and RFC1519 • RFC1467 summarizes the state of CDIR deployment in the Internet • The basic concept is to allocate multiple addresses in such a way that allows summarization into a smaller number of routing table entries Dynamic Routing

  32. Summarization • Three features are needed: • Multiple IP addresses to be summarized together for routing must share the same high-order bits of their addresses • The routing tables and routing algorithms must be extended to base their routing decisions on a 32-bit address and a 32-bit mask • The routing protocols being used must be extended to carry the 32-bit mask in addition to the 32-bit address (OSPF and RIP-2 are both capable of doing this) Dynamic Routing

  33. Example • RFC1466 recommends that new class C addresses in Europe be in the range 194.0.0.0 through 195.255.255.255 (0x2000000 through 0xc3ffffff) • In countries other than Europe a single routing table entry with an IP address of 0x2000000 and a 32-bit mask of 0xfe000000 (254.0.0.0) could be used to route all of these 65535 network IDs to a single point Dynamic Routing

  34. Why Classless? • CIDR also uses a technique whereby the best match is always the one with the longest match: The one with the greatest number of one bits in the 32-bit mask • The term classless is used because routing decisions are now based on masking operations of the entire 32-bit address. Whether the IP address is class A, B, or C makes no difference. Dynamic Routing

More Related