28
04/05/2001 1 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis http://www.cs.ucdavis.edu/~wu/ [email protected]

04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 1

ecs298k:Routing in General...lecture #2

Dr. S. Felix Wu

Computer Science Department

University of California, Davishttp://www.cs.ucdavis.edu/~wu/

[email protected]

Page 2: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

2 04/05/2001

Routing Protocol Framework Information Model

FIB

RIB

NPDU Header (Network Protocol Data Unit)

(Dest, NextHop, Routing Metrics)

Forwarding Algorithm

OSPF

RIBRIB

RIPv2 BGP4

FIB

ForwardingDecision

Application Layer

Network Layer

RoutingInformationBase

ForwardingInformationBase

Page 3: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 3

Operation Model - Routing Information Exchange

Hey, Here is the routing information I got so far

Hmm, some of them are obsolete, Here is my update

Page 4: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 4

Operation Model - Route Generation and Selection

Which algorithm should I use??Distributed Dijikstra’s algorithm or

Distributed Bellman-Ford algorithm?

Routing Information Base

Forwarding Information Base

application Layer

network Layer

Page 5: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 5

Routing Protocol Framework Topology Model

Administrative Domain 1 Administrative Domain 2

ASBR

ASBRASBR

AIR

Routing Domain Domain

HostAIRHost

AIRAIR

Host

Host

Routing Domain Domain

AIR

Two Level Routing - Intra-domain and Inter-domain Multiple routing domains can form an administrative domain ASBR and It’s restriction Routing protocol examples ( RIP, RIPv2, IGRP, OSPF, EGP, BGP, IS-IS)

Page 6: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 6

FIB• Forwarding Information Base

• Longest Matching Rule– CIDR (Classless Inter-domain Routing)

• IP address + Net Mask Length• 128.32.12/24 versus 128.32.12/22

– 10000000.00100000.00001100.--------– 11111111.11111111.11111111.00000000– 11111111.11111111.11111100.00000000

– Aggregation:• 128.32.12.0/24, 128.32.13.0/24 => 128.32.12.0/23• 128.32.12.0/23, 128.32.14.0/23 => 128.32.12.0/22

Page 7: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 7

IP Routing

• Routing targets network addresses– Clouds - IP network address.

• Routers use forwarding table– destination/mask, next hop, network interface, metric– table look-up for each packet– need to recognize address structure

• Routing information updates the forwarding table after the route computation.

Page 8: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 8

Routing

I want to knowthe shortest pathor simply “a path”

Routers exchange local information!

SRC

DST

Page 9: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 9

Link State

A

B

C

You

YourNeighbor

A B

A B

A B

Flooding

Page 10: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 10

Page 11: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 11

Link State

A

B

C

You

YourNeighbor

A B

A B

A B

Flooding

Page 12: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 12

Distance Vector

A

B

C

You

YourNeighbor

A: 3 hopsB: 2 hopsC: 2 hops

Your Neoghbor will decide who should be the next hop!

A: 1 hopB: 2 hops

VIEW

Page 13: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 13

Routing Information

• Link State:– I let the whole world knows about my

relationship with my neighbors.– (Felix, Neighbor-X) is up!

• Distance Vector:– I let all my neighbors knows about my

relationship with the rest of the world.– (Felix can get to Remote-Y) in 5 hops.

Page 14: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 14

RIP• Routing Information Protocol is a simple

distance vector protocol.

• Initialization:– When the routing daemon is initialized, it send

a request command to each network interface (card).

– Neighboring routers will reply with routing table information.

Page 15: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 15

RIP, cont.

• Periodic Updates– routers advertise tables with neighbors

periodically (~30 seconds) + upon interface changes.

• Split-Horizon– Router records the interface providing a route

and does not propagate it back.

Page 16: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 16

Bad News Propagation: 1

A: 0 A: 1 A: 2 A: 3 A: 4 A: 51 1 1 1 1

20

Page 17: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 17

Bad News Propagation: 2

A: 0 A: 3 A: 2 A: 3 A: 4 A: 51 1 1 1

20

8

Page 18: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 18

Black Hole

A

B

C

You

YourNeighbor

A: 3 hopsB: 2 hopsC: 2 hops

A: 1 hopB: 2 hops

Page 19: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 19

Black Hole Attack

R1

Destination N, NextHop R1, Metric 1

R2

R3

Rn

control flowdata flow

Page 20: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 20

BGP4• In between Link-State and Distance-Vector

– tell my neighbors about my connection to the rest of the world

– but, also tell them how I reach there:• routing path information.

– What can or can’t I do with the extra path information?

• Can I still attack?• How can I prevent or detect?

Page 21: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 21

Route Path (among AS’s)

A

B

C

A-B-E-F

E

F

A-C

Page 22: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 22

BGP Messages

• OPEN

• NOTIFICATION

• UPDATE (NEW and WITHDRAW)

Page 23: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 23

Internet BGP Update VolumeAnn and With at Mae-East

0

200,000

400,000

600,000

800,000

1,000,000

1,200,000

1,400,000

1,600,000

1,800,000

2,000,0004/17/1997

6/17/1997

8/17/1997

10/17/1997

12/17/1997

2/17/1998

4/17/1998

6/17/1998

8/17/1998

10/17/1998

12/17/1998

2/17/1999

4/17/1999

6/17/1999

8/17/1999

10/17/1999

12/17/1999

2/17/2000

Announcements

Withdraws

Page 24: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 24

Race Conditions and Paths

• T(shortest path) <= Tdown <= T(longest path)

B

A

Page 25: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 25

BGP Convergence ExampleR

AS0 AS1

AS2AS3

*B R via 3 B R via 03 B R via 23

*B R via 3 B R via 03 B R via 13

*B R via 3 B R via 13 B R via 23

AS0 AS1 AS2

** **B R via 203

*B R via 013 B R via 103

Page 26: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 26

ISP3-ISP4 Paths During Failure

ISP 3

Ste

ady

St a

t e

ISP 4

R3

P2

P2

ISP 5

FAULT

ISP 1

P3

P3

P6

P7

P7P4

P4

P5

P5

P5P5

P5

P6

P6

P6

ISP 7

ISP 9

ISP 8

P7

P7

P4

36% Average: 110 (min/max 78/135) seconds

Announce AS4 AS5 AS (52 seconds)

Withdraw (110 seconds)

35% Average: 107 (min/max 91/133) seconds

Announce AS4 AS1 AS3 (39 seconds)

Announce AS4 AS5 AS3 (68 seconds)

Withdraw (107 seconds)

2% Average:140.00 (min/max 120/142)

Announce AS4 AS5 AS8 AS7 AS3 (27) Announce AS4 AS5AS9 AS8 AS7 AS3 (86)

Withdraw (140 seconds)

27% Other

Page 27: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 27

ISP2-ISP4 Paths During Failure

Ste

ady

Sta

te

ISP 2

ISP 4

P2

P2

ISP 5

P3

P3

P3

ISP 6

R2

FAULT

Vagabond

P4

P4ISP 10

ISP 11

ISP 12

ISP 13

P4

P4

P4

63% Average: 79 (min/max 44/208) seconds

AS4 AS5 AS2 (35 seconds)

Withdraw (79 seconds)

7% Average: 88 (min/max 80/94) seconds

Announce AS4 AS5 AS2 (33 seconds)

Announce AS4 AS6 AS5 AS2 (61 seconds)

Withdraw (88 seconds)

7% Average: 54 (min/max 29/9) seconds

Withdraw (54 seconds)

23% Other

Page 28: 04/05/20011 ecs298k: Routing in General... lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis wu

04/05/2001 28

ISP1-ISP4 Paths During Failure

• Only one back up path (length 3)

Steady State

ISP 1

ISP 5

P2

P2ISP 4

R1

FAULT

96% Average: 92 (min/max 63/140) seconds

Announce AS4 AS5 AS1 (44 seconds)

Withdraw (92 seconds)

4% Average: 32 (min/max 27/38) seconds

Withdraw (32 seconds)