Avoiding autoconf on RHEL6 and related distros

Phil Mayers p.mayers at imperial.ac.uk
Wed May 22 18:20:16 CEST 2013


On 22/05/13 14:41, Dick Visser wrote:
> Hi
>
> I'm trying to configure an Ubuntu 12.04 Server VM with static IP addresses.
> The config is this:

In the same vein, we had to fight with this on RHEL6 recently, and I 
thought I'd dash out a quick note on what we found.

In brief: the global SysV init script:

   * /etc/init.d/network
   * /etc/sysconfig/network-scripts/init.ipv6-global

...and the ifup/ifdown sub-scripts that control IPv6:

   * /etc/sysconfig/networks-scripts/ifup-ipv6
   * /etc/sysconfig/networks-scripts/ifdown-ipv6

...fiddle with sysctl values directly, and in ways that can trample on 
settings in /etc/sysctl.conf

If you want to disable autoconf addresses, you need to add lines to the 
global network config to disable it, then re-enable it if required on a 
per-interface basis:

/etc/sysconfig/network:

# actually read what comes next
IPV6INIT=yes
# disable autoconf by default
IPV6_AUTOCONF=no
# optionally:
IPV6_DEFAULTGW="fe80::5:73ff:fea0:1%eth0"

/etc/sysconfig/network-scripts/ifcfg-ethX:

IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6ADDR="2001:db8:1::101/64"


You can also then enable autoconf on a specific interface with:

/etc/sysconfig/network-scripts/ifcfg-ethX:

IPV6INIT=yes
IPV6_AUTOCONF=yes


Unfortunately there seems to be no easy way to completely disable IPv6 
on specific interfaces (with the "disable_ipv6" sysctl) which would be 
desirable for bridge members e.g. on a VM host.

If anyone has a pipeline into RedHat that I can feed our experiences 
into, do let me know...

Cheers,
Phil



More information about the ipv6-ops mailing list