• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

Question about deprecating an address on OSX or BSD

Started by guylhem, July 20, 2011, 11:00:11 AM

Previous topic - Next topic

guylhem

Hello

I would like to know what is the equivalent on OSX or BSD of the following linux command :

ip -6 addr change 2001::something/64 dev tap0 preferred_lft 0

The idea is to make the address still valid for receiving packets, but not valid for sending them.

I tried to do some googling but I found nothing for OSX or BSD

Thanks
Guylhem

juhoostman

Try this: ifconfig DEV inet6 ADDR deprecated

This is not tested at all, since I have no access to an OS X, instead it is quickly derived from the source. You may also have a different version of ifconfig.

guylhem

Hello

Thanks - but with this syntax I get:

ifconfig: unable to get address cache: Operation not supported on socket

If I remove "addr" it works, but the address is not deprecated.

Guylhem

jrocha

Replace DEV with your device name and ADDR with the address you wish to depreciate, like so:

sudo ifconfig en0 inet6 2001:470::a9:1889:a6e7:ee07:1687 deprecated

juhoostman

If this doesn't work, there may be other means to do what you want. You can create a pseudo-interface and assign the addresses you don't want to be used by default to it instead of the real outgoing interface. You should assign only single addresses to the pseudo-interface, not subnets. If the addresses have subnets, add explicit routes to them through their real interfaces.

juhoostman

You can also use ip6addrctl if it is available. First run ip6addrctl to see the current policy table, then add a new rule:
ip6addrctl add <prefix to be "deprecated"> 1 <label that is not yet used, maybe greater than 10>