MK-PPT Chapter 3-3
MK-PPT Chapter 3-3
Chapter 3
Internetworking
3
Chapter 3
Host Configurations
Notes
Ethernet addresses are configured into network by
manufacturer and they are unique
IP addresses must be unique on a given internetwork
but also must reflect the structure of the internetwork
Most host Operating Systems provide a way to
manually configure the IP information for the host
Drawbacks of manual configuration
A lot of work to configure all the hosts in a large network
Configuration process is error-prune
Automated Configuration Process is required
4
Chapter 3
Dynamic Host Configuration Protocol (DHCP)
5
Chapter 3
DHCP
Newly booted or
attached host sends
DHCPDISCOVER
message to a special IP
address
(255.255.255.255)
DHCP relay agent
unicasts the message to
DHCP server and waits
for the response
6
Chapter 3
Internet Control Message Protocol (ICMP)
Defines a collection of error messages that are sent back
to the source host whenever a router or host is unable to
process an IP datagram successfully
Destination host unreachable due to link /node failure
Reassembly process failed
TTL had reached 0 (so datagrams don't cycle forever)
IP header checksum failed
7
Chapter 3
Routing
Forwarding versus Routing
– Forwarding:
– to select an output port based on destination address
and routing table
– Routing:
– process by which routing table is built
8
Chapter 3
Routing
• Forwarding table VS Routing table
• Forwarding table
• Used when a packet is being forwarded and so must contain
enough information to accomplish the forwarding function
• A row in the forwarding table contains the mapping from a
network number to an outgoing interface and some MAC
information, such as Ethernet Address of the next hop
the forwarding table needs to be structured to optimize the
9
Chapter 3
Routing
Assignment
10
Chapter 3
Routing
• Network as a Graph (Graph Theory)
11
Chapter 3
Routing
• For a simple network, we can calculate all shortest paths and
load them into some nonvolatile storage on each node.
• Such a static approach has several shortcomings
• It does not deal with node or link failures
• It does not consider the addition of new nodes or links
• It implies that edge costs cannot change
12
Chapter 3
Distance Vector
Each node constructs a one dimensional array (a vector)
containing the “distances” (costs) to all other nodes and
distributes that vector to its immediate neighbors
Starting assumption is that each node knows the cost of
the link to each of its directly connected neighbors
13
Chapter 3
Distance Vector
14
Chapter 3
Distance Vector
15
Chapter 3
Distance Vector
16
Chapter 3
Distance Vector
17
Chapter 3
Distance Vector
The distance vector routing algorithm is sometimes
called as Bellman-Ford algorithm
Every T seconds each router sends its table to its
neighbor each router then updates its table based on the
new information (Periodic Update)
Triggered Update (Link Failure)
Link Failure Detection
Continually send control frame and receive acknowledgements
Do not receive periodic update from other node
18
Chapter 3
Distance Vector
• When a node detects a link failure
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
19
Chapter 3
Distance Vector
Slightly different circumstances can prevent the network from
stabilizing
Suppose the link from A to E goes down
In the next round of updates, A advertises a distance of infinity to E, but
B and C advertise a distance of 2 to E
Depending on the exact timing of events, the following might happen
Node B, upon hearing that E can be reached in 2 hops from C, concludes
that it can reach E in 3 hops and advertises this to A
Node A concludes that it can reach E in 4 hops and advertises this to C
Node C concludes that it can reach E in 5 hops; and so on.
This cycle stops only when the distances reach some number that is large
enough to be considered infinite
Count-to-infinity problem
20
Chapter 3
Count-to-infinity Problem
Use some relatively small number as an approximation of infinity
For example, the maximum number of hops to get across a certain
network is never going to be more than 16
21
Chapter 3
Count-to-infinity Problem
In a stronger version of split horizon, called split horizon with poison
reverse
B actually sends that back route to A, but it puts negative information in
the route to ensure that A will not eventually use B to get to E
For example, B sends the route (E, ∞) to A
22
Chapter 3
Link State Routing
• Same assumptions as of distance-vector
Each node is assumed to be capable of
finding out the state of the link to its neighbors
(up or down) and the cost of each link.
we want to provide each node with enough
information to enable it to find the least-cost
path to any destination.
23
Chapter 3
Link State Routing
the basic idea is for a node to send its link-state
information out on all of its directly connected links; each
node that receives this information then forwards it out
on all of its links.
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
Reliable Flooding
store most recent LSP from each node
forward LSP to all nodes but one that sent it
generate new LSP periodically; increment SEQNO
start SEQNO at 0 when reboot
decrement TTL of each stored LSP; discard when TTL=0
24
Chapter 3
Link State
Reliable Flooding
25
Chapter 3
Shortest Path Routing
Dijkstra’s Algorithm - Assume non-negative link weights
N: set of nodes in the graph
l((i, j): the non-negative cost associated with the edge between
nodes i, j N and l(i, j) = if no edge connects i and j
Let s N be the starting node which executes the algorithm to
find shortest paths to all other nodes in N
Two variables used by the algorithm
M: set of nodes incorporated so far by the algorithm
C(n) : the cost of the path from s to each node n
The algorithm
M = {s}
For each n in N – {s}
C(n) = l(s, n)
while ( N M)
M = M {w} such that C(w) is the minimum
for all w in (N-M)
For each n in (N-M)
C(n) = MIN (C(n), C(w) + l(w, n))
26
Chapter 3
Shortest Path Routing
In practice, each switch computes its routing table
directly from the LSP’s it has collected using a realization
of Dijkstra’s algorithm called the forward search algorithm
Specifically each switch maintains two lists, known as
Tentative and Confirmed
Each of these lists contains a set of entries of the form
(Destination, Cost, NextHop)
27
Chapter 3
Shortest Path Routing
The algorithm
Initialize the Confirmed list with an entry for myself; this entry has a cost
of 0
For the node just added to the Confirmed list in the previous step, call it
node Next, select its LSP
For each neighbor (Neighbor) of Next, calculate the cost (Cost) to reach
this Neighbor as the sum of the cost from myself to Next and from Next
to Neighbor
If Neighbor is currently on neither the Confirmed nor the Tentative list, then
add (Neighbor, Cost, Nexthop) to the Tentative list, where Nexthop is the
direction I go to reach Next
If Neighbor is currently on the Tentative list, and the Cost is less than the
currently listed cost for the Neighbor, then replace the current entry with
(Neighbor, Cost, Nexthop) where Nexthop is the direction I go to reach Next
If the Tentative list is empty, stop. Otherwise, pick the entry from the
Tentative list with the lowest cost, move it to the Confirmed list, and
return to Step 2.
28
Chapter 3
Shortest Path Routing
29
Chapter 3
Metrics
Link Costs (No. of hops)
Drawbacks
It does not distinguish between links on a latency
basis. Thus, a satellite link with 250-ms latency
looks just as attractive to the routing protocol as a
terrestrial link with 1-ms latency
It does not distinguish between routes on a
capacity basis, making a 9.6-kbps link look just as
good as a 45-Mbps link.
it does not distinguish between links based on
their current load, making it impossible to route
around overloaded links.
30
Chapter 3
Summary
We have looked at some of the issues involved in
building scalable and heterogeneous networks by using
switches and routers to interconnect links and networks.
To deal with heterogeneous networks, we have
discussed in details the service model of Internetworking
Protocol (IP) which forms the basis of today’s routers.
We have discussed in details two major classes of
routing algorithms
Distance Vector
Link State
31