Internet Layer: IP
Aka Internet Protocol address
IPv4
- An address consists
32 bits (8 bits x 4 octets)
- A 8-bit octet can represent a decimal value from 0 to 255 (2^8 = 256 values)
- Total Addresses: 256^4 = 4,294,967,296 ~=
4.3 billion
IPv6
- An address consists
128 bits (16 bits x 8 blocks)
- A 16-bit block can represent
- a hexadecimal value from 0000 to FFFF
- a decimal value from 0 to 65535 (2^16 = 65535 values)
- F in hexadecimal is 15 in decimal
- FFFF is (15 * 16^3) + (15 * 16^2) + (15 * 16^1) + (15 * 16^0) = 65535 in decimal
- Total Addresses: 65535^8 = (2^16)^8 = 2^128 ~=
340 undecillion
Transport Layer: UDP
Aka User Datagram Protocol
- No Handshakes (cheap, low latency)
- No resent mechanism (Not reliable)
- Application Layer using UDP
- WebRTC (Streaming, it uses both TCP and UDP)
- VoIP (Audio Streaming, Voice over IP)
- DNS
- DHCP (Router)
- NTP (Clock, Network Time Protocol)
Transport Layer: TCP
Aka Transmission Control Protocol
- 3-Way Handshake (expensive, high latency)
- 2-Way Connection (Both side can Send and Receive)
- It has resent mechanism