3

On Linux, I can do ip -6 addr list and every address comes with a valid_lft and preferred_lft. What is the OS X equivalent? ifconfig doesn't include this information in its output.

0

1 Answer 1

5

From the manual page of ifconfig:

If -L flag is supplied, address lifetime is displayed for IPv6 addresses, as time offset string.

The output looks like this:

en9: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=4<VLAN_MTU>
    ether 00:0e:ca:00:3d:0e 
    inet6 fe80::20e:caff:fe00:3d0e%en9 prefixlen 64 scopeid 0xe 
    inet 192.168.178.21 netmask 0xffffff00 broadcast 192.168.178.255
    inet6 2001:db8:d:ff01:20e:caff:fe00:3d0e prefixlen 64 autoconf pltime 3385 vltime 6985 
    inet6 2001:db8:d:ff01:2559:b136:a7f2:67c0 prefixlen 64 autoconf temporary pltime 3385 vltime 6985 
    nd6 options=1<PERFORMNUD>
    media: autoselect (100baseTX <full-duplex,flow-control>)
    status: active

Notice the pltime and vltime at the end of the inet6 lines.

2
  • @SanderSteffann Good job, IOU1. Commented Sep 16, 2015 at 10:32
  • Thanks. I think I even knew about this option at some point; I guess I must have searched the manpage for "valid" and "preferred" but not "lifetime"!
    – Glyph
    Commented Sep 16, 2015 at 23:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .