Instiq
Chapter 6 · Network Fundamentals·v1.0.0·Updated 7/20/2026·~16 min

What's changed: Initial version

6.1L2/L3 fundamentals (MAC, VLAN, IP, subnet, gateway)

Key points

As the prerequisite for an automation script or API client to actually reach its target, this section covers L2 MAC addresses and VLANs, and L3 IP addresses, subnet mask/prefix, routing, and the default gateway—framed as the connectivity diagnosis of "why can only this host not reach the API."

For someone writing automation, network fundamentals are not a memorization subject but the foundation for judging whether packets actually reach the API endpoint your script calls. When requests.get() times out, an ssh session will not open, or a NETCONF session fails to establish, the cause is often not an application bug but L2/L3 reachability. This section organizes MAC/VLAN (L2), which handle forwarding within one segment, and IP/subnet/routing/default gateway (L3), which handle reachability across segments, as tools for isolating "where it stops."

6.1.1L2: MAC addresses and VLANs

  • A MAC address is a 48-bit L2 identifier burned into the NIC (e.g. 00:1A:2B:3C:4D:5E). Within one segment (same VLAN/subnet), a switch forwards a frame to the destination MAC. To a different subnet it cannot reach by MAC; L3 routing is required—confusing this leads to misdiagnosing "they are on the same switch yet cannot communicate."
  • A VLAN logically splits one physical switch into multiple broadcast domains. Different VLANs are separate segments at L2, so inter-VLAN traffic requires L3 (a router or an L3 switch SVI). If the automation host sits in a different VLAN from the managed devices but routing or a default gateway is not set, it cannot reach them even within the same building.

Continue reading — free sign-up

You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.