Concise Encoding of Flow Attributes in SDN Switches Robert MacDavid - - PowerPoint PPT Presentation

concise encoding of flow attributes in sdn switches
SMART_READER_LITE
LIVE PREVIEW

Concise Encoding of Flow Attributes in SDN Switches Robert MacDavid - - PowerPoint PPT Presentation

Concise Encoding of Flow Attributes in SDN Switches Robert MacDavid *, Rdiger Birkner , Ori Rottenstreich*, Arpit Gupta*, Nick Feamster*, Jennifer Rexford* *Princeton University, ETH Zrich Motivation Incoming Flows Classifier


slide-1
SLIDE 1

Concise Encoding of Flow Attributes in SDN Switches

Robert MacDavid*, Rüdiger Birkner†, Ori Rottenstreich*, Arpit Gupta*, Nick Feamster*, Jennifer Rexford*

*Princeton University, †ETH Zürich

slide-2
SLIDE 2

2

Motivation

Classifier Switches Incoming Flows

slide-3
SLIDE 3

3

Motivation - Load Balancing

slide-4
SLIDE 4

3

Motivation - Load Balancing

LB Class 1

slide-5
SLIDE 5

3

Motivation - Load Balancing

LB Class 1 LB Class 2

slide-6
SLIDE 6

4

Motivation - Quick Failover

slide-7
SLIDE 7

4

Motivation - Quick Failover

Preferred Path Backup Path

slide-8
SLIDE 8

4

Motivation - Quick Failover

Preferred Path Backup Path

slide-9
SLIDE 9

4

Motivation - Quick Failover

Backup Path Backup Path

slide-10
SLIDE 10

5

Motivation - Service Chaining

slide-11
SLIDE 11

5

Motivation - Service Chaining

slide-12
SLIDE 12

5

Motivation - Service Chaining

slide-13
SLIDE 13

5

Motivation - Service Chaining

slide-14
SLIDE 14

6

Motivation - Access Control

slide-15
SLIDE 15

6

Motivation - Access Control

slide-16
SLIDE 16

6

Motivation - Access Control

slide-17
SLIDE 17

6

Motivation - Access Control

slide-18
SLIDE 18

6

Motivation - Access Control

slide-19
SLIDE 19

6

Motivation - Access Control

? ?

slide-20
SLIDE 20

7

Tagging Applications

Application Existing Solution Tag Field Tag Conveyed By Service Chaining FlowTags IP Fragment Field First Middlebox Policy Enforcement Alpaca IP Source Address DHCP SDN-Enabled IXP iSDX Destination MAC ARP

slide-21
SLIDE 21

8

B A

n1

D C

n2 n3

Example: Service Chaining

Edge Switch

Path Tag A,C 00 A,D 01 B,C 10 B,D 11

slide-22
SLIDE 22

00→A 01→A 10→B 11→B 00→C 01→D 10→C 11→D

Exact-Match Rules

8

B A

n1

D C

n2 n3

Example: Service Chaining

Edge Switch

Path Tag A,C 00 A,D 01 B,C 10 B,D 11

slide-23
SLIDE 23

8

B A

n1

D C

n2 n3

Example: Service Chaining

Edge Switch

0*→A 1*→B *0→C *1→D

Wildcard-Match Rules

Path Tag A,C 00 A,D 01 B,C 10 B,D 11

slide-24
SLIDE 24

9

Attribute-Encoding Tags

Switch actions often depend on one attribute

B A

n1

If (A in Tag): goTo A If (B in Tag): goTo B

D C

n2 n3

If (C in Tag): goTo C If (D in Tag): goTo D

slide-25
SLIDE 25

10

Tagging Applications

Application Attributes Typical Attribute Space Size Service Chaining Middleboxes O(10) Policy Enforcement Host Permissions O(100) SDN-Enabled IXP Advertising Peers O(1000)

slide-26
SLIDE 26

11

Attribute-Encoding Tags

Any tagging problem is composed of two parts:

slide-27
SLIDE 27

11

Attribute-Encoding Tags

FEC Attributes Tag 1 traverse A, traverse C 00 2 hit Mbox A, hit Mbox D 01 3 hit Mbox B, hit Mbox C 10 4 hit Mbox B, hit Mbox D 11

  • 1. A Tag for every FEC

Any tagging problem is composed of two parts:

slide-28
SLIDE 28

11

Attribute-Encoding Tags

FEC Attributes Tag 1 traverse A, traverse C 00 2 hit Mbox A, hit Mbox D 01 3 hit Mbox B, hit Mbox C 10 4 hit Mbox B, hit Mbox D 11

  • 1. A Tag for every FEC

Attribute Match Condition hit Mbox A Compare Tag to 0* hit Mbox B Compare Tag to 1* hit Mbox C Compare Tag to *0 hit Mbox D Compare Tag to *1

  • 2. Pattern-match strings

to check for attributes Any tagging problem is composed of two parts:

slide-29
SLIDE 29

11

Attribute-Encoding Tags

FEC Attributes Tag 1 traverse A, traverse C 00 2 hit Mbox A, hit Mbox D 01 3 hit Mbox B, hit Mbox C 10 4 hit Mbox B, hit Mbox D 11

  • 1. A Tag for every FEC

Attribute Match Condition hit Mbox A Compare Tag to 0* hit Mbox B Compare Tag to 1* hit Mbox C Compare Tag to *0 hit Mbox D Compare Tag to *1

  • 2. Pattern-match strings

to check for attributes Any tagging problem is composed of two parts:

Tradeoff: Tag width vs. complexity of match conditions

slide-30
SLIDE 30

12

  • 1. Construct tagging scheme for

unordered sets of attributes

  • 2. Extend scheme to support ordered

sequences of attributes

  • 3. Using prefix codes to reduce tag size

PathSets Outline

slide-31
SLIDE 31

13

FEC

Attributes S1

B, C

S2

B, C, D

S3

D

S4

D, E

S5

D, E, F FEC

Attributes S1

B C _ _ _

S2

B C D _ _

S3

_ _ D _ _

S4

_ _ D E _

S5

_ _ D E F

Attribute Sets Attribute Vectors

Strawman Approach

slide-32
SLIDE 32

14

Masks over [B,C,D,E,F]

FEC Bitmask

S1

11000

S2

11100

S3

00100

S4

00110

S5

00111

Vector Bitmasks Attribute Vectors

FEC

Attributes S1

B C _ _ _

S2

B C D _ _

S3

_ _ D _ _

S4

_ _ D E _

S5

_ _ D E F

Strawman Approach

slide-33
SLIDE 33

15

Set Bitmask

B,C

11000

B,C,D

11100

D

00100

D,E

00110

D,E,F

00111

Very simple match rules!

Attribute Match

B

1****

C

*1***

D

**1**

E

***1*

F

****1

Tags Match Patterns

Strawman Approach

slide-34
SLIDE 34

16

Set Bitmask

B,C

11000

B,C,D

11100

D

00100

D,E

00110

D,E,F

00111

Problem: Tag size is linear in the number

  • f attributes to encode. Scales poorly

Strawman Approach

slide-35
SLIDE 35

17

Attributes S1

B C _ _ _

S2

B C D _ _

S3

_ _ D _ _

S4

_ _ D E _

S5

_ _ D E F

Masking over Clusters

Subsets of [B,C,D,E,F]

FEC Bitmask

S1

11000

S2

11100

S3

00100

S4

00110

S5

00111

slide-36
SLIDE 36

17

Attributes S1

B C _ _ _

S2

B C D _ _

S3

_ _ D _ _

S4

_ _ D E _

S5

_ _ D E F

Masking over Clusters

Subsets of [B,C,D,E,F]

FEC Bitmask

S1

11000

S2

11100

S3

00100

S4

00110

S5

00111

slide-37
SLIDE 37

17

Attributes S1

B C _ _ _

S2

B C D _ _

S3

_ _ D _ _

S4

_ _ D E _

S5

_ _ D E F

Masking over Clusters

Subsets of [B,C,D,E,F]

FEC Bitmask

S1

11000

S2

11100

S3

00100

S4

00110

S5

00111

slide-38
SLIDE 38

17

BCD DEF

S1

110

S2

111

S3

001 100

S4

110

S5

111 Subsets of Cluster [B,C,D] Subsets of Cluster [D,E,F]

Attributes S1

B C _ _ _

S2

B C D _ _

S3

_ _ D _ _

S4

_ _ D E _

S5

_ _ D E F

Masking over Clusters

slide-39
SLIDE 39

BCD DEF

S1

110

S2

111

S3

001 100

S4

110

S5

111

Cluster-0 Cluster-1

18

Two-part Tag

slide-40
SLIDE 40

BCD DEF

S1

110

S2

111

S3

001 100

S4

110

S5

111

1 Cl-ID

18

Two-part Tag

ID of Cluster 1

slide-41
SLIDE 41

1 1 D E F

BCD DEF

S1

110

S2

111

S3

001 100

S4

110

S5

111

1 Cl-ID

18

Two-part Tag

Mask of Cluster 1

slide-42
SLIDE 42

1 1 D E F

BCD DEF

S1

110

S2

111

S3

001 100

S4

110

S5

111

1 Cl-ID

  • 4 bits instead of strawman’s 5
  • Tag Size now =

log2(Num Clusters) + Cluster Size

18

Two-part Tag

slide-43
SLIDE 43

19

  • Tag field at least as big as the largest set
  • Ok if assume sets are sparse

Attributes . . . . Sk ABCDEFGH . . . .

1 1 1 1 1 1 1 1 ID A B C D E F G H

Tag for set Sk

Min Mask Size

slide-44
SLIDE 44

20

  • If X appears in multiple clusters, then multiple

match patterns needed for X

BCD DEF S1 110 S2 111 S3 001 100 S4 110 S5 111

Matching not as easy

slide-45
SLIDE 45

20

  • If X appears in multiple clusters, then multiple

match patterns needed for X

BCD DEF S1 110 S2 111 S3 001 100 S4 110 S5 111

Matching not as easy

D in both clusters

slide-46
SLIDE 46

20

  • If X appears in multiple clusters, then multiple

match patterns needed for X

BCD DEF S1 110 S2 111 S3 001 100 S4 110 S5 111

1 1 1 ID D E F 1 1 1 ID B C D

Matching not as easy

slide-47
SLIDE 47

20

  • If X appears in multiple clusters, then multiple

match patterns needed for X

BCD DEF S1 110 S2 111 S3 001 100 S4 110 S5 111

1 1 1 ID D E F 1 1 1 ID B C D

Att Match B 01** C 0*1* D 0**1 OR 11** E 1*1* F 1**1

Matching not as easy

slide-48
SLIDE 48

20

  • If X appears in multiple clusters, then multiple

match patterns needed for X

BCD DEF S1 110 S2 111 S3 001 100 S4 110 S5 111

1 1 1 ID D E F 1 1 1 ID B C D

Att Match B 01** C 0*1* D 0**1 OR 11** E 1*1* F 1**1

6 patterns (strawman had 5)

Matching not as easy

slide-49
SLIDE 49

21

  • 1. Construct tagging scheme for unordered

sets of attributes

  • 2. Extend scheme to support ordered

sequences of attributes

  • 3. Using prefix codes to reduce tag size

PathSets Outline

slide-50
SLIDE 50

22

Ordered Attribute Checks

Sequence A→B→C→D C→D→E B→E A→C→E

slide-51
SLIDE 51

22

Ordered Attribute Checks

Tag 11110 00111 01001 10101 Sequence A→B→C→D C→D→E B→E A→C→E

One Cluster - ABCDE - No ID

slide-52
SLIDE 52

22

Ordered Attribute Checks

Tag 11110 00111 01001 10101 Sequence A→B→C→D C→D→E B→E A→C→E

slide-53
SLIDE 53

22

Att. Match String A “1****” B “*1***” C “**1**” D “***1*” E “****1”

Ordered Attribute Checks

Tag 11110 00111 01001 10101 Sequence A→B→C→D C→D→E B→E A→C→E

slide-54
SLIDE 54

22

Att. Match String A “1****” B “*1***” C “**1**” D “***1*” E “****1”

Ordered Attribute Checks

Tag 11110 00111 01001 10101 Sequence A→B→C→D C→D→E B→E A→C→E

Doesn’t enforce attribute ordering

slide-55
SLIDE 55

22

Att. Match String A “1****” B “*1***” C “**1**” D “***1*” E “****1”

Ordered Attribute Checks

Tag 11110 00111 01001 10101 Sequence A→B→C→D C→D→E B→E A→C→E

Sequences ordered Left-to-Right

slide-56
SLIDE 56

22

Att. Match String A “1****” B “*1***” C “**1**” D “***1*” E “****1”

Ordered Attribute Checks

Tag 11110 00111 01001 10101 Sequence A→B→C→D C→D→E B→E A→C→E Att. Match String A “1****” B “01***” C “001**” D “0001*” E “00001”

Leftmost attribute takes priority Sequences ordered Left-to-Right

slide-57
SLIDE 57

23

Attribute Sequences

If all sequences adhere to some supersequence, the extension is straightforward

Sequence Tag A→B→C→D 11110 C→D→E 00111 B→E 01001 A→C→E 10101

Att. Match String A “1****” B “01***” C “001**” D “0001*” E “00001”

Supersequence ID A→B→C→D→E

slide-58
SLIDE 58

24

Real Applications not ideal

Attribute Sequence

A→B →C B →C→D A→C→B C→B →D

B comes before C B comes after C

slide-59
SLIDE 59

24

Real Applications not ideal

Attribute Sequence

A→B →C B →C→D A→C→B C→B →D

B comes before C B comes after C

1 1 2 2 1 2

slide-60
SLIDE 60

24

Real Applications not ideal

Attribute Sequence

A→B →C B →C→D A→C→B C→B →D

B comes before C B comes after C

1 1 2 2 1 2

Total Order = A < B1 < C < B2 < D

slide-61
SLIDE 61

24

Real Applications not ideal

Attribute Sequence

A→B →C B →C→D A→C→B C→B →D

1 1 2 2

Total Order = A < B1 < C < B2 < D

Tag

11100 01101 10110 00111

slide-62
SLIDE 62

24

Real Applications not ideal

Attribute Sequence

A→B →C B →C→D A→C→B C→B →D

1 1 2 2

Total Order = A < B1 < C < B2 < D

Att Match Pattern A 1**** B 01*** OR 0001* C 001** D 00001

Tag

11100 01101 10110 00111

slide-63
SLIDE 63

25

How do we systematically identify and resolve conflicts efficiently?

slide-64
SLIDE 64

Sequences

A→C→B→D E→A→B D→F A→B→C→D

26

Heuristic Intuition

A B C D F E

Sequence Graph

Vertex for each attribute

slide-65
SLIDE 65

Sequences

A→C→B→D E→A→B D→F A→B→C→D

A

26

Heuristic Intuition

A B C D F E

Sequence Graph

slide-66
SLIDE 66

Sequences

A→C→B→D E→A→B D→F A→B→C→D

C

26

Heuristic Intuition

A B C D F E

Sequence Graph

slide-67
SLIDE 67

Sequences

A→C→B→D E→A→B D→F A→B→C→D

B

26

Heuristic Intuition

A B C D F E

Sequence Graph

slide-68
SLIDE 68

Sequences

A→C→B→D E→A→B D→F A→B→C→D

26

Heuristic Intuition

A B C D F E

Sequence Graph

D

slide-69
SLIDE 69

Sequences

A→C→B→D E→A→B D→F A→B→C→D

26

Heuristic Intuition

A B C D F E

Sequence Graph

Repeat for all sequences Use existing graph theory to identify and resolve conflicts

slide-70
SLIDE 70

27

  • 1. Construct tagging scheme for unordered

sets of attributes

  • 2. Extend scheme to support ordered

sequences of attributes

  • 3. Using prefix codes to reduce tag size

PathSets Outline

slide-71
SLIDE 71

28

Fixed-Length IDs are Inefficient

slide-72
SLIDE 72

28

Fixed-Length IDs are Inefficient

ID Clusters 00 [A,B,C] 01 [C,D] 10 [E,F] 11 [W,X,Y,Z]

Shortest Tag = 4 Bits Longest Tag = 6 Bits Tags can vary in size

slide-73
SLIDE 73

28

Fixed-Length IDs are Inefficient

ID Clusters 00 [A,B,C] 01 [C,D] 10 [E,F] 11 [W,X,Y,Z]

Shortest Tag = 4 Bits Longest Tag = 6 Bits Tags can vary in size

ID Clusters 000 [E,F] 001 [F,H,I] 010 [L,M] 011 [M,N,O,P] 100 [R,S,T] 101

  • 110
  • 111
  • Many identifiers can

be left unused

slide-74
SLIDE 74

29

Prefix-Free Codes as IDs

ID Clusters 1 [A,B,C,D] 01 [E,F,G] 001 [H,I] 0001 [J] 0000

slide-75
SLIDE 75

29

Prefix-Free Codes as IDs

ID Clusters 1 [A,B,C,D] 01 [E,F,G] 001 [H,I] 0001 [J] 0000

  • Observation: Tags are

uniquely decodable iff no ID is a prefix of any other

  • Can use this to create

variable-length identifiers

slide-76
SLIDE 76

29

Prefix-Free Codes as IDs

ID Clusters 1 [A,B,C,D] 01 [E,F,G] 001 [H,I] 0001 [J] 0000

  • Observation: Tags are

uniquely decodable iff no ID is a prefix of any other

  • Can use this to create

variable-length identifiers

  • Use theory of Kraft’s

Inequality to optimally build identifiers

slide-77
SLIDE 77

29

Prefix-Free Codes as IDs

ID Clusters 1 [A,B,C,D] 01 [E,F,G] 001 [H,I] 0001 [J] 0000

  • Shortest Tag = 5 Bits

Longest Tag = 5 Bits

  • Observation: Tags are

uniquely decodable iff no ID is a prefix of any other

  • Can use this to create

variable-length identifiers

  • Use theory of Kraft’s

Inequality to optimally build identifiers

slide-78
SLIDE 78

30

  • Evaluated Scheme for two Applications:
  • 1. Software-Defined IXP Case

(Unordered Sets)

  • 2. Middlebox paths (Ordered Sets)

Empirical Analysis

slide-79
SLIDE 79

31

  • Used AMS-IX RIPE RIB dumps (633k prefixes, 63

attached networks)

  • Generated 1k random SDN policies, computed switch

table size Statistics

  • Balancing tradeoffs, tags that required 37 bits used

<2k switch entries

  • Flat tagging requires ~18 bits, >200k entries

SDN-IXP Evaluation

slide-80
SLIDE 80

32

  • 800 random paths using Markov chains over some

hidden super sequence

  • 5% chance of pairwise reordering
  • 40 distinct middlebox types

Statistics

  • Flat tagging needs 10 bits, ~150 entries per switch
  • PathSets needs <19 bits, ~75 entries

Service Chaining Evaluation

slide-81
SLIDE 81

33

  • Our tagging scheme is general enough to be used

by many applications

  • A first step for non-flat attribute-encoding tagging
  • Prototype code publicly available:

github.com/PrincetonUniversity/PathSets

Conclusions

slide-82
SLIDE 82

Thank You!