13
EECS 161 - Introduction to Computer Networking Scott Jordan Internet / Routing UCI University of California, Irvine Open Shortest Path First (OSPF): General Idea: Part (A): Within a small network called an "Autonomous System" (AS), each router sends their address and an estimate of delays on outgoing links to all their neighbors. Each router also forwards information received to all outgoing links not equal to incoming link, subject to a maximum number of hops -- "flooding" Part (B): Each router uses the information it obtains, and an algorithm to find the shortest path to each possible destination in the network.

Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

Open Shortest Path First (OSPF):

General Idea:

Part (A):

Within a small network called an "Autonomous System" (AS), each router sends their address and an estimate of delays on outgoing links to all their neighbors.

Each router also forwards information received to all outgoing links not equal to incoming link, subject to a maximum number of hops -- "flooding"

Part (B):

Each router uses the information it obtains, and an algorithm to find the shortest path to each possible destination in the network.

Page 2: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

Part (A) in more detail:

A router estimates delay to all adjacent routers, e.g. queueing time + transmit time + propagation time.

The router sends this information to all adjacent routers as a message:

When a router receives a message, if it is new it

- updates its information.- copies the message to all adjacent routers (other than incoming link).

source msg. # link 1 delay 1 ... link m delay m

Page 3: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

Part (B) in more detail:Explore links from each router & keep track of best routes found so far.

IP : OSPF (1/8)

3

46

3

1

1 4

1

1

8

Source

3

460

3

1

4

2

6

7

3

1

1 4

1

1

8

Tree of shortest paths from souceto other nodes

Link length

Minimum distance fromsource to that node

Link along shortest path

from source to node

Link not along shortest

path from source to node

Page 4: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

IP : OSPF (2/8)

3

46

3

1

1 4

1

1

8

Source

Destination

3

5

460

3

1

6

3

1

1 4

1

1

8

Algorithm:• Initial label = infinity for all nodes, 0 for source; nodes unmarked• Pick umarked node with smallest label [here: source]• Update its children and mark it; mark/unmark shortest path links

[Here: three nodes are updated (3, 6, 1), their links are marked.]

Page 5: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

IP : OSPF (3/8)

3

5

460

3

1

6

3

1

1 4

1

1

8

3

460

3

1

5

2

3

1

1 4

1

1

8

Algorithm:• Initial label = infinity for all nodes, 0 for source; source marked• Pick umarked node with smallest label [node with label 1]• Update its children and mark it; mark/unmark shortest path links

[nodes with label 5: umark link from source, mark link 1-5]

Page 6: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

IP : OSPF (4/8)

3

460

3

1

5

2

3

1

1 4

1

1

8

3

460

3

1

5

2

10

3

1

1 4

1

1

8

Algorithm:• Initial label = infinity for all nodes, 0 for source; source marked• Pick umarked node with smallest label [node with label 2]• Update its children and mark it; mark/unmark shortest path links

[label 10, mark links 2-10]

Page 7: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

IP : OSPF (5/8)

3

460

3

1

5

2

10

3

1

1 4

1

1

8

3

460

3

1

4

2

6

10

3

1

1 4

1

1

8

Algorithm:• Initial label = infinity for all nodes, 0 for source; source marked• Pick umarked node with smallest label [node with label 3]• Update its children and mark it; mark/unmark shortest path links [update node from label 5 to 4, umark old link, mark new one]

Page 8: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

IP : OSPF (6/8)

3

460

3

1

4

2

6

10

3

1

1 4

1

1

8

3

460

3

1

4

2

6

8

3

1

1 4

1

1

8

Algorithm:• Initial label = infinity for all nodes, 0 for source; source marked• Pick umarked node with smallest label [node with label 4]• Update its children and mark it; mark/unmark shortest path links

[update label from 10 to 8, unmark/mark link]

Page 9: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

IP : OSPF (7/8)

3

460

3

1

4

2

6

8

3

1

1 4

1

1

8

3

460

3

1

4

2

6

7

3

1

1 4

1

1

8

Algorithm:• Initial label = infinity for all nodes, 0 for source; source marked• Pick umarked node with smallest label• Update its children and mark it; mark/unmark shortest path links

Page 10: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

(typo - the link from 2 to 7 should not be marked)

IP : OSPF (8/8)

3

460

3

1

4

2

6

7

3

1

1 4

1

1

8

3

460

3

1

4

2

6

7

3

1

1 4

1

1

8

Algorithm:• Initial label = infinity for all nodes, 0 for source; source marked• Pick umarked node with smallest label• Update its children and mark it; mark/unmark shortest path links

Page 11: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

Border Gateway Protocol (BGP):

Each router has to know about all other routers in the Internet?No - use "hierarchical routing"

- Use OSPF within each AS, e.g. to get from S to UCI’s gateway to calren2.net.- Use BGP to determine the sequence of autonomous systems from S to D.

uci.edu

SR R G

calren2.net

R RR G

cenic.net

RR

R

GR

R

ucaid.edu

GRGRD

nox.org

mit.edu

Page 12: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

BGP:

Part (A):

Exchange preferred routes with adjacent autonomous systems. Send message [route,delay] for each destination AS to each adjacent AS.

Page 13: Open Shortest Path First (OSPF) - University of California ...sjordan/courses/eecs148/visuals/lec16.pdf · Open Shortest Path First (OSPF): General Idea: Part (A): Within a small

EECS 161 - Introduction to Computer Networking Scott Jordan

Internet / RoutingUCIUniversity of California, Irvine

Part (B):

(Tanenbaum, fig. 5-55)

Example: F to D- eliminate routes that include you (I,E)- eliminate routes that violate policies- among remaining, choose shortest path

Policies may include economic arrangements between autonomous systems.