1 / 14

Routing Algorithms

Routing Algorithms. Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbors A node sends periodically a list of routing updates to its neighbors. If all nodes update their distances, the routing tables eventually converge

ganit
Télécharger la présentation

Routing Algorithms

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. Routing Algorithms Distance Vector Routing • Each node knows the distance (=cost) to its directly connected neighbors • A node sends periodically a list of routing updates to its neighbors. • If all nodes update their distances, the routing tables eventually converge • New nodes advertise themselves to their neighbors 2. Link State Routing • Each node knows the distance to its neighbors • The distance information (=link state) is broadcast to all nodes in the network • Each node calculates the routing tables independently COMM3380

  2. Distance Vector Protocol Example Routing Information Protocol (RIP) COMM3380

  3. Routing Information Protocol (RIP) • RIP is an IGP for use within an autonomous system • Designed for small networks with same speed links • Uses UDP port 520 • Request and Response messages - requests update and responds with update • Broadcasts request out every RIP configured interface on start up of routing protocol. • Upon receipt of response message, routes are checked in current routing table, if absent, routes are added, if existing, route only updated if it has a lower hop count COMM3380

  4. RIP broadcast from a neighbouring router • If the destination is not in the table, then create a new table entry for it. • If the destination is already in the table via a different route but the received list gives a shorter distance to it, then change the table entry. • If the destination is already in the table via the same route, but the received list gives a distance that is different then change the table entry. • Otherwise do nothing with this destination/distance pair of values. COMM3380

  5. RIP : Count to infinity problem • B – X -> distance = 0 • A – X -> distance = 1 • If connection from B to X fails -> B – X marked unreachable • A broadcasts DV list • B sees A-X at distance 1 -> thinks link B-A-X exists with distance 2 -> updates table -> routing loop between A and B for traffic destined for X COMM3380

  6. Now B broadcast its DV list with X reachable via A at distance = 2 A sees distance B-X has changed from distance 0 to 2 -> A updates A-X to distance = 3 A broadcasts -> B see A-X with distance=3 -> B updates entry B-X to distance=4 Continues until distance = 16 reached -> unreachable RIP : Count to infinity problem COMM3380

  7. Split Horizon • Solves trivial count-to-infinity problem • Routers never advertise the cost of a destination back to its next hop, i.e. where it learned it from • Poison Reverse -> advertise back infinity COMM3380

  8. Routing Loop Avoidance • Routing loops can still occur in any network due to router configuration errors. • To prevent -> IP packet has a time to live (TTL) value in its header-> decremented by each router as it receives the packet. If the TTL of a packet becomes zero, the router discards it. COMM3380

  9. RIP Message Format COMM3380

  10. RIP v1 • Command specifies Request = 1 or Response - 2 • Version Ripv1 = 1 • AFI - Address-Family Identifier - specifies protocol, IP = 2 • IP address of destination route • Metric - hop count to destination • Up to 25 routes - AFI, IP and Metric combinations COMM3380

  11. RIP Operations • On start-up, RIP broadcast Request message out each RIP enabled interface. • From then on, it listens for Request and Response messages from others. • Neighbour routers respond to initial Request with full routing table in Response Message(s) - 25 routes per Response packet. • On receipt of Response message, • If route entry is new, it is added to routing table with address of advertising router. • If the route entry is not new and the hop count is the same, the timer is updated. • If the route entry is not new and the hop count is lower, the new next hop information is entered. • If the route entry if not new and the hop count is greater, the route is marked as Hold down. • Routers continue to send gratuitous Response message(s) out each RIP enable interface every 30 seconds COMM3380

  12. RIP Version 2 Changes • Classless routing and subnet masks in routing updates • Routing update authentication • Next-hop addresses for each route • External route tags • Multicast route updates, instead of broadcast • Same procedures, timers & functions of v1 COMM3380

  13. RIPv2 Packet • Command specifies Request = 1 or Response - 2 • Version Ripv2 = 2 • AFI - Address-Family Identifier - specifies protocol, IP = 2, 0xffff -> Authentication Entry in place of first routing entry • Route Tag - mark external or redistributed routes into RIP • Network - IP address of destination route • Subnet Mask - allows for classless routing • Metric - hop count to destination • Up to 25 routes - AFI, IP and Metric combinations • Maximum datagram size 512 octets • Authentication by password in update COMM3380

  14. RIP v1 & v2 • Metric of hop count only allowable of 1-15. At 16, destination is considered unreachable, to prevent routing loops. This limits the depth of a network to run RIP. • Update timer - Router sends gratuitous Response message out each interface every 30 seconds with full routing table. • Expiration timer - initialized to 180 seconds for a new route and reset upon update of that route. If timer expires, hop count set to 16, unreachable, but still advertised. • Flush timer - set to 240 seconds upon initialization, once expired, route is removed from routing table and no longer advertise. • Holddown timer - Cisco only - set for 180 seconds when updated route has a higher hop count than previous advertisement. COMM3380

More Related