"sysctl net.ipv6.conf.all.accept_ra"는 CentOS 7 및 RHEL 7에서 다르게 작동합니다.

"sysctl net.ipv6.conf.all.accept_ra"는 CentOS 7 및 RHEL 7에서 다르게 작동합니다.

두 개의 VM이 있습니다. 하나는 RHEL 7이고 다른 하나는 CentOS 7입니다. 실행하면 sysctl net.ipv6.conf.all.accept_ra두 VMS에서 서로 다른 동작이 표시됩니다.

센트OS 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

그러나 이 매개변수는 파일 net.ipv6.conf.all.accept_ra에 존재합니다 /etc/sysctl.conf.

# 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

RHEL 7에서 오류가 발생하는 이유는 무엇입니까?

업데이트

ipv6나중에 나는 /proc/sys/net/. 그 이유는 무엇입니까?

답변1

IPv6가 비활성화되었습니다.부팅 시귀하의 시스템에서. 이렇게 하면 사용 가능한 IPv6의 흔적이 전혀 남지 않습니다.

일반적으로 이는 에 옵션을 추가하여 수행됩니다 /etc/default/grub.

이 경우 다음으로 시작하고 실행하는 줄에 있어야 하는 /etc/default/grub옵션을 편집하고 제거하여 이 설정을 되돌릴 수 있습니다.ipv6.disable=1GRUB_CMDLINE_LINUX

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

변경 사항으로 GRUB 옵션을 다시 생성합니다.

그런 다음 재부팅이 필요합니다.

관련 정보