21
Ch 22. Routing

Ch 22. Routing

  • Upload
    elijah

  • View
    56

  • Download
    0

Embed Size (px)

DESCRIPTION

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 … - PowerPoint PPT Presentation

Citation preview

Page 1: Ch  22. Routing

Ch 22. Routing

Page 2: Ch  22. Routing

22.1 Direct and Indirect Delivery

Page 3: Ch  22. Routing

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

Page 4: Ch  22. Routing

Forwarding Process

• Forwarding module (for classless addressing)

Page 5: Ch  22. Routing

Example

• Routing table of R1

Page 6: Ch  22. Routing

Address Aggregation

Page 7: Ch  22. Routing

Longest Mask MatchingR1R3

Page 8: Ch  22. Routing

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

Page 9: Ch  22. Routing

Application

• “netstat”

• “ifconfig” (“ipconfig” in Windows)

Page 10: Ch  22. Routing

22.3 Unicast Routing Protocols

• Autonomous system:– A group of networks and routers under a single admin.

Page 11: Ch  22. Routing

Popular Routing Protocols

– Intradomain protocol for routing within an AS– Interdomain protocol for routing between ASs

Page 12: Ch  22. Routing

Distance Vector Routing• Used for Routing Information Protocol (RIP)• Each node (router) maintains a vector of

minimum distance (cost) to every nodeLink cost

Page 13: Ch  22. Routing

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

Page 14: Ch  22. Routing

Example

• Initialization

• Update at node Abased on the vectorreceived from node C

Page 15: Ch  22. Routing

Loop Instability

• Count-to-infinity problem

• Solutions: defining infinity, split horizon, poison reverse

Page 16: Ch  22. Routing

Link State Routing

• Used for Open Shortest Path First (OSPF)• Each node has link information of ALL the link

Page 17: Ch  22. Routing

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

Page 18: Ch  22. Routing

Dijkstra Algorithm

• Example of node A

Page 19: Ch  22. Routing

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

Page 20: Ch  22. Routing

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).

Page 21: Ch  22. Routing

• 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

1

2