Data Link Layer Data Link Layer Home network Regional ISP Yanmin - - PowerPoint PPT Presentation

data link layer data link layer
SMART_READER_LITE
LIVE PREVIEW

Data Link Layer Data Link Layer Home network Regional ISP Yanmin - - PowerPoint PPT Presentation

Network Layer Network Layer Mobile network Gl b l Global ISP P Data Link Layer Data Link Layer Home network Regional ISP Yanmin Zhu Institutional network D p Department of Computer tm t f C mp t Science and Engineering 1 Network


slide-1
SLIDE 1

Network Layer Network Layer

Mobile network Gl b l P Global ISP

Data Link Layer

Home network Regional ISP

Data Link Layer

Institutional network

Yanmin Zhu D p tm t f C mp t Department of Computer Science and Engineering

Network Layer 1

slide-2
SLIDE 2

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-2

slide-3
SLIDE 3

Network Layer Network Layer

Interplay between routing, forwarding

ti l ith routing algorithm local forwarding table header value output link

0100 0101 0111 3 2 2

value in arriving

1001 1

1

0111

value in arriving packet’s header 2 3

Network Layer 4-3

slide-4
SLIDE 4

Network Layer Network Layer

Graph abstraction

5

Graph abstraction

w v

2 5 3 5

u y

x z 2 1 3 1 1 2 Graph: G = (N E) 1 Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) } Remark: Graph abstraction is useful in other network contexts Example: P2P, where N is set of peers and E is set of TCP connections

Network Layer 4-4

Example: P2P, where N is set of peers and E is set of TCP connections

slide-5
SLIDE 5

Network Layer Network Layer

Graph abstraction: costs Graph abstraction: costs

5

w v

2 5 3 5

  • c(x,x’) = cost of link (x,x’)
  • e.g., c(w,z) = 5

u y

x z 2 2 1 3 1 2 e.g., c(w,z) 5

  • cost could always be 1, or

inversely related to bandwidth

y

1 inversely related to bandwidth,

  • r inversely related to

congestion Cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp) Q ti Wh t’ th l t t th b t d ? Question: What’s the least-cost path between u and z ? Routing algorithm: algorithm that finds least-cost path

Network Layer 4-5

slide-6
SLIDE 6

Network Layer Network Layer

Routin Al orithm classification Routing Algorithm classification

Global or decentralized

Static or dynamic?

G o a or c ntra z information?

Global:

Static or dynamic?

Static:

 routes change slowly

 all routers have complete

topology, link cost info

 “link state” algorithms

 routes change slowly

  • ver time

Dynamic:

link state algorithms Decentralized:

 router knows physically-

Dynamic:

 routes change more

quickly

p y y connected neighbors, link costs to neighbors

 iterative process of

q y

 periodic update  in response to link

 iterative process of

computation, exchange of info with neighbors “di t t ” l ith

n response to l nk cost changes

Network Layer 4-6

 “distance vector” algorithms

slide-7
SLIDE 7

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-7

slide-8
SLIDE 8

Network Layer Network Layer

Link State: Big Picture Link-State: Big Picture

E h d

 Each node

measures

5

cost to every neighbor

w v

5 3

 Each node

sends table

u

z 2 2 3 1 5

  • f neighbors

to all nodes

y

x 1 3 2

 Every node

computes

y

x 1

computes routing path

Introduction 1-8

slide-9
SLIDE 9

Network Layer Network Layer

A Link State Routin Al orithm A Link-State Routing Algorithm

Dijk ’ l i h N i Dijkstra’s algorithm

 net topology, link costs

known to all nodes

Notation:

 c(x,y): link cost from node x to y; = if not direct known to all nodes

 accomplished via “link

state broadcast” x to y; = ∞ if not direct neighbors  D(v): current value of cost

 all nodes have same info

 computes least cost paths

from one node (‘source”) to  D(v): current value of cost

  • f path from source to
  • dest. v

( )

d d from one node ( source ) to all other nodes

 gives forwarding table

f th t d  p(v): predecessor node along path from source to v  N': set of nodes whose for that node

 iterative: after k

iterations, know least cost  N : set of nodes whose least cost path definitively known

Network Layer 4-9

, path to k dest.’s

slide-10
SLIDE 10

Network Layer Network Layer

Dijsktra’s Al orithm Dijsktra s Algorithm

1 Initialization: 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) ( ) ( ( ) ( ) ( ) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N'

Network Layer 4-10

15 until all nodes in N

slide-11
SLIDE 11

Network Layer Network Layer

Dijkstra’s al orithm: example Dijkstra s algorithm: example

Step N' D(v) p(v) D(w) p(w) D(x) p(x) D(y) p(y) D(z) p(z) Step 1 2 N u ux D(v),p(v) 2,u 2,u 2 D(w),p(w) 5,u 4,x 3 D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z)

∞ ∞

2 3 4 uxy uxyv uxyvw 2,u 3,y 3,y 4,y 4,y 4 y 5 uxyvwz 4,y 5

w v

2 5 3 5

u y

x z 2 1 3 1 2

Network Layer 4-11

y

1

slide-12
SLIDE 12

Network Layer Network Layer

Dijkstra’s al orithm: example (2) Dijkstra s algorithm: example (2)

Resulting shortest-path tree from u:

w v u y

x z

y

Resulting forwarding table in u: v (u,v) ( ) destination link x y w (u,x) (u,x) (u x)

Network Layer 4-12

w z (u,x) (u,x)

slide-13
SLIDE 13

Network Layer Network Layer

Dijkstra’s al orithm discussion Dijkstra s algorithm, discussion

Algorithm complexity: n nodes g p y

 each iteration: need to check all nodes, w, not in N  n(n+1)/2 comparisons: O(n2)  more efficient implementations possible: O(nlogn)

Oscillations possible: p

 e.g., link cost = amount of carried traffic

A D C B

1 1+e e

A D B

2+e 1+e 1

A D B

2+e 1+ 1 0 0

A D B

2+e e 1+e 1

C

e e 1 1

C C

1+e 1

C

e

initially … recompute … recompute … recompute

Network Layer 4-13

initially routing

slide-14
SLIDE 14

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-14

slide-15
SLIDE 15

Network Layer Network Layer

Distance Vector: Rational Distance Vector: Rational

B ll F d E (d ) Bellman-Ford Equation (dynamic programming) Define dx(y) := cost of least-cost path from x to y Then dx(y) = min {c(x,v) + dv(y) }

x y v y

where min is taken over all neighbors v of x

v

Network Layer 4-15

where min is taken over all neighbors v of x

slide-16
SLIDE 16

Network Layer Network Layer

Bellman Ford example Bellman-Ford example

5

w v

2 5 3 5

Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3

u y

x z 2 1 3 1 2

du(z) = min { c(u,v) + dv(z), B-F equation says:

y

1

c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5 = min {2 + 5, 1 + 3, 5 + 3} = 4 } Node that achieves minimum is next hop in shortest path ➜ forwarding table

Network Layer 4-16

hop in shortest path ➜ forwarding table

slide-17
SLIDE 17

Network Layer Network Layer

Distance Vector: Big Picture Distance Vector: Big Picture

5

v’s u’s distance vector

w v

5 3 5

dest cost next hop

v s

u

z 2 2 3 1 5

p v 2 v

y

x 1 3 1 2

x 1 x i f

1

w inf

  • y

inf

  • des

t cos t next hop des t cos t next hop des t cos t next hop

y inf

  • z

inf

  • V

x w y v x w y u 2 U x 2 X w 3 W y Inf

  • Network Layer

4-17

f

z z z Inf

  • v’s

x’s w’s

slide-18
SLIDE 18

Network Layer Network Layer

Distance Vector Algorithm Distance Vector Algorithm

D ( ) f l f

 Dx(y) = estimate of least cost from x to y  Node x knows cost to each neighbor v:

g c(x,v)

 Node x maintains distance vector Dx =  Node x maintains distance vector Dx

[Dx(y): y є N ]

 Node x also maintains its neighbors’  Node x also maintains its neighbors

distance vectors

 For each neighbor v x maintains  For each neighbor v, x maintains

Dv = [Dv(y): y є N ]

Network Layer 4-18

slide-19
SLIDE 19

Network Layer Network Layer

Distance vector algorithm (4) Distance vector algorithm (4)

B i id Basic idea:

 From time-to-time, each node sends its own

distance vector estimate to neighbors distance vector estimate to neighbors

 Asynchronous  When a node x receives new DV estimate from  When a node x receives new DV estimate from

neighbor, it updates its own DV using B-F equation: Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N

x(y) v{ ( , ) v(y)}

f y

 Under minor, natural conditions, the estimate Dx(y)

converge to the actual least cost d (y) converge to the actual least cost dx(y)

Network Layer 4-19

slide-20
SLIDE 20

Network Layer Network Layer

Dist n V t Al ithm (5) Distance Vector Algorithm (5)

Iterative, asynchronous: Each node: , y

each local iteration caused by:

 local link cost change

wait for (change in local Each node

 local link cost change  DV update message from

neighbor

wait for (change in local

link cost or msg from neighbor)

Distributed:

 each node notifies

i hb l h i DV

recompute estimates

neighbors only when its DV changes

 neighbors then notify

p

if DV to any dest has

g y their neighbors if necessary

if DV to any dest has changed, notify neighbors

Network Layer 4-20

slide-21
SLIDE 21

Network Layer Network Layer

node x table Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 7+0} = 3 x y z cost to x y z cost to node x table = min{2+1 , 7+0} = 3 x y z 0 2 7 ∞ ∞ ∞ ∞ ∞ ∞ from x y z from 2 0 1 7 1 0 3 2 ∞ ∞ ∞ x y z cost to 7 1 0 1 2

y

node y table from x y z ∞ ∞ ∞ ∞ ∞ ∞ 2 0 1

x

z 1 2 7 z ∞ ∞ ∞ x y z cost to node z table from x y z x y ∞ ∞ ∞ ∞ ∞ ∞

Network Layer 4-21

z 7 1 time

slide-22
SLIDE 22

Network Layer Network Layer

node x table Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 7+0} = 3 x y z cost to x y z cost to x y z cost to node x table = min{2+1 , 7+0} = 3 x y z 0 2 7 ∞ ∞ ∞ ∞ ∞ ∞ from x y z 0 2 3 from x y z 0 2 3 from 2 0 1 7 1 0 2 0 1 3 1 0 ∞ ∞ ∞ z x y z cost to x y z cost to x y z cost to 7 1 0 3 1 0 1 2

y

node y table from x y z ∞ ∞ ∞ ∞ ∞ x y z 0 2 7 from y x y z 0 2 3 from ∞ 2 0 1 2 0 1 7 1 0 2 0 1 3 1 0

x

z 1 2 7 z ∞ ∞ ∞ z z x y z cost to x y z cost to x y z cost to 7 1 0 3 1 0 node z table from x y z 0 2 3 from x y z 0 2 7 from x y z x y ∞ ∞ ∞ ∞ ∞ ∞ 2 0 1 3 1 0 3 1 0 2 0 1

Network Layer 4-22

z z z 7 1 3 1 0 3 1 0 time

slide-23
SLIDE 23

Network Layer Network Layer

DVR Shortcomings DVR Shortcomings

DVR i i i b

DVR is pretty expensive: it turns out to be O(n3) which is too high for a fast convergence. I DVR th i th bl f t t

In DVR, there is the problem of count-to- infinity in the presence of node crashes.

U it bl f l t k

Unsuitable for large network.

Count-to-infinity problem

23 Network Layer

slide-24
SLIDE 24

Network Layer Network Layer

Solution: Split Horizon with p Poison Reverse

 Split Horizon (SH): Router 1 does not tell

h h f f h h router 2 the path for X if the path is through 2

 SH with Poison Reverse: Router 1 tells

router 2 that the path for X has a metric p

  • f inf.

Introduction 1-24

slide-25
SLIDE 25

Network Layer Network Layer

C mp is n f LS nd DV l ithms Comparison of LS and DV algorithms

Message complexity Robustness: what happens g p y

 LS: with n nodes, E links,

O(nE) msgs sent

 DV: exchange between

pp if router malfunctions? LS:

 DV: exchange between

neighbors only

 convergence time varies  node can advertise

incorrect link cost

 each node computes only

Speed of convergence

 LS: O(n2) algorithm requires

 each node computes only

its own table

DV:

( ) g q O(nE) msgs

 may have oscillations

DV ti i

 DV node can advertise

incorrect path cost

 each node’s table used by

 DV: convergence time varies

 may be routing loops  count-to-infinity problem  each node s table used by

  • thers
  • error propagate thru

k

Network Layer 4-25

 count to infinity problem

network

slide-26
SLIDE 26

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-26

slide-27
SLIDE 27

Network Layer Network Layer

Hierarchical Routin Hierarchical Routing

Our routing study thus far - idealization Our routing study thus far idealization

 all routers identical  network “flat”  network flat

… not true in practice scale: with 200 million destinations: administrative autonomy

 internet = network of  can’t store all dest’s in

routing tables!

 routing table exchange

networks

 each network admin may

want to control routing in its

 routing table exchange

would swamp links! want to control routing in its

  • wn network

Network Layer 4-27

slide-28
SLIDE 28

Network Layer Network Layer

Hierarchical Routin Hierarchical Routing

 aggregate routers into

G

 aggregate routers into

regions, “autonomous systems” (AS) Gateway router

 Direct link to router in

th AS y t m ( )

 routers in same AS run

same routing protocol another AS g p

 “intra-AS” routing

protocol

 r ut rs in diff r nt AS  routers in different AS

can run different intra- AS routing protocol

Network Layer 4-28

slide-29
SLIDE 29

Network Layer Network Layer

Interconnected ASes Interconnected ASes

3b 3a 2a AS3 2c 2b 3c 1d 1c AS3 AS1

AS2

1a 2b 1b

 forwarding table  forwarding table

configured by both intra- and inter-AS

Intra-AS Routing algorithm Inter-AS Routing algorithm

routing algorithm

 intra-AS sets entries

f int n l d sts

Forwarding table

for internal dests

 inter-AS & intra-As

sets entries for

Network Layer 4-29

external dests

slide-30
SLIDE 30

Network Layer Network Layer

Inter-AS tasks

AS1 must:

 suppose router in AS1

receives datagram d d d f AS1 must

1.

learn which dests are reachable through AS2 hi h h h destined outside of AS1:

 router should

AS2, which through AS3

2

propagate this

 router should

forward packet to gateway router, but

  • 2. propagate this

reachability info to all routers in AS1 which one? Job of inter-AS routing!

3a 2c 3c 3b 3a 1c 2a AS3

AS2

1a 2c 2b 1b

Network Layer 4-30

1d AS1 1b

slide-31
SLIDE 31

Network Layer Network Layer

Example: Setting forwarding table in router 1d

 suppose AS1 learns (via inter-AS protocol) that subnet

pp ( p ) x reachable via AS3 (gateway 1c) but not via AS2.

 inter-AS protocol propagates reachability info to all

p p p g y internal routers.

 router 1d determines from intra-AS routing info that

its interface I is on the least cost path to 1c.

 installs forwarding table entry (x,I) 3c

x

3b 3a 1c 2a AS3 AS2 1 2c 2b

Network Layer

4-31

1d AS1 1a 1b

slide-32
SLIDE 32

Network Layer Network Layer

Example: Choosing among multiple ASes

 now suppose AS1 learns from inter-AS protocol that

subnet x is reachable from AS3 and from AS2 subnet x is reachable from AS3 and from AS2.

 to configure forwarding table, router 1d must

determine towards which gateway it should forward k t f d t packets for dest x.

 this is also job of inter-AS routing protocol!

x

3b 3a 1 2a AS3 2c 2b 3c

x

1d 1c AS1

AS2

1a 2b 1b

Network Layer 4-32

slide-33
SLIDE 33

Network Layer Network Layer

Example: Choosing among multiple ASes

 now suppose AS1 learns from inter-AS protocol that

subnet x is reachable from AS3 and from AS2 subnet x is reachable from AS3 and from AS2.

 to configure forwarding table, router 1d must

determine towards which gateway it should forward k t f d t packets for dest x.

 this is also job of inter-AS routing protocol!

 hot potato routing: send packet towards closest of  hot potato routing: send packet towards closest of

two routers.

Learn from inter-AS protocol that subnet x is reachable via Hot potato routing: Choose the gateway Use routing info from intra-AS protocol to determine Determine from forwarding table the interface I that leads x is reachable via multiple gateways Choose the gateway that has the smallest least cost protocol to determine costs of least-cost paths to each

  • f the gateways

interface I that leads to least-cost gateway. Enter (x,I) in forwarding table Network Layer 4-33

slide-34
SLIDE 34

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-34

slide-35
SLIDE 35

Network Layer Network Layer

Intra AS Routin Intra-AS Routing

l k I i G P l (IGP)

 also known as Interior Gateway Protocols (IGP)  most common Intra-AS routing protocols:

 RIP: Routing Information Protocol

OSPF O Sh t t P th Fi t

 OSPF: Open Shortest Path First  IGRP: Interior Gateway Routing Protocol (Cisco

y g ( proprietary)

Network Layer 4-35

slide-36
SLIDE 36

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-36

slide-37
SLIDE 37

Network Layer Network Layer

RIP ( Routing Information Protocol) RIP ( Routing Information Protocol)

di l i h

 distance vector algorithm  included in BSD-UNIX Distribution in 1982  distance metric: # of hops (max = 15 hops)

u v destination hops 1 From router A to subnets:

B A

w u 1 v 2 w 2

D

C x y z w 2 x 3 y 3

Network Layer 4-37

y z 2

slide-38
SLIDE 38

Network Layer Network Layer

RIP advertisements RIP advertisements

d h d

 distance vectors: exchanged among

neighbors every 30 sec via Response M ( l ll d d ) Message (also called advertisement)

 each advertisement: list of up to 25

destination subnets within AS destination subnets within AS

Network Layer 4-38

slide-39
SLIDE 39

Network Layer Network Layer

RIP: Example RIP: Example

z D w x y z A D B A C B

Destination Network Next Router Num. of hops to dest.

w A 2 C y B 2 z B 7 1 x

  • 1

…. …. ....

i / di bl i

Network Layer 4-39

Routing/Forwarding table in D

slide-40
SLIDE 40

Network Layer Network Layer

RIP: Example

Dest Next hops w

  • 1

x

  • 1

Advertisement from A to D

z

x 1 z C 4 …. … ...

w x y A D B

D ti ti N t k N t R t N f h t d t

C

Destination Network Next Router Num. of hops to dest.

w A 2 y B 2 y z B A 7 5 x

  • 1

Network Layer 4-40

…. …. ....

Routing/Forwarding table in D

slide-41
SLIDE 41

Network Layer Network Layer

RIP: Li k F il d R RIP: Link Failure and Recovery

 If no advertisement heard after 180 sec -->  If no advertisement heard after 180 sec

> neighbor/link declared dead

 routes via neighbor invalidated  routes via neighbor invalidated  new advertisements sent to neighbors  neighbors in turn send out new advertisements (if  neighbors in turn send out new advertisements (if

tables changed)  link failure info quickly (?) propagates to  link failure info quickly (?) propagates to

entire net

 poison reverse used to prevent ping pong loops  poison reverse used to prevent ping-pong loops

(infinite distance = 16 hops)

Network Layer 4-41

slide-42
SLIDE 42

Network Layer Network Layer

RIP Table processin RIP Table processing

RIP i bl d b li i l l

 RIP routing tables managed by application-level

process called route-d (daemon)

d tis ts s t i UDP k ts i di ll

 advertisements sent in UDP packets, periodically

repeated

Transprt

routed

Transprt

routed

network forwarding (IP) t bl Transprt (UDP) network (IP) Transprt (UDP) forwarding t bl physical link (IP) table physical link (IP) table

Network Layer 4-42

physical physical

slide-43
SLIDE 43

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-43

slide-44
SLIDE 44

Network Layer Network Layer

OSPF (Open Shortest Path First) OSPF (Open Shortest Path First)

 “open”: publicly available  open : publicly available  uses Link State algorithm

 LS packet dissemination  LS packet dissemination  topology map at each node  route computation using Dijkstra’s algorithm

 OSPF advertisement carries one entry per neighbor

t router

 advertisements disseminated to entire AS (via

flooding) flooding)

 carried in OSPF messages directly over IP (rather than TCP

  • r UDP

Network Layer 4-44

slide-45
SLIDE 45

Network Layer Network Layer

OSPF “ d n d” f t s (n t in RIP) OSPF advanced” features (not in RIP)

 security: all OSPF messages authenticated (to

prevent malicious intrusion)

 multiple same-cost paths allowed (only one path in

RIP) F h li k lti l t t i f diff t

 For each link, multiple cost metrics for different

TOS (e.g., satellite link cost set “low” for best effort; high for real time) high for real time)

 integrated uni- and multicast support:

 Multicast OSPF (MOSPF) uses same topology data  Multicast OSPF (MOSPF) uses same topology data

base as OSPF

 hierarchical OSPF in large domains

Network Layer 4-45

 hierarchical OSPF in large domains.

slide-46
SLIDE 46

Network Layer Network Layer

Hi hi l OSPF Hierarchical OSPF

Network Layer 4-46

slide-47
SLIDE 47

Network Layer Network Layer

Hierarchical OSPF Hierarchical OSPF

 two-level hierarchy: local area backbone  two-level hierarchy: local area, backbone.

 Link-state advertisements only in area  each node has detailed area topology; only know  each node has detailed area topology; only know

direction (shortest path) to nets in other areas.

 area border routers: “summarize” distances to nets  area border routers:

summarize distances to nets in own area, advertise to other Area Border routers.

 backbone routers: run OSPF routing limited to  backbone routers run OSPF routing limited to

backbone.

 boundary routers: connect to other AS’s.

y

Network Layer 4-47

slide-48
SLIDE 48

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-48

slide-49
SLIDE 49

Network Layer Network Layer

Internet inter AS routin : BGP Internet inter-AS routing: BGP

BGP (B d G t P t l) th d

 BGP (Border Gateway Protocol): the de

facto standard BGP id h AS t

 BGP provides each AS a means to:

  • 1. Obtain subnet reachability information from

neighboring ASs neighboring ASs.

  • 2. Propagate reachability information to all AS-

internal routers.

  • 3. Determine “good” routes to subnets based on

reachability information and policy.  allows subnet to advertise its existence to

rest of Internet: “I am here”

Network Layer 4-49

slide-50
SLIDE 50

Network Layer Network Layer

BGP basics

 when AS2 advertises a prefix (subnet) to AS1:

AS2 promises it will forward datagrams t d th t fi towards that prefix.

 AS2

t fi i it

 AS2 can aggregate prefixes in its

advertisement

3a 2c 3c

eBGP session iBGP session

3b 3a 1c 2a AS3

AS2

1a c 2b

Network Layer 4-50

1d AS1 1a 1b

slide-51
SLIDE 51

Network Layer Network Layer

Distributing reachability info g y

 using eBGP session between 3a and 1c, AS3 sends

prefix reachability info to AS1. prefix reachability info to AS1.

 1c can then use iBGP do distribute new prefix

info to all routers in AS1

 1b can then re-advertise new reachability info

to AS2 over 1b-to-2a eBGP session

h t l f fi it t t

 when router learns of new prefix, it creates entry

for prefix in its forwarding table.

3a 2c 3c

eBGP session iBGP session

3b 3a 1c 2a AS3

AS2

1a c 2b

Network Layer 4-51

1d

AS1

1a 1b

slide-52
SLIDE 52

Network Layer Network Layer

Path attributes & BGP routes Path attributes & BGP routes

d ti d fi i l d BGP tt ib t

 advertised prefix includes BGP attributes.

 prefix + attributes = “route”

t i t t tt ib t

 two important attributes:

 AS-PATH: contains ASs through which prefix

advertisement has passed: e g AS 67 AS 17 advertisement has passed: e.g, AS 67, AS 17

 NEXT-HOP: indicates specific internal-AS router

to next-hop AS. (may be multiple links from to next hop AS. (may be multiple links from current AS to next-hop-AS)  when gateway router receives route

g y advertisement, uses import policy to accept/decline.

Network Layer 4-52

slide-53
SLIDE 53

Network Layer Network Layer

BGP route selection BGP route selection

l b h 1

 router may learn about more than 1

route to some prefix. Router must select route.

 elimination rules:

1

local preference value attribute: policy

1.

local preference value attribute: policy decision

2.

shortest AS-PATH

3.

closest NEXT-HOP router: hot potato routing

4.

additional criteria

Network Layer 4-53

.

add t onal cr ter a

slide-54
SLIDE 54

Network Layer Network Layer

BGP messa es BGP messages

 BGP messages exchanged using TCP  BGP messages exchanged using TCP.  BGP messages:

OPEN: s TCP ti t d

 OPEN: opens TCP connection to peer and

authenticates sender

 UPDATE: advertises new path (or withdraws old)  UPDATE: advertises new path (or withdraws old)  KEEPALIVE keeps connection alive in absence of

UPDATES; also ACKs OPEN request UPDATES; also ACKs OPEN request

 NOTIFICATION: reports errors in previous msg;

also used to close connection also used to close connection

Network Layer 4-54

slide-55
SLIDE 55

Network Layer Network Layer

BGP tin p li BGP routing policy

legend: provider

A B

W X

g customer p network

C

Y

customer network:  A,B,C are provider networks

( f d k )

 X,W,Y are customer (of provider networks)  X is dual-homed: attached to two networks

 X does not want to route from B via X to C  .. so X will not advertise to B a route to C

Network Layer 4-55

slide-56
SLIDE 56

Network Layer Network Layer

BGP tin p li (2) BGP routing policy (2)

legend: provider

A B

W X

g customer p network

C

Y

customer network:  A advertises path Aw to B  B advertises path BAw to X  B advertises path BAw to X  Should B advertise path BAw to C?

 No way! B gets no “revenue” for routing CBAw since  No way! B gets no revenue for routing CBAw since

neither W nor C are B’s customers

 B wants to force C to route to w via A

Network Layer 4-56

f

 B wants to route only to/from its customers!

slide-57
SLIDE 57

Network Layer Network Layer

Wh diff I d I AS i ? Why different Intra- and Inter-AS routing ? Policy: Policy:

 Inter-AS: admin wants control over how its traffic

routed who routes through its net. routed, who routes through its net.

 Intra-AS: single admin, so no policy decisions needed

Scale: Scale:

 hierarchical routing saves table size, reduced update

traffic traffic Performance:

 Intra-AS: can focus on performance  Intra-AS: can focus on performance  Inter-AS: policy may dominate over performance

Network Layer 4-57

slide-58
SLIDE 58

Network Layer Network Layer

Network Layer Network Layer

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-58

slide-59
SLIDE 59

Network Layer Network Layer

summary summary

1 I d i 5 R i l i h

 1 Introduction  2 Virtual circuit and

d t t ks

 5 Routing algorithms

 Link state  Distance Vector

datagram networks

 3 What’s inside a

router

 Distance Vector  Hierarchical routing

 6 Routing in the

router

 4 IP: Internet

Protocol

 6 Routing in the

Internet

 RIP

Protocol

 Datagram format  IPv4 addressing  OSPF  BGP

B d d

g

 ICMP  IPv6

 7 Broadcast and

multicast routing

Network Layer 4-59

slide-60
SLIDE 60

Network Layer Network Layer

Assignment #3 Assignment #3

44

 pp. 445  5, 8, 11, 14, 19  Due: 2012.12.11

Introduction 1-60