Network Design 16.583/483: University of Massachusetts Lowell
Network Design 16.583/483: University of Massachusetts Lowell
Network Design 16.583/483: University of Massachusetts Lowell
Class 5
Internetworking (2/2)
Lecture Outline
Routing Global Internet Multicast Multiprotocol Label Switching
Routing
Forwarding vs. Routing
Forwarding consists of taking a packet, looking at its destination address, consulting a table, and sending the packet in a direction determined by that table.
Simple well-defined process.
A row from a Routing Table Network Num 18 Interface if0 MAC Address 8:2:2b:e4:b:1:2
Routing (contd)
Network as a Graph
The Nodes, A - F, may be hosts, switches, routers, or networks. Edges are network links. Each edge has an associated cost. Routing: Find the lowest-cost path between any two nodes.
Calculating all the shortest paths and loading them into a nonvolatile storage on each node is an option. What are the shortcomings of such a static approach?
It does not deal with node or link failures. It does not consider the addition of new nodes or links. It implied that edge costs cannot change, even though high cost can be temporarily assigned to a link that is heavily loaded.
Network Design 16.583/483 Spring 2010
Two main classes of routing protocols: Distance Vector and Link State. University of Massachusetts Lowell 4
Routing (contd)
Distance Vector
Each node constructs a vector containing the distances (costs) to all other nodes. It distributes that vector to its immediate neighbors. Each node knows the cost of the link to each of its directly connected neighbors. A link that is down is assigned an infinite cost.
Routing (contd)
Distance Vector (contd)
Initially, each node sets a cost of 1 to its directly connected neighbors and to all other nodes.
Routing (contd)
Distance Vector (contd)
The next step is that every node sends a message to its directly connected neighbors containing its personal list of distances. Update the routing table with costs and next hops for all nodes in the network.
Distance to Reach Node Information Stored at Node A B C D E A B C D E F G
0 1 1 2 1 1 2
1 0 1 2 2 2 3
1 1 0 1 2 2 2
2 2 1 0 3 2 1
1 2 2 3 0 2 3
1 2 2 2 2 0 1
2 3 2 1 3 1 0
F G
Routing (contd)
Distance Vector (contd)
Directly connected neighbors exchange updates
Periodic Update: Each node automatically sends an update message
every so often, even if nothing has changed.
Refresh existing routes, delete if they time out. Convergence: The process of getting consistent routing information to all
the nodes.
In case of failure
Set the cost of reaching failed route to . Send update message. Network Design Spring 2010 16.583/483 Recreate the routing table.University of Massachusetts Lowell
Routing (contd)
Distance Vector (contd)
Example of Routing Loops
F detects that link to G has failed. F sets distance to G to infinity and sends update to A. A sets distance to G to infinity since it uses F to reach G. A receives periodic update from C with 2-hop path to G. A sets distance to G to 3 and sends update to F. F decides it can reach G in 4 hops via A.
Routing (contd)
Distance Vector (contd)
Routing Information Protocol (RIP)
Distributed with the BSD (Berkeley Software Distribution) version of Unix. Canonical example of distance vector based routing protocol The goal of routers is to know how to forward packets to various networks. Advertise cost of reaching networks not routers. Example
Router C would advertise to router A the fact that can reach networks 2 and 3 at a cost of 0, networks 5 and 6 at cost 1, and network 4 at cost 2.
10
Routing (contd)
Distance Vector
(contd)
It always tries to find a Minimum Hop Route Valid distances are 1 to 15, with 16 representing (infinity).
11
Routing (contd)
Distance Vector (contd)
Routing Information Protocol (RIP) (contd)
12
Routing (contd)
Distance Vector (contd)
Routing Information Protocol (RIP) (contd)
13
Routing (contd)
Link State
Strategy
All nodes know their link costs to directly connected neighbors. Disseminate this information to the whole network. Then, every node has a complete map of the whole network. Find the shortest path to the destination. Two Mechanisms
Reliable dissemination of the link state information Route calculation from the accumulated link-state knowledge
Reliable Flooding
Make sure every node gets link-state information from every other node in the network Link State Packet (LSP)
ID of the node that created the LSP Cost of link to each directly connected neighbor Sequence Number (SEQNO) Time-To-Live (TTL) for this packet
University of Massachusetts Lowell 14
Routing (contd)
Link State (contd)
Reliable Flooding (contd)
Store most recent LSP from each node Forward LSP to all nodes but the one that sent it Generate new LSP periodically or triggered by link state change
Increment SEQNO (large SEQNO space 64 bits) Keep the period large (order of hours)
If periodic hello messages are not received from a neighbor then considered dead Start SEQNO at 0 when reboot Decrement TTL of each stored LSP
Discard when TTL = 0
Flooding of link-state packets. (a) LSP arrives at node X; (b) X floods LSP to A and C; (c) A and C flood LSP to B (but not Network Design 16.583/483 Spring 2010 X); (d) flooding is complete. University of Massachusetts Lowell
15
Routing (contd)
Link State
(contd)
M = {s}
// Initialize the table of costs to other nodes using the known costs to directly connected nodes.
while (N != M)
// Look at the node that is reachable at lowest cost (w) and add it to M.
for each n in (N - M)
// Choose a new route to node n that goes through node w if the total cost of going // from the source to w and then following the link from w to n is less than the old route // we had to n. Network Design 16.583/483 Spring 2010
University of Massachusetts Lowell C(n) = MIN(C(n), C (w) + l(w, n ))
16
Routing (contd)
Link State
(contd)
Routing (contd)
Link State
(contd)
Route Calculation: Dijkstras shortest path algorithm (contd) Note: Also called Forward
Search algorithm
Routing (contd)
Link State
(contd)
Additional hierarchy
Further division of domains in areas.
Load balancing
Multiple routes to the same destination.
Currently set to 2 The sender of the message Checksum as in IP header Password or Cryptography Checksum Network Design 16.583/483 Spring 2010 1 = Hello (router is still alive) 2 = Database Description 3 = Link State Request 4 = Link State Update 5 = Link State Acknowledgment Packet length in bytes (including header) Identifier of the area in which the node is located 0 = No Auth 1 = Auth: Password 19 2 = Auth: Cryptography Checksum
Routing (contd)
Link State (contd)
Metrics: How to assign costs to links?
Original ARPANET Metric
Measures number of packets queued on each link Took neither latency or bandwidth into consideration
20
Routing (contd)
Routing for Mobile Hosts (Mobile IP)
Mobility Support: What happens when a destined host disconnects
from the network and connects to another by the time the router on the original network tries to deliver the packet to that host? Home Agent: This router is located on the Home Network of the Mobile
Host. The Mobile Host has a permanent IP address, called its Home Address, which has a network number equal to that of the Home Network, and thus of the Home Agent. Foreign Agent: It is located on a network to which the Mobile Host attaches itself when it is away from its Home Network.
Home and Foreign Agents periodically exchange advertisement messages. Care-of-Address: When the Mobile Host attaches to a Foreign Network, it
registers with the Foreign Agent it detects, providing the address of its Home Agent. The Foreign Agent then contacts the Home Agent, providing a Care-of-Address, usually the IP address of the Foreign Agent.
Any host trying to send a packet to the Mobile Host will send it with a destination address equal to the Home Address of that node.
21
22
Subnetting means that a host is now configured with both an IP address and a Subnet Mask for the Subnet to which it is attached.
23
The network numbers are represented in (length, value) pairs. All routers must understand CIDR addressing.
25
26
Advanced Routing Capabilities: Including support for mobile hosts. Extension Headers: In the NextHeader field
Fragmentation Authentication and Security
28
29
Multicast
One-to-Many
Internet TV, information update (stock market info)
Many-to-Many
Multimedia teleconferencing, online multiplayer gaming, distributed computing
Multicast address
Associated with an abstract group IPv4 -> 28 bits of possible Multicast addresses
30
Multicast (contd)
Source Specific Multicast (SSM)
Suitable for internet radio
Multicast routing
Multicast forwarding table
Specifies a tree (rather than a path such as in Unicast routing)
31
32
33