ifconfig -a inet6 returns "invalid argument"

For some reasony my macOS Monterey 12.0.1 returns an "ifconfig: invalid arguments" for the command "ifconfig -a inet6". On another computers this command provides me with an IPv6 addresses for all interfaces. But on this macbook pro, I have no idea why its returning this error. BTW "ifconfig" shows my IPv4 only, not IPv6 even I can clearly see IPv6 address this macbook in System preferences / Network ...


Any idea why is this happening?

Posted on Dec 6, 2021 6:59 AM

Reply

Similar questions

1 reply

Dec 6, 2021 7:56 AM in response to magsayshug

I tried that from the command-line in 10.14 Mojave and got the 'this is how you use it' response.


the I tried the same command with 'inet', and with 'link' as the address_family parameter and got result for each (but not IPv6 info).


Then I tried the original inet6 and it worked, and provided the IPv6 info as well.


Then quitting Terminal and re-launching still allowed inet6 to work correctly.


--------

I took a look at the man page and saw this [emphasis is mine]:

address

For the DARPA-Internet family, the address is either a host name

present in the host name data base, hosts(5), or a DARPA Internet

address expressed in the Internet standard ``dot notation''.


It is also possible to use the CIDR notation (also known as the

slash notation) to include the netmask.  That is, one can specify

an address like 192.168.0.1/16.


For the ``inet6'' family, it is also possible to specify the pre-

fix length using the slash notation, like ::1/128.  See the

prefixlen parameter below for more information.


The link-level (``link'') address is specified as a series of

colon-separated hex digits.  This can be used to e.g. set a new

MAC address on an ethernet interface, though the mechanism used

is not ethernet-specific.  If the interface is already up when

this option is used, it will be briefly brought down and then

brought back up again in order to ensure that the receive filter

in the underlying ethernet hardware is properly reprogrammed.


>> so I am trying to suggest that unless/until ifconfig examines each interface with the 'link' parameter active, it may not be ready to provide the information you asked for. And after it has used the 'link' parameter, it continues to be ready to provide that info.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ifconfig -a inet6 returns "invalid argument"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.