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.
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 en002What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ipconfig — view and control IP configuration (macOS)Evidence: Documents getpacket to show the DHCP lease packet and getoption to fetch individual DHCP options.
Last verified: 2026-09-17 · Category: Network