210 likes | 394 Views
Ch 22. Routing. 22.1 Direct and Indirect Delivery. 22.2 Forwarding. Require a routing table To find the route to the final destination Fast routing table lookup is the key to speed up forwarding process Reduce the size of routing table by keeping …
E N D
22.2 Forwarding • Require a routing table • To find the route to the final destination • Fast routing table lookup is the key to speed up forwarding process • Reduce the size of routing table by keeping … • Only the next-hop info. (instead of the whole route) • Destination network info. (instead of each host info.) • Default router for un-specified destinations
Forwarding Process • Forwarding module (for classless addressing)
Example • Routing table of R1
Longest Mask Matching R3 R1
Others and Routing Table Entry • More techniques to reduce routing table size • Hierarchical routing: try to use the hierarchy of the Internet • Geographical routing • Common routing table entry
Application • “netstat” • “ifconfig” (“ipconfig” in Windows)
22.3 Unicast Routing Protocols • Autonomous system: • A group of networks and routers under a single admin.
Popular Routing Protocols • Intradomain protocol for routing within an AS • Interdomain protocol for routing between ASs
Distance Vector Routing • Used for Routing Information Protocol (RIP) • Each node (router) maintains a vector of minimum distance (cost) to every node Link cost
Building the Vector • Initialization: build a vector from neighboring (direct connected) nodes • Sharing: exchange the vector between neighboring nodes • Updating: based on the received vectors, update the vector by recalculating the min. cost route • Repeat “sharing & updating” periodically
Example • Initialization • Update at node Abased on the vectorreceived from node C
Loop Instability • Count-to-infinity problem • Solutions: defining infinity, split horizon, poison reverse
Link State Routing • Used for Open Shortest Path First (OSPF) • Each node has link information of ALL the link
Building Routing Tables • Create the state of the links – Link State Packet (LSP) • Periodically, or when there is a change in topology • Disseminate LSP to every router – flooding • If new LSP is received, copy it to other interfaces • If an old LSP is received, discard it • Each node will collect LSPs from all nodes • Find the shortest path tree – Dijkstra algorithm
Dijkstra Algorithm • Example of node A
Path Vector Routing • “Interdomain routing” used for Border Gateway Protocol (BGP) • In general, similar to distance vector routing • Main differences • Speaker node: a node that acts on behalf of the AS • Loop prevention: routing tables show entire path
Homework • Exercise • 16 • 23 • 24 – Assume that the cost is the hop-distance, i.e., each link cost = 1, and that the router of RIP routing table and the router C is directly connected (i.e., their distance is 1-hop).
Additional problem • Link state routing is operating with topology shown below • Assume that A is chosen as a root • Find the shortest path tree using Dijkstra algorithm (draw all the steps as in Fig. 22.23) 7 2 1