📡 L2_L7_STANDARDS // NETWORKING

Subnet bounds, layer interactions, frame translations, transceivers, and DHCP mappings.

NOC CONTROL

CIDR Subnet & Mask Calculator

IPV4 SUBNETTING
Target IP / CIDR Prefix:
Network Address

10.240.84.192 /27

Subnet Mask

255.255.255.224

Broadcast Address

10.240.84.223

Usable Host Pool

30 Hosts

Usable Host Range:

10.240.84.193 ➔ 10.240.84.222

Protocol Anatomy: "ping google.com"

DEEP PACKET FLOW
1

Local Socket & Route Inspection

Layer 3 (Network) Kernel Socket / Routing Table

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.

Frame / Packet Payload:
Local Source: 10.240.0.45 | Target Domain: google.com | Socket: AF_INET (RAW)
2

DNS Resolution (Domain -> IP)

Layer 7 (Application) -> Layer 4 (UDP) DNS (UDP Port 53)

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).

Frame / Packet Payload:
DNS Query: google.com (Type A) -> Answer: 142.250.190.46 | Port 53
3

ARP Resolution (Gateway MAC Discovery)

Layer 2 (Data Link) ARP (Address Resolution Protocol)

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.

Frame / Packet Payload:
ARP Request: Broadcast (ff:ff:ff:ff:ff:ff) -> ARP Reply: Gateway MAC (e0:d5:5e:a1:b2:c3)
4

ICMP Echo Request Frame Assembly

Layer 2 -> Layer 3 ICMP (Type 8, Code 0) / IPv4

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 / Packet Payload:
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]
5

L3 Transit & Hop-by-Hop Routing

Layer 3 (Network) IP / BGP / OSPF

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.

Frame / Packet Payload:
Hop 1 Gateway -> Hop 2 ISP Edge -> Hop 3 Google Edge Router (TTL: 64 -> 63 -> 58)
6

Target Reception & Echo Reply

Layer 3 -> Layer 7 ICMP (Type 0, Code 0)

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.

Frame / Packet Payload:
ICMP Echo Reply (Type 0) Src: 142.250.190.46 -> Dst: 10.240.0.45
7

Socket Delivery & RTT Calculation

Application / Terminal ICMP / System Clock

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'.

Frame / Packet Payload:
Result: 64 Bytes | Sequence: 1 | TTL: 116 | RTT: 14.2ms | Status: 0% Packet Loss

Optical Transceiver & Port Directory

10GBASE-SRSFP+10 GbpsMMF (OM3/OM4)300m (OM3) / 400m (OM4)850 nmLC Duplex-1.0 to -9.9 dBm
10GBASE-LRSFP+10 GbpsSMF (OS2)10 km1310 nmLC Duplex+0.5 to -14.4 dBm
25GBASE-SRSFP2825 GbpsMMF (OM3/OM4)70m (OM3) / 100m (OM4)850 nmLC Duplex+2.4 to -10.3 dBm
25GBASE-LRSFP2825 GbpsSMF (OS2)10 km1310 nmLC Duplex+2.0 to -13.3 dBm
40GBASE-SR4QSFP+40 GbpsMMF (OM3/OM4)100m (OM3) / 150m (OM4)850 nm (4x 10G)MPO-12+2.4 to -9.5 dBm
40GBASE-LR4QSFP+40 GbpsSMF (OS2)10 kmCWDM (1271-1331 nm)LC Duplex+2.3 to -13.7 dBm
100GBASE-SR4QSFP28100 GbpsMMF (OM3/OM4)70m (OM3) / 100m (OM4)850 nm (4x 25G)MPO-12+2.4 to -10.3 dBm
100G-CWDM4QSFP28100 GbpsSMF (OS2)2 kmCWDM (1271-1331 nm)LC Duplex+2.5 to -10.0 dBm
100G-PSM4QSFP28100 GbpsSMF (OS2)500 m1310 nm (Parallel SMF)MPO-12 (SMF)+2.0 to -9.4 dBm
400GBASE-SR8QSFP-DD400 GbpsMMF (OM3/OM4)70m (OM3) / 100m (OM4)850 nm (8x 50G PAM4)MPO-16+3.0 to -8.0 dBm
Rows per page: Showing 1–10 of 11
Page 1 of 2

Interactive OSI Model

Select a layer to inspect protocol bindings and physical equipment.

Layer 7: Application

L7 SPEC

Functional Responsibility:

End-user interfaces and network-aware application processes.

Key Protocols

HTTP, DNS, DHCP, SSH, FTP, SMTP

Physical Equipment

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

Technician Laptop MAC: 00:0a:95:9d:68:16
📢 LAYER 2 BROADCAST FRAME

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.

DHCP Server Gateway: 10.0.0.1