Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from stackoverflow.com Apr 29 '12 at 9:21

This question came from our site for professional and enthusiast programmers.

    
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 '12 at 16:04

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.