The Bits Must Flow -or- (Net)Working Through the Abstractions

A presentation at THAT Conference, WI 2023 in July 2023 in Wisconsin Dells, WI, USA by fen aldrich

Slide 1

Slide 1

The Bits Must Flow netWorking through the abstractions @crayzeigh@hachyderm.io 1

Slide 2

Slide 2

@crayzeigh@hachyderm.io 2

Slide 3

Slide 3

@crayzeigh@hachyderm.io 3

Slide 4

Slide 4

@crayzeigh@hachyderm.io 4

Slide 5

Slide 5

Hi I’m fen (they/them) social: @crayzeigh@hachyderm.io slides: speaking.crayzeigh.com @crayzeigh@hachyderm.io 5

Slide 6

Slide 6

Developer Advocate: @crayzeigh@hachyderm.io 6

Slide 7

Slide 7

Internet Traffic Per Second 167,069 GB @crayzeigh@hachyderm.io 7

Slide 8

Slide 8

bits per second 1,336,544,000,000,000 @crayzeigh@hachyderm.io 8

Slide 9

Slide 9

What happens when you visit a website? @crayzeigh@hachyderm.io 9

Slide 10

Slide 10

@crayzeigh@hachyderm.io 10

Slide 11

Slide 11

OSI 7-Layer model Application Presentation Session Transport Network Data Link Physical @crayzeigh@hachyderm.io 11

Slide 12

Slide 12

OSI TCP/IP Application Application Presentation

Session

Transport Transport Network Internet Data Link Network Access Physical

@crayzeigh@hachyderm.io 12

Slide 13

Slide 13

Why all these layers anyway? @crayzeigh@hachyderm.io 13

Slide 14

Slide 14

Layer 2: Network Access Data Frames link digital to physical @crayzeigh@hachyderm.io 14

Slide 15

Slide 15

Layer 2: Switching Sending data to local devices @crayzeigh@hachyderm.io 15

Slide 16

Slide 16

Frame Header Preamble SFD Dest. MAC Src. MAC Type Data & Pad FCS 7 Bytes 1 Byte 6 Bytes 6 Bytes 2 Bytes 46–1500 Bytes 4 Bytes @crayzeigh@hachyderm.io 16

Slide 17

Slide 17

1 MAC Address 01:23:45 01:23:45:67:89:ab :67:89:ab 1. Media Access Control @crayzeigh@hachyderm.io 17

Slide 18

Slide 18

MAC Address – Identifies the (network) device – For devices on the local network @crayzeigh@hachyderm.io 18

Slide 19

Slide 19

Address Resolution Protocol @crayzeigh@hachyderm.io 19

Slide 20

Slide 20

ARP – Mapping IPs and MAC addresses @crayzeigh@hachyderm.io 20

Slide 21

Slide 21

ARP – Mapping IPs and MAC addresses – Necessary for your device to talk to your router @crayzeigh@hachyderm.io 21

Slide 22

Slide 22

ARP – Mapping IPs and MAC addresses – Necessary for your device to talk to your router – Finds neighbors through broadcast @crayzeigh@hachyderm.io 22

Slide 23

Slide 23

ARP – Mapping IPs and MAC addresses – Necessary for your device to talk to your router – Finds neighbors through broadcast – arp -a for your local table @crayzeigh@hachyderm.io 23

Slide 24

Slide 24

Virtual Local Area Networks @crayzeigh@hachyderm.io 24

Slide 25

Slide 25

VLANs – Used for limiting broadcast domains @crayzeigh@hachyderm.io 25

Slide 26

Slide 26

VLANs – Used for limiting broadcast domains – up to 4096 VLANs 1. 1 VXLAN addresses this limitation but that’s A Whole Other Thing @crayzeigh@hachyderm.io 26

Slide 27

Slide 27

VLANs – Used for limiting broadcast domains – up to 4096 VLANs 1 – Can be native (default traffic on a switch port) or tagged (logically divided in packet header) 1. VXLAN addresses this limitation but that’s A Whole Other Thing @crayzeigh@hachyderm.io 27

Slide 28

Slide 28

@crayzeigh@hachyderm.io 28

Slide 29

Slide 29

Layer 3: Internet Protocol Packets wrap your digital data and route it remotely @crayzeigh@hachyderm.io 29

Slide 30

Slide 30

Layer 3: Routing Directing data to remote destinations @crayzeigh@hachyderm.io 30

Slide 31

Slide 31

IPv4 Packet Header @crayzeigh@hachyderm.io 31

Slide 32

Slide 32

IP Address Classes and CIDR @crayzeigh@hachyderm.io 32

Slide 33

Slide 33

IP Classes & CIDR – Classless Inter-Domain Routing @crayzeigh@hachyderm.io 33

Slide 34

Slide 34

IP Classes & CIDR – Classless Inter-Domain Routing – Helps determine destination locality, i.e. routing @crayzeigh@hachyderm.io 34

Slide 35

Slide 35

IP Classes & CIDR – Classless Inter-Domain Routing – Helps determine destination locality, i.e. routing – CIDR replaced “class a/b/c” IP addressing to help address IP address availability @crayzeigh@hachyderm.io 35

Slide 36

Slide 36

CIDR Notation @crayzeigh@hachyderm.io 36

Slide 37

Slide 37

10.10.10.10/ 10.10.10.10/24 24 @crayzeigh@hachyderm.io 37

Slide 38

Slide 38

Host/ Host/Network Network bits @crayzeigh@hachyderm.io 38

Slide 39

Slide 39

10.10.10/ 10.10.10/24 24 IP Address: 10.10.10.10 Subnet Mask: 255.255.255.0 @crayzeigh@hachyderm.io 39

Slide 40

Slide 40

Converts to Binary IP: 00001010.00001010.00001010.00001010 SM: 11111111.11111111.11111111.00000000 In the Subnet Mask: 1 = Network 0 = Host @crayzeigh@hachyderm.io 40

Slide 41

Slide 41

Special IPs – Broadcast (ex. 10.10.10.255) – host bits are all 1’s – For sending data to all hosts in a network – Network (ex. 10.10.10.0) – host bits are all 0’s – only used for forwarding data between routers @crayzeigh@hachyderm.io 41

Slide 42

Slide 42

Putting it all together CIDR 10.10.10.10/24 Network 10.10.10.0/24 Broadcast IP 10.10.10.255 Available Host IPs 10.10.10.1 - 254 @crayzeigh@hachyderm.io 42

Slide 43

Slide 43

Bigger Networks CIDR 192.168.1.100/22 Network 192.168.0.0/22 Broadcast IP 192.168.3.255 Available Host IPs 192.168.0.1 - 192.168.3.254 @crayzeigh@hachyderm.io 43

Slide 44

Slide 44

Weird Ones @crayzeigh@hachyderm.io 44

Slide 45

Slide 45

Weird Ones Explained /30 – “Costs” 4 IPs, but only gives 2 host addresses – Broadcast & Network IPs still required – Used for legacy compatibility or you just really like holding IP addresses @crayzeigh@hachyderm.io 45

Slide 46

Slide 46

Weird Ones Explained /31 – Creates 2 adjacent host IPs – Only “costs” 2 IPs – Proposed in RFC3021 (in 2000) to combat dwindling IP availability @crayzeigh@hachyderm.io 46

Slide 47

Slide 47

Weird Ones Explained /32 – Single IP Address – useful generally for isolating public internet traffic @crayzeigh@hachyderm.io 47

Slide 48

Slide 48

IPv6 @crayzeigh@hachyderm.io 48

Slide 49

Slide 49

IPv6 Packet Header @crayzeigh@hachyderm.io 49

Slide 50

Slide 50

IPv6 – 128 bits long (vs 32 bits for v4) @crayzeigh@hachyderm.io 50

Slide 51

Slide 51

IPv6 – 128 bits long (vs 32 bits for v4) 32 9 2 ≈ 4.3x10 @crayzeigh@hachyderm.io 51

Slide 52

Slide 52

IPv6 – 128 bits long (vs 32 bits for v4) 32 9 2 ≈ 4.3x10 ≈ 4.3 billion @crayzeigh@hachyderm.io 52

Slide 53

Slide 53

IPv6 – 128 bits long (vs 32 bits for v4) 32 9 2 ≈ 4.3x10 ≈ 4.3 billion 128 28 2 ≈ 3.4x10 @crayzeigh@hachyderm.io 53

Slide 54

Slide 54

IPv6 – 128 bits long (vs 32 bits for v4) 32 9 2 ≈ 4.3x10 ≈ 4.3 billion 128 28 2 ≈ 3.4x10 ≈ 27 orders of magnitude larger @crayzeigh@hachyderm.io 54

Slide 55

Slide 55

IPv6 – 128 bits long (vs 32 bits for v4) – introduced to handle IP shortage – written as 8 groups of 4 bytes in hex @crayzeigh@hachyderm.io 55

Slide 56

Slide 56

Abbreviations fddd:f00d:b33f:0000:0000:0000:0000:0001 @crayzeigh@hachyderm.io 56

Slide 57

Slide 57

Abbreviations fddd:f00d:b33f:0:0:0:0:1 @crayzeigh@hachyderm.io 57

Slide 58

Slide 58

Abbreviations fddd:f00d:b33f::1 @crayzeigh@hachyderm.io 58

Slide 59

Slide 59

Abbreviations 00ff:0000:0000:0000:0001:0000:0000:0001 @crayzeigh@hachyderm.io 59

Slide 60

Slide 60

Which one is correct? ff:0:0:0:1:0:0:1 1. ff::1:0:0:1 2. ff::1::1 3. ff:0:0:0:1::1 @crayzeigh@hachyderm.io 60

Slide 61

Slide 61

Which one is correct? ff:0:0:0:1:0:0:1 1. ff::1:0:0:1 2. ff::1::1 (ambiguous) 1 3. ff:0:0:0:1::1 (longest 0’s must be shortened ) 1. RFC 5952 @crayzeigh@hachyderm.io 61

Slide 62

Slide 62

Subnetting @crayzeigh@hachyderm.io 62

Slide 63

Slide 63

Subnetting ifconfig | grep inet6 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet6 fe80::1470:43d6:1243:7a20%en0 prefixlen 64 secured scopeid 0x4 inet6 2601:19e:8380:20dc:4ea:6990:6d8e:68a3 prefixlen 64 autoconf secured inet6 2601:19e:8380:20dc:5ce:b0e:70ad:988 prefixlen 64 deprecated autoconf temporary inet6 2601:19e:8380:20dc::f42a prefixlen 64 dynamic inet6 2601:19e:8380:20dc:141b:7764:190d:9240 prefixlen 64 deprecated autoconf temporary inet6 2601:19e:8380:20dc:d477:fa12:2a44:7983 prefixlen 64 autoconf temporary … @crayzeigh@hachyderm.io 63

Slide 64

Slide 64

Subnetting address obtained ::1 loopback (special) fe80::1470:43d6:1243:7a20 self-assigned (local) 2601:19e:8380:20dc:4ea:6990:6d8e:68a3 self-assigned (global) 2601:19e:8380:20dc::f42a DHCPv6 (global) @crayzeigh@hachyderm.io 64

Slide 65

Slide 65

Routing Sending data to remote addresses @crayzeigh@hachyderm.io 65

Slide 66

Slide 66

Source: 10.10.10.10/24 Destination: 10.10.10.100 @crayzeigh@hachyderm.io 66

Slide 67

Slide 67

Source IP: 10.10.10 10.10.10.10 .10 Network: 255.255.255 255.255.255.0 .0 Destination: 10.10.10 10.10.10.100 .100 @crayzeigh@hachyderm.io 67

Slide 68

Slide 68

Source: 10.10.10.10/24 Destination: 10.10.10.100

  1. Checks network space to see address is local 2. Sends local ARP broadcast to find MAC of destination 3. wraps packet in frame with newly discovered MAC 4. sends data frame through switch to destination “directly” @crayzeigh@hachyderm.io 68

Slide 69

Slide 69

Source: 10.10.10.10/24 Destination: 1.1.1.1 @crayzeigh@hachyderm.io 69

Slide 70

Slide 70

Source IP: 10.10.10 10.10.10.10 .10 Network: 255.255.255 255.255.255.0 .0 Destination: 1.1.1 1.1.1.1 .1 @crayzeigh@hachyderm.io 70

Slide 71

Slide 71

Source: 10.10.10.10/24 Destination: 1.1.1.1

  1. Checks network space and see’s address is remote 2. Wraps packet in frame with router’s mac address and desired destination IP, forwards to router 3. Forwards frame to the router, router re-wraps packet with a frame pointing to the next router in line 4. And so on until the local router for 1.1.1.1 receives the packet and wraps in the final destination frame @crayzeigh@hachyderm.io 71

Slide 72

Slide 72

How does the router know where the next hop in line is? @crayzeigh@hachyderm.io 72

Slide 73

Slide 73

Routing Tables 3 Types of Routes: – Connected: The networks connected to your interfaces – Static: Manually set, e.g. Default Route/Gateway – Learned: Learned from advertising peers, e.g. via BGP @crayzeigh@hachyderm.io 73

Slide 74

Slide 74

BGP @crayzeigh@hachyderm.io 74

Slide 75

Slide 75

BGP @crayzeigh@hachyderm.io 75

Slide 76

Slide 76

BGP @crayzeigh@hachyderm.io 76

Slide 77

Slide 77

Anycast @crayzeigh@hachyderm.io 77

Slide 78

Slide 78

Anycast Benefits @crayzeigh@hachyderm.io 78

Slide 79

Slide 79

Anycast Benefits @crayzeigh@hachyderm.io 79

Slide 80

Slide 80

What Happens when you visit a website? @crayzeigh@hachyderm.io 80

Slide 81

Slide 81

@crayzeigh@hachyderm.io 81

Slide 82

Slide 82

Try it! use discount code THATCONF23 for $800 credit http://eqix.co/metal /assets/Simple_Footer_center.png @crayzeigh@hachyderm.io 82

Slide 83

Slide 83

Getting Started check out our youtube channel for tips and ideas http://eqix.co/start-metal @crayzeigh@hachyderm.io 83

Slide 84

Slide 84

@crayzeigh@hachyderm.io 84

Slide 85

Slide 85

thanks! social: @crayzeigh@hachyderm.io slides: speaking.crayzeigh.com @crayzeigh@hachyderm.io 85

Slide 86

Slide 86

organizer: @crayzeigh@hachyderm.io 86

Slide 87

Slide 87

host: @crayzeigh@hachyderm.io 87

Slide 88

Slide 88

@crayzeigh@hachyderm.io 88