Top Banner
Routing So how does the network layer do its business?
17

Routing

Feb 11, 2016

Download

Documents

venus

Routing. So how does the network layer do its business?. Forwarding. The actual “routing” part of routing is pretty straightforward. A packet arrives. The router gets the destination address of the packet and looks up its entry in the routing table - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Routing

Routing

So how does the network layer do its business?

Page 2: Routing

Forwarding• The actual “routing” part of routing is pretty

straightforward.• A packet arrives.• The router gets the destination address of the packet

and looks up its entry in the routing table• The routing table tells the router what machine to

forward the packet to, and on what port.

Page 3: Routing

Routing table• The actual guts of routing is the routing table. • The routing table is what tells the router where to

forward packets it receives, based on the destination address.

• Static routing tables are ones where all the entries are manually entered by a system administrator.

• Dynamic routing tables are ones where the router builds the table itself.

• When we talk about a “routing protocol” we are referring to a system for building dynamic routing tables.

Page 4: Routing

Stages of construction• All routing protocols involve three stages:

– Initialization: Setting the initial state of the routing table depends on what the later steps of the protocol are.

– Sharing: For any dynamic routing to work, routers must share some or part of their routing tables with their neighbors.

– Updating: Based on the information a router gets from its neighbors, it needs to update its own routing table.

Page 5: Routing

Unicast routing• All routing wants to find the least-cost route

between any two nodes of the network. They differ in how they define “least cost.”

• The majority of communication is from one source to a single destination. This is unicast communication, and requires unicast routing.

• There are three main systems of unicast routing:– Distance vector– Link State– Path vector

Page 6: Routing

Distance vector routing• Distance vector routing defines the least-cost

route as the one with the shortest distance.• In the initialization phase, routers know the

distance to their immediate neighbors, and assume all other nodes are an infinite distance away.

QuickTime™ and a decompressor

are needed to see this picture.

Page 7: Routing

• In the sharing phase, each node shares its routing table with all of its neighbors.

• This generally happens immediately when there is a change.• Otherwise, on a periodic basis.

• Updating is relatively straightforward. Presume node B sends it’s table to node A. A then:

1. Adds the distance from A to B to all of the distances in B’s table.2. A adds B as the next-hop for every entry in B’s table.3. A compares each row of its table with the corresponding row of

B’s table.a) If the next-hop entry is different, A keeps the row with the lower cost.b) If it is the same, A keeps the new row.

Page 8: Routing

• One problem with distance vector routing is the two-node loop instability, which is a form of a race condition.

• Solutions include:• Redefine infinity so eventually the system stops.• Split horizon: B does not need bother telling A about routes to X that

go through A.• Split horizon w/ poison reverse

QuickTime™ and a decompressor

are needed to see this picture.

Page 9: Routing

QuickTime™ and a decompressor

are needed to see this picture.

Page 10: Routing

Routing Information Protocol• RIP implements distance vector routing for

parts of the internet.• Distance is defined as the number of hops.

Each hop has a distance of 1.• Infinity is defined as 16.

Page 11: Routing

Link State Routing• Each node in the network knows the full network

topology - nodes, links, costs of links, etc.• Each node uses Dijkstra’s algorithm to build its

routing table.• Initialization involves each node generating a

description of its link states.• Each node shares its link states with every other

node using the Link State Packet (LSP).• Each node updates its table using Dijkstra’s

algorithm for calculating a shortest path tree.

Page 12: Routing

Dijkstra’s algorithm

QuickTime™ and a decompressor

are needed to see this picture. QuickTime™ and a decompressor

are needed to see this picture.

Page 13: Routing

Path Vector Routing• Distance vector and Link State routing do

not scale upwards very well. For large networks (like the internet) we need something else.

• Path vector routing works like distance vector routing, except that each LAN has one router called a speaker node that advertises its routing table to its neighboring speaker nodes.

Page 14: Routing

QuickTime™ and a decompressor

are needed to see this picture.

Page 15: Routing

Border Gateway Protocol• BGP implements path vector routing on the

internet. It divides autonomous systems into three types:– Stub AS: The end of the line (Carthage)– Multihomed AS: Connections to multiple other

AS’s, but no thru traffic allowed (Google)– Transient AS: Thru traffic permitted (backbones)

Page 16: Routing

Multicast link-state routing• Source-based SPTs: Each

router has one shortest path tree for each group. A group is a set of destinations for a multicast packet. Essentially, the table maintains a list of next hops for all destinations.

• Group-shared trees: One central router distributes all multicast packets.

QuickTime™ and a decompressor

are needed to see this picture.

MOSPF implements source-based trees using a special packet associating the unicast address of a host with its group address(es).

Page 17: Routing

Multicast Distance Vector• DVMRP uses source-based trees, but the routing

tables are not kept. They are created whenever a multicast packet arrives using one of four methods:

1. Flooding: The packet is forwarded on every interface except the one it was received from.

2. Reverse Path Forwarding: Only the copy of a packet that has traveled the shortest possible distance when it arrives at the router is forwarded.

3. Reverse Path Broadcasting: Define a parent router for each network. The network will only accept multicast packets from a given source through this designated parent router

4. Reverse Path Multicasting: The designated parent router maintains information about which of its hosts belong to which groups.