A comprehensive technical reference covering Ethernet fundamentals, OSI and TCP/IP layering, network topologies, IPv4/IPv6 addressing with subnetting, and routing protocols from static routes through BGP.
OSI 7-LayerTCP/IP 4-LayerCSMA/CDIPv4 · IPv6BGP · OSPF · EIGRP
Section 01
Ethernet & CSMA/CD
Ethernet (IEEE 802.3) is the dominant Layer-2 LAN technology. Its original contention-based medium access method — Carrier Sense Multiple Access / Collision Detection — defines how stations share a shared coaxial or half-duplex segment.
CSMA/CD Algorithm
PSEUDO-CODEwhileframe_to_send:
sense medium # carrier senseif idle >= 9.6 µs: # IFG (Inter-Frame Gap)
begin transmitting
while transmitting:
detect collision # collision detectif collision:
transmit JAM signal32 bitsincrement attempt counter
if counter > 16:
abort# discard framewait back-off(k) # truncated binary exp.goto sense
frame sent OK
else:
defer and retry
Key Parameters
Slot Time512 bit-times = 51.2 µs @ 10 Mbps
Jam Signal32 bits — ensures all stations detect collision
Max Retries16 — then frame discarded, upper layer notified
Min Frame Size64 bytes (to cover max collision domain)
Max Frame Size1518 bytes (standard) / 9000 bytes (jumbo)
IFG9.6 µs — mandatory idle time between frames
Collision DomainMax 2500 m / 4 repeaters (5-4-3 rule)
⚡CSMA/CD is obsolete in modern switched networks. Full-duplex Ethernet (introduced with switches) eliminates collisions entirely — no carrier sense, no jam signal, no back-off. CSMA/CD only operates in half-duplex, shared-medium segments (hubs). 1 Gbps+ Ethernet uses point-to-point full-duplex exclusively.
Standard
Speed
Medium
Max Distance
CSMA/CD?
10BASE-T
10 Mbps
Cat3/5 UTP
100 m
Yes (half-duplex)
100BASE-TX
100 Mbps
Cat5/5e UTP
100 m
Yes (half-duplex)
1000BASE-T
1 Gbps
Cat5e UTP
100 m
No (full-duplex only)
1000BASE-SX
1 Gbps
Multimode fiber
550 m
No
10GBASE-LR
10 Gbps
Singlemode fiber
10 km
No
100GBASE-SR4
100 Gbps
OM4 MMF
100 m
No
Section 02
OSI Network Layers
The OSI Reference Model (ISO/IEC 7498-1) partitions network communication into 7 abstract layers. The TCP/IP model collapses these into 4 functional layers. Each OSI layer communicates with the layer directly above and below via service access points (SAPs).
OSI 7-Layer Model
7
Application
HTTP/SFTPSMTPDNSSNMPSSH
6
Presentation
TLS/SSLJPEGMPEGASN.1XDR
5
Session
NetBIOSRPCPPTPSOCKS
4
Transport
TCPUDPSCTPDCCP
3
Network
IPv4IPv6ICMPOSPFBGP
2
Data Link
Ethernet802.11ARPPPPVLANSTP
1
Physical
NICFiberRJ-45RS-232DSL
OSI ↔ TCP/IP Mapping
TCP/IP Layer
OSI Layers
PDU Name
Application
L7 + L6 + L5
Data
Transport
L4
Segment / Datagram
Internet
L3
Packet
Network Access
L2 + L1
Frame / Bits
Per-Layer Deep Detail
L1 — Physical Layer
Responsible for bit transmission: voltage levels, timing, modulation, encoding. Standards: RS-232, V.35, EIA/TIA-568. Devices: repeaters, hubs, cables, transceivers. Encoding schemes: NRZ, Manchester, 8B/10B, 64B/66B.
L2 — Data Link Layer
Framing, MAC addressing (48-bit), error detection (CRC-32), flow control. Split into LLC (IEEE 802.2) and MAC sub-layers. Devices: switches (L2), bridges. VLANs operate at L2 (IEEE 802.1Q tag: 4 bytes, 12-bit VLAN ID). STP (802.1D) prevents loops via root election and port roles.
Logical (IP) addressing, routing, packet fragmentation. IPv4 header: 20 bytes minimum. TTL prevents infinite loops. IP fragmentation based on MTU (default 1500 bytes Ethernet). ICMP provides control messages (type 0: echo reply, type 3: dest unreachable, type 11: TTL exceeded).
UDP: connectionless, 8-byte header, no ordering guarantee. Used for DNS, DHCP, VoIP, QUIC.
Section 03
Network Topologies
Network topology defines the arrangement of nodes and links. Physical topology describes cabling; logical topology describes data flow. The two most common WAN topologies in enterprise design are Hub-and-Spoke and Full Mesh.
Hub-and-Spoke (Star)
Links requiredN − 1
Traffic pathAll traffic traverses hub — single choke point
RedundancyNone without adding backup hub / DMVPN
ScalabilityHigh — add spokes without rewiring others
SPOFYes — hub failure = total outage
Use caseMPLS VPN, DMVPN Phase 1, branch WAN
Full Mesh
Links requiredN(N−1) / 2
Traffic pathDirect path between any pair — optimal latency
Use caseCore/backbone layer, DMVPN Phase 3, data centers
📐Partial Mesh is the practical compromise: only critical nodes are fully interconnected. For example, in a 3-tier campus design, the core switches form a full mesh (2 nodes, 1 link), distribution switches connect to both core nodes (partial), and access switches connect only upward to distribution.
Section 04
IP Addressing — IPv4 / IPv6
IPv4 uses 32-bit addresses (4,294,967,296 total). Originally divided into classes (classful routing). Today, CIDR (Classless Inter-Domain Routing, RFC 4632) is universal. IPv6 uses 128-bit addresses, expressed in 8 groups of 4 hex digits.
IPv4 Address Classes
Class A · /8 0.0.0.0 – 127.255.255.255
Class B · /16 128.0 – 191.255
C · /24 192–223
D Mcast
E Exp.
Class
First Bits
Range (1st Octet)
Default Mask
Networks
Hosts/Net
Purpose
A
0xxxxxxx
1 – 126
/8 (255.0.0.0)
126
16,777,214
Large corporations, ISPs
B
10xxxxxx
128 – 191
/16 (255.255.0.0)
16,384
65,534
Medium-large organizations
C
110xxxxx
192 – 223
/24 (255.255.255.0)
2,097,152
254
Small networks, branches
D
1110xxxx
224 – 239
N/A
N/A
N/A
Multicast (OSPF: 224.0.0.5, PIM, etc.)
E
1111xxxx
240 – 255
N/A
N/A
N/A
Reserved / Experimental
Private (RFC 1918) Address Space
RFC 1918# Class A private range — 1 block10.0.0.0/8# 10.0.0.0 – 10.255.255.255 (16,777,216 addresses)# Class B private range — 16 blocks172.16.0.0/12# 172.16.0.0 – 172.31.255.255 (1,048,576 addresses)# Class C private range — 256 blocks192.168.0.0/16# 192.168.0.0 – 192.168.255.255 (65,536 addresses)# Special ranges127.0.0.0/8# Loopback169.254.0.0/16# APIPA (link-local, RFC 3927)0.0.0.0/8# "This network" (source only)255.255.255.255# Limited broadcast
IPv6 — 128-Bit Addressing
IPv6 addresses are 128 bits written as 8 groups of 4 hex nibbles separated by colons. Consecutive all-zero groups may be replaced with :: once per address.
AnycastFrom unicast space — assigned to multiple interfaces
IPv4 vs IPv6 Quick Compare
Address size32 bits → 128 bits
Header size20–60 bytes → 40 bytes (fixed)
FragmentationRouters + hosts → end hosts only
BroadcastYes → No (replaced by multicast/anycast)
ARPARP (RFC 826) → NDP / ICMPv6
DHCPDHCPv4 → DHCPv6 or SLAAC (RFC 4862)
IPSecOptional → Mandatory (RFC 6434)
ChecksumYes → Removed (L2/L4 handle it)
Section 04b
Subnetting
Subnetting borrows bits from the host portion of an address to create multiple smaller networks. CIDR notation expresses the prefix length (number of network bits). Hosts per subnet = 2h − 2 where h = host bits.
CIDR Reference Table — Class C (/24 base)
CIDR
Subnet Mask
Subnets from /24
Host Bits
Usable Hosts
Block Size
/24
255.255.255.0
1
8
254
256
/25
255.255.255.128
2
7
126
128
/26
255.255.255.192
4
6
62
64
/27
255.255.255.224
8
5
30
32
/28
255.255.255.240
16
4
14
16
/29
255.255.255.248
32
3
6
8
/30
255.255.255.252
64
2
2
4
/31
255.255.255.254
128
1
2 (p2p)
2
/32
255.255.255.255
256
0
1 (host)
1
Subnet Quick Calculator
IP Address
Prefix (CIDR)
Section 04c
Subnetting Exercises
Exercise 1 — Network & Broadcast from 172.16.45.14/20
Find: Network address, broadcast address, first/last usable host, and the number of usable hosts.
▶ Show Solution
/20 = 20 network bits, 12 host bits in the last two octets.
Mask = 255.255.240.0. Block size on 3rd octet = 256−240 = 16.
3rd octet 45 → floor(45/16)×16 = 32. So network = 172.16.32.0/20.
Broadcast = 172.16.47.255 (32+16−1 = 47, last octet all 1s).
First host = 172.16.32.1 · Last host = 172.16.47.254
Usable hosts = 212 − 2 = 4,094
Routing is the process of selecting paths in a network. The router's forwarding decision is based on the Routing Information Base (RIB) — the best entry per prefix is installed in the Forwarding Information Base (FIB). Best path is determined by prefix length (longest match), then Administrative Distance, then metric.
Administrative Distance (AD)
AD is Cisco's trustworthiness value for a routing source. Lower = more trusted. Used to select between routes from different sources to the same prefix.
Source
AD
Trustworthiness
Connected interface
0
Static route
1
eBGP
20
EIGRP (internal)
90
OSPF
110
IS-IS
115
RIP
120
EIGRP (external)
170
iBGP
200
Unknown / Unreachable
255
Static Routing
CISCO IOS# Standard static routeip route192.168.20.0 255.255.255.010.0.0.2# Static route via exit interface (proxy ARP concern on Ethernet)ip route192.168.20.0 255.255.255.0GigabitEthernet0/1# Floating static (backup) — AD 254 > OSPF 110, used only if OSPF failsip route0.0.0.0 0.0.0.0203.0.113.1254# Default routeip route0.0.0.0 0.0.0.010.0.0.1# Null route (black-hole)ip route192.168.99.0 255.255.255.0Null0
Dynamic Routing Protocols
IGP (Interior Gateway Protocol) — operates within a single Autonomous System (AS). Exchanges topology / reachability information between routers under the same administrative domain. AS is identified by a 16-bit or 32-bit number. EGP (Exterior Gateway Protocol) — operates between Autonomous Systems. BGP is the only EGP in production use and is the routing protocol of the entire Internet.