Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

There is an inet6 addr on the eth0 interface:

eth0      Link encap:Ethernet  HWaddr 00:0c:29:d9:46:f5  
          inet6 addr: fe80::20c:29ff:fed9:46f5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:193 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4133 (4.1 KB)  TX bytes:32902 (32.9 KB)
          Interrupt:19 Base address:0x2024 

I don't need this address and I use the following command to delete it:

sudo ifconfig eth0 inet6 del fe80::20c:29ff:fed9:46f5/64

However, each time I restart the system, this address comes back.

How to disable the autoconfigured inet6 address?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can't, that's how IPv6 works. (However, you can disable IPv6. See below.)

Explanation:

IPv6 doesn't use ARP to find which MAC address belongs to which IP, it uses the Neighbor Discovery Protocol. As a core concept, the NDP works over IP, not over Ethernet frames, so it needs an IP address to communicate. That's the "fe80" link-local address.

Solution:

If you don't want to use IPv6 at all, I suggest you blacklist the IPv6 module in the Linux kernel by adding the following line to /etc/modprobe.d/blacklist.conf:

blacklist ipv6

After a restart all your IPv6 addresses should be gone.

However, if you do plan on using IPv6, I suggest you seriously read up on it, otherwise you will be in a world of pain and security issues.

share|improve this answer
    
Thanks very much for your explanation! –  tonybuaa Jun 10 '13 at 8:32
1  
For completeness: link-local addresses are used for more things than just NDP. Applications like Windows Home-Group and Apple AirPlay and Bonjour use it as well for communication in the local LAN. –  Sander Steffann Jun 10 '13 at 8:39
    
And please don't blacklist the IPv6 address. You could ignore all IPv6-addresses that starts with fe80::/10 (or actually fc00::/7), as they are basicly the same as 169.254.0.0/16. Which are only usable on a link in your LAN. Addresses 2000::/3 (starts with 2 or 3) are global addresses. No, you don't have any like the IPv4 addresses in 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 in IPv6. And that is Good(tm). –  Anders Jun 10 '13 at 19:15
    
@Anders if he doesn't want IPv6, he should turn it off, if he does want it, he should configure it properly. If he has IPv6 floating around, somebody just needs to turn on some router advertisement (RA) in the network and you have a big honkin' security hole. –  Janoszen Jun 11 '13 at 15:51
    
And exactly the same problem do he have now, but with IPv4, unless all machines in his net has static addresses. Just start a DHCPD server and you have controll over the IPv4 net. There are no real reason to turn IPv6 off, unless you know how IPv4 and IPv6 works. It will not gain anything and it will not make your network any securer. –  Anders Jun 14 '13 at 18:29

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.