cast_for_educationSprintTZ Knowledge Share · Team Training Series

Network Fundamentals:
IP, Binary, Hex, MAC & OSI

From phone numbers to binary switches to the seven layers that make the internet work — the complete foundation every network engineer must own.

DE
David Emiru Egwell
CTO · SprintUG Internet Limited
10
Sections
4
Engineers
7
OSI Layers
16
Hex Digits
254
Hosts / /24
tocSession Outline

The Phone Number Analogy

Today we bridged a critical gap: how IP addressing works in the real world.

255 794 73 63 73
  • check_circle255 — Country Code (which country)
  • check_circle794 — Network Code (which carrier/region)
  • check_circle73 63 73 — Your phone number (you specifically)
Key Insight: This is EXACTLY how IP addressing works.

IP Address & Subnet Mask

compare_arrowsMapping
IP Address: 192.168.1.1 Subnet Mask: 255.255.255.0 ┌────────────────────────────────┐ │ 192.168.1 ↔ 255 (country) │ │ (network portion) │ │ │ │ .1 ↔ 73 63 73 │ │ (host portion) │ └────────────────────────────────┘

What This Means

  • check_circleFirst three octets = the network
  • check_circleLast octet = the host on that network

Team Network Allocations

EngineerNetworkHosts
Irene192.168.3.0/24254
Ibrahim192.168.7.0/24254
Msabi192.168.6.0/24254
Dennis192.168.5.0/24254

What /24 Means

  • check_circle24 bits = network portion
  • check_circle8 bits (32 − 24) = host addresses

Each of you manages 254 usable IPs (256 minus network and broadcast).

Converting to Binary

The 8-Bit Byte

Bit: 7 6 5 4 3 2 1 0 Value: 128 64 32 16 8 4 2 1 ┌────┬────┬────┬────┬────┬────┬────┬────┐ │ │ │ │ │ │ │ │ │ └────┴────┴────┴────┴────┴────┴────┴────┘ ON (1) → add value | OFF (0) → add nothing

Example: 192 to Binary

128? YES → 1 (192−128=64) 64? YES → 1 (64−64=0) 32? NO → 0 16? NO → 0 8? NO → 0 4? NO → 0 2? NO → 0 1? NO → 0 Result: 1 1 0 0 0 0 0 0 Check: 128 + 64 = 192 ✓

Team Networks Converted

Irene
192.168.3.0/24
192 = 1 1 0 0 0 0 0 0 (128+64) ✓ 168 = 1 0 1 0 1 0 0 0 (128+32+8) ✓ 3 = 0 0 0 0 0 0 1 1 (2+1) ✓ 0 = 0 0 0 0 0 0 0 0 ✓
11000000.10101000.00000011.00000000
Ibrahim
192.168.7.0/24
192 = 1 1 0 0 0 0 0 0 (128+64) ✓ 168 = 1 0 1 0 1 0 0 0 (128+32+8) ✓ 7 = 0 0 0 0 0 1 1 1 (4+2+1) ✓ 0 = 0 0 0 0 0 0 0 0 ✓
11000000.10101000.00000111.00000000
Msabi
192.168.6.0/24
192 = 1 1 0 0 0 0 0 0 (128+64) ✓ 168 = 1 0 1 0 1 0 0 0 (128+32+8) ✓ 6 = 0 0 0 0 0 1 1 0 (4+2) ✓ 0 = 0 0 0 0 0 0 0 0 ✓
11000000.10101000.00000110.00000000
Dennis
192.168.5.0/24
192 = 1 1 0 0 0 0 0 0 (128+64) ✓ 168 = 1 0 1 0 1 0 0 0 (128+32+8) ✓ 5 = 0 0 0 0 0 1 0 1 (4+1) ✓ 0 = 0 0 0 0 0 0 0 0 ✓
11000000.10101000.00000101.00000000

The Least Significant Bit

Bit 0 (LSB) = 1 ← 2⁰ = 1 Bit 7 (MSB) = 128 ← 2⁷ = 128 192.168.5.0 = ...00000000 (OFF) 192.168.5.1 = ...00000001 (bit 0 ON) LSB lets us count: 0,1,2,3…255

The Hexadecimal Number System

Why Do We Need Hex?

Binary is painful for humans. A MAC address in binary:

01100110 11010110 10011010 00011100 01110000 01000001

Same address in hexadecimal:

66:D6:9A:1C:70:41

Hex is shorthand for binary — every hex digit maps to exactly 4 binary bits.

The rule: Hex maps cleanly to binary. Decimal does NOT. Hex does — perfectly, every time.

Counting in Base 16

We use 0–9, then letters A–F for values 10–15:

DecHexBinaryDecHexBinary
000000881000
110001991001
22001010A1010
33001111B1011
44010012C1100
55010113D1101
66011014E1110
77011115F1111
Pattern: 1 hex digit = 4 bits. Two hex digits = 8 bits = 1 byte. MAC pairs = one byte each.

Place Values

Decimal (base 10): 1000 100 10 1 10³ 10² 10¹ 10⁰ Hex (base 16): 4096 256 16 1 16³ 16² 16¹ 16⁰

Hex → Decimal Conversions

0x66 — Dennis's first MAC byte

6 × 16 = 96 6 × 1 = 6 ─── Total = 102 ✓

0xD6 — Dennis's second byte

D = 13 in decimal 13 × 16 = 208 6 × 1 = 6 ─── Total = 214 ✓

0xFF — max value of one byte

F = 15 15 × 16 = 240 15 × 1 = 15 ─── Total = 255 Binary: 1111 1111 Hex: FF Decimal: 255 All the same number. ✓

Hex → Binary: The Direct Method

D6 hex → binary? D = 1101 6 = 0110 D6 = 1101 0110 ← Done! 128+64+16+4+2 = 214 ✓

Decimal → Hex

Convert 192 to hex: 192 ÷ 16 = 12 remainder 0 12 ÷ 16 = 0 remainder 12 (C) Read bottom-up: C0 192 = 0xC0 ✓

Dennis's Full MAC Decoded

MAC: 66:D6:9A:1C:70:41 ┌──────┬─────┬────────────┬──────────┐ │ Hex │ Dec │ Binary │ Calc │ ├──────┼─────┼────────────┼──────────┤ │ 66 │ 102 │ 0110 0110 │ 6×16+6 │ │ D6 │ 214 │ 1101 0110 │ 13×16+6 │ │ 9A │ 154 │ 1001 1010 │ 9×16+10 │ │ 1C │ 28 │ 0001 1100 │ 1×16+12 │ │ 70 │ 112 │ 0111 0000 │ 7×16+0 │ │ 41 │ 65 │ 0100 0001 │ 4×16+1 │ └──────┴─────┴────────────┴──────────┘

Where You'll See Hex

ContextExampleWhy Hex?
MAC66:D6:9A:1C:70:416 bytes → 12 hex digits
IPv62001:0db8::8a2e128 bits as hex groups
CSS Colours#2980B9RGB as 3 bytes
Memory0x7FFE42A0RAM locations
CAN Bus0x7E8ECU identifiers
Your brand colour: #2980B9 = R:29(41) G:80(128) B:B9(185). Blue dominates — that's why it looks blue.

Quick Reference

┌─────┬──────┬──────────┬──────────────────┐ │ Dec │ Hex │ Binary │ Usage │ ├─────┼──────┼──────────┼──────────────────┤ │ 0 │ 00 │ 00000000 │ Network address │ │ 10 │ 0A │ 00001010 │ Common host .10 │ │ 15 │ 0F │ 00001111 │ Half-byte max │ │ 127 │ 7F │ 01111111 │ Loopback 127.x │ │ 168 │ A8 │ 10101000 │ Private .168 │ │ 192 │ C0 │ 11000000 │ Private 192. │ │ 255 │ FF │ 11111111 │ Broadcast/mask │ └─────┴──────┴──────────┴──────────────────┘

MAC Addresses & the MAC Table

66:D6:9A:1C:70:41

Dennis's MAC Address — 48 bits, 6 bytes in hex:

66 : D6 : 9A : 1C : 70 : 41 102 214 154 28 112 65

OUI: Manufacturer Fingerprint

66:D6:9A : 1C:70:41 └── OUI ──┘ └─ Device ─┘ Manufacturer Serial #

Scale: 281 Trillion

2⁴⁸ = 281,474,976,710,656 addresses = 37,000+ per person on Earth ~16 billion assigned so far

ARP & the MAC Table

1→ ARP: "Who has 192.168.3.10?" 2→ Switch MAC table: ┌────────────────┬──────────────┐ │ MAC │ Port │ ├────────────────┼──────────────┤ │ 66:D6:9A:1C:…│ 5 (Dennis) │ │ AA:BB:CC:DD:…│ 3 (Irene) │ │ 11:22:33:44:…│ 8 (Ibrahim) │ │ 55:66:77:88:…│ 12 (Msabi) │ └────────────────┴──────────────┘ 3→ Unicast to Port 3 only ✓

Layer 2 vs Layer 3

LayerIDPurpose
L3 Network192.168.5.41Route across networks
L2 Data Link66:D6:9A:1C:70:41Deliver on local segment
Mental model: IP = routers know where. MAC = switch knows which cable.

The OSI Model — All 7 Layers

Everything today fits into one framework: Open Systems Interconnection. Seven layers — data starts at the top, travels down picking up packaging at each level, hits the wire, then unwraps in reverse at the far end.

local_shippingThe Shipping Analogy

Shipping a vase from Dar es Salaam to Kampala: write a letter (L7), put it in an addressed envelope (L3), wrap in bubble wrap (L4), put in a labelled box (L2), hand to the courier (L1). At each step, packaging is added. On arrival, unwrapped in reverse.

Memory Trick

Top-down: "All People Seem To Need Data Processing" L7 Application "All" L6 Presentation "People" L5 Session "Seem" L4 Transport "To" L3 Network "Need" L2 Data Link "Data" L1 Physical "Processing"

Layer by Layer

Upper Layers — Application Group
7

Application Layer

What the user interacts with

Network services directly to applications — web browsing, email, file transfer, DNS. Not the app itself (Chrome isn't L7), but the network protocols the app uses.

Your reality: Typing google.com triggers a DNS query (L7). SSH into a router = L7. SNMP polling = L7.

HTTP, HTTPS, DNS, DHCP, SSH, FTP, SMTP, SNMP
6

Presentation Layer

Translation, encryption, compression

The translator. Three jobs: format conversion (EBCDIC→ASCII), encryption (TLS/SSL), and compression.

Your reality: The padlock icon = TLS at this layer. JPEG encoding, UTF-8 character sets — all L6.

TLS/SSL, JPEG, PNG, MPEG, ASCII, Unicode
5

Session Layer

Managing connections

Opens, manages, and closes conversations. Handles authentication, authorisation, and session restoration.

Your reality: Website login sessions staying active for 30 min. RPC calls. NetBIOS in Windows networking.

NetBIOS, RPC, PPTP, SMB sessions, SOCKS
Lower Layers — Transport Group
4

Transport Layer

Reliable or fast delivery

Quality control. Breaks data into segments, numbers them, ensures correct delivery.

TCP — reliable. Three-way handshake (SYN→SYN-ACK→ACK), numbering, acknowledgements, retransmission. Web, email, file transfer.

UDP — fast. No connection, no acks. Video calls, VoIP, DNS queries, live streaming.

Port numbers identify which application receives data:

src: 192.168.5.41:54321 (Dennis) dst: 142.250.190.14:443 (Google HTTPS) Key ports: 22=SSH 53=DNS 80=HTTP 443=HTTPS 25=SMTP 3306=MySQL
TCP, UDP | Segment / Datagram
3

Network Layer

IP addressing and routing

Everything we learned about IP today. Logical addressing (IP) and routing (best path across networks). Devices: routers — your Juniper MX80, MikroTik CCR2116.

Packet header: ┌────────────┬────────────┬─────┐ │ Src IP │ Dst IP │ TTL │ │192.168.5.41│192.168.3.10│ 64 │ └────────────┴────────────┴─────┘ MX80: "dst 192.168.3.0/24 → ge-0/0/1"
IPv4, IPv6, ICMP, OSPF, BGP | Packet | Router
2

Data Link Layer

MAC addressing, local delivery

Everything about MAC addresses today. Framing, error detection (CRC), media access control. Devices: switches. Two sub-layers:

LLC (upper) → protocol multiplexing MAC (lower) → MAC addresses, CRC, media access control

Your reality: VLANs (802.1Q), STP, the MAC table exercise — all L2.

Ethernet, Wi-Fi, PPP, 802.1Q, STP | Frame | Switch
1

Physical Layer

Signals on the wire

Raw bits. Voltage on copper, light in fibre, radio waves for wireless. Doesn't understand addresses — only 1s and 0s.

Copper: Cat5e → 1G, 100m Cat6a → 10G, 100m Fibre: SMF → long (km), laser MMF → short (≤550m), LED Wireless: Wi-Fi 6 → 2.4/5/6 GHz, 9.6Gbps

Your reality: Crimping RJ45 = L1. SFP modules in the MX80 = L1. Link light green = L1 confirmed.

RJ45, SFP/SFP+, 802.3 physical, DSL | Bit | Hub, NIC

Data Flow Through the Stack

Dennis → Web Server: L7 App → HTTP GET created L6 Present → Encrypted (TLS) L5 Session → Session ID attached L4 Transp → TCP segment (port 443) L3 Network → IP packet (src→dst) L2 Link → Ethernet frame (+MACs) L1 Phys → Electrical signals ━━━ WIRE ━━━ L1→L2→L3→L4→L5→L6→L7 (unwrap) ✓

Today's Lessons → OSI

LessonLayerWhy
IP AddressesL3 NetworkLogical routing
Subnets (/24)L3 NetworkNetwork boundaries
BinaryL1–3Foundation of all addressing
HexadecimalL2–3Compact binary for MACs, IPv6
MAC AddressesL2 Data LinkPhysical local delivery
ARP + MAC TableL2–3Logical → physical mapping
Cables, portsL1 PhysicalBits on the wire
The whole picture: Today = Layers 1, 2, 3 in depth. Tomorrow = Layers 4–7 come alive when we trace a packet end-to-end. The OSI model isn't theory — it's the troubleshooting checklist: start L1 (cable plugged in?) and work up.

What We Accomplished

  • check_circleIP Addressing — Network + host = country code + phone number
  • check_circleBinary — Decimal to binary using switch logic
  • check_circleHexadecimal — Base-16 bridge between human and binary
  • check_circleSubnet Masks — /24 and host capacity
  • check_circleMAC Addresses — Physical identity, OUI, hex encoding
  • check_circleARP & MAC Tables — How switches learn and forward
  • check_circleOSI Model — All 7 layers mapped to today's topics
#PillarLesson
1Binary ThinkingThe native language of machines
2Hex ShorthandCompact notation humans can manage
3Address HierarchiesOrganising thousands of devices
4Uniqueness at Scale281 trillion MACs — global order
5Separation of ConcernsL2 and L3 solve different problems
6Layered ArchitectureOSI = universal troubleshooting
By Monday, you won't just know these. You'll own them.

Tomorrow: Theory → Practice

  • check_circleSubnetting — Host ranges, broadcast, boundaries, no calculator
  • check_circleARP live — MAC discovery on real switches
  • check_circlePacket flow — All 7 OSI layers, keyboard to server and back
  • check_circleHex drills — Dec↔bin↔hex under time pressure
  • check_circleReal equipment — Switches, routers, Wireshark
assignmentHomework (Optional)
  1. Convert teammates' networks to full binary
  2. Convert each byte of your MAC to decimal + binary
  3. Find your MAC: ipconfig /all (Win) · ip addr show (Linux)
  4. Draw 7 OSI layers from memory with one protocol each
  5. Hex challenge: decode #2980B9 → three RGB decimals
"

IP addresses are ZIP codes. MAC addresses are house numbers. Hex is the shorthand. Binary is the truth. The OSI model is the checklist. You've got this.

— David Emiru Egwell · SprintTZ Knowledge Share