1. IPV6信息查询
1.1. 查看IPv6地址
[root@localhost ~]
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.10.3.11 netmask 255.255.255.0 broadcast 192.10.3.255
inet6 fe80::28c:faff:fef1:dd24 prefixlen 64 scopeid 0x20<link>
ether 00:8c:fa:f1:dd:24 txqueuelen 1000 (Ethernet)
RX packets 49501354 bytes 29731085315 (27.6 GiB)
RX errors 0 dropped 1204 overruns 0 frame 0
TX packets 707190 bytes 461594037 (440.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xc7200000-c727ffff
eno2: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:8c:fa:f1:dd:25 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xc7100000-c717ffff
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 122 bytes 11983 (11.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 122 bytes 11983 (11.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
1.2. 查看IPv6默认网关
[root@localhost ~]
fe80::/64 proto kernel metric 256
2. IPv6静态配置
2.1. 配置sysctl.conf 文件
vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6=0
net.ipv6.conf.default.disable_ipv6=0
net.ipv6.conf.lo.disable_ipv6=0
2.2. disable_ipv6.conf
vi /etc/modprobe.d/disable_ipv6.conf
options ipv6 disable=0
2.3. 配置
vi /etc/sysconfig/network
NETWORKING_IPV6=yes
vi /etc/sysconfig/network-scripts/ifcfg-eno1
NAME=eno1
UUID=ec075e28-30b1-48db-8d48-74e7d416a0b9
DEVICE=eno1
ONBOOT=yes
IPADDR=192.10.3.11
PREFIX=24
GATEWAY=192.10.3.1
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6ADDR=fe80::28c:faff:fef1:dd24
IPV6_DEFAULTGW=fe80::/64
2.4. 重启网络服务
[root@localhost network-scripts]
3. 验证是否能够ping通
[root@localhost sysconfig]
PING fe80::28c:faff:fef1:dd24(fe80::28c:faff:fef1:dd24) from fe80::28c:faff:fef1:dd24 eno1: 56 data bytes
64 bytes from fe80::28c:faff:fef1:dd24: icmp_seq=1 ttl=64 time=0.023 ms
64 bytes from fe80::28c:faff:fef1:dd24: icmp_seq=2 ttl=64 time=0.012 ms
64 bytes from fe80::28c:faff:fef1:dd24: icmp_seq=3 ttl=64 time=0.022 ms
64 bytes from fe80::28c:faff:fef1:dd24: icmp_seq=4 ttl=64 time=0.022 ms