1

I have two VMs; one with RHEL 7 nad other with CentOS 7. Running sysctl net.ipv6.conf.all.accept_ra show different behaviors on two VMS.

CentOS 7

$ sysctl net.ipv6.conf.all.accept_ra
net.ipv6.conf.all.accept_ra = 1

RHEL7

# sysctl net.ipv6.conf.all.accept_ra 
sysctl: cannot stat /proc/sys/net/ipv6/conf/all/accept_ra: No such file or directory

Yet, this parameter net.ipv6.conf.all.accept_ra exists in /etc/sysctl.conf file.

# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.suid_dumpable = 0 
kernel.randomize_va_space = 2
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0 
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
pv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
net.core.somaxconn=511
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.accept_ra = 0

What can be the reason for the error in RHEL 7?

Update

Later I found there is no ipv6 directory in /proc/sys/net/. What can be the reason for that?

5
  • 2
    IPv6 is disabled in your specific configuration?
    – A.B
    Apr 15, 2020 at 9:25
  • Add the output of sysctl -a | grep ipv6.*disable as root on both VMs to your question. Apr 15, 2020 at 11:56
  • Hi Nasir, nothing returned Apr 15, 2020 at 13:05
  • try this instead: grep ipv6 /proc/cmdline
    – A.B
    Apr 15, 2020 at 13:07
  • # grep ipv6 /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-1062.18.1.el7.x86_64 root=/dev/mapper/osvg-root ro ipv6.disable=1 LANG=en_US.UTF-8 @A.B: So, ipv6 is disabled, right? Apr 15, 2020 at 13:11

1 Answer 1

2

IPv6 has been disabled at boot on your system. When it's done like this, there's no remaining trace of IPv6 available at all.

Usually this is done by adding an option in /etc/default/grub.

If that's the case, you can revert this setting by editing /etc/default/grub and removing the option ipv6.disable=1 which should be present in the line starting with GRUB_CMDLINE_LINUX and then running:

grub2-mkconfig -o /boot/grub2/grub.cfg

to regenerate the GRUB options with your changes.

A reboot is then required.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .