SlideShare a Scribd company logo
1 of 24
Download to read offline
What The F*ck Is The Internet?
Vol 1: Bits, Encoding, Packets, and Protocols
Alex C. Viana (@AlexVianaPro)
Motivation: To Understand* How Networks Work
Physics background → understand* how electronics work
Dev experience → understand* how software works
… everything in the middle is kinda ¯_(ツ)_/¯
So this is me trying to fill in the gaps.
Everything I Previously Knew About Networks
Data is digital (0’s and 1’s)
IP addresses are a thing
The internet exists
Sometimes computers are called “nodes”, this is usually about where I get lost
Sometimes people say the word “sockets” when explaining things to me
The Plan
There’s a lot of hand waving here, but I suspect this is the case for a lot of people.
So, with apologies to the devops who live and breath this stuff…
Let’s just start from the bottom and work our way up!
Bits, Bytes, and Encoding
Starting from the bottom
Binary: 0’s and 1’s
The atomic unit of digital data is a “bit” which can either a 0 or a 1.
Everything digital, from Snapchat, to webpages, to Matchlight, is composed of bits.
The only reason bits can convey any information is because we have conventions
about what sequences of bits mean.
Binary: Numbers Other Than 0 or 1
All integers can be represented in binary as some combination of the powers of 2:
1, 2, 4, 8, 16, ...
For example, here are all the numbers you can make with 2 bits:
00 (binary)= ((2 x 0) + (1 x 0)) = 0 + 0 = 0 (decimal)
01 (binary)= ((2 x 0) + (1 x 1)) = 0 + 1 = 1 (decimal)
10 (binary)= ((2 x 1) + (1 x 0)) = 2 + 0 = 2 (decimal)
11 (binary)= ((2 x 1) + (1 x 1)) = 2 + 1 = 3 (decimal)
This is just a convention, there is no magic here.
Binary: Bits into Bytes
8 bits together are called a byte:
10000001 (binary) = 129 (decimal)
This is where we get the terms we use for the size of data:
Kilobytes = 1,000 bytes
Megabytes = 1,000,000 bytes
Gigabytes = 1,000,000,000 bytes
Ok so we can make numbers, but what else?
Binary: From Numbers to Letters
Similarly, by convention, numbers (in binary), can be mapped to letters, according to a
convention, called an encoding:
Binary Code | ASCII Code | Letter
01000001 | 065 | A
01000010 | 066 | B
01000011 | 067 | C
The convention above is called ASCII but there are others, such as UTF-8.
Computers have to agree/understand (in binary) what encoding is being used.
Binary: What’s Next?
So you’re a computer. You’re sitting on a network. You get sent this:
11100011 10101101 01001110 00110100 00010000 01001011
01000000 01010001 10111001 00100100 01001101 10100101
11100010 10001011 01011101 00011111 00100000 01001100
11101111 11000011 11010000 01110100 10111001 00101100
Is this a series of letters? Is this a huge number? Something else? What now?
Protocols and Packets
Making sense of bytes
Protocols: How Computers Communicate
In the same way encodings allows us to turn bits into letters, another type of
convention, a protocol, allows us to make sense of the bits over a network.
There are lots of protocols, you can even write your own.
Packets: The Atomic Unit of a Network
Data is sent over a network in sequences of bits called packets
Packets typically have a header, which is metadata, and a payload, which contains the
data.
Let’s look at a header from a common type of protocol called IP (Internet Protocol)
Packets: Internet Protocol Header
IP Headers: Version
The 1st 4 bits of an IP packet header are used to identify the IP protocol version.
This can be either IPv4 or IPv6, encoded by convention as a 4 or 6 in binary.
IPv4 : 0100 : 0 + 4 + 0 + 0 = 4
IPv6 : 0110 : 0 + 4 + 2 + 0 = 6
Note that there is “room” in a 4-bit sequence for numbers up to 15.
The next header field implicitly begins at the 5th bit. There is no comma or period or
space.
IP Headers: Addresses
The source and destination address are 32-bit words that encode the IP address of the
sender and the receiver.
01001010011111010010101101100011 = 1249717091
While the above is technically correct, a 32-bit IP address is understood be composed
of 4 bytes (8-bit words). Adding dots for clarity:
01001010.01111101.00101011.01100011 = 74.125.43.99
This is just to emphasize that it’s the context of the protocol that gives the bits their
meaning.
IP Headers: IP Addresses
An IP address uniquely identifies a machine on a network.
In an IP header the Source and Destination Address fields tell every computer that
interacts with a packet where it is coming from and where it is going.
What happens next depends on the role of the machine in the network. This could be
as easy a printing from the printer right next to you or as complex as fetching a
webpage from Australia.
IP Headers: Protocol
The protocol header is an 8-bit word that specifies the protocol used in the data
portion of the packet.
Using the same pattern as with letters, binary values map to decimal values which map
to a table of values, this time a table of possible protocols.
But isn’t the protocol already the IP protocol?
The Internet Protocol Suite
It’s turtles all the way down!
The IP Suite: Layers
There are lots of protocols!
Protocols that serve roughly the same
purpose in a network are organized
into layers.
Layers work together to relay
information across a network.
This is also called the OSI model
The IP Suite: Encapsulation
Protocols work together by completely
encapsulating packets as they move
between layers.
A packet (header + data) will be
encapsulated as a data in a new packet
with a new header appropriate for that
layer.
So an IP header, the protocol field
encodes the type of packet
encapsulated in the IP data.
Summary
All digital data is just 0’s and 1’s
Conventions allow us to encode more complicated information as bits
Packets are digital data sent over the network
The contents of the bits in a packet are governed by protocols
Packet headers tell computers what the packets contain and what to do with them
This is the foundation of network communication
Future Work
I’m probably going to make more networking presentations as a way to teach myself.
Right now I’m really interested in what I see as the next step in this process: routing
and sockets.
That is what machines do with IP packets and how.
Also, interested how IP layers interact.
Thanks!

More Related Content

What's hot

6.01.hash tableintro
6.01.hash tableintro6.01.hash tableintro
6.01.hash tableintroamoldkul
 
Networking assignment 1
Networking assignment 1Networking assignment 1
Networking assignment 1Soham Sengupta
 
IPv4- Internet Protocol version 4
IPv4- Internet Protocol version 4IPv4- Internet Protocol version 4
IPv4- Internet Protocol version 4praveenps17
 
Network Layer Numericals
Network Layer NumericalsNetwork Layer Numericals
Network Layer NumericalsManisha Keim
 
On the Identification Protocols of Versions 4 and 6
On the Identification Protocols of Versions 4 and 6On the Identification Protocols of Versions 4 and 6
On the Identification Protocols of Versions 4 and 6inventionjournals
 
Internet protocol (ip)
Internet protocol (ip)Internet protocol (ip)
Internet protocol (ip)junnubabu
 
Basics of IP Addressing
Basics of IP AddressingBasics of IP Addressing
Basics of IP AddressingKushal Sheth
 
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and CorrectionSYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and CorrectionArti Parab Academics
 
IP Address
IP AddressIP Address
IP AddressRahul P
 
Easy and simple concept of IP Address
Easy and simple concept of IP AddressEasy and simple concept of IP Address
Easy and simple concept of IP AddressLearn with Arsl khan
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6Adeel Rasheed
 
IP Configuration
IP ConfigurationIP Configuration
IP ConfigurationStephen Raj
 
ip addressing & routing
 ip addressing & routing ip addressing & routing
ip addressing & routingVikas Jagtap
 
network Addressing
network Addressingnetwork Addressing
network AddressingTauseef khan
 

What's hot (20)

Ip addressing...
Ip addressing... Ip addressing...
Ip addressing...
 
6.01.hash tableintro
6.01.hash tableintro6.01.hash tableintro
6.01.hash tableintro
 
Networking assignment 1
Networking assignment 1Networking assignment 1
Networking assignment 1
 
IPv4- Internet Protocol version 4
IPv4- Internet Protocol version 4IPv4- Internet Protocol version 4
IPv4- Internet Protocol version 4
 
Network Layer Numericals
Network Layer NumericalsNetwork Layer Numericals
Network Layer Numericals
 
IP Address
IP AddressIP Address
IP Address
 
On the Identification Protocols of Versions 4 and 6
On the Identification Protocols of Versions 4 and 6On the Identification Protocols of Versions 4 and 6
On the Identification Protocols of Versions 4 and 6
 
Explaining ip address
Explaining ip addressExplaining ip address
Explaining ip address
 
Internet protocol (ip)
Internet protocol (ip)Internet protocol (ip)
Internet protocol (ip)
 
Basics of IP Addressing
Basics of IP AddressingBasics of IP Addressing
Basics of IP Addressing
 
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and CorrectionSYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
 
IP Address
IP AddressIP Address
IP Address
 
IP and MAC addressing
IP and MAC addressingIP and MAC addressing
IP and MAC addressing
 
Easy and simple concept of IP Address
Easy and simple concept of IP AddressEasy and simple concept of IP Address
Easy and simple concept of IP Address
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
 
IP Configuration
IP ConfigurationIP Configuration
IP Configuration
 
ip addressing & routing
 ip addressing & routing ip addressing & routing
ip addressing & routing
 
Ip address
Ip address Ip address
Ip address
 
network Addressing
network Addressingnetwork Addressing
network Addressing
 

Viewers also liked

Atividade 7 valdemir_vitorino_slides_digitais_na_escola
Atividade 7 valdemir_vitorino_slides_digitais_na_escolaAtividade 7 valdemir_vitorino_slides_digitais_na_escola
Atividade 7 valdemir_vitorino_slides_digitais_na_escolavav62
 
BIW16: Meetings About Spreadsheets: Lessons From My First Six Months As A Tec...
BIW16: Meetings About Spreadsheets: Lessons From My First Six Months As A Tec...BIW16: Meetings About Spreadsheets: Lessons From My First Six Months As A Tec...
BIW16: Meetings About Spreadsheets: Lessons From My First Six Months As A Tec...Alex Viana
 
Marietta College Colloquium
Marietta College ColloquiumMarietta College Colloquium
Marietta College ColloquiumAlex Viana
 
cienca-aberta-software-carpentry
cienca-aberta-software-carpentrycienca-aberta-software-carpentry
cienca-aberta-software-carpentryAlex Viana
 
digital training tools overview (ukraine)
digital training tools overview (ukraine)digital training tools overview (ukraine)
digital training tools overview (ukraine)Sergey Lyubov
 
36 способов достучаться до аудитории в соц. сетях
36 способов достучаться до аудитории в соц. сетях36 способов достучаться до аудитории в соц. сетях
36 способов достучаться до аудитории в соц. сетяхDigital.Tools
 
Marketing Media Overview / лето 2016 / Украина
Marketing Media Overview / лето 2016 / УкраинаMarketing Media Overview / лето 2016 / Украина
Marketing Media Overview / лето 2016 / УкраинаIsobar Ukraine
 
Digital Marketing for FMCG vol 1
Digital Marketing for FMCG vol 1Digital Marketing for FMCG vol 1
Digital Marketing for FMCG vol 1Reza Taufik Hidayat
 
Starbucks digital strategy
Starbucks digital strategyStarbucks digital strategy
Starbucks digital strategyDmitry Zorkin
 
Digital Marketing Media Overview / зима 2016 / Украина
Digital Marketing Media Overview / зима 2016 / УкраинаDigital Marketing Media Overview / зима 2016 / Украина
Digital Marketing Media Overview / зима 2016 / УкраинаIsobar Ukraine
 
Your Speech is Toxic
Your Speech is ToxicYour Speech is Toxic
Your Speech is ToxicChiara Ojeda
 
Marketing Strategies of HUL
Marketing Strategies of HULMarketing Strategies of HUL
Marketing Strategies of HULPiyush Gupta
 

Viewers also liked (13)

Atividade 7 valdemir_vitorino_slides_digitais_na_escola
Atividade 7 valdemir_vitorino_slides_digitais_na_escolaAtividade 7 valdemir_vitorino_slides_digitais_na_escola
Atividade 7 valdemir_vitorino_slides_digitais_na_escola
 
BIW16: Meetings About Spreadsheets: Lessons From My First Six Months As A Tec...
BIW16: Meetings About Spreadsheets: Lessons From My First Six Months As A Tec...BIW16: Meetings About Spreadsheets: Lessons From My First Six Months As A Tec...
BIW16: Meetings About Spreadsheets: Lessons From My First Six Months As A Tec...
 
Marietta College Colloquium
Marietta College ColloquiumMarietta College Colloquium
Marietta College Colloquium
 
cienca-aberta-software-carpentry
cienca-aberta-software-carpentrycienca-aberta-software-carpentry
cienca-aberta-software-carpentry
 
digital training tools overview (ukraine)
digital training tools overview (ukraine)digital training tools overview (ukraine)
digital training tools overview (ukraine)
 
36 способов достучаться до аудитории в соц. сетях
36 способов достучаться до аудитории в соц. сетях36 способов достучаться до аудитории в соц. сетях
36 способов достучаться до аудитории в соц. сетях
 
Marketing Media Overview / лето 2016 / Украина
Marketing Media Overview / лето 2016 / УкраинаMarketing Media Overview / лето 2016 / Украина
Marketing Media Overview / лето 2016 / Украина
 
Digital Marketing for FMCG vol 1
Digital Marketing for FMCG vol 1Digital Marketing for FMCG vol 1
Digital Marketing for FMCG vol 1
 
Starbucks digital strategy
Starbucks digital strategyStarbucks digital strategy
Starbucks digital strategy
 
Digital Marketing Media Overview / зима 2016 / Украина
Digital Marketing Media Overview / зима 2016 / УкраинаDigital Marketing Media Overview / зима 2016 / Украина
Digital Marketing Media Overview / зима 2016 / Украина
 
Digital strategy lection
Digital strategy lectionDigital strategy lection
Digital strategy lection
 
Your Speech is Toxic
Your Speech is ToxicYour Speech is Toxic
Your Speech is Toxic
 
Marketing Strategies of HUL
Marketing Strategies of HULMarketing Strategies of HUL
Marketing Strategies of HUL
 

Similar to What the f*ck is the internet? - vol. 1

Similar to What the f*ck is the internet? - vol. 1 (20)

Intro tcpip-part1
Intro tcpip-part1Intro tcpip-part1
Intro tcpip-part1
 
I.p. protocol
I.p. protocolI.p. protocol
I.p. protocol
 
Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...
 
1.1.1 binary systems By Zak
1.1.1 binary systems By Zak1.1.1 binary systems By Zak
1.1.1 binary systems By Zak
 
IPV6
IPV6IPV6
IPV6
 
Chapter 2Hardware2.1 The System Unit2.2 Data and P
Chapter 2Hardware2.1 The System Unit2.2 Data and PChapter 2Hardware2.1 The System Unit2.2 Data and P
Chapter 2Hardware2.1 The System Unit2.2 Data and P
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Linux Internals - Interview essentials 2.0
Linux Internals - Interview essentials 2.0Linux Internals - Interview essentials 2.0
Linux Internals - Interview essentials 2.0
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) ppt
 
Internet Protocol
Internet ProtocolInternet Protocol
Internet Protocol
 
Ipv4 Final
Ipv4 FinalIpv4 Final
Ipv4 Final
 
IP-Subnetworking
IP-SubnetworkingIP-Subnetworking
IP-Subnetworking
 
Internet protocol v6
Internet protocol v6Internet protocol v6
Internet protocol v6
 
Internet protocols
Internet protocolsInternet protocols
Internet protocols
 
Networking Brush Up for Amazon AWS Administrators
Networking Brush Up for Amazon AWS AdministratorsNetworking Brush Up for Amazon AWS Administrators
Networking Brush Up for Amazon AWS Administrators
 
Internet Protocols
Internet ProtocolsInternet Protocols
Internet Protocols
 
IP Address
IP AddressIP Address
IP Address
 
Week 6 osi-tcp
Week 6    osi-tcpWeek 6    osi-tcp
Week 6 osi-tcp
 
chapter 6.pptx
chapter 6.pptxchapter 6.pptx
chapter 6.pptx
 
Report on ip addresses
Report on ip addressesReport on ip addresses
Report on ip addresses
 

Recently uploaded

Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 

Recently uploaded (20)

Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 

What the f*ck is the internet? - vol. 1

  • 1. What The F*ck Is The Internet? Vol 1: Bits, Encoding, Packets, and Protocols Alex C. Viana (@AlexVianaPro)
  • 2. Motivation: To Understand* How Networks Work Physics background → understand* how electronics work Dev experience → understand* how software works … everything in the middle is kinda ¯_(ツ)_/¯ So this is me trying to fill in the gaps.
  • 3. Everything I Previously Knew About Networks Data is digital (0’s and 1’s) IP addresses are a thing The internet exists Sometimes computers are called “nodes”, this is usually about where I get lost Sometimes people say the word “sockets” when explaining things to me
  • 4. The Plan There’s a lot of hand waving here, but I suspect this is the case for a lot of people. So, with apologies to the devops who live and breath this stuff… Let’s just start from the bottom and work our way up!
  • 5. Bits, Bytes, and Encoding Starting from the bottom
  • 6. Binary: 0’s and 1’s The atomic unit of digital data is a “bit” which can either a 0 or a 1. Everything digital, from Snapchat, to webpages, to Matchlight, is composed of bits. The only reason bits can convey any information is because we have conventions about what sequences of bits mean.
  • 7. Binary: Numbers Other Than 0 or 1 All integers can be represented in binary as some combination of the powers of 2: 1, 2, 4, 8, 16, ... For example, here are all the numbers you can make with 2 bits: 00 (binary)= ((2 x 0) + (1 x 0)) = 0 + 0 = 0 (decimal) 01 (binary)= ((2 x 0) + (1 x 1)) = 0 + 1 = 1 (decimal) 10 (binary)= ((2 x 1) + (1 x 0)) = 2 + 0 = 2 (decimal) 11 (binary)= ((2 x 1) + (1 x 1)) = 2 + 1 = 3 (decimal) This is just a convention, there is no magic here.
  • 8. Binary: Bits into Bytes 8 bits together are called a byte: 10000001 (binary) = 129 (decimal) This is where we get the terms we use for the size of data: Kilobytes = 1,000 bytes Megabytes = 1,000,000 bytes Gigabytes = 1,000,000,000 bytes Ok so we can make numbers, but what else?
  • 9. Binary: From Numbers to Letters Similarly, by convention, numbers (in binary), can be mapped to letters, according to a convention, called an encoding: Binary Code | ASCII Code | Letter 01000001 | 065 | A 01000010 | 066 | B 01000011 | 067 | C The convention above is called ASCII but there are others, such as UTF-8. Computers have to agree/understand (in binary) what encoding is being used.
  • 10. Binary: What’s Next? So you’re a computer. You’re sitting on a network. You get sent this: 11100011 10101101 01001110 00110100 00010000 01001011 01000000 01010001 10111001 00100100 01001101 10100101 11100010 10001011 01011101 00011111 00100000 01001100 11101111 11000011 11010000 01110100 10111001 00101100 Is this a series of letters? Is this a huge number? Something else? What now?
  • 12. Protocols: How Computers Communicate In the same way encodings allows us to turn bits into letters, another type of convention, a protocol, allows us to make sense of the bits over a network. There are lots of protocols, you can even write your own.
  • 13. Packets: The Atomic Unit of a Network Data is sent over a network in sequences of bits called packets Packets typically have a header, which is metadata, and a payload, which contains the data. Let’s look at a header from a common type of protocol called IP (Internet Protocol)
  • 15. IP Headers: Version The 1st 4 bits of an IP packet header are used to identify the IP protocol version. This can be either IPv4 or IPv6, encoded by convention as a 4 or 6 in binary. IPv4 : 0100 : 0 + 4 + 0 + 0 = 4 IPv6 : 0110 : 0 + 4 + 2 + 0 = 6 Note that there is “room” in a 4-bit sequence for numbers up to 15. The next header field implicitly begins at the 5th bit. There is no comma or period or space.
  • 16. IP Headers: Addresses The source and destination address are 32-bit words that encode the IP address of the sender and the receiver. 01001010011111010010101101100011 = 1249717091 While the above is technically correct, a 32-bit IP address is understood be composed of 4 bytes (8-bit words). Adding dots for clarity: 01001010.01111101.00101011.01100011 = 74.125.43.99 This is just to emphasize that it’s the context of the protocol that gives the bits their meaning.
  • 17. IP Headers: IP Addresses An IP address uniquely identifies a machine on a network. In an IP header the Source and Destination Address fields tell every computer that interacts with a packet where it is coming from and where it is going. What happens next depends on the role of the machine in the network. This could be as easy a printing from the printer right next to you or as complex as fetching a webpage from Australia.
  • 18. IP Headers: Protocol The protocol header is an 8-bit word that specifies the protocol used in the data portion of the packet. Using the same pattern as with letters, binary values map to decimal values which map to a table of values, this time a table of possible protocols. But isn’t the protocol already the IP protocol?
  • 19. The Internet Protocol Suite It’s turtles all the way down!
  • 20. The IP Suite: Layers There are lots of protocols! Protocols that serve roughly the same purpose in a network are organized into layers. Layers work together to relay information across a network. This is also called the OSI model
  • 21. The IP Suite: Encapsulation Protocols work together by completely encapsulating packets as they move between layers. A packet (header + data) will be encapsulated as a data in a new packet with a new header appropriate for that layer. So an IP header, the protocol field encodes the type of packet encapsulated in the IP data.
  • 22. Summary All digital data is just 0’s and 1’s Conventions allow us to encode more complicated information as bits Packets are digital data sent over the network The contents of the bits in a packet are governed by protocols Packet headers tell computers what the packets contain and what to do with them This is the foundation of network communication
  • 23. Future Work I’m probably going to make more networking presentations as a way to teach myself. Right now I’m really interested in what I see as the next step in this process: routing and sockets. That is what machines do with IP packets and how. Also, interested how IP layers interact.