2

I'm trying to find out how to disable and enable link local addresses, on my linux machine(also on arm). So basically for IPv4 and IPv6 I would like to either disable (or bring down) both addresses together or even individually if needs be. Then to enable both again. I would also like to check if they have been disabled and enabled each time.

Is it possible to execute system command line scripts to achieve this, for instance

*ip -f inet route*  or
*ip -f inet6 route*

Is it possible to do this without restarting the network?

Also, I have, using the 2 examples above, obtained both IPv4 and IPv6 addresses. For example,

ip -f inet route | grep \"dev eth0\" | cut -d' ' -f1
ip -f inet route | grep \"dev eth0\" | cut -d' ' -f1

but I am concerned that the grep string is not unique enough to search for the line(s) where the address(es) are. Is there a better way to do this?

Thanks.

1
  • Provided you know that you have a certain link-local address, you use ip addr del fe80::xyzfillinhere dev eth0, not ip -f inet route.
    – jørgensen
    Apr 24, 2012 at 16:04

1 Answer 1

0

ip link set lo down ? you can operate with adresses with ip addr too

You must log in to answer this question.