1. Check whether IPv6 is enabled
1.1 Use ifconfig to check whether your IP address contains an IPv6 address
Inet ADDR: 192.168.198.128 bcast: 192.168.198.255 mask: 255.255.255.0
Inet6 ADDR: fe80: 20c: 29ff: fee4: 1d8/64 scope: Link
Up broadcast running Multicast MTU: 1500 Metric: 1
RX packets: 1080 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 890 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX Bytes: 89517 (87.4 kib) TX Bytes: 122147 (119.2 kib)
Interrupt: 185 base address: 0x1400
The red part is the IPv6 address.
1.2 check whether the IP address of the Service Listening has an IPv6 address
[Root @ centos ~] # Netstat-tulnactive Internet connections (only servers) proto Recv-Q send-Q local address foreign address statetcp 0 0 0.0.0.0: 613 0.0.0.0: * listentcp 0 0 0.0.0.0: 3306 0.0.0.0: * listentcp 0 0 0.0.0.0: 111 0.0.0.0: * listentcp 0 0 0.0.0.0: 21 0.0.0.0: * listentcp 0 0 127.0.0.1: 631 0.0.0.0: * listentcp 0 0 127.0.0.1: 25 0.0.0.0: * listentcp 0 0: 80: * listentcp 0 0: 22: * listenudp 0 0 0.0.0.0: 68 0.0.0.0: * UDP 0 0 0.0.0.0: 607 0.0.0.0: * UDP 0 0 0.0.0.0: 610 0.0.0.0: * UDP 0 0 0.0.0.0: 111 0.0.0.0: * UDP 0 0 0.0.0.0: 631 0.0.0.0 :*
1.3 Use lsmod | grep IPv6 to check whether IPv6 modules are loaded
[Root @ centos ~] # Lsmod | grep ipv6ipv6 243425 19
2. Disable/enable IPv6
2.1 Disable Ipv6
# Vi/etc/modprobe. conf
Add the following two lines
Alias net-pf-10 off
Alias IPv6 off
Save and exit, and restart the system.
After restarting, you can use the preceding three methods to verify whether IPv6 support has been disabled.
2.2 enable IPv6
IPv6 is supported by default, so when you want to restart IPv6 support, comment out the two commands in/etc/modprobe. conf.