Skip to content

Networking Basics

What Matters First

  • An IP address identifies a host logically.
  • A mask or prefix defines the network boundary.
  • A default gateway is needed to leave the local network.
  • DNS maps names to IPs.
  • TCP is built for reliable delivery; UDP is built for lower overhead.

OSI vs TCP/IP

OSI

  1. Physical
  2. Data Link
  3. Network
  4. Transport
  5. Session
  6. Presentation
  7. Application

TCP/IP

  1. Link
  2. Internet
  3. Transport
  4. Application

In real troubleshooting, this is often simplified to:

  • L1/L2: cable, interface, VLAN, MAC
  • L3: IP and routing
  • L4: TCP or UDP port
  • L7: HTTP, DNS, SSH, SMTP, and application behavior

IPv4 in Two Lines

192.168.10.25/24

  • 192.168.10.0 is the network
  • 192.168.10.25 is the host address
  • /24 means 24 bits are used for the network prefix

Common Private Ranges

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16

NAT

NAT rewrites the source or destination address. In offices, home networks, and clouds, the most common case is source NAT for private hosts reaching the Internet through one public IP.

VLAN

A VLAN logically splits one L2 domain into multiple isolated segments. Typical examples include separate VLANs for users, servers, management, and voice.

MTU

If a path breaks larger packets, you may see strange symptoms: hanging TLS sessions, unstable VPNs, or incomplete HTTP requests. This is checked with ping packet sizes and interface or tunnel MTU settings.

DNS in the Network Picture

Even if IP connectivity exists, an application can still look broken because of bad name resolution, stale caches, or an incorrect search domain.

Practice

  • Separate transport issues from name resolution issues first.
  • Verify routing in both directions, not just “ping from here to there”.
  • On Linux, ip and ss are usually more useful than legacy tools.