Docsity

Network Layer (Routing), Summaries of Network Design

Partial preview of the text

Download Network Layer (Routing) and more Summaries Network Design in PDF only on Docsity!

Network Layer (Routing)

Topics

  • Network service models
    • Datagrams (packets), virtual circuits
  • IP (Internet Protocol)
    • Internetworking
    • Forwarding (Longest Matching Prefix)
    • Helpers: ARP and DHCP
    • Fragmentation and MTU discovery
    • Errors: ICMP (traceroute!)
    • IPv6, scaling IP to the world
    • NAT, and “middleboxs”
  • Routing Algorithms

Dijkstra’s Algorithm

Algorithm:

  • Mark all nodes tentative, set distances from source to 0

(zero) for source, and ∞ (infinity) for all other nodes

  • While tentative nodes remain:
    • Extract N, a node not yet on the tree with lowest distance
    • Add link to N to the shortest path tree
    • Relax the distances of neighbors of N by lowering any better

distance estimates

Dijkstra’s Algorithm (2)

  • Initialization A B C
D
E
F
G
H

2 1 10 2 2 4 2 4 4 3 3 3

∞ ∞ ∞ ∞ ∞ ∞ We’ll compute shortest paths from A ∞

Dijkstra’s Algorithm (4)

  • Relax around B A B C
D
E
F
G
H

2 1 10 2 2 4 2 4 4 3 3 3

∞

Distance fell! 6

∞

Dijkstra’s Algorithm (5)

  • Relax around C A B C
D
E
F
G
H

2 1 10 2 2 4 2 4 4 3 3 3

Distance fell again! 6

Dijkstra’s Algorithm (7)

  • Relax around F (say) A B C
D
E
F
G
H

2 1 10 2 2 4 2 4 4 3 3 3

Relax has no effect 6

Dijkstra’s Algorithm (8)

  • Relax around E A B C
D
E
F
G
H

2 1 10 2 2 4 2 4 4 3 3 3

Dijkstra’s Algorithm (10)

  • Finally, H … done A B C
D
E
F
G
H

2 1 10 2 2 4 2 4 4 3 3 3

Dijkstra Comments

  • Finds shortest paths in order of increasing distance

from source

  • Leverages optimality property
  • Runtime depends on cost of extracting min-cost node
  • Superlinear in network size (grows fast)
  • Gives complete source/sink tree
  • More than needed for forwarding!
  • But requires complete topology

Distance Vector Routing

  • Simple, early routing approach
    • Used in ARPANET, and RIP
  • One of two main approaches to routing
    • Distributed version of Bellman-Ford
    • Works, but very slow convergence after some failures
  • Link-state algorithms are now typically used in practice
    • More involved, better behavior

Distance Vector Setting

Each node computes its forwarding table in a distributed setting:

  1. Nodes know only the cost to their neighbors; not topology
  2. Nodes can talk only to their directly connected neighbors
  3. All nodes run the same algorithm concurrently
  4. Nodes and links may fail, messages may be lost

Distance Vector (2)

  • Consider from the point of view of node A
    • Can talk only with nodes B and E A B C
D
E
F
G
H

2 1 10 2 2 4 2 4 4 3 3 3 To Cost A 0 B ∞ C ∞ D ∞ E ∞ F ∞ G ∞ H ∞ Initial vector

Distance Vector (3)

  • First exchange with B, E; learn best 1-hop routes 20
A B
C
D
E
F
G
H

2 1 10 2 2 4 2 4 4 3 3 3 A’s Cost A’s Next 0 -- 4 B ∞ -- ∞ -- 10 E ∞ -- ∞ -- ∞ -- To B says E says A ∞ ∞ B 0 ∞ C ∞ ∞ D ∞ ∞ E ∞ 0 F ∞ ∞ G ∞ ∞ H ∞ ∞ **B

E +** ∞ ∞ 4 ∞ ∞ ∞ ∞ ∞ ∞ 10 ∞ ∞ ∞ ∞ ∞ ∞ Learned better route