70
1 Mythology and Folklore of Network Protocol Design Radia Perlman Sun Microsystems Laboratories

Folklore of Network Protocol Design

  • Upload
    kklo

  • View
    226

  • Download
    1

Embed Size (px)

DESCRIPTION

Presentation by Radia Perlman

Citation preview

Page 1: Folklore of Network Protocol Design

1

Mythology and Folklore of Network Protocol Design

Radia Perlm anSun Microsystem s Laboratories

Page 2: Folklore of Network Protocol Design

2

Messages

• Dispel m yths and “religion”– “It’s not what you don’t know that’ll get

you . It’s what you do know that ain ’t true” Mark Twain

• Learn from m istakes• Learn from cool ideas• Be provocative. Start lively discussion

Page 3: Folklore of Network Protocol Design

3

Messages for studen ts

• Don’t believe everything you hear• Don’t believe th ings you cannot

understand• There is a lot of random ness is whether

papers get accepted• Standards creation is m ore political

than techn ical

Page 4: Folklore of Network Protocol Design

4

General stuff to consider in designs

• Sim plicity• Scalability• Manageability• Robustness• Ease of adding new features

Page 5: Folklore of Network Protocol Design

5

First a bit of background in order to m ake the exam ples clear

Page 6: Folklore of Network Protocol Design

6

What are protocol layers?

• Just a way of th inking about the problem

• ISO defined 7 layers• TCP/ IP suite claim s it’s on ly 4 layers,

but has at least 6 of the ISO layers– Perhaps leaves out session layer, but

“BEEP” was in fashion for awhile• A lot of the layers get subdivided in to

others

Page 7: Folklore of Network Protocol Design

7

Bridges, Routers, and Switches! Oh m y!

• This discussion sheds light on how/ why th ings work today

• Need the background for som e other exam ples

Page 8: Folklore of Network Protocol Design

8

Why th is whole layer 2/ 3 th ing?

• Myth: bridges/ switches sim pler devices, designed before routers

• OSI Layers– 1: physical

Page 9: Folklore of Network Protocol Design

9

Why th is whole layer 2/ 3 th ing?

• Myth: bridges/ switches sim pler devices, designed before routers

• OSI Layers– 1: physical– 2: data link (nbr-nbr)

Page 10: Folklore of Network Protocol Design

10

Why th is whole layer 2/ 3 th ing?

• Myth: bridges/ switches sim pler devices, designed before routers

• OSI Layers– 1: physical– 2: data link (nbr-nbr)– 3: network (create en tire path)

Page 11: Folklore of Network Protocol Design

11

Why th is whole layer 2/ 3 th ing?

• Myth: bridges/ switches sim pler devices, designed before routers

• OSI Layers– 1: physical– 2: data link (nbr-nbr)– 3: network (create en tire path)– 4 end-to-end

Page 12: Folklore of Network Protocol Design

12

Why th is whole layer 2/ 3 th ing?

• Myth: bridges/ switches sim pler devices, designed before routers

• OSI Layers– 1: physical– 2: data link (nbr-nbr)– 3: network (create en tire path)– 4 end-to-end– 5 and above: boring

Page 13: Folklore of Network Protocol Design

13

Defin itions

• Repeater: layer 1 relay• Bridge: layer 2 relay• Router: layer 3 relay

Page 14: Folklore of Network Protocol Design

14

Defin itions

• Repeater: layer 1 relay• Bridge: layer 2 relay• Router: layer 3 relay• OK: What is layer 2 vs layer 3?

Page 15: Folklore of Network Protocol Design

15

Defin itions

• Repeater: layer 1 relay• Bridge: layer 2 relay• Router: layer 3 relay• OK: What is layer 2 vs layer 3?

– My defin ition : layer 3 forwards, layer 2 does not

Page 16: Folklore of Network Protocol Design

16

Defin itions

• Repeater: layer 1 relay• Bridge: layer 2 relay• Router: layer 3 relay• OK: What is layer 2 vs layer 3?

– True defin ition of a layer n protocol: Anything designed by a com m ittee whose charter is to design a layer n protocol

Page 17: Folklore of Network Protocol Design

17

Layer 3 (DECnet, IP)

• Put source, destination , hop coun t on packet• At the tim e DECnet was m ore prevalen t, but

it’s logically equivalen t to IP• Then along cam e “the EtherNET”

– reth ink routing algorithm a bit, but it’s a link!• The world got confused. Built on layer 2• I tried to argue: “But you m ight wan t to talk

from one Ethernet to another!”• “Which will w in? Ethernet or DECnet?”

Page 18: Folklore of Network Protocol Design

18

Problem Statem en t

Need som ething that w ill sit between two Ethernets, andlet a station on one Ethernet talk to another

A C

Page 19: Folklore of Network Protocol Design

19

Basic idea

• Listen prom iscuously• Learn location of source address based

on source address in packet and port from which packet received

• Forward based on learned location of destination

Page 20: Folklore of Network Protocol Design

20

What’s differen t between th is and a repeater?

• no collisions• with learn ing, can use m ore aggregate

bandwidth than on any one link• no artifacts of LAN technology (# of

stations in ring, distance of CSMA/ CD)

Page 21: Folklore of Network Protocol Design

21

But loops are a disaster• No hop coun t• Exponen tial proliferation

B1 B2 B3

Page 22: Folklore of Network Protocol Design

22

Thus the Spann ing Tree Algorithm

I th ink that I shall never seeA graph m ore lovely than a tree.

A tree whose crucial propertyIs loop-free connectivity.

A tree which m ust be sure to spanSo packets can reach every LAN.

First the Root m ust be selectedBy ID it is elected.

Least cost paths from Root are tracedIn the tree these paths are placed.

A m esh is m ade by folks like m e.Then bridges find a spanning tree.

Page 23: Folklore of Network Protocol Design

23

Bother with spann ing tree?

• Maybe just tell custom ers “don’t do loops”

• First bridge sold...

Page 24: Folklore of Network Protocol Design

24

First Bridge Sold

A C

Page 25: Folklore of Network Protocol Design

25

Myth

• Ethernet con tinues to be a successful technology

Page 26: Folklore of Network Protocol Design

26

So what is Ethernet?

• CSMA/ CD, right? Not any m ore, really...

• source, destination (and no hop coun t)• lim ited distance, scalability (not any

m ore, really)

Page 27: Folklore of Network Protocol Design

27

Switches

• Ethernet used to be bus• Easier to wire, m ore robust if star (one

huge m ultiport repeater with p t-to-pt links

• If store and forward rather than repeater, and with learn ing, m ore aggregate bandwidth

• Can cascade devices…do spann ing tree

• We’re reinven ted the bridge!

Page 28: Folklore of Network Protocol Design

28

Sim ple th ings people get wrong

• They get obsessed with esoteric stuff like “provable properties” of cryptographic algorithm s, but m iss basic system issues

Page 29: Folklore of Network Protocol Design

29

Exam ple: What is a version num ber?

Page 30: Folklore of Network Protocol Design

30

Version Num bers

• What’s the difference between a new protocol, and a new version of an existing protocol?

• For in stance, why was CLNP a “new protocol”, and IPv6 a “new version of IP”?

Page 31: Folklore of Network Protocol Design

31

Version Num bers

• What’s the difference between a new protocol, and a new version of an existing protocol?

• For in stance, why was CLNP a “new protocol”, and IPv6 a “new version of IP”?– Its nam e?– Who defines it?

Page 32: Folklore of Network Protocol Design

32

Defin ition that m akes sense to m e

• New protocol m eans differen t protocol discrim inator at layer n -1

• New version m eans sam e protocol discrim inator, and version num ber distinguishes

Page 33: Folklore of Network Protocol Design

33

If you distinguish with version num ber

• Then if the packet form at is incom patible, the old version node m ust not try to parse

• Don’t increase version num ber un less packet is incom patible

• Specify packet m ust be dropped if version num ber is bigger

Page 34: Folklore of Network Protocol Design

34

Is IPv6 a new version of IPv4?

• IPv4 spec says “set version to 4”• But doesn’t say to look at it• IPv6 form at incom patible with IPv4• So if you send an IPv4 node an IPv6

packet, it will do who knows what…

Page 35: Folklore of Network Protocol Design

35

Result

• IPv6 needs new protocol type• So IPv6 is a new protocol, not a new

version of IP• IPv6 does have a version num ber field ,

but it could be version 1

Page 36: Folklore of Network Protocol Design

36

We learned our lesson , right?

• So IPv6 spec m ust say “drop if version num ber > 6”

Page 37: Folklore of Network Protocol Design

37

We learned our lesson , right?

• So IPv6 spec m ust say “drop if version num ber > 6”

• Nope…just says “set th is field to 6”

Page 38: Folklore of Network Protocol Design

38

Another exam ple: SSL

• They com pletely changed the form at from SSLv2 to v3

• Not on ly didn’t say to drop if version num ber greater…

Page 39: Folklore of Network Protocol Design

39

Another exam ple: SSL

• They com pletely changed the form at from SSLv2 to v3

• Not on ly didn’t say to drop if version num ber greater…

• But m oved the version num ber field!!!

Page 40: Folklore of Network Protocol Design

40

Param eters

Page 41: Folklore of Network Protocol Design

41

Param eters

• Min im ize these:– som eone has to docum ent it– custom er has to read docum entation and

understand it

• How to avoid– architectural constan ts if possible– autom atically configure if possible

Page 42: Folklore of Network Protocol Design

42

Settable Param eters

• Make sure they can’t be set incom patibly across nodes, across layers, etc. (e.g., hello tim e and dead tim er)

• Make sure they can be set at nodes one at a tim e and the net can stay runn ing

Page 43: Folklore of Network Protocol Design

43

Param eter tricks

• IS-IS– pairwise param eters reported in “hellos”– area-wide param eters reported in LSPs

• OSPF– copied m ost of IS-IS, but got th is wrong.

Use field in hello to refuse to talk if not iden tical!

• Bridges– Use Root’s values, sen t in spann ing tree

m sgs

Page 44: Folklore of Network Protocol Design

44

What’s with IPv6?

Page 45: Folklore of Network Protocol Design

45

What’s with IPv6?

• A connection less network layer consists of:– Source address– Destination address– Hop coun t

Page 46: Folklore of Network Protocol Design

46

What’s with IPv6?

• A connection less network layer consists of:– Source address– Destination address– Hop coun t

• What could take so long?

Page 47: Folklore of Network Protocol Design

47

What’s with IPv6

• In 1992, IAB said– Gee, IP addresses not big enough– Why don’t we use CLNP?

Page 48: Folklore of Network Protocol Design

48

What’s with IPv6?

• In 1992, IAB said– Gee, IP addresses not big enough– Why don’t we use CLNP?

• What’s CLNP?– ISO’s version of IP– 20 byte addresses

• Cam e with m ature routing protocols, autoconfiguration , im plem en ted by all m ajor vendors

Page 49: Folklore of Network Protocol Design

49

What’s with IPv6?

• But som e vocal IETF people said– We can ’t replace IP with ISO!

• Result– We m ay have m issed our window– Giving a large com m ittee 13 years (and coun ting)

of tim e, you can generate lots of pages of specs– CLNP would have been fine– And we’d have bigger addresses now (and a

sim pler p rotocol)

Page 50: Folklore of Network Protocol Design

50

Result

• We m ay have m issed our window• Giving a large com m ittee 13 years (and

counting) of tim e, you can get lots of pages of specs

• CLNP would have been fine• And we’d have bigger addresses now (and a

sim pler protocol than IPv6)• Worse yet, we get IPv4 and NATs, and, if we

m igrate, very com plex m igration

Page 51: Folklore of Network Protocol Design

51

What’s with IP Multicast?

Page 52: Folklore of Network Protocol Design

52

Multicast

• Ethernet: falls out of technology• ATM: create VC. “Add m em ber”

A

C

G

H

X

Page 53: Folklore of Network Protocol Design

53

IP Multicast

• Idea: m ake it look “just like Ethernet”– globally un ique m ulticast addresses

• IP address 32 bits, top 4 bits=1110

– anyone can request to listen . anyone can send without being a m em ber

• So, start out with unchangeable “m odel”– signalling protocol to in form local rtr to

send G

Page 54: Folklore of Network Protocol Design

54

Problem : Can’t be im plem en ted

• various attem pts:– flood and prune

• send all data everywhere, in case som eone in Alban ia wan ts to listen

• if not in terested, send “prune”• keep track of all (S,G) pairs nbr NOT in terested

in

– MOSPF• routers keep track of all listeners for all groups

Page 55: Folklore of Network Protocol Design

55

IP Multicast attem pts

• Tree building like with ATM– send join towards Root– create tree

• Problem s:– who is Root for G?

• unscalable in tradom ain protocol to select a Root-candidate for G

– how to adm in ister addresses

Page 56: Folklore of Network Protocol Design

56

IP Multicast

• So, cam e up with unscalable com plex in tradom ain

• Then MSDP to p iece dom ains together

x x

x

x

xx

xx

x

x

Page 57: Folklore of Network Protocol Design

57

How IP Multicast should look

• Two types– finding som ething (low bandwidth , can’t

set up tree). Just flood with RPF– conference call, etc. Find host H. Build

tree to H. Have address of group be (H,G), where G on ly has to be un ique to H

Page 58: Folklore of Network Protocol Design

58

Self-Stabilization

• Bad th ings m ay happen– sick or m alicious devices m ight corrupt

databases or in ject bad traffic

• Once bad device disconnected from the net, the network should return to norm al operation

• How could it not?

Page 59: Folklore of Network Protocol Design

59

Link State Routing, ARPANET style

• Link state routing– figure out who your nbrs are– create LSP (who I am , who m y nbrs are)– flood LSP, keep m ost recen tly generated

LSP from each other router– use LSP database to calculate paths

Page 60: Folklore of Network Protocol Design

60

How to flood

• Regular flooding is exponen tial• But here, on ly flood each packet once

(if newer than that in database)• How to recogn ize packet is new?• ARPANET

– sequence num ber and age– sequence num ber circular– age increm ents after holding it for n

seconds

Page 61: Folklore of Network Protocol Design

61

Arithm etic in circular space

x

>x

<x

Page 62: Folklore of Network Protocol Design

62

ARPANET disaster

• sym ptom : net didn’t work• how do you diagnose and m anage a

network?• Note: these guys were really really

lucky!• What had happened: Fred, a sick

router, generate bad LSPs before dying, with sequence num bers x, y, z

Page 63: Folklore of Network Protocol Design

63

ARPANET disaster

x

y

z

xyzxyzxyz

xzyxzyxzy

yzxy

zxyz

x

Page 64: Folklore of Network Protocol Design

64

So how do you fix a broken net?

• Patched version of code that ignore LSPs from Fred

• One by one crashed system s (not easy!) and reloaded with patched code

• Only after all routers reloaded, can they be reloaded with correct version again

Page 65: Folklore of Network Protocol Design

65

Robustness

• Can be designed to be self-stabilizing (paper from 1983)

• Paper claim ed “but can ’t expect the network to con tinue operating if faulty equipm en t is still connected”

• My thesis from 1988: routing with Byzan tine robustness

Page 66: Folklore of Network Protocol Design

66

Other th ings that I could ran t about

• XML• BGP

Page 67: Folklore of Network Protocol Design

67

My com plain t about how networking is taught

• It’s taught like a trade school…all the details of the curren tly deployed stuff

Page 68: Folklore of Network Protocol Design

68

How networking should be taught

• Cover conceptual problem s• And range of solu tions

– In teresting ideas, even if not curren tly deployed

– In teresting ideas, even if never deployed• Teach how to th ink critically

– Don’t believe everyth ing in prin t– Don’t assum e what com es out of

standards bodies is perfect

Page 69: Folklore of Network Protocol Design

69

Mistakes standards bodies m ake

• “We should get extra credit because we didn’t look at any ideas done before”

• “We are too busy to answer basic questions, or explain anything”

• “If we revisit old decisions, we’ll lose 10 years worth of work”– If you find yourself in a hole, stop digging!

Page 70: Folklore of Network Protocol Design

70

Lessons

• Always seem s easy to start over with new thing. Always takes longer and com es out worse.

• Don’t cast som ething in stone before there is a p lausible way of realizing it

• Min im ize configuration• Don’t just dive in and start doing stuff. Think

about what problem you’re solving before you try to com e up with a solution .