1 / 61

W4140 Network Laboratory Lecture 5 Oct 9 - Fall 2006 Shlomo Hershkop Columbia University

This lecture covers the overview of dynamic routing protocols, distance vector routing, and intra-domain routing protocols like RIP. It also discusses the architecture and components of routers.

Download Presentation

W4140 Network Laboratory Lecture 5 Oct 9 - Fall 2006 Shlomo Hershkop Columbia University

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. W4140 Network LaboratoryLecture 5Oct 9 - Fall 2006Shlomo HershkopColumbia University

  2. Announcements • Please do not reset password, and let me know if you find someone has done it to your station • Please log out when done • how many groups are having hardware / software issues ? • this week’s lab • if you have done part 1-4 of lab 4…..you have a free week!! • else this week you have a chance to catch up • also start to think about projects, the wireless equipment have arrived and so will setup more project proposals based on those • wireless bridges and configuration • security with wireless • wireless mesh networks • capacity, interference, and overlap with wireless systems

  3. ISSUES ?? • is there any issues with the labs ? • please be aware that VOIP will be using the lab, so if you can, please coordinate with the TA’s about extra lab time…they will be in touch with VOIP • our lab times, represent reserved times, so feel free to ask people to move over (nicely please)

  4. Dynamic routing protocols I Overview of router architecture Overview Dynamic Routing Protocols: Distance Vector Routing Intra-Domain Routing Protocols: RIP

  5. Forwarding is selecting the next-hop machine for each outgoing packet. Forwarding table, FIB (Forwarding Information Base). Routing is the process of deciding the path from a source to a destination. Routing table, RIB (Routing Information Base). Why two tables and not just one? Routing and Forwarding

  6. Routing and Forwarding Control plane: run routing protocols: (RIP, OSPF, BGP) Data plane:forwarding packets from incoming to outgoing link

  7. Select the next-hop router. Find the outgoing interface. Find the MAC address of the next-hop router. In Unix, you specify the IP address of the next-hop router. Longest-prefix first. Default routing (implied by longest-prefix rule: default has prefix of length 0). Routing and Forwarding

  8. Routing and Forwarding Routing functions include: • route calculation • maintenance of the routing table • execution of routing protocols • On commercial routers handled by a single general purpose processor, called route processor IP forwarding is per-packet processing • On high-end commercial routers, IP forwarding is distributed • Most work is done on the interface cards

  9. Hardware components of a router: Network interfaces Switching fabrics Processor with a memory and CPU Router Hardware Components Processor Memory CPU Switching fabric Interface Card Interface Card Interface Card

  10. On a PC router: Switching fabric is the (PCI) bus Interface cards are NICs (e.g., Ethernet cards) All forwarding and routing is done on central processor On Commercial routers: Switching fabrics and interface cards can be sophisticated Central processor is the route processor (only responsible for control functions) PC Router versus commercial router Processor Memory CPU Switching fabric Interface Card Interface Card Interface Card

  11. Basic Architectural ComponentsPer-packet processing I/O Ports I/O Ports Switching Fabric

  12. Evolution of Router Architectures • Early routers were essentially general purpose computers • Today, high-performance routers resemble supercomputers • Exploit parallelism • Special hardware components • Until 1980s (1st generation): standard computer • Early 1990s (2nd generation): delegate to interfaces • Late 1990s (3rd generation): Distributed architecture • Today: Distributed over multiple racks

  13. 1st Generation Routers (switching via memory) • This architecture is still used in low end routers • Arriving packets are copied to main memory via direct memory access (DMA) • Switching fabric is a backplane (shared bus) • All IP forwarding functions are performed in the central processor. • Routing cache at processor can accelerate the routing table lookup.

  14. Drawbacks of 1st Generation Routers Memory Input Port Output Port System Bus • Forwarding Performance is limited by memory and CPU • Capacity of shared bus limits the number of interface cards that can be connected

  15. 2nd Generation Routers (switching via a shared bus) • Keeps shared bus architecture, but offloads most IP forwarding to interface cards • Interface cards have local route cache and processing elements Fast path:If routing entry is found in local cache, forward packet directly to outgoing interface Slow path:If routing table entry is not in cache, packet must be handled by central CPU

  16. Another 2nd Generation Architecture • IP forwarding is done by separate components (Forwarding Engines) Forwarding operations: • Packet received on interface: Store the packet in local memory. Extracts IP header and sent to one forwarding engine • Forwarding engine does lookup, updates IP header, and sends it back to incoming interface • Packet is reconstructed and sent to outgoing interface.

  17. Drawbacks of 2nd Generation Routers Bus contention limits throughput

  18. 3rd Generation Architecture • Switching fabric is an interconnection network (e.g., a crossbar switch) • Distributed architecture: • Interface cards operate independent of each other • No centralized processing for IP forwarding • These routers can be scaled to many hundred interface cards and to aggregate capacity of > 1 Terabit per second

  19. Cisco Express Forwarding (distributed mode)

  20. Scalability & Efficiency Adjacency Tables for local hosts (same network) Layer 2 switching is faster. The line cards perform the express forwarding between port adapters, relieving the RSP (Route Switch Processing) of involvement in the switching operation. Resilience No route cache: several data structures for CEF switching Line Cards maintain an identical copy of the FIB and adjacency tables. More at Cisco on-line documentation Cisco Express Forwarding Benefits

  21. Slotted Chassis • Large routers are built as a slotted chassis • Interface cards are inserted in the slots • Route processor is also inserted as a slot • This simplifies repairs and upgrades of components

  22. Dynamic Routing ProtocolsDistance Vector Routing

  23. Routing Protocols • Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface of a router (packet forwarding) ? 2. How to find and setup a route ? • We already discussed the packet forwarding part • Longest prefix match • There are two approaches for calculating the routing tables: • Static Routing (We modify manually the Routes) • Dynamic Routing: Routes are calculated by a routing protocol

  24. Routing protocols vs routing algorithms • Routing protocols establish routing tables at routers. • A routing protocol specifies • What messages are sent between routers • Under what conditions the messages are sent • How messages are processed to compute routing tables • At the heart of any routing protocol is a routing algorithm that determines the path from a source to a destination

  25. IGP : interior gateway protocols • used within an autonomous system • Distance-vector routing protocol • information on who is next to you and cost (hop) (route table) • share info • update info • relatively slow to propagate • can insert bad info • Link-state routing protocol • have a network map by everyone • calculate best path • can end up with loops if two points have different starting maps

  26. Overview Routing Protocols Routing protocol Routing Algorithm

  27. Intra-domain routing versus inter-domain routing • Recall Internet is a network of networks. • Administrative autonomy • internet = network of networks • each network admin may want to control routing in its own network • Scale: with 200 million destinations: • can’t store all destinations’s in routing tables! • routing table exchange would swamp links

  28. Autonomous systems • aggregate routers into regions, “autonomous systems” (AS) or domain • routers in the same AS run the same routing protocol • “intra-AS” or intra-domain routing protocol • routers in different AS can run different intra-AS routing protocol

  29. Autonomous Systems • An autonomous system is a region of the Internet that is administered by a single entity. • Examples of autonomous regions are: • UCI’s campus network • MCI’s backbone network • Regional Internet Service Provider • Routing is done differently within an autonomous system (intradomain routing) and between autonomous system (interdomain routing). • RIP, OSPF, IGRP, and IS-IS are intra-domain routing protocols. • BGP is the only inter-domain routing protocol.

  30. Distance Vector Routing • Variations of Bellman-Ford algorithm. • Each router starts by knowing: • Prefixes of its attached networks (“zero” distance). • Its next hop routers (how to find them?) • Each router advertises only to its neighbors: • All prefixes it knows about. • Its distance from them. • Each router learns: • All prefixes its neighbors know about. • Their distance from them. • Each router figures out, for each destination prefix: • The “distance” (how far away it is). • The “vector” (the next hop router).

  31. Distance Vector Routing Properties • DV Computes the Shortest Path • “Routing by rumor” • Each router believes what its neighbors tell it. • In steady-state, each router has the “shortest” (smallest metric) path to the destination. • Convergence time is (on the average) proportional to the diameter of the network. • Any link change affects the entire network.

  32. Distance vector algorithm • A decentralized algorithm • A router knows physically-connected neighbors and link costs to neighbors • A router does not have a global view of the network • Path computation is iterative and mutually dependent. • A router sends its known distances to each destination (distance vector) to its neighbors. • A router updates the distance to a destination from all its neighbors’ distance vectors • A router sends its updated distance vector to its neighbors. • The process repeats until all routers’ distance vectors do not change (this condition is called convergence).

  33. Bellman-Ford Algorithm Bellman-Ford Equation Define dx(y) := cost of the least-cost path from x to y Then • dx(y) = minv{c(x,v) + dv(y) }, where min is taken over all neighbors of node x

  34. Distance vector algorithm: initialization • Let Dx(y) be the estimate of least cost from x to y • Initialization: • Each node x knows the cost to each neighbor: c(x,v). For each neighbor v of x, Dx(v) = c(x,v) • Dx(y) to other nodes are initialized as infinity. • Each node x maintains a distance vector (DV): • Dx = [Dx(y): y 2 N ]

  35. Distance vector algorithm: updates • Each node x sends its distance vector to its neighbors, either periodically, or triggered by a change in its DV. • When a node x receives a new DV estimate from a neighbor v, it updates its own DV using B-F equation: • If c(x,v) + Dv(y) < Dx(y) then • Dx(y) = c(x,v) + Dv(y) • Sets the next hop to reach the destination y to the neighbor v • Notify neighbors of the change • The estimate Dx(y) will converge to the actual least cost dx(y)

  36. Distance vector algorithm: an example 1 1 1 1 1 1 1 1 Time = 0

  37. Distance vector algorithm: an example Time = 1

  38. Distance vector algorithm: an example Time = 2 (End)

  39. How to map the abstract graph to the physical network • Nodes (e.g., v, w, n) are routers, identified by IP addresses, e.g. 10.0.0.1 • Nodes are connected by either a directed link or a broadcast link (Ethernet) • Destinations are IP networks, represented by the network prefixes, e.g., 10.0.0.0/16 • Net(v,n) is the network directly connected to router v and n. • Costs (e.g. c(v,n)) are associated with network interfaces. • Router1(config)# router rip • Router1(config-router)# offset-list 0 out 10 Ethernet0/0 • Router1(config-router)# offset-list 0 out 10 Ethernet0/1

  40. Distance vector routing protocol: Routing Table c(v,w): cost to transmit on the interface to network Net(v,w) Net(v,w): Network address of the network between v and w D(v,net) is v’s cost to Net

  41. Distance vector routing protocol: Messages [Net , D(v,Net)] v n • Nodes send messages to their neighbors which contain distance vectors • A message has the format: [Net , D(v,Net)] means“My cost to go to Net is D (v,Net)”

  42. Distance vector routing algorithm: Sending Updates Periodically, each node v sends the content of its routing table to its neighbors:

  43. Initiating Routing Table I • Suppose a new node v becomes active. • The cost to access directly connected networks is zero: • D (v, Net(v,m)) = 0 • D (v, Net(v,w)) = 0 • D (v, Net(v,n)) = 0

  44. Initiating Routing Table II • Node v sends the routing table entry to all its neighbors:

  45. Initiating Routing Table III • Node v receives the routing tables from other nodes and builds up its routing table

  46. The Count-to-Infinity Problem • What happens on a link failure? X A: 0 B:1,B C:2,B A: 0 B:1,B C:4,B A: 0 B:1,B C:6,B A: 1,A B:0 C:1,C A: 1,A B:0 C:- A: 1,A B:0 C:3,A A: 1,A B:0 C:5,A A: 2,B B:1,B C:0

  47. Count-to-Infinity • The reason for the count-to-infinity problem is that each node only has a “next-hop-view” • For example, in the first step, A did not realize that its route (with cost 2) to C went through node B • How can the Count-to-Infinity problem be solved?

  48. Count-to-Infinity • The reason for the count-to-infinity problem is that each node only has a “next-hop-view” • For example, in the first step, A did not realize that its route (with cost 2) to C went through node B • How can the Count-to-Infinity problem be solved? • Solution 1: Always advertise the entire path in an update message to avoid loops (Path vectors) • BGP uses this solution

  49. Count-to-Infinity • The reason for the count-to-infinity problem is that each node only has a “next-hop-view” • For example, in the first step, A did not realize that its route (with cost 2) to C went through node B • How can the Count-to-Infinity problem be solved? • Solution 2:Never advertise the cost to a neighbor if this neighbor is the next hop on the current path (Split Horizon) • Example: A would not send the first routing update to B, since B is the next hop on A’s current route to C • Split Horizon does not solve count-to-infinity in all cases! • You can produce the count-to-infinity problem in Lab 4.

  50. Characteristics of D.V. Routing Protocols • Periodic Updates: Updates to the routing tables are sent at the end of a certain time period. A typical value is 30 seconds. • Triggered Updates: If a metric changes on a link, a router immediately sends out an update without waiting for the end of the update period. • Full Routing Table Update: Most distance vector routing protocol send their neighbors the entire routing table (not only entries which change). • Route invalidation timers: Routing table entries are invalid if they are not refreshed. A typical value is to invalidate an entry if no update is received after 3-6 update periods.

More Related