Re: [gentoo-user] Re: Disable IPv6 on an interface?

2012-01-17 Thread Michael Mol
Grant Edwards wrote:
 On 2012-01-17, Paul Hartman paul.hartman+gen...@gmail.com wrote:
 On Tue, Jan 17, 2012 at 9:48 AM, Grant Edwards
 grant.b.edwa...@gmail.com wrote:
 How does one disable IPv6 for a particular interface?

 I want eth2 up but with no IP address. ?Just doing an ifconfig eth2
 up worked fine until I enabled IPv6 support in the kernel. ?Now I get
 a link-local IPv6 address just by bringing the interface up -- and I
 don't want one.

 Google has found me the anser for Debian, but for Gentoo all it found
 was somebody else asking the qeustion (with no answers).

 I didn't try it myself, but what about sysctl?

 net.ipv6.conf.eth0.disable_ipv6=1

 or something like that...
 
 That does it!
 
 The next question is what do I put in the Gentoo network configuration
 file (/etc/conf.d/net) to get that result (eth2 up with no IP
 addresses).
 

/etc/sysctl.conf

net.ipv6.conf.eth0.disable_ipv6=1

It may be sufficient to just use:
net.ipv6.conf.eth0.autoconf=0
net.ipv6.conf.eth0.accept_ra=0

I'm just guessing that .autoconf corresponds to link-local addresses,
though.



Re: [gentoo-user] Re: Disable IPv6 on an interface?

2012-01-17 Thread Pandu Poluan
On Jan 17, 2012 11:56 PM, Grant Edwards grant.b.edwa...@gmail.com wrote:

 On 2012-01-17, Paul Hartman paul.hartman+gen...@gmail.com wrote:
  On Tue, Jan 17, 2012 at 9:48 AM, Grant Edwards
 grant.b.edwa...@gmail.com wrote:
  How does one disable IPv6 for a particular interface?
 
  I want eth2 up but with no IP address. ?Just doing an ifconfig eth2
  up worked fine until I enabled IPv6 support in the kernel. ?Now I get
  a link-local IPv6 address just by bringing the interface up -- and I
  don't want one.
 
  Google has found me the anser for Debian, but for Gentoo all it found
  was somebody else asking the qeustion (with no answers).
 
  I didn't try it myself, but what about sysctl?
 
  net.ipv6.conf.eth0.disable_ipv6=1
 
  or something like that...

 That does it!

 The next question is what do I put in the Gentoo network configuration
 file (/etc/conf.d/net) to get that result (eth2 up with no IP
 addresses).


You don't.

Put it in /etc/sysctl.conf instead.

Rgds,


Re: [gentoo-user] Re: Disable IPv6 on an interface?

2012-01-17 Thread Paul Hartman
On Tue, Jan 17, 2012 at 11:50 AM, Grant Edwards
grant.b.edwa...@gmail.com wrote:
 After putting the above line in sysctl.conf (and removing my preup()
 function), everything worked as expected except that I had to manually
 start the interface with the command /etc/init.d/net.eth2 start.

 Google told me to fix that by using rc-update to add net.eth2 to the
 default runlevel.

 Everything's tickety-boo now, but I don't remember have to do that
 last step in the past when I added a network interface -- all I had to
 do was create the symlink from net.whatever to net.lo.

 Is the rc-update runlevel stuff new?

AFAIR you've had to do it that way forever... but it's not exactly
something I set up every day.

Maybe if you used ifplugd, wicd, networkmanager etc. it works differently.