Saturday, April 26, 2008

FreeBSD Tip: How to delete all IPv6 address in an interface

You can delete all IPv6 addresses in an interface using the following command (vanilla Bourne shell):

while i="`ifconfig le0 | grep inet6 | grep -m 1 -v '%'`"; do
ifconfig le0 $i delete
Note: replace le0 with your interface name.

No comments: