Using the Network Layering DAG CS 118 Computer Network Fundamentals - - PowerPoint PPT Presentation

using the network layering dag cs 118 computer network
SMART_READER_LITE
LIVE PREVIEW

Using the Network Layering DAG CS 118 Computer Network Fundamentals - - PowerPoint PPT Presentation

Using the Network Layering DAG CS 118 Computer Network Fundamentals Peter Reiher Lecture 13 CS 118 Page 1 Winter 2016 Outline The DAG A closer look at tables A closer look at directed links A closer look at FSMs and their


slide-1
SLIDE 1

Lecture 13 Page 1 CS 118 Winter 2016

Using the Network Layering DAG CS 118 Computer Network Fundamentals Peter Reiher

slide-2
SLIDE 2

Lecture 13 Page 2 CS 118 Winter 2016

Outline

  • The DAG

– A closer look at tables – A closer look at directed links – A closer look at FSMs and their state – Optimizations and equivalences

  • DAG walks
slide-3
SLIDE 3

Lecture 13 Page 3 CS 118 Winter 2016

Reminder

  • This is an conceptual approach

– There’s no common implementation approach – Most code is designed as a fixed structure

  • And what are shown as a separate tables and FSM state

is often mangled together

– There are programmable communication systems

  • That COULD be programmed like this
  • E.g., Netgraph, Click
slide-4
SLIDE 4

Lecture 13 Page 4 CS 118 Winter 2016

Another reminder

  • The DAG describes motion through network

layers

  • Not motion between network nodes
  • Each node on a path has its own DAG of this

type

– Simple or complex

slide-5
SLIDE 5

Lecture 13 Page 5 CS 118 Winter 2016

The DAG

  • Components

– Nodes – Arcs

  • Rules (constraints)
slide-6
SLIDE 6

Lecture 13 Page 6 CS 118 Winter 2016

10,000 ft view

  • Alternating nodes

– FSM + state – Tables

  • Directed arcs

– With rules governing what they connect

Hard state WDM link stream DNS A DNS->IPv4 stream DNS AAAA DNS->IPv6 Stream DNS txt DNS->O-ID packet sBGP IPv4->IPv4 packet BGP IPv4->IPv4 packet OSPF IPv4->IPv4 packet ARP IPv4->E-mac packet 64tun cfg IPv6->IPv4 E-net Id=45 WDM ID=3 Hard state TCP conn. Soft state Delta-T Hard state WDM link Soft state tunnel

  • Rec. block

Service type Update protocol From->To

Legend

slide-7
SLIDE 7

Lecture 13 Page 7 CS 118 Winter 2016

Components

  • Tables
  • FSMs and their state
  • Directed links
slide-8
SLIDE 8

Lecture 13 Page 8 CS 118 Winter 2016

Tables

  • Name translation

– Bridge identities between layers – …which indicates choices of layers (or not) – …which indicates network paths

stream DNS A DNS->IPv4

slide-9
SLIDE 9

Lecture 13 Page 9 CS 118 Winter 2016

For example,

Hard state WDM link stream DNS A DNS->IPv4 stream DNS AAAA DNS->IPv6 Stream DNS txt DNS->O-ID packet sBGP IPv4->IPv4 packet BGP IPv4->IPv4 packet OSPF IPv4->IPv4 packet ARP IPv4->E-mac packet 64tun cfg IPv6->IPv4 E-net Id=45 WDM ID=3 Hard state TCP conn. Soft state Delta-T Hard state WDM link Soft state tunnel

  • Rec. block

Service type Update protocol From->To

Legend

This table translates the DNS name to an IPv4 name We could have chosen tables that translate the DNS name to an IPv6 or OID name Implying different layer choices And different paths through the network

stream DNS A DNS->IPv4

slide-10
SLIDE 10

Lecture 13 Page 10 CS 118 Winter 2016

FSMs and their state

  • Represents the protocol

– State

  • Representing a running FSM

– Waiting for

  • Tape-in (from FSM above, i.e., “upper layer”)
  • Messages (from FSM below, i.e., “lower layer”)
  • Timer events

– Emitting

  • Tape-out (to FSM above, i.e., “upper layer”)
  • Messages (to FSM below, i.e., “lower layer”)

– Rules

  • Governing the relation of the above

Hard state TCP conn.

slide-11
SLIDE 11

Lecture 13 Page 11 CS 118 Winter 2016

For example,

Hard state WDM link stream DNS A DNS->IPv4 stream DNS AAAA DNS->IPv6 Stream DNS txt DNS->O-ID packet sBGP IPv4->IPv4 packet BGP IPv4->IPv4 packet OSPF IPv4->IPv4 packet ARP IPv4->E-mac packet 64tun cfg IPv6->IPv4 E-net Id=45 WDM ID=3 Hard state TCP conn. Soft state Delta-T Hard state WDM link Soft state tunnel

  • Rec. block

Service type Update protocol From->To

Legend

Hard state TCP conn.

A TCP finite state machine The layer above provided an IPv4 address (name) and a DNS name (msg) It will emit messages to the lower layer The lower layer will eventually provide a response from the DNS server Which the TCP layer will emit to the upper DNS layer

slide-12
SLIDE 12

Lecture 13 Page 12 CS 118 Winter 2016

Directed links

  • Describe relationships between

– Running FSMs (protocols in progress)

  • Including “users” (information source/sink)
  • Including links (physical information conduits)

– Translation tables

slide-13
SLIDE 13

Lecture 13 Page 13 CS 118 Winter 2016

For example,

Hard state WDM link stream DNS A DNS->IPv4 stream DNS AAAA DNS->IPv6 Stream DNS txt DNS->O-ID packet sBGP IPv4->IPv4 packet BGP IPv4->IPv4 packet OSPF IPv4->IPv4 packet ARP IPv4->E-mac packet 64tun cfg IPv6->IPv4 E-net Id=45 WDM ID=3 Hard state TCP conn. Soft state Delta-T Hard state WDM link Soft state tunnel

  • Rec. block

Service type Update protocol From->To

Legend

Describes relationship between DNS IPv4 table and TCP FSM That table outputs serve as inputs to TCP FSM

slide-14
SLIDE 14

Lecture 13 Page 14 CS 118 Winter 2016

Rules (graph constraints)

  • Structure
  • Nodes
  • Links
  • Paths
slide-15
SLIDE 15

Lecture 13 Page 15 CS 118 Winter 2016

Node rules

  • Table rules

– Root tables – Leaf tables – Other tables

  • FSM + state rules
slide-16
SLIDE 16

Lecture 13 Page 16 CS 118 Winter 2016

Root table rules

  • Table just below the “user FSM”

– User FSM represents input/output to the communication system – User FSM isn’t really part of the system – “User” is not necessarily a human user

  • Translates user-provided names to the first

protocol name

– User-provided names are local to the OS

slide-17
SLIDE 17

Lecture 13 Page 17 CS 118 Winter 2016

For example,

Hard state WDM link stream DNS A DNS->IPv4 stream DNS AAAA DNS->IPv6 Stream DNS txt DNS->O-ID packet sBGP IPv4->IPv4 packet BGP IPv4->IPv4 packet OSPF IPv4->IPv4 packet ARP IPv4->E-mac packet 64tun cfg IPv6->IPv4 E-net Id=45 WDM ID=3 Hard state TCP conn. Soft state Delta-T Hard state WDM link Soft state tunnel

  • Rec. block

Service type Update protocol From->To

Legend

stream DNS A DNS->IPv4

The user or application provides a DNS name This table translates the DNS name to an IPv4 name For the use of the next protocol down (TCP, here)

slide-18
SLIDE 18

Lecture 13 Page 18 CS 118 Winter 2016

Leaf table rules

  • Table just above the “link FSM”

– Link FSM represents input/output to the physical link – Link FSM is the only part that’s “real” (all else is emulated)

  • Translates

– Protocol names to physical encodings – Computation to communication

slide-19
SLIDE 19

Lecture 13 Page 19 CS 118 Winter 2016

For example,

Hard state WDM link stream DNS A DNS->IPv4 stream DNS AAAA DNS->IPv6 Stream DNS txt DNS->O-ID packet sBGP IPv4->IPv4 packet BGP IPv4->IPv4 packet OSPF IPv4->IPv4 packet ARP IPv4->E-mac packet 64tun cfg IPv6->IPv4 E-net Id=45 WDM ID=3 Hard state TCP conn. Soft state Delta-T Hard state WDM link Soft state tunnel

  • Rec. block

Service type Update protocol From->To

Legend

packet ARP IPv4->E-mac

This table translates the IPv4 address to an Ethernet MAC address Which the leaf protocol can use to physically send a message across an Ethernet channel

slide-20
SLIDE 20

Lecture 13 Page 20 CS 118 Winter 2016

Intermediate table rules

  • All other tables except root and leaf

– Represents message in/out to FSM above – Represents tape-in/-out to FSM below

  • Translates

– Names in FSM above to names in FSM below

slide-21
SLIDE 21

Lecture 13 Page 21 CS 118 Winter 2016

FSM + state rules

  • FSM represents the protocol

– Operates in a single namespace

  • Real FSMs (part of the system)

– Matches names in table above AND table below

  • Virtual user FSM (top/root)

– Represents system in/out

  • Virtual link FSM (bottom/leaf)

– Represents a physical link

slide-22
SLIDE 22

Lecture 13 Page 22 CS 118 Winter 2016

For example,

Hard state WDM link stream DNS A DNS->IPv4 stream DNS AAAA DNS->IPv6 Stream DNS txt DNS->O-ID packet sBGP IPv4->IPv4 packet BGP IPv4->IPv4 packet OSPF IPv4->IPv4 packet ARP IPv4->E-mac packet 64tun cfg IPv6->IPv4 E-net Id=45 WDM ID=3 Hard state TCP conn. Soft state Delta-T Hard state WDM link Soft state tunnel

  • Rec. block

Service type Update protocol From->To

Legend

Hard state TCP conn.

A real FSM A virtual user FSM A virtual link FSM

slide-23
SLIDE 23

Lecture 13 Page 23 CS 118 Winter 2016

General node rules

  • Roots

– FSMs that represent user programs – Link to root tables

  • Leaves

– FSMs that represent physical links – Linked from leaf tables

  • FSMs

– Operate in a single name space – Refer to tables “below”

slide-24
SLIDE 24

Lecture 13 Page 24 CS 118 Winter 2016

Paths

  • Meaning
  • Rules (constraints)
slide-25
SLIDE 25

Lecture 13 Page 25 CS 118 Winter 2016

Linking nodes

  • Orientation

– Directed – Acyclic

  • Head/tail

– Connects different types of graph nodes:

  • If head is a table, tail is a FSM
  • If head is an FSM, tail is a table
slide-26
SLIDE 26

Lecture 13 Page 26 CS 118 Winter 2016

Head/tail rule

  • Tables and FSMs “alternate”

– In our pictures, looks like this:

slide-27
SLIDE 27

Lecture 13 Page 27 CS 118 Winter 2016

Path meaning

  • Creates communication from networking

– Composed of layered capabilities

  • Describes the “stack” of layers

– All communication is pairwise – Nested composition = linear path (the “stack”) – Each message traverses a single path

slide-28
SLIDE 28

Lecture 13 Page 28 CS 118 Winter 2016

Path rules

  • View of a user host
  • View of an intermediate (relay) host
  • User to user view
slide-29
SLIDE 29

Lecture 13 Page 29 CS 118 Winter 2016

The different host types

1 9 r s Δ Σ

User hosts Relay hosts

slide-30
SLIDE 30

Lecture 13 Page 30 CS 118 Winter 2016

Path in a user host

  • Source (push)

– Enter at top – Exit at bottom

  • Destination (pop)

– Enter at bottom – Exit at top

slide-31
SLIDE 31

Lecture 13 Page 31 CS 118 Winter 2016

Implications of host path rules

  • Tables must tie user to a physical link

– Must start with a name a user knows – Must follow a continuous chain of tables – Must end with a physical link

The maps tell you the DAG structure

(real or implied)

slide-32
SLIDE 32

Lecture 13 Page 32 CS 118 Winter 2016

DAGs and links

  • Links are the physical network connections
  • DAGs exist at the nodes at each end of a link
  • We can hook together DAGs of different nodes

together

  • Describing the overall network path through

layers on multiple nodes

slide-33
SLIDE 33

Lecture 13 Page 33 CS 118 Winter 2016

Path in a relay host

  • Messages

– Enter at a leaf (pop) – Exit at a leaf (push) – Share a common FSM

  • No user input/output
slide-34
SLIDE 34

Lecture 13 Page 34 CS 118 Winter 2016

Path matching

  • Links match tails

Source Destination Relay

slide-35
SLIDE 35

Lecture 13 Page 35 CS 118 Winter 2016

Path matching

  • Links match tails

– Links must match – Tails must match Source Destination Relay

slide-36
SLIDE 36

Lecture 13 Page 36 CS 118 Winter 2016

Path matching

  • Links match tails

– Links must match – Tails must match

  • Ends *and* hops match

heads

Source Destination Relay

slide-37
SLIDE 37

Lecture 13 Page 37 CS 118 Winter 2016

Path matching

  • Links match tails

– Links must match – Tails must match

  • Ends *and* hops match

heads

– Emulate end-to-end – By relaying through shared node Source Destination Relay

slide-38
SLIDE 38

Lecture 13 Page 38 CS 118 Winter 2016

Pushing and popping

  • Each FSM

– On the way down, adds info needed … – For matching FSM on the way up

  • Push/pop

– Stacked layers make messages and FSMs work like one large, distributed FSM

slide-39
SLIDE 39

Lecture 13 Page 39 CS 118 Winter 2016

A deeper look…

  • Tables
  • FSM + state
slide-40
SLIDE 40

Lecture 13 Page 40 CS 118 Winter 2016

Tables

  • Name translation
  • Relay support
slide-41
SLIDE 41

Lecture 13 Page 41 CS 118 Winter 2016

Name translation

  • Map FROM domain

into TO domain

– “Domain” is another term for “namespace” – Map can have:

  • Aliases (N:1)
  • Proxies (1:N)
  • Additional information

Transla(on Table From: To: IP-1 Eth-22 IP-5 Eth-85 “From” domain “To” domain

slide-42
SLIDE 42

Lecture 13 Page 42 CS 118 Winter 2016

Relaying support

  • Governs when can you relay
  • Provides additional information
  • Table origins
slide-43
SLIDE 43

Lecture 13 Page 43 CS 118 Winter 2016

When can you relay?

  • When a table entry exists

– When it’s already there (cached, “push”) – When you can fill it in (i.e., “pull”)

slide-44
SLIDE 44

Lecture 13 Page 44 CS 118 Winter 2016

Does an entry ensure connectivity?

  • Nope!
  • DAG inside one host should match, though

– E.g., remove “thread” of entries “above” when the “bottom” has no entry

slide-45
SLIDE 45

Lecture 13 Page 45 CS 118 Winter 2016

Other table information

  • Resolution context

– Cost, weight, etc. to differentiate proxies

  • Table maintenance

– Expiration time – Origin (for refresh, duplicate detection, etc.)

slide-46
SLIDE 46

Lecture 13 Page 46 CS 118 Winter 2016

Table origins

  • Manual
  • External
slide-47
SLIDE 47

Lecture 13 Page 47 CS 118 Winter 2016

Manual table configuration

  • Preconfigured

– Config files, boot files, etc.

  • Manual manipulation

– User commands

slide-48
SLIDE 48

Lecture 13 Page 48 CS 118 Winter 2016

External table configuration

  • Host configuration

– DHCP

  • Dynamic update

– Routing protocols (covered next week)

slide-49
SLIDE 49

Lecture 13 Page 49 CS 118 Winter 2016

Directed links

  • As part of the table
  • Defining alternates
  • Defining protocol reuse and sharing
slide-50
SLIDE 50

Lecture 13 Page 50 CS 118 Winter 2016

Links in the table

  • What needs to be there?

– Name you have – Name you want – A way to get to the next FSM

  • Via identifier of the namespaces
  • Via separate identifier (OS pointer, e.g.)
  • Or implied

– In the picture so far, a table is defined as having one TO namespace, so the “next FSM” is implied

slide-51
SLIDE 51

Lecture 13 Page 51 CS 118 Winter 2016

Alternates

  • Multiple entries for a name to resolve

– I.e., proxy – Weights or costs

  • Allows us to prioritize selection

– Indicators of usage

  • Use only one
  • Use one until one works
  • Use multiple at the same time

– Forces “parallelism” for fault tolerance, e.g.

– I.e., the bottom half of the hourglass

slide-52
SLIDE 52

Lecture 13 Page 52 CS 118 Winter 2016

Reuse

  • Many FSMs point to a single table

– All share the same FROM namespace – Allows the rest of the path down the DAG to be shared/reused by other protocols – I.e., the top half of the hourglass

slide-53
SLIDE 53

Lecture 13 Page 53 CS 118 Winter 2016

FSMs and their state

  • Soft vs. hard
  • The base case as an FSM
slide-54
SLIDE 54

Lecture 13 Page 54 CS 118 Winter 2016

Soft state

  • Not critical to FSM operation

– Recoverable

  • Cached optimization

– MUST be equivalent to “null start” – I.e., reaches the same result as an FSM that starts in the idle state

slide-55
SLIDE 55

Lecture 13 Page 55 CS 118 Winter 2016

Hard state

  • Critical to FSM operation

– Cannot be recovered; results in error/failure

  • Persists between messages

– E.g., represents shared state with the other end of the channel – Provides context for FSM operation – Acts like a “paused” FSM

slide-56
SLIDE 56

Lecture 13 Page 56 CS 118 Winter 2016

Soft vs. Hard

  • Soft

– Fault tolerant if lost – More efficient if it can recover/refresh

  • Hard

– Requires guarantees, backups, etc. – No communication until restored (if possible)

slide-57
SLIDE 57

Lecture 13 Page 57 CS 118 Winter 2016

The base case as an FSM

  • The base case FSM isn’t really there

– The channel is treated like an FSM

slide-58
SLIDE 58

Lecture 13 Page 58 CS 118 Winter 2016

DAG walks

  • Early binding
  • Late binding
slide-59
SLIDE 59

Lecture 13 Page 59 CS 118 Winter 2016

Early binding

  • Setup path through DAG on first use

– Record that path (e.g., socket data structure) – Reuse that path (forever) – Independent of FSM hard/soft state

slide-60
SLIDE 60

Lecture 13 Page 60 CS 118 Winter 2016

Late binding

  • Every message finds its own way

– Ignore path of previous messages – Each message finds its own – Independent of FSM hard/soft state

slide-61
SLIDE 61

Lecture 13 Page 61 CS 118 Winter 2016

Early vs. late

  • Early (static)

– Pros

  • Ensures stability

– Cons

  • Cannot adapt (suboptimal,

fragile)

  • Late (dynamic)

– Pros

  • Adapts while info

exchange is in progress

– Cons

  • Can be expensive (slow,

costs resources)

  • Can be unpredictable
slide-62
SLIDE 62

Lecture 13 Page 62 CS 118 Winter 2016

Processing

  • The recursive block walks the tree

– Using message as part of context for FSM

Recursive Block Service=#42 ID=JN3E

  • So. state

Service=#42 ID=JN3E

slide-63
SLIDE 63

Lecture 13 Page 63 CS 118 Winter 2016

Graph traversal

  • Each recursive step

– Walks a layer down – Wraps needed state for retrieval at receiver FSM

Recursive Core Service=#42 ID=JN3E Translation Table From: To: JN3E 223.45-7 Recursive Core Service=#42 ID=223.45-7

slide-64
SLIDE 64

Lecture 13 Page 64 CS 118 Winter 2016

Summary

  • The DAG encodes:

– The protocol stack – The network architecture

  • The DAG has constraints

– Esp. DAG portions must match

  • The DAG is a concept

– Implementations vary, grouping/partitions vary