AutoIP negotiation module for link-local addresses
mount -Tio-net [-o option,option,...] nfm-autoip.so
The AutoIP io-net module (nfm-autoip.so) configures a specified interface with a link-local IP address by negotiating with neighboring hosts. If no host on the local network is using the IP address the module has chosen then the interface is configured with the chosen address.
The AutoIP module will choose its address from the IANA registered IP address network of 169.254/16. Some of this network is reserved for special purposes, so the available addresses are from 169.254.1.0 to 169.254.254.255.
Once an IP address is chosen and configured, the AutoIP module will continue to monitor the network for address conflicts, and will either defend or change the address assigned to the interface to correct conflicts.
Only one interface can be supported at one time. The io-net module can be loaded only once.
The AutoIP module will begin transmitting packets as soon as it detects that the specified interface is available. If the driver that provides the interface is unmounted, the AutoIP module will wait until the interface is available again, and start the negotiation process from the beginning.
When the AutoIP module configures a TCP/IP interface with an IP address, it does so as an alias. This way, if the interface already has an IP address, it won't delete the original address; the interface will be assigned both addresses. This allows the module to coexist with dhcp.client. There is no way for the AutoIP module to detect that you have unconfigured the link-local IP address on the interface, so if you don't want the AutoIP link-local IP address to be configured any longer, you must unmount the AutoIP module. Also, if you're configuring the interface manually along with a link-local address, you must pass alias argument to ifconfig so you don't delete the link-local address by accident. Also if you're deleting the manually configured address, you must specify the specific address, or ifconfig may end up deleting the link-local IP address if it was the first IP address defined.
These examples assume a manual configuration in combination with AutoIP.
Configuring the interface:
ifconfig en0 alias 10.0.0.1
Unconfiguring the interface:
ifconfig en0 delete 10.0.0.1
Don't execute the following:
ifconfig en0 delete
This following command line mounts the AutoIP module to service interface en0. The initial link-local IP address that it PROBEs for is 169.254.20.20; it has a 200 ms delay between PROBE packets. If an IP address conflict is detected after the interface has been configured, it releases the address immediately.
mount -T io-net -oif=en0,ip=169.254.20.20,debug,delay=200,abandon nfm-autoip.so
dhcp.client, ifconfig, netstat, npm-tcpip.so
draft-ietf-zeroconf-ipv4-linklocal-07.txt