Read Your DHCP Lease with ipconfig getpacket

macOS's ipconfig utility reveals the raw DHCP offer — router, DNS, lease time, vendor options — for any interface.

macOSdhcpleaseipconfigLow risk
Run `ipconfig getpacket en0` to dump the full DHCP lease packet for the en0 interface, including router, DNS and lease time.

01Command

Command
$ ipconfig getpacket en0

02What it does

Unlike the Windows tool of the same name, macOS's ipconfig drives the IP configuration daemon. getpacket prints the complete DHCP response: yiaddr (your IP), siaddr (server), router, domain_name_server, lease_time, and any vendor-specific options the network pushes. Use `ipconfig getoption en0 router` to fetch a single option, and `ipconfig getiflist` to enumerate interfaces if en0 isn't the active one.

03Risk

RiskLow risk
RequirementsBuilt-in on macOS; on Apple Silicon Wi-Fi Macs check the right interface (often en0 for Wi-Fi too).

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-17 · Category: Network