CS 352 Internet Technology Routing - PowerPoint PPT Presentation

1 / 56
About This Presentation
Title:

CS 352 Internet Technology Routing

Description:

Forwarding is the lookup once the decision has been made ... Example: Cell phone number allways contacts a single device, even when changing access points. ... – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 57
Provided by: brettv4
Category:

less

Transcript and Presenter's Notes

Title: CS 352 Internet Technology Routing


1
CS 352Internet TechnologyRouting
  • Richard Martin
  • Dept. of Computer Science
  • Rutgers University

2
Forwarding vs Routing
  • Routing is the decision which path to take
  • Forwarding is the lookup once the decision has
    been made
  • These functions are typically decoupled in real
    systems

3
Routing Algorithms
  • A routing algorithm decides which output link an
    incoming packet should be transmitted on
  • A routing table contains the mappings from the
    networks and host addresses to output ports on
    the router
  • The routing algorithm builds this table

4
Forwarding
  • A forwarding algorithm performs the lookup of
    address to output port
  • In connection-oriented service, the forwarding
    algorithm is performed by switches and only
    during connection setup
  • In connectionless service, the forwarding
    algorithm is performed by routers every time a
    packet arrives

5
Example Routing Table
  • remus/ug/u1/rmartinnetstat -rn
  • Routing Table
  • Destination Gateway Flags
    Ref Use Interface
  • -------------------- -------------------- -----
    ----- ------ --------
  • 128.6.13.0 128.6.13.3 U
    3 4259 hme0
  • 224.0.0.0 128.6.13.3 U
    3 0 hme0
  • default 128.6.13.21 UG
    02184931
  • 127.0.0.1 127.0.0.1 UH
    0 346400 lo0

6
Routing Algorithms
  • Two types of routing algorithms
  • Non-Adaptive Routing Algorithms
  • Adaptive Routing Algorithms
  • Hierarchical Routing is used to make these
    algorithms scale to large networks

7
Non-Adaptive Routing Algorithms
  • Non-adaptive routing algorithms do not base their
    routing decisions on the current state of the
    network
  • Examples
  • Flooding
  • Shortest Path Routing

8
Flooding Algorithm
  • Every incoming packet is sent out on every
    outgoing line except the one it arrived on
  • No routing table, no lookup!
  • Problem Vast number of duplicated packets

9
Reducing Flooding Algorithms Duplicate Packets
  • Solution 1 Hop counter
  • Have a hop counter in the packet header
  • Routers decrement each arriving packets hop
    counter
  • Routers discard a packet with hop count0
  • Ideally, the hop counter should be initialized to
    the length of the path from the source to the
    destination
  • Hop count defines the Horizon of the packet,
    which is how far a node can see.

10
Reducing Flooding Algorithms Duplicate Packets
(contd)
  • Solution 2 Sequence Numbers
  • Require the first router hop to put a sequence
    number in each packet it receives from its hosts
  • Each router maintains a table listing the
    sequence numbers it has seen from each first-hop
    router. The router can then discard packets it
    has already seen.

11
Flooding Uses
  • Used in small networks or limited horizon
  • order 100s of nodes
  • Military A pplications
  • Large number of routers is desirable
  • If one router is taken out (by a bomb?) flooding
    will still get packets to their destinations
  • Distributed Databases
  • Simultaneous updates of multiple databases can be
    done with a single packet transmission
  • Gnutella search is an example, uses horizon

12
Shortest Path Routing
  • For a pair of communicating hosts, there is a
    shortest path between them
  • Shortness may be defined by
  • Number of router/switch hops
  • Geographic distance
  • Link delay

13
Shortest Path
What is the shortest path between A and F?
2
B
3
4
D
F
1
A
2
2
1
C
E
3
Edge Weight (Distance)
14
Computing the Shortest Path
  • Dijkstras Shortest Path Algorithm
  • Step 1 Draw nodes as circles. Fill in a circle
    to mark it as a permanent node.
  • Step 2 Set the current node equal to the source
    node
  • Step 3 For the current node
  • Mark the cumulative distance from the current
    node to each non-permanent adjacent node. Also
    mark the name of the current node. Erase this
    marking if the adjacent node already has a
    shorter cumulative distance marked
  • Mark the non-permanent node with the shortest
    listed cumulative distance as permanent and set
    the current node equal to it. Repeat step 3
    until all nodes are marked permanent.

15
Dijskstras Shortest Path AlgorithmExample
7
B
C
2
3
2
3
2
A
E
F
D
1
2
2
4
4
G
H
16
Dijskstras Shortest Path AlgorithmExample
7
B
C
2
3
2
3
2
A
E
F
D
1
2
2
6
4
G
H
17
Dijskstras Shortest Path AlgorithmExample
7
B
C
2
3
2
3
2
A
E
F
D
1
2
2
6
4
G
H
18
Dijskstras Shortest Path AlgorithmExample
7
B
C
2
3
2
3
2
A
E
F
D
1
2
2
6
4
G
H
Selected edge
Candidate edge
Not visited
19
Dijskstras Shortest Path AlgorithmExample
7
B
C
2
3
2
3
2
A
E
F
D
1
2
2
6
4
G
H
20
Dijkstras Algorithm
21
Shortest Path Routing (contd)
  • Non-adaptive, if
  • geographical distances are used as edge weights
  • maximum link throughputs are used as edge weights
  • Number of IMP hops are used as edge weights

22
Adaptive Routing Algorithms
  • Problems with non-adaptive algorithms
  • If traffic levels in different parts of the
    subnet change dramatically and often,
    non-adaptive routing algorithms are unable to
    cope with these changes
  • Lots of computer traffic is bursty, but
    non-adaptive routing algorithms are usually based
    on average traffic conditions
  • Adaptive routing algorithms can deal with these
    situations

23
Adaptive Routing Algorithms (contd)
  • Three Types
  • Centralized Adaptive Routing
  • Isolated Adaptive Routing
  • Distributed Adaptive Routing

24
Centralized Adaptive Routing
  • Routing table adapts to network traffic
  • A routing control center is somewhere in the
    network
  • Periodically, each router forwards link status
    information to the control center
  • The center can, with Dijkstras shortest path
    algorithm, compute the best routes
  • Best routes are dispatched to each router

25
Problem with Centralized Algorithms
  • Vulnerability
  • If the control center goes down, routing becomes
    non-adaptive
  • Scalability
  • The control center must handle a great deal of
    routing information, especially for larger
    networks

26
Isolated Adaptive Routing Algorithms
  • Routing decisions are made only on the basis of
    information available locally in each router
  • Examples
  • Hot Potato
  • Backward Learning

27
Hot Potato Routing
  • When a packet arrives, the router tries to get
    rid of it as fast as it can by putting it on the
    output line that has the shortest queue
  • Hot potato does not care where the output line
    leads
  • Not very effective

28
Backward Learning Routing
  • Packet headers include destination and source
    addresses. They also include a hop counter
  • Network nodes, initially ignorant of network
    topology, acquire knowledge of the network state
    as packets are handled

29
Backward Learning
  • Algorithm
  • Routing is originally random
  • A packet with a hop count of one is from a
    directly connected node thus, neighboring nodes
    are identified with their connecting links
  • A packet with a hop count of two is from a source
    two hops away, etc.
  • As packets arrive, the router compares the hop
    count for a given source address with the minimum
    hop count already registered if the new one is
    less, it is substituted for the previous one

30
Distributed Routing Algorithms
  • Each router periodically exchanges routing
    information (e.g., estimated time delay, queue
    length, etc.) with its neighbors
  • Examples
  • Distance Vector Routing
  • Link State Routing

31
Distance Vectors
  • Each router maintains lists of best-known
    distances to all other known routers. These
    lists are called vectors.
  • Each router is assumed to know the exact distance
    (in delay, hop count, etc.) to other routers
    directly connected to it.
  • Periodically, vectors are exchanged between
    adjacent routers, and each router updates its
    vectors.

32
Distance Vectors (contd)
33
Convergence Speed
  • Supposed all routers know the current state of
    the network
  • Next, a change in link-status happens
  • How fast the routers learn new state of the
    network is the convergence speed

34
Problem Count-to-Infinity
  • With distance vector routing, links coming on
    line converge quickly but link failures converge
    slowly
  • This problem for DV routing algorithms is call
    count-to-infinity

35
Count-to-Infinity
A
B
C
D
E
1
2
3
4
Initially
3
2
3
4
After 1 exchange
3
4
3
4
After 2 exchanges
5
4
5
4
After 3 exchanges
5
6
5
6
After 4 exchanges
7
6
7
6
After 5 exchanges
etc to infinity
36
Split Horizon
  • Insight Its not useful to claim reachablility
    for a destination to the neighbor from which the
    route was learned
  • Dont report routes back to node from which the
    route was learned
  • E.g. If I hear from X has the shortest route to
    Y, dont report to X I have a route to Y

37
Poison Reverse
  • Not reporting a route means having to wait for a
    timeout
  • Report split-horizon routes as infinity to
    break loops on the first routing exchange.

38
Split Horizon with Poisoned Reverse
A
B
C
D
E
inf.
2
3
4
B learns A is dead
C reports to B that As metric is inf.
inf.
inf.
2
3
4
inf.
inf.
3
4
After 1 exchange
inf.
inf.
inf.
4
After 2 exchanges
inf.
inf.
inf.
inf.
After 3 exchanges
39
Split Horizon Failure
B
A
If D goes down, A and B will still count to
infinity. Split-Horizon infinity messages are
sent from A-C and B-C, not AB
C
D
40
Link State Routing
  • Each router measures the distance (in delay, hop
    count, etc.) between itself and its adjacent
    routers
  • The router builds a packet containing all these
    distances. The packet also contains a sequence
    number and an age field.
  • Each router distributes these packets using
    flooding
  • Each router builds map of the entire network,
    uses a shortest-path algorithm

41
Link State Routing (contd)
  • To control flooding, the sequence numbers are
    used by routers to discard flood packets they
    have already seen from a given router
  • The age field in the packet is an expiration
    date. It specifies how long the information in
    the packet is good for.
  • Once a router receives all the link state packets
    from the network, it can reconstruct the complete
    topology and compute a shortest path between
    itself and any other node using Dijsktras
    algorithm.

42
Hierarchical Routing
  • All routing algorithms have difficulties as the
    network becomes large
  • For large networks, the routing tables grow very
    quickly, and so does the number of flood packets
  • How can this be reduced? Hierarchical routing

43
Hierarchical Routing (contd)
  • Segment the network into regions
  • Routers in a single region know all the details
    about other routers in that region, but none of
    the details about routers in other regions
  • Analogy Telephone area codes

44
Hierarchical Routing (contd)
45
RIP
  • Route Information Protocol
  • One of the routing algorithms used by the
    Internet
  • Based on distance vector routing
  • Did not scale well
  • suffered the count-to-infinity problem
  • weak security
  • RIP is phased out for large backbones
  • but still widely used for smaller networks

46
OSPF
  • Open Shortest Path First
  • Routing algorithm now used in the Internet
  • OSPF uses the Link State Routing algorithm with
    modifications to support
  • Multiple distance metrics (geographical distance,
    delay, throughput)
  • Support for real-time traffic
  • Hierarchical routing
  • Security

47
OSPF (contd)
  • OSPF divides the network into several
    hierarchies
  • Autonomous Systems (ASs)
  • groups of subnets
  • Areas
  • Groups of routers within an AS
  • Backbone Areas
  • Groups of routers that connect other areas
    together

48
OSPF (contd)
Autonomous System
Backbone Area
Area
Area
Autonomous System
Area
Backbone Area
Area
Area
49
OSPF (contd)
  • Routers are distinguished by the functions they
    perform
  • Internal routers
  • Only route packets within one area
  • Area border routers
  • Connect to areas together
  • Backbone routers
  • Reside only in the backbone area
  • AS boundary routers
  • Routers that connect to a router outside the AS

50
OSPF Modified Link State Routing
  • Recall
  • In link state routing, routers flood their
    routing information to all other routers in the
    network
  • In OSPF, routers only send their information to
    adjacent routers, not to all routers.
  • Adjacent does NOT mean nearest-neighbor in OSPF
  • One router in each area is marked as the
    designated router
  • Designated routers are considered adjacent to all
    other routers in the area
  • OSPF combines link state routing with centralized
    adaptive routing

51
OSPF Adjacency
Designated Router
To backbone area
F
B
D
A
Area
E
C
Example C is adjacent to B but not to A or E B
is adjacent to all routers in the area
52
Mobile Routing
  • How to deal with mobile computers?
  • Want a single network address to route to a
    single computer, wherever it is.
  • Example Cell phone number allways contacts a
    single device, even when changing access points.

53
Motivating Mobility
Radio Media M is a mobile host
2
B
3
4
D
F
1
A
2
2
1
C
E
3
M
54
Motivating Mobility
Radio Media M is a mobile host Now M can only
contact C Update all routing tables?
2
B
3
4
D
F
1
A
2
2
1
C
E
3
M
55
Mobility Solutions
  • Home agent
  • Keeps track of a Mobiles position in fixed
    network
  • Serves as the contact point for M
  • Foreign agent
  • Record all mobile agents in area.
  • Act as mobiles representative in local area
  • Tunneling Sending a layer N(3) packet in layer
    N.

56
Mobility Example
  • Mobile broadcasts to find foreign agent

S
4
(2) Mobile registers withforeign agent
H
3
F
(3) Foreign and Home agents authenticate
1,2
M
(4)Traffic from S to M routed to H and tunneled
through HF
Write a Comment
User Comments (0)
About PowerShow.com