Routing So how does the network layer do its business?
-
date post
20-Dec-2015 -
Category
Documents
-
view
217 -
download
0
Transcript of Routing So how does the network layer do its business?
![Page 1: Routing So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/1.jpg)
Routing
So how does the network layer do its business?
![Page 2: Routing So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/2.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/3.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/4.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/5.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/6.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/7.jpg)
• 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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/8.jpg)
• 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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/9.jpg)
QuickTime™ and a decompressor
are needed to see this picture.
![Page 10: Routing So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/10.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/11.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/12.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/13.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/14.jpg)
QuickTime™ and a decompressor
are needed to see this picture.
![Page 15: Routing So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/15.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/16.jpg)
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 So how does the network layer do its business?](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d445503460f94a21614/html5/thumbnails/17.jpg)
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.