How to Verify IP Parameters for Client OS (Windows, macOS, Linux)

How to verify IP parameters for Client OS (Windows, Mac OS, Linux)

Before troubleshooting any network issue, the very first question should be: “What IP configuration does this device actually have?” Whether you’re dealing with a user who “can’t get on the Internet” or configuring a new server, checking the client’s IP parameters is always step one.

This article covers exactly how to view and interpret IP configuration — IP address, subnet mask, default gateway, DNS servers, and more — on the three major client operating systems: Windows, macOS, and Linux.

The Core IP Parameters Every Client Needs

Regardless of operating system, every properly configured client needs these five pieces of information to communicate on a network:

ParameterPurpose
IP AddressUniquely identifies this device on the network
Subnet MaskDefines which portion of the IP address is network vs. host, determining the size of the local network
Default GatewayThe router’s IP address, used to reach any destination outside the local subnet
DNS Server(s)Translates domain names (like google.com) into IP addresses
MAC AddressThe device’s physical/hardware address, used for Layer 2 communication within the local segment

These can be assigned either manually (static) or automatically via DHCP (Dynamic Host Configuration Protocol).

Windows: Viewing IP Configuration

Command: ipconfig

The most basic command, showing a quick summary:

C:\Users\PC1> ipconfig

Windows IP Configuration

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : example.com
   IPv4 Address. . . . . . . . . . . : 192.168.1.100
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

Command: ipconfig /all

Gives full details, including DNS servers, DHCP status, and the MAC (Physical) address:

C:\Users\PC1> ipconfig /all

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : example.com
   Description . . . . . . . . . . . : Intel(R) Ethernet Connection
   Physical Address. . . . . . . . . : AA-BB-CC-DD-EE-FF
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.1.100(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Wednesday, July 22, 2026 8:00:00 AM
   Lease Expires . . . . . . . . . . : Thursday, July 23, 2026 8:00:00 AM
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DNS Servers . . . . . . . . . . . : 8.8.8.8
                                       8.8.4.4

Key fields to check when troubleshooting:

  • DHCP Enabled: Yes/No — confirms whether the address was assigned automatically or configured statically.
  • Lease Obtained/Expires — useful for diagnosing intermittent IP conflicts or renewal issues.
  • DNS Servers — a very common cause of “Internet doesn’t work but I can ping IP addresses” symptoms.

Useful Related Windows Commands

C:\Users\PC1> ipconfig /release      REM Release current DHCP lease
C:\Users\PC1> ipconfig /renew        REM Request a new DHCP lease
C:\Users\PC1> ipconfig /flushdns     REM Clear the local DNS resolver cache
C:\Users\PC1> arp -a                 REM View the local ARP cache
C:\Users\PC1> route print            REM View the local routing table

Windows GUI Method

You can also view (and set) IP parameters via: Settings > Network & Internet > Properties, or the classic Control Panel > Network and Sharing Center > Change Adapter Settings > Properties > Internet Protocol Version 4 (TCP/IPv4).

macOS: Viewing IP Configuration

Command: ifconfig

The classic Unix-style tool, still available on macOS (though considered legacy in favor of networksetup and the newer ifconfig/netstat combination):

$ ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether aa:bb:cc:dd:ee:ff
	inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255
	media: autoselect
	status: active

Breaking this down:

  • ether aa:bb:cc:dd:ee:ff — the MAC address
  • inet 192.168.1.101 — the IPv4 address
  • netmask 0xffffff00 — the subnet mask in hexadecimal (this equals 255.255.255.0)
  • status: active — confirms the link is up

Command: networksetup -getinfo

Gives a more readable, complete summary including the default gateway and DNS servers:

$ networksetup -getinfo Wi-Fi
DHCP Configuration
IP address: 192.168.1.101
Subnet mask: 255.255.255.0
Router: 192.168.1.1
Wi-Fi ID: aa:bb:cc:dd:ee:ff

Command: scutil --dns

Shows the DNS resolver configuration in detail:

$ scutil --dns
DNS configuration
resolver #1
  search domain[0] : example.com
  nameserver[0] : 8.8.8.8
  nameserver[1] : 8.8.4.4

Useful Related macOS Commands

$ sudo ipconfig set en0 DHCP        # Request a new DHCP lease on interface en0
$ sudo dscacheutil -flushcache      # Flush the local DNS cache
$ arp -a                            # View the local ARP cache
$ netstat -rn                       # View the routing table

Linux: Viewing IP Configuration

Command: ip addr show (Modern Standard)

The modern iproute2 suite (ip command) has replaced the older ifconfig on most current Linux distributions.

$ ip addr show
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.102/24 brd 192.168.1.255 scope global dynamic eth0
       valid_lft 3542sec preferred_lft 3542sec
    inet6 fe80::abcd:1234:5678:90ab/64 scope link

Breaking this down:

  • link/ether aa:bb:cc:dd:ee:ff — MAC address
  • inet 192.168.1.102/24 — IP address with CIDR prefix length (equivalent to subnet mask 255.255.255.0)
  • dynamic — indicates this address was assigned via DHCP
  • valid_lft 3542sec — remaining DHCP lease time in seconds
  • inet6 ... — the automatically assigned IPv6 link-local address

Command: ip route show

Shows the default gateway (and full routing table):

$ ip route show
default via 192.168.1.1 dev eth0 proto dhcp metric 100
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.102 metric 100

Command: resolvectl status (systemd-resolved based systems) or cat /etc/resolv.conf

$ resolvectl status
Link 2 (eth0)
    Current Scopes: DNS
    DNS Servers: 8.8.8.8 8.8.4.4
    DNS Domain: example.com

Or on older/simpler systems:

$ cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

Legacy Command: ifconfig (Still Available on Many Distros)

$ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.102  netmask 255.255.255.0  broadcast 192.168.1.255
        ether aa:bb:cc:dd:ee:ff  txqueuelen 1000  (Ethernet)

Useful Related Linux Commands

$ sudo dhclient -r eth0             # Release DHCP lease
$ sudo dhclient eth0                # Renew/request DHCP lease
$ arp -a                            # View ARP cache (or: ip neigh show)
$ ip neigh show                     # Modern equivalent of arp -a

Visualizing the DHCP Assignment Process (Relevant to All Three OSes)

sequenceDiagram
    participant Client
    participant DHCPServer as DHCP Server
    Client->>DHCPServer: DHCPDISCOVER (broadcast)
    DHCPServer->>Client: DHCPOFFER (IP, mask, gateway, DNS)
    Client->>DHCPServer: DHCPREQUEST (accepting offer)
    DHCPServer->>Client: DHCPACK (lease confirmed)
    Note over Client: Client now has full IP configuration

This four-step exchange (often abbreviated DORA: Discover, Offer, Request, Acknowledge) is exactly what populates the IP address, subnet mask, default gateway, and DNS server fields you see in all the commands above — regardless of operating system.

Comparison Table: Command Equivalents Across Operating Systems

TaskWindowsmacOSLinux
View IP configurationipconfig /allifconfig / networksetup -getinfoip addr show
View routing tableroute printnetstat -rnip route show
View ARP/neighbor cachearp -aarp -aip neigh show
View DNS serversipconfig /allscutil --dnsresolvectl status
Release DHCP leaseipconfig /releasesudo ipconfig set en0 DHCPsudo dhclient -r eth0
Renew DHCP leaseipconfig /renew(automatic, or same command)sudo dhclient eth0
Flush DNS cacheipconfig /flushdnssudo dscacheutil -flushcachesudo resolvectl flush-caches

Python Example: Retrieving Local IP Configuration Programmatically

For automation scripts or health-check tools, Python can retrieve basic IP information cross-platform using the standard library and the psutil package (pip install psutil):

import socket
import psutil

def show_ip_config():
    hostname = socket.gethostname()
    print(f"Hostname: {hostname}")

    for interface, addrs in psutil.net_if_addrs().items():
        for addr in addrs:
            if addr.family == socket.AF_INET:
                print(f"Interface: {interface}")
                print(f"  IP Address : {addr.address}")
                print(f"  Netmask    : {addr.netmask}")

show_ip_config()

Example output:

Hostname: client-pc
Interface: eth0
  IP Address : 192.168.1.102
  Netmask    : 255.255.255.0

This kind of script is the basis for many cross-platform network inventory and health-check tools used in enterprise automation.

Real-World Troubleshooting Scenario

Symptom: A user reports “the Internet isn’t working,” but they can still access internal file shares.

Step-by-step diagnosis using IP parameter verification:

  1. Check the IP address and subnet mask — confirm the device has a valid address in the expected subnet, not a self-assigned APIPA address (169.254.x.x on Windows), which indicates the DHCP server was unreachable.
  2. Check the default gateway — if it’s missing or wrong, the device can talk to local devices (same subnet) but not reach anything beyond the local network — exactly matching this symptom.
  3. Check DNS servers — if the gateway is correct but DNS is misconfigured, the user could still reach the Internet by IP address but not by domain name, which also matches “Internet doesn’t work.”
  4. Test with ping <gateway-ip>, then ping 8.8.8.8 (tests raw IP connectivity), then ping google.com (tests DNS resolution) — each step isolates a different potential fault layer.
flowchart TD
    A["User reports: No Internet"] --> B{"Can ping default gateway?"}
    B -- No --> C["Local connectivity/gateway issue"]
    B -- Yes --> D{"Can ping 8.8.8.8 (by IP)?"}
    D -- No --> E["Upstream routing/ISP issue"]
    D -- Yes --> F{"Can resolve google.com?"}
    F -- No --> G["DNS configuration issue"]
    F -- Yes --> H["Internet working - issue may be application-specific"]

Best Practices

  1. Always verify IP configuration before assuming a routing or firewall problem — many “network” issues are simply misconfigured or expired DHCP leases.
  2. Standardize on DHCP for end-user devices wherever possible — static IP misconfigurations (duplicate addresses, wrong subnet masks) are a very common source of hard-to-diagnose issues.
  3. Document static IP assignments (servers, printers, network equipment) in a central IP address management (IPAM) system to avoid conflicts.
  4. Use consistent DNS servers across your environment, and document them, so troubleshooting “can’t resolve names” issues is fast and predictable.
  5. Know your OS-specific commands — the underlying TCP/IP concepts are identical across Windows, macOS, and Linux, but the tools to inspect them differ.

Summary

Regardless of operating system, every client needs the same five fundamental IP parameters: IP address, subnet mask, default gateway, DNS servers, and MAC address. Windows uses ipconfig /all, macOS uses ifconfig/networksetup/scutil, and Linux uses ip addr show/ip route show. Mastering these commands — and knowing exactly which piece of information explains which symptom — is one of the fastest ways to cut troubleshooting time from hours to minutes.

Further Reading

Total
3
Shares

Leave a Reply

Previous Post
Compare IPv6 address types

Compare IPv6 Address Types

Next Post
Describe characteristics of network topology architectures

Describe Characteristics of Network Topology Architectures

Related Posts