Network Layering CS 118 Computer Network Fundamentals Peter Reiher - - PowerPoint PPT Presentation

network layering cs 118 computer network fundamentals
SMART_READER_LITE
LIVE PREVIEW

Network Layering CS 118 Computer Network Fundamentals Peter Reiher - - PowerPoint PPT Presentation

Network Layering CS 118 Computer Network Fundamentals Peter Reiher Lecture 8 CS 118 Page 1 Winter 2016 Outline What is a layer? Goals of layering Internet and the One Ring Lecture 8 CS 118 Page 2 Winter 2016 What is a layer?


slide-1
SLIDE 1

Lecture 8 Page 1 CS 118 Winter 2016

Network Layering CS 118 Computer Network Fundamentals Peter Reiher

slide-2
SLIDE 2

Lecture 8 Page 2 CS 118 Winter 2016

Outline

  • What is a layer?
  • Goals of layering
  • Internet and the One Ring
slide-3
SLIDE 3

Lecture 8 Page 3 CS 118 Winter 2016

What is a layer?

  • A layer is:

– The largest set of parties (nodes) that can communicate – Using a single protocol – And a single name space – A kind of a “zone”

I.e., the transitive closure

  • f a set of nodes

via relayed communication

slide-4
SLIDE 4

Lecture 8 Page 4 CS 118 Winter 2016

Limits of a single layer

  • Homogeneity
  • Complexity
slide-5
SLIDE 5

Lecture 8 Page 5 CS 118 Winter 2016

Homogeneity 1

  • No environment / context optimizations

– Prevents customization, e.g., for wireless, satellite, low-power, lightweight devices, etc.

  • Difficult to pick

– Hard to pick one everyone will agree on

slide-6
SLIDE 6

Lecture 8 Page 6 CS 118 Winter 2016

Homogeneity 2

  • Locked-in once deployed

– No incremental evolution

  • Needs a “flag day” to change

– First major change to Multics: June 14, 1966 – Internet shift from NCP to TCP: Jan. 3, 1983

slide-7
SLIDE 7

Lecture 8 Page 7 CS 118 Winter 2016

Complexity

  • One large, flat layer

– Difficult to manage – Difficult to route (determine paths) – Difficult to coordinate resources

  • And its one, large name space

– See above…

Groups of layers can be easier…

slide-8
SLIDE 8

Lecture 8 Page 8 CS 118 Winter 2016

Reasons to have multiple layers

  • Abstraction
  • Emulation
  • Containment
  • Scale
slide-9
SLIDE 9

Lecture 8 Page 9 CS 118 Winter 2016

Abstraction

  • Model

– Simplification – Extract key features – See: Picasso ->

slide-10
SLIDE 10

Lecture 8 Page 10 CS 118 Winter 2016

Abstraction and Layering

  • Present a simpler

system

– Topology – Protocol – Behavior

  • Other simplifications

– Node subset – Smaller distance

slide-11
SLIDE 11

Lecture 8 Page 11 CS 118 Winter 2016

IEEE 802

  • Base layer

(802.2 LLC: Logical Link Layer)

– Addressing – Frame format – Error detection – Upper-layer interface (API)

  • Lower layer

– Bridging (802.1), i.e., switch control and configuration

  • Upper layers

– Ethernet (802.3) – Token bus (802.4) – Token ring (802.5) – Wireless (802.11) – Personal (802.15) – Emergency (802.23)

slide-12
SLIDE 12

Lecture 8 Page 12 CS 118 Winter 2016

Emulation

  • Abstraction to copy

behavior

– Replicate capabilities of another system – By limiting, composing,

  • r modifying an existing

system

  • Change existing system

to another one by adding layers

slide-13
SLIDE 13

Lecture 8 Page 13 CS 118 Winter 2016

Emulation and Layering

  • PPP

– Point-to-point protocol – Emulate a physical wire

  • ver a dialup modem
  • PPPoE

– Ethernet

  • PPPoA

– ATM

slide-14
SLIDE 14

Lecture 8 Page 14 CS 118 Winter 2016

Containment

  • Enforce boundaries

– Protect interior

  • Ensure a stable locale
  • Enforce limited function

– Protect exterior

  • Deploy new features
  • Support local capability
slide-15
SLIDE 15

Lecture 8 Page 15 CS 118 Winter 2016

Containment and Layering

  • Hide / protect a network from the world
  • Hide / protect the world from an experiment
slide-16
SLIDE 16

Lecture 8 Page 16 CS 118 Winter 2016

Scale

  • Limit complexity

– Hard to route everywhere, so maybe route via a tree?

  • Overcome physical

limits

– Sharing can be very useful, but may require a very different protocol for relaying

slide-17
SLIDE 17

Lecture 8 Page 17 CS 118 Winter 2016

Scale and Layering

  • Tree routing

– Know your descendants – Route down for known, up for unknown – Relies on varying detail at different layers

  • Label groups
  • Cloud routing

– Traverse the clouds without knowing what happens inside – Inside the cloud, it’s the cloud’s problem

slide-18
SLIDE 18

Lecture 8 Page 18 CS 118 Winter 2016

Connections and layering

  • Dovetailed

– Edge connected – Peer translators – Both transit or terminus

  • Stacked

– Top-to-bottom connected – Treat lower layers as encapsulation transit – Never as terminus

slide-19
SLIDE 19

Lecture 8 Page 19 CS 118 Winter 2016

Translation gateways

  • Gateway converts

– Bidirectional translation – Complex internal state

  • Two views

– Presents two views – Proxies in both directions

slide-20
SLIDE 20

Lecture 8 Page 20 CS 118 Winter 2016

Benefits of adapters

  • Allow local optimization
  • Allow partial (subset) upgrades
slide-21
SLIDE 21

Lecture 8 Page 21 CS 118 Winter 2016

Issues with adapters

  • The telephone game
  • Semantic gaps
  • Gateway state
  • Scale vs. number of “languages”
slide-22
SLIDE 22

Lecture 8 Page 22 CS 118 Winter 2016

Lost in translation

  • Protocols have idioms

– Behaviors are “native” to a protocol

  • Sequences of translations lose info

– Telephone game

slide-23
SLIDE 23

Lecture 8 Page 23 CS 118 Winter 2016

Semantic gaps

  • No protocol is “complete”

– Turing machine has “completeness” – But protocols built on finite state machines – FSM is a limited TM

  • Some things don’t translate

– “Ballpark”, “drop a dime”

slide-24
SLIDE 24

Lecture 8 Page 24 CS 118 Winter 2016

State problems

  • Size

– Physical limits constrain state – State can explode

  • Combined FSMs = product of states
  • Reliability

– Gateway failure = lost state – Lost state affects protocols on both sides

  • Path correlation

– End-to-end exchanges need to go through the same gateway for their entire interaction – OR state needs to be shared among multiple gateways

slide-25
SLIDE 25

Lecture 8 Page 25 CS 118 Winter 2016

Mutual modeling

  • My world

– Has a proxy for you – Ends at that proxy

  • Your world

– Has a proxy for me – Ends at that proxy

  • Sort of independent but not really

– We both think our worlds are contained – But my proxy and your proxy are coupled

slide-26
SLIDE 26

Lecture 8 Page 26 CS 118 Winter 2016

Scale of translation

  • More languages = more translators

– Each new language has cost proportional to the number of languages currently in use – Gets worse as languages are added

  • Who adds the translator?

– Team effort – both new and old parties – Need someone “fluent” in both

slide-27
SLIDE 27

Lecture 8 Page 27 CS 118 Winter 2016

Stacked layers

  • The alternative to edge layers
  • Put one layer on top of another
  • Each layer has its own responsibilities

– Need not worry about things higher layers handle – And higher layers assume lower layer has taken care of certain things

  • Layers can be customized to circumstances

– Wireless vs. wired links, e.g.

slide-28
SLIDE 28

Lecture 8 Page 28 CS 118 Winter 2016

Stacked layers

  • Each layer sits on a lower

layer

  • Each layer “depends” on the

lower layer

  • But not directly on the

layers below that

  • We might have “icing”

connecting the layers

  • To “hold them together”
  • A network isn’t a cake, but it’s a little less different

than you might think

slide-29
SLIDE 29

Lecture 8 Page 29 CS 118 Winter 2016

Internet model

Net A Net B Net C Internet

  • But how do these different nets work together?
  • One layer to rule them all!
slide-30
SLIDE 30

Lecture 8 Page 30 CS 118 Winter 2016

IP Layer

  • The common layer for the Internet
  • Packets

– Variable length – Includes source and destination addresses

  • Global addresses

– Two-level hierarchy

  • High bits = assigned by central authority
  • Low bits = locally assigned
  • Best-effort communication

– Allows for loss, reordering – Enables simple forwarding, use smart ends to repair

slide-31
SLIDE 31

Lecture 8 Page 31 CS 118 Winter 2016

Metcalfe’s Law

  • If this is right, key to maximizing network utility is

maximizing N

slide-32
SLIDE 32

Lecture 8 Page 32 CS 118 Winter 2016

Internet principle

  • Talking to everyone poorly is more important

than talking to anyone well

– Prefer capability over efficiency – Prefer capability over performance – Prefer capability over security – Prefer capability over anything else!

Capability is everything

slide-33
SLIDE 33

Lecture 8 Page 33 CS 118 Winter 2016

Benefits of a common layer

  • All the benefits of dovetailing

– Abstraction – Emulation – Containment – Scale

  • Common expectations

– Encourages internetwork communication that avoids idioms, or uses them very carefully

  • Stacking supports recursion

– Can be applied in various places, repeatedly – AND multiple versions don’t interact

slide-34
SLIDE 34

Lecture 8 Page 34 CS 118 Winter 2016

The Hourglass Principle

slide-35
SLIDE 35

Lecture 8 Page 35 CS 118 Winter 2016

The Narrow Waist

HTTP/DNS/FTP/ NFS/IM

TCP/UDP/ SCTP/RTP Ethernet/ FDDI/Sonet

λ PPM, λ CDMA, e- NRZ, e- PCM HTTP DNS FTP NFS IM λPPM λCDMA eNRZ ePCM

slide-36
SLIDE 36

Lecture 8 Page 36 CS 118 Winter 2016

How may waists?

  • IP

– The one ring…

  • 802.*

– The lowest layer above hardware, for many

  • HTTP/HTTPS

– A user layer that works everywhere – Even where others are blocked

slide-37
SLIDE 37

Lecture 8 Page 37 CS 118 Winter 2016

Issues with a common layer

  • Lowered expectations

– Avoiding idioms may be less efficient – Least common denominator may be weak

  • Cost

– Everyone translates, sometimes even when not necessary – Common language is native to no one

  • Like Esperanto
slide-38
SLIDE 38

Lecture 8 Page 38 CS 118 Winter 2016

Why has stacked layering won?

  • Benefits outweigh costs

– There were critics as recently as 1990s, e.g., that IP was not fast enough for network disks

  • Parallels lingua franca experience

– Removes “home field advantage”

  • Nobody “spoke” their “native languages” all

that well, anyway

– The lingua franca of networking developed as networking itself developed

slide-39
SLIDE 39

Lecture 8 Page 39 CS 118 Winter 2016

How layers are used

  • More about dovetailing (peer layers)
  • More about stacked layers
slide-40
SLIDE 40

Lecture 8 Page 40 CS 118 Winter 2016

Dovetailed (peer) layers Net A Net B

slide-41
SLIDE 41

Lecture 8 Page 41 CS 118 Winter 2016

Translation Net A Net B

slide-42
SLIDE 42

Lecture 8 Page 42 CS 118 Winter 2016

Peer – what is translated?

Everything:

  • Message contents
  • Addresses
slide-43
SLIDE 43

Lecture 8 Page 43 CS 118 Winter 2016

Stacked layers

Net A Net B Net C Internet

  • Remember, we’re thinking layers, not physical

connections here

slide-44
SLIDE 44

Lecture 8 Page 44 CS 118 Winter 2016

Stacked layers

Where does communication go?

  • Between the subnets?
  • Or through the common layer?

Net A Net B Net C Internet

slide-45
SLIDE 45

Lecture 8 Page 45 CS 118 Winter 2016

Subnet to subnet

  • Common interchange

– Translate to common – Relay common – Translate back

slide-46
SLIDE 46

Lecture 8 Page 46 CS 118 Winter 2016

Subnet to subnet

  • Pros:

– Reduces number of translators

  • Compared to direct

translation

– Sub-layers can be tuned to native contexts

  • Cons:

– Twice translated – Like two-step dovetailing

slide-47
SLIDE 47

Lecture 8 Page 47 CS 118 Winter 2016

Staying in the waist

  • Common as primary

– Use sub-layers as a transit

slide-48
SLIDE 48

Lecture 8 Page 48 CS 118 Winter 2016

Staying in the waist

  • Pros:

– Sub-layers for local environments, local relaying – Translate just the name – Use sub-layer as a transit communications service

  • Cons:

– Enables communication

  • nly at the common layer
slide-49
SLIDE 49

Lecture 8 Page 49 CS 118 Winter 2016

Conclusion: stacking as transit wins

  • Avoids translation

– Except for the names – And content, as necessary, at the endpoints

  • Supports localization

– Using subnets as transits

slide-50
SLIDE 50

Lecture 8 Page 50 CS 118 Winter 2016

A layer vs. layering

  • A layer (one layer)

– A homogeneous network – Largest group that can communicate via transitive closure with

  • ne protocol and one

name space – Largest network with one protocol and one namespace

  • Layering (stacked

transit using multiple layers)

– Creating a homogeneous network from a set of heterogeneous networks

slide-51
SLIDE 51

Lecture 8 Page 51 CS 118 Winter 2016

Stacking via transit

  • Transiting other layers

– A layer as unifying different networks

  • The basic definition
  • Translating capabilities

– A layer as an adapter between networks

  • Takes one capability and turns it into another
slide-52
SLIDE 52

Lecture 8 Page 52 CS 118 Winter 2016

Services provided by a layer

  • Communication

– Shared state coordination

  • Any computable function

– High-level capabilities built from shared state – Typically that assist communication itself

slide-53
SLIDE 53

Lecture 8 Page 53 CS 118 Winter 2016

Useful functions

  • Emulation

– Act like a single physical link

  • Splitting

– Large messages over smaller ones

  • Joining

– Pack many small messages in one larger one

  • Correction

– Repair the impact of loss, error, reordering

slide-54
SLIDE 54

Lecture 8 Page 54 CS 118 Winter 2016

What defines a layer?

  • WHO can communicate

– Largest group using a single set of rules

  • HOW they use communication

– Services that users can apply to problems – 2-party? Multiparty? – Reliable? Ordered? Like a wire or like packages?

  • HOW they interact with heterogeneous nets

– The kinds of other networks that a layer can “group”

slide-55
SLIDE 55

Lecture 8 Page 55 CS 118 Winter 2016

Layers as building blocks

  • Capabilities it provides
  • Expectations it assumes
slide-56
SLIDE 56

Lecture 8 Page 56 CS 118 Winter 2016

Layer expectations

  • A layer is a common language

– But only for nets it can translate to

  • Requirements:

– Name translation

  • Identify party’s local name, given common one

– Capability translation

  • Use the lower net as a communications link
slide-57
SLIDE 57

Lecture 8 Page 57 CS 118 Winter 2016

Layer capabilities

  • A layer provides a common language

– A common interface – A common set of services – With which users can apply

  • Expectations:

– Name

  • Users must identify party’s common name

– Capability

  • Users must be able to use the services provided
slide-58
SLIDE 58

Lecture 8 Page 58 CS 118 Winter 2016

Things you can do with layers

  • Unify heterogeneous

networks

– As we’ve seen – Bridge communications between other layers

  • Create new services

– Does not have to join heterogeneous nets – Can bridge capabilities between other layers

slide-59
SLIDE 59

Lecture 8 Page 59 CS 118 Winter 2016

Glue layers

  • Adapt capabilities

– Lossy -> reliable – Reordered -> ordered – Jittery -> periodic – Stream -> message – Message -> stream – Multiple stream -> 1 – 1 stream -> multiple

slide-60
SLIDE 60

Lecture 8 Page 60 CS 118 Winter 2016

How layers interact

  • Common (upper) layer

– Translates its (common) names to that of the lower layer – Creates its own (common) services from those provided by the lower

  • Various (lower) layers

– Expect upper layer to use its names – Expect upper layer to use its services – Provides some set of communications capabilities within its network

slide-61
SLIDE 61

Lecture 8 Page 61 CS 118 Winter 2016

Things that make you go hmm…

  • Upper layer also

– Expects its names – Provides its services

  • Lower layer also

– Translates its names – Creates its services

slide-62
SLIDE 62

Lecture 8 Page 62 CS 118 Winter 2016

What’s the difference?

  • Common layer
  • Each heterogeneous

layer

slide-63
SLIDE 63

Lecture 8 Page 63 CS 118 Winter 2016

So what really defines a layer?

  • Largest set that can

communicate with:

– Single name space – Single protocol

  • A network with:

– Common expectations – Common capabilities Every layer is its own “one ring”

slide-64
SLIDE 64

Lecture 8 Page 64 CS 118 Winter 2016

Examples of layers

  • “Lowest” (touch the physical layer)

– Ethernet, ATM

  • Above Ethernet

– IP, ARP, PPPoE

  • Above IP

– TCP, UDP, ICMP

  • Above TCP

– HTTP, SMTP, IMAP, DNS, NFS, NTP

slide-65
SLIDE 65

Lecture 8 Page 65 CS 118 Winter 2016

Different expectations and capabilities

  • HTTP

– Provides request/response messaging – Expects reliable, ordered stream of bytes

  • TCP

– Provides reliable, ordered stream of bytes – Expects messaging

  • Delivered within 2 minutes if delivered
  • If lost, because of congestion (competition)
  • Mostly without errors
  • Ethernet

– Provides messaging without errors (can be lost) – Expects a shared wire (originally)

slide-66
SLIDE 66

Lecture 8 Page 66 CS 118 Winter 2016

Messages inside messages

  • Frame

– Ethernet

  • IP

– TCP » HTTP

slide-67
SLIDE 67

Lecture 8 Page 67 CS 118 Winter 2016

Messages spread across messages

  • IP datagram =

– IP fragment 1 – IP fragment 2

slide-68
SLIDE 68

Lecture 8 Page 68 CS 118 Winter 2016

Summary

  • Layering allows us to create powerful

networks from components

  • Stacking layers for transit

– Transit is the win for heterogeneity

  • Layers have requirements

– What they expect

  • Layers create capabilities

– What they provide