Skip to main content
PacketMentor logo
Open menu
← All topics
Network Fundamentals Foundational

Verify IP Parameters on the Client OS (Windows / macOS / Linux)

The commands to check a laptop's IP, gateway, DNS, ARP table, and route table on Windows, macOS, and Linux — the ones you'll run before you ever SSH into a switch.

Quick summary
  • Windows: ipconfig /all, arp -a, route print, ping, tracert, nslookup — same info, three different command syntaxes across the platforms.
  • macOS + Linux: ip addr / ifconfig, ip route / netstat -rn, arp -an, dig / host, traceroute — the modern ip suite replaces the old ifconfig on Linux.
  • Read from IP → mask → gateway → DNS → ping local → ping gateway → ping DNS → ping public IP → resolve name. If a step fails, that's your layer.

Mental model

Before you SSH into a switch or router, verify the client. Nine times out of ten the problem is on the laptop: DHCP failed, DNS is unset, or the default gateway isn’t reachable. Every OS has the same information — you just type slightly different commands to get at it.

The three-column cheat sheet

QuestionWindowsmacOSLinux
My IP + mask + gateway + DNSipconfig /allifconfig + scutil --dnsip addr + resolvectl status
Just the essentialsipconfigifconfig en0 | grep inetip -br addr
Default gateway / route tableroute printnetstat -rnip route
ARP tablearp -aarp -anip neigh
Reachability by IPping 8.8.8.8ping 8.8.8.8ping 8.8.8.8
Path tracetracert 8.8.8.8traceroute 8.8.8.8traceroute 8.8.8.8 (or mtr)
Name → IP resolutionnslookup google.comdig google.comdig google.com
Renew DHCP leaseipconfig /renew(off/on network toggle)sudo dhclient -r && sudo dhclient
Flush DNS cacheipconfig /flushdnssudo dscacheutil -flushcachesudo resolvectl flush-caches

Reading ipconfig /all (Windows)

Ethernet adapter Ethernet:
   Connection-specific DNS Suffix  . : corp.example.com
   Description . . . . . . . . . . . : Intel(R) Ethernet Connection I219-V
   Physical Address. . . . . . . . . : 3C-52-82-1A-4B-77
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.1.42(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Sunday, August 9, 2026 8:12:31 AM
   Lease Expires . . . . . . . . . . : Monday, August 10, 2026 8:12:30 AM
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DNS Servers . . . . . . . . . . . : 192.168.1.1
                                       8.8.8.8

Six values to check: IP, mask, gateway, DNS, DHCP server, lease timestamps.

Reading ip addr (Linux)

$ ip addr
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 3c:52:82:1a:4b:77 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.42/24 brd 192.168.1.255 scope global dynamic noprefixroute enp3s0
       valid_lft 79832sec preferred_lft 79832sec
    inet6 fe80::3e52:82ff:fe1a:4b77/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
  • Interface state: UP,LOWER_UP — cable connected + link protocol up.
  • inet 192.168.1.42/24 — v4 address and prefix length.
  • inet6 fe80::.../64 scope link — the automatic link-local IPv6 (see ipv6-address-types).

For route + gateway:

$ ip route
default via 192.168.1.1 dev enp3s0 proto dhcp metric 100
192.168.1.0/24 dev enp3s0 proto kernel scope link src 192.168.1.42 metric 100

The default via 192.168.1.1 line is your gateway.

Reading ifconfig (macOS)

macOS still ships ifconfig. Filter for the IP:

$ ifconfig en0 | grep inet
	inet 192.168.1.42 netmask 0xffffff00 broadcast 192.168.1.255
	inet6 fe80::3e52:82ff:fe1a:4b77%en0 prefixlen 64 secured scopeid 0x4

netmask 0xffffff00 = 255.255.255.0 = /24. Gateway lives in netstat -rn:

$ netstat -rn | grep default
default            192.168.1.1        UGSc          en0

DNS servers on macOS aren’t in ifconfig — use scutil:

$ scutil --dns | grep 'nameserver\[' | head -3
  nameserver[0] : 192.168.1.1
  nameserver[1] : 8.8.8.8

Systematic triage — the “bottom-up” ladder

When a user says “the internet is broken”, run the ladder — first failure = broken layer.

1.  ipconfig /all                   ← Do I have an IP? Gateway? DNS?
2.  ping 127.0.0.1                  ← Is my TCP/IP stack alive?  (L3-4 loopback)
3.  ping <my own IP>                ← Is my NIC responding?      (L2 self)
4.  ping <default gateway>          ← Is my subnet reachable?    (L2/L3 local)
5.  ping 8.8.8.8                    ← Does routing work?         (L3 remote)
6.  ping google.com                 ← Does DNS work?             (L7 name-service)
7.  tracert google.com              ← Where's the hop that fails? (path)

Every step maps to an OSI layer. If ping to gateway works but ping to 8.8.8.8 doesn’t, routing is broken between your subnet and the outside. If DNS fails but ping-by-IP works, look at nslookup / dig.

The #1 mistake

Assuming APIPA 169.254.x.x means “internet is broken”. That address means DHCP silently failed — your NIC assigned itself a link-local as a fallback. The wireless is up, the cable is plugged in, but no DHCP server answered. Fix DHCP (on the router / server) — not the NIC.

  • DHCP — how the address you see in ipconfig gets assigned
  • DNS — how nslookup/dig turn a name into an IP
  • ARP — how your OS learns the MAC that goes with the gateway IP
  • OSI + TCP/IP — the mental model behind the ping ladder
Master this on a real network

Want this drilled into reflex?

1:1 weekly sessions, live feedback on your labs, and US interview prep — built around the CCNA® exam blueprint. Free first session. No card on file until you decide.

Claim my free session →

Get the free CCNA 12-week roadmap

You're already reading up on Verify IP Parameters on the Client OS (Windows / macOS / Linux). The roadmap is the order I recommend studying every CCNA topic in — with what to lab each week and where Verify IP Parameters on the Client OS (Windows / macOS / Linux) fits. A written personal reply, not an autoresponder. Expect it within one business day.

Personal reply from a senior network engineer. No third-party tracking. Unsubscribe any time.