📡 L2_L7_STANDARDS // NETWORKING
Subnet bounds, layer interactions, frame translations, transceivers, and DHCP mappings.
CIDR Subnet & Mask Calculator
IPV4 SUBNETTING10.240.84.192 /27
255.255.255.224
10.240.84.223
30 Hosts
Usable Host Range:
10.240.84.193 ➔ 10.240.84.222
Wildcard: 0.0.0.31
Binary Mask: 11111111.11111111.11111111.11100000
Protocol Anatomy: "ping google.com"
Local Socket & Route Inspection
User executes 'ping google.com'. The ICMP binary creates a raw socket socket(AF_INET, SOCK_RAW, IPPROTO_ICMP). The OS checks local host routing rules ('ip route') to determine the outgoing interface and default gateway IP.
Local Source: 10.240.0.45 | Target Domain: google.com | Socket: AF_INET (RAW)DNS Resolution (Domain -> IP)
The OS resolver checks /etc/hosts, systemd-resolved, and DNS cache. If unmapped, a UDP packet is sent to the configured nameserver in /etc/resolv.conf. The DNS server recursively resolves 'google.com' to an IPv4 address (e.g. 142.250.190.46).
DNS Query: google.com (Type A) -> Answer: 142.250.190.46 | Port 53ARP Resolution (Gateway MAC Discovery)
Since 142.250.190.46 is outside the local /24 subnet, the host targets the Default Gateway (10.240.0.1). The kernel checks its ARP cache ('ip neighbor'). If missing, an ARP Request broadcast ('Who has 10.240.0.1?') is sent over Ethernet. The gateway responds with its MAC address.
ARP Request: Broadcast (ff:ff:ff:ff:ff:ff) -> ARP Reply: Gateway MAC (e0:d5:5e:a1:b2:c3)ICMP Echo Request Frame Assembly
The kernel constructs an ICMP Echo Request payload containing timestamp telemetry and payload bytes. An IPv4 header is attached (Protocol 1, TTL=64, Src=10.240.0.45, Dst=142.250.190.46). An Ethernet II frame encapsulates the packet with Destination MAC set to Gateway MAC.
Frame: [Dst MAC: e0:d5:5e:a1:b2:c3 | Src MAC: 00:0a:95:9d:68:16] [IP: 10.240.0.45 -> 142.250.190.46] [ICMP Type 8]L3 Transit & Hop-by-Hop Routing
The packet leaves the server NIC via SFP+ transceiver. Switches perform Layer 2 forwarding. Routers strip the Layer 2 header, decrement TTL by 1, recalculate IP checksum, re-encapsulate with next-hop destination MAC, and route packet across WAN backbones using BGP routing tables.
Hop 1 Gateway -> Hop 2 ISP Edge -> Hop 3 Google Edge Router (TTL: 64 -> 63 -> 58)Target Reception & Echo Reply
Google's edge load balancer receives the frame, verifies checksum, strips headers, and processes ICMP Type 8. The host immediately constructs an ICMP Echo Reply (Type 0, Code 0), swapping source and destination IP/MAC addresses, and sends it back across the network.
ICMP Echo Reply (Type 0) Src: 142.250.190.46 -> Dst: 10.240.0.45Socket Delivery & RTT Calculation
The local server NIC receives the reply frame. The kernel pushes payload to the waiting raw socket. The 'ping' CLI process computes Round-Trip Time (RTT = T_receive - T_send) and displays output: '64 bytes from 142.250.190.46: icmp_seq=1 ttl=116 time=14.2 ms'.
Result: 64 Bytes | Sequence: 1 | TTL: 116 | RTT: 14.2ms | Status: 0% Packet LossOptical Transceiver & Port Directory
| 10GBASE-SR | SFP+ | 10 Gbps | MMF (OM3/OM4) | 300m (OM3) / 400m (OM4) | 850 nm | LC Duplex | -1.0 to -9.9 dBm |
| 10GBASE-LR | SFP+ | 10 Gbps | SMF (OS2) | 10 km | 1310 nm | LC Duplex | +0.5 to -14.4 dBm |
| 25GBASE-SR | SFP28 | 25 Gbps | MMF (OM3/OM4) | 70m (OM3) / 100m (OM4) | 850 nm | LC Duplex | +2.4 to -10.3 dBm |
| 25GBASE-LR | SFP28 | 25 Gbps | SMF (OS2) | 10 km | 1310 nm | LC Duplex | +2.0 to -13.3 dBm |
| 40GBASE-SR4 | QSFP+ | 40 Gbps | MMF (OM3/OM4) | 100m (OM3) / 150m (OM4) | 850 nm (4x 10G) | MPO-12 | +2.4 to -9.5 dBm |
| 40GBASE-LR4 | QSFP+ | 40 Gbps | SMF (OS2) | 10 km | CWDM (1271-1331 nm) | LC Duplex | +2.3 to -13.7 dBm |
| 100GBASE-SR4 | QSFP28 | 100 Gbps | MMF (OM3/OM4) | 70m (OM3) / 100m (OM4) | 850 nm (4x 25G) | MPO-12 | +2.4 to -10.3 dBm |
| 100G-CWDM4 | QSFP28 | 100 Gbps | SMF (OS2) | 2 km | CWDM (1271-1331 nm) | LC Duplex | +2.5 to -10.0 dBm |
| 100G-PSM4 | QSFP28 | 100 Gbps | SMF (OS2) | 500 m | 1310 nm (Parallel SMF) | MPO-12 (SMF) | +2.0 to -9.4 dBm |
| 400GBASE-SR8 | QSFP-DD | 400 Gbps | MMF (OM3/OM4) | 70m (OM3) / 100m (OM4) | 850 nm (8x 50G PAM4) | MPO-16 | +3.0 to -8.0 dBm |
Interactive OSI Model
Select a layer to inspect protocol bindings and physical equipment.
Layer 7: Application
L7 SPECFunctional Responsibility:
End-user interfaces and network-aware application processes.
HTTP, DNS, DHCP, SSH, FTP, SMTP
Layer 7 Web Application Firewalls, Application Load Balancers
Interview Scenario Reference
Q: Explain DHCP's port usage under UDP transport. A: DHCP utilizes UDP. Clients send packets from Source Port 68 to Destination Port 67 (Server). Servers reply from Source Port 67 to Destination Port 68 (Client).
DHCP State Machine: The DORA Process
Source IP: 0.0.0.0:68 ➔ Destination IP: 255.255.255.255:67
Action: Client broadcasts network parameter search query across local Layer 2 segment.