Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm about to connect our network to the IPv6 Internet and need to control the kernel ipv6 settings found under /proc. I know there are configurations for each interface, for all interfaces, and the default config. My question is: which settings win if the individual values contradict each other? While I was able to find good documentation on the individual settings, I don't know about setting precedence ...

There is a related question concerning IPv4, but it mainly talks about the differences of all, default and the individual interfaces. From that I gather the concrete settings are always somehow logically combined. However, the fields most important to me (see the following examples) are not covered, and IPv6 seems to be implemented differently so that the referenced kernel source file in the referenced answer does not help my IPv6 issue and the following examples.

A few examples:

cat /proc/sys/net/ipv6/conf/all/accept_ra
0
cat /proc/sys/net/ipv6/conf/eth1/accept_ra
1

Will eth1 accept router advertisements?

cat /proc/sys/net/ipv6/conf/all/forwarding
1
cat /proc/sys/net/ipv6/conf/eth1/forwarding
0
cat /proc/sys/net/ipv6/conf/eth1/accept_ra
1

Will eth1 accept router advertisements?

cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
cat /proc/sys/net/ipv6/conf/all/accept_ra
1
cat /proc/sys/net/ipv6/conf/eth1/disable_ipv6
0
cat /proc/sys/net/ipv6/conf/all/accept_ra
0

Will eth1 accept router advertisements?

cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
cat /proc/sys/net/ipv6/conf/all/fowarding
1
cat /proc/sys/net/ipv6/conf/eth1/disable_ipv6
0
cat /proc/sys/net/ipv6/conf/all/accept_ra
1

Will eth1 accept router advertisements?

share|improve this question
    
cat /proc/sys/net/ipv6/conf/all/disable_ipv6 1 that soesn't sound like IPv6 is activated –  Kiwy Mar 13 at 8:24
2  
@Kiwy Isn't that the point of the question? It's about what happens when things are disabled in /all but enabled for individual interfaces –  Michael Mrozek Mar 13 at 17:06

1 Answer 1

  1. yes
  2. yes
  3. depends
  4. depends

The "default" entries are, well, the default. When an interface comes up, it inherits the parameters from there.

The "all" entries are there to assign a parameter to all interfaces at once. That does not mean that every interface is locked to that parameter. For instance, consider

echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/enp2s1/accept_ra

then

cat /proc/sys/net/ipv6/conf/all/accept_ra
0
cat /proc/sys/net/ipv6/conf/enp2s1/accept_ra
1
cat /proc/sys/net/ipv6/conf/wlp2s0/accept_ra
0

so "all" does not represent any kind of state, it is only for collective assignment.

share|improve this answer

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.