[ SRE_ARENA ]
TCP/IP & NETWORKING

TCP/IP & Networking: The Network is NEVER Reliable

Visualization: 1. The Network Stack & IP Addressing
DOWNLOADING CONCEPT: 1. THE NETWORK STACK & IP ADDRESSING...
  • ↳The network stack is a series of encapsulation layers (the OSI Model).
  • ↳When your application sends an HTTP response, it sits at Layer 7 (Application).
  • ↳The OS kernel wraps this data in a Layer 4 (Transport) TCP segment (adding source/dest ports).
  • ↳Then it wraps it in a Layer 3 (Network) IP packet (adding source/dest IP addresses).
  • ↳Finally, it wraps it in a Layer 2 (Data Link) Ethernet frame (adding MAC addresses).
IP Addressing
  • ↳(Layer 3) is how machines find each other.
  • ↳IPv4 addresses are 32-bit (e.g., 192.168.1.5).
  • ↳Because we ran out of IPv4 addresses, we rely heavily on NAT (Network Address Translation), which translates a single public IP to multiple private IPs.
Command

ip addr Shows your network interfaces and their assigned IP addresses.

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP 
    link/ether 06:b0:b1:a4:23:11 brd ff:ff:ff:ff:ff:ff
    inet 10.0.4.17/24 brd 10.0.4.255 scope global eth0
▲ LIVE INCIDENTApp logs show: Cannot assign requested address.
sre@arena:~/osi-tcpip
sre@arena:~$ netstat -tn | awk '{print $6}' | sort | uniq -c && ss -s