CentOS 7 disable IPv6

nmtui工具可以設定是否要啟用ipv6,但是關掉後發現dmesg還是一直出現router advertisement failed to add default router的訊息,代表網卡的ipv6還是有在運作(發送router solicitation)

查看 /etc/sysconfig/network-scripts  下網卡的設定

IPV6INIT=no

但是透過

ip addr show dev enp1s0

還是可以看到ipv6的設定

參考上面說明: It is not helpful to add IPV6INIT=no parameter to interfaces that need to disable IPv6. Link local ipv6 can still be seen on that interface.

透過sysctl關掉

再檢查 ip addr show dev 就只剩下ipv4的設定了

This entry was posted in System Administration. Bookmark the permalink.

Leave a Reply