Title: Routing
1Routing
The Internet is a datagram network
Notice that packets that make up a message can
take different paths through the internetwork.
What are some issues raised by this design?
2Routing
The Internet is a best effort infrastructure.
If a router becomes overloaded, it may need to
ignore some traffic.
Traffic at congested nodes may be ???????
If a router or a channel fails, the traffic
directed to that path will be ???
If a packet arrives at a router with an error,
what happens to it?
Level 3 goal is to move the packet toward its
destination.
There are no guarantees.
If guaranteed, error-free delivery is required,
an upper level protocol must provide that service
3Routing
Every packet is routed at every router. Routers
look at the ????? to make routing decisions.
Routers have routing tables that they use to make
routing decisions. For big backbone routers,
these tables are huge, because they need an entry
for every possible _________
Internet routing tables are dynamic (why?).
Routing tables are maintained by the periodic
exchange of information
4Routing
Whats the best path through this internetwork
from A to X?
- A router has two jobs
- Build a routing table with the best routes it can
determine - Forward packets in the correct direction based on
that table
R
A
R
R
R
R
R
R
Z
5Routing
- Internet routing has two types
- Interior Gateway Protocol
- Interior gateway protocols are used to distribute
routing information inside of an Autonomous
System (AS). An AS is a set of routers inside the
domain administered by one authority. (RIP, OSPF) - Exterior Gateway Protocol
- Exterior gateway protocols are used for inter-AS
routing, so that each AS may be aware of how to
reach others throughout the Internet. (BGP)
6Routing
7Routing
- An Autonomous System (AS) is a group of routers
- Exchanging information via a common routing
protocol (OSPF or RIP) - Managed by a single organization
- Completely connected (in a logical sense)
A routing protocol for an autonomous system is
called an Interior routing protocol
8Routing
9Routing
- Routing table maintenance
- Static (entered by network engineer and changed
only by him/her) - Dynamic (changed by exchange of information among
routers)
Distance vector protocol RIP 1 and RIP 2 What
matters is number of hops the best path is
the shortest path Why is this useful? Why is this
an oversimplification? Routers must routinely
send routing updates to other routers (every 30
seconds) Figure 14.2 Some problems slow
convergence several minutes RIP-1 does not
support VLSM (variable length subnet masking)
10Routing
Distance vector protocol OSPF What matters is
cost of the path the best path is the
cheapest path Cost can be hop-count, delay, or
some other metric In order to compute the best
path, every router has to know the entire network
topology Routers learn network topology by
exchanging information with their neighbors. Full
exchange is done by reliable flooding (every 30
minutes) Partial exchange is done by making sure
neighbors are responding Convergence is quick (10
sec)
11Routing
VLSM Variable Length Subnet Masking (Sometimes
called Classless) Information conveying
subnetwork identities is provided How to convey
subnetwork identity? Subnetwork mask Number of
meaningful bits in the network address
12Routing
All nodes on a TCP/IP network have a routing
table!
redwoodgt netstat -nr Routing tables Destination
Gateway Flags Refs Use
Interface Netmasks Inet
255.255.0.0 Route Tree for Protocol Family
2 default 137.150.128.1 UG
2 206038 fta0 127.0.0.1 127.0.0.1
UH 2 30094 lo0 137.150
137.150.148.19 U 29 1271544
fta0 redwoodgt This is redwood's old routing
table Notice that everything not bound for
network 137.150 goes to the gateway 137.150.128.1
(the cisco router).
U means "up" G means Gateway Use number of
packets transmitted via this route Interface
name for network access hardware/software
13Internet Routing
Actually, routing is the process by which routing
tables are built. Routing is a problem of graph
theory. Forwarding is the process of looking up
information in a routing table, depending
upon??? A routing protocol is the rules used to
construct the routing tables A routed protocol is
a Layer 3 protocol taking advantage of routing
tables (IP).
14Internet Routing
Routing is a problem of graph theory.
15Internet Routing
Two main classes distance vector and link state
In distance vector routing, we are using "hop
count" as the metric to minimize. Each node
exchanges information with its neighbors every so
often
16Internet Routing
Distance vector
At first, B knows only about A and F
But since A knows about E and C and B and F knows
about B, E, Z and D
After one exchange of information, B knows about
them, too.
17Internet Routing
Distance vector
B can get to ? hops via A 1 A F 1 F E 2 A C 2 A D
2 F Z 2 F
18Internet Routing
Distance vector
After a second exchange of information, B knows
about A, E, F, D, Z, C And also H and G
19Internet Routing
B can get to node ? hops via A 1 A C 2 A D 2 F E
2 A F 1 F G 3 F H 3 F Z 2 F
Distance vector
20Internet Routing
Routing table for node C? ? hops via A 1 A D 1 D G
1 G etc. (you should be able to complete this
table)
Distance vector
21Internet Routing
Notice that during information exchange, B will
discover that since it can get to H at a cost of
3 hops, and that H can get to E at a cost of 1
hop, that it can get to E at a cost of 4
hops. Why doesn't it use this information?
Distance vector
22Internet Routing
What happens if the connection between A and E is
broken? A will stop reporting that it can get to
E in one hop (and E will stop reporting that it
can get to A in one hop). All nodes will
eventually incorporate this new version into
their tables.
Distance vector
23Internet Routing
B can get to node ? hops via age A 1 A 1 C 2 A 1
D 2 F 1 E 2 A 10 F 1 F 1 G 3 F 1 H 3 F 1 Z 2 F 1
E 2 F 1
Distance vector
24Internet Routing
Each node talks only to directly connected
neighbors, but tells them everything it
knows. This information eventually percolates
throughout the network. Eventually, all switches
will know the "least-cost" path to all other
switches
Distance vector
Used in RIP (Routing Internet Protocol) for
Autonomous Networks (15 hop limit information
exchanged every 30 secs). http//www.ietf.org/rfc/
rfc2453.txt?number2453
25Internet Routing
- Link state
- Â
- Uses "reliable flooding" to get a node's
information about its neighbors to all nodes of
the network - Uses Dijkstra's algorithm for find the shortest
path through a graph to determine the routing
table.
26Internet Routing
1a. Discover neighbors 1b. Measure distance
(cost) to neighbors 1c. Construct a Link State
Packet with this info 1d. Broadcast that
information reliably 1e. Tabulate all received
LSPs 2. Dijkstra's algorithm (Any time there is
a change in the "state" of a link, all the
routers note the change, and recompute their
routes accordingly. This method is more reliable,
easier to debug and less bandwidth-intensive than
distance-vector. It is also more complex and more
compute- and memory-intensive. )
27Internet Routing
1a. Discover neighbors When router boots, it
sends a special "Hello, hi, my name is" packet to
all its neighbors.
28Internet Routing
Link State - Reliable Flooding 1b. Measure
distance (cost) to neighbors Router sends
out special ECHO packets to all its
neighbors All neighbors return reply (this is
like ping) The router measures the roundtrip
time Now the router can construct a Link State
Packet
29Internet Routing
- Link State - Reliable Flooding
- 1c. Router constructs a LSP
- Its own id as creator of the LSP
- cost of link to each directly connected neighbor
- sequence number (SEQNO)
- time-to-live (TTL) for this packet (starts at,
say, 15)
30Internet Routing
- Link State - Reliable Flooding
- 1d. Broadcast that information
- Router sends its LSP to each neighboring router
- Router forwards all LSPs it gets on to all other
neighbors after decrementing TTL - Except if TTL goes to zero
- (This step is the reason for the name "reliable
flooding". Why is this "reliable"?)
31Internet Routing
- Link State - Reliable Flooding
- 1e. Router keeps track of all LSPs in a table.
- Stores new link costs
- Replaces outdated link costs (how does it
know???)
32Internet Routing
From To Cost Z S 1 S Z 1 S T 1 T S 1 T Y 1 Y T 1 Y
X 2 Y U 2 U Y 2 U V 10 X Y 2 X W 8
From To Cost V Z 3 V U 10 V W 1 W V 1 W Z 1 W X 8
Z W 1 Z V 3
All nodes have all this information because of ???
33Internet Routing
Edgar Dijkstra's Algorithm for least-cost path
through a weighted graph (aka network) was
published in 1959.
http//www.cs.usask.ca/resources/tutorials/csconce
pts/1999_8/tutorial/advanced/dijkstra/dijkstra_app
let.html
http//www.deakin.edu.au/agoodman/graph/example1.
htm
34Routing
IGRP (Interior Gateway Routing Protocol) Cisco
proprietary
Under what circumstances is this possible?
Ciscos response to the problems with
RIP-1 Distance vector routing protocol that uses
more than hop count as the distance (uses
bandwidth and delay and computes a combined cost
metric)
35Routing
Chronology RIP 1 IGRP OSPF EIGRP RIP2
36Routing
Enhanced Interior Gateway Routing Protocol
(EIGRP) Balanced hybrid protocol Cisco
proprietary Diffusing Update Algorithm (DUAL) A
compromise in terms of what must be sent from
router, to router, how often it must be sent, and
the computational intensity to get good loop-free
paths quickly. Has an alternative route to each
subnet standing by, so quick convergence if
something happens. Metric based on bandwidth and
delay, similar to IGRP