cs 352 internet technology routing n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CS 352 Internet Technology Routing PowerPoint Presentation
Download Presentation
CS 352 Internet Technology Routing

Loading in 2 Seconds...

play fullscreen
1 / 56

CS 352 Internet Technology Routing - PowerPoint PPT Presentation


  • 95 Views
  • Uploaded on

CS 352 Internet Technology Routing. Richard Martin Dept. of Computer Science Rutgers University. www.btechebooks4u.blogspot.com. Forwarding vs Routing. Routing is the decision which path to take Forwarding is the lookup once the decision has been made

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CS 352 Internet Technology Routing' - diata


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cs 352 internet technology routing

CS 352Internet TechnologyRouting

Richard Martin

Dept. of Computer Science

Rutgers University

www.btechebooks4u.blogspot.com

forwarding vs routing
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

www.btechebooks4u.blogspot.com

routing algorithms
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”

www.btechebooks4u.blogspot.com

forwarding
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

www.btechebooks4u.blogspot.com

example routing table
Example Routing Table

remus:/ug/u1/rmartin%netstat -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

www.btechebooks4u.blogspot.com

routing algorithms1
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

www.btechebooks4u.blogspot.com

non adaptive routing algorithms
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

www.btechebooks4u.blogspot.com

flooding algorithm
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
reducing flooding algorithm s duplicate packets
Reducing Flooding Algorithm’s Duplicate Packets
  • Solution 1: Hop counter
    • Have a hop counter in the packet header
    • Routers decrement each arriving packet’s hop counter
    • Routers discard a packet with hop count=0
    • 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”.

www.btechebooks4u.blogspot.com

reducing flooding algorithm s duplicate packets cont d
Reducing Flooding Algorithm’s Duplicate Packets (cont’d)
  • 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.

www.btechebooks4u.blogspot.com

flooding uses
Flooding Uses
  • Used in small networks or limited horizon
    • order 100’s 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

www.btechebooks4u.blogspot.com

shortest path routing
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
shortest path
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)

www.btechebooks4u.blogspot.com

computing the shortest path
Computing the Shortest Path
  • Dijkstra’s 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.
dijskstra s shortest path algorithm example

Selected edge

Candidate edge

Not visited

Dijskstra’s Shortest Path AlgorithmExample

7

B

C

2

3

2

3

2

A

E

F

D

1

2

2

4

4

G

H

www.btechebooks4u.blogspot.com

dijskstra s shortest path algorithm example1

Selected edge

Candidate edge

Not visited

Dijskstra’s Shortest Path AlgorithmExample

7

B

C

2

3

2

3

2

A

E

F

D

1

2

2

6

4

G

H

dijskstra s shortest path algorithm example2

Selected edge

Candidate edge

Not visited

Dijskstra’s Shortest Path AlgorithmExample

7

B

C

2

3

2

3

2

A

E

F

D

1

2

2

6

4

G

H

www.btechebooks4u.blogspot.com

dijskstra s shortest path algorithm example3
Dijskstra’s 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

dijskstra s shortest path algorithm example4

Selected edge

Candidate edge

Not visited

Dijskstra’s Shortest Path AlgorithmExample

7

B

C

2

3

2

3

2

A

E

F

D

1

2

2

6

4

G

H

www.btechebooks4u.blogspot.com

shortest path routing cont d
Shortest Path Routing (cont’d)
  • 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

www.btechebooks4u.blogspot.com

adaptive routing algorithms
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
adaptive routing algorithms cont d
Adaptive Routing Algorithms(cont’d)
  • Three Types:
    • Centralized Adaptive Routing
    • Isolated Adaptive Routing
    • Distributed Adaptive Routing

www.btechebooks4u.blogspot.com

centralized adaptive routing
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 Dijkstra’s shortest path algorithm, compute the best routes
  • Best routes are dispatched to each router

www.btechebooks4u.blogspot.com

problem with centralized algorithms
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
isolated adaptive routing algorithms
Isolated Adaptive Routing Algorithms
  • Routing decisions are made only on the basis of information available locally in each router
  • Examples:
    • Hot Potato
    • Backward Learning

www.btechebooks4u.blogspot.com

hot potato routing
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

www.btechebooks4u.blogspot.com

backward learning routing
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

www.btechebooks4u.blogspot.com

backward learning
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
distributed routing algorithms
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

www.btechebooks4u.blogspot.com

distance vectors
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.

www.btechebooks4u.blogspot.com

convergence speed
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

www.btechebooks4u.blogspot.com

problem count to infinity
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”
count to infinity
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

www.btechebooks4u.blogspot.com

split horizon
Split Horizon
  • Insight: It’s not useful to claim reachablility for a destination to the neighbor from which the route was learned
  • Don’t report routes back to node from which the route was learned
    • E.g. If I hear from X has the shortest route to Y, don’t report to X I have a route to Y

www.btechebooks4u.blogspot.com

poison reverse
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.

www.btechebooks4u.blogspot.com

split horizon with poisoned reverse
Split Horizon with Poisoned Reverse

A

B

C

D

E

inf.

2

3

4

B learns A is dead

C reports to B that A’s 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

split horizon failure
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 A<->B

C

D

www.btechebooks4u.blogspot.com

link state routing
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
link state routing cont d
Link State Routing (cont’d)
  • 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 Dijsktra’s algorithm.

www.btechebooks4u.blogspot.com

hierarchical routing
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
hierarchical routing cont d
Hierarchical Routing (cont’d)
  • 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

www.btechebooks4u.blogspot.com

hierarchical routing cont d1
Hierarchical Routing (cont’d)

www.btechebooks4u.blogspot.com

slide45
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

www.btechebooks4u.blogspot.com

slide46
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
ospf cont d
OSPF (cont’d)
  • OSPF divides the network into several hierarchies:
    • Autonomous Systems (AS’s)
      • groups of subnets
    • Areas
      • Groups of routers within an AS
    • Backbone Areas
      • Groups of routers that connect other areas together

www.btechebooks4u.blogspot.com

ospf cont d1
OSPF (cont’d)

Autonomous System

Backbone

Area

Area

Area

Autonomous System

Area

Backbone

Area

Area

Area

ospf cont d2
OSPF (cont’d)
  • 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

www.btechebooks4u.blogspot.com

ospf modified link state routing
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
ospf adjacency
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

www.btechebooks4u.blogspot.com

mobile routing
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.
motivating mobility
Motivating Mobility

Radio Media

M is a mobile host

2

B

3

4

D

F

1

A

2

2

1

C

E

3

M

www.btechebooks4u.blogspot.com

motivating mobility1
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

mobility solutions
Mobility Solutions
  • Home agent:
    • Keeps track of a Mobile’s position in fixed network
    • Serves as the contact point for M
  • Foreign agent:
    • Record all mobile agents in area.
    • Act as mobile’s representative in local area
  • Tunneling: Sending a layer N(3) packet in layer N.

www.btechebooks4u.blogspot.com

mobility example
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 H<->F

www.btechebooks4u.blogspot.com