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

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 

Recently uploaded (20)

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 

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.