Linux 主机配置ipv6地址

ifconfig

# ifconfig
docker0: flags=4099  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:02:db:ce:da  txqueuelen 0  (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

ens160: flags=4163  mtu 1500
        inet 10.200.108.171  netmask 255.255.255.0  broadcast 10.200.108.255
        inet6 fe80::250:56ff:febd:1953  prefixlen 64  scopeid 0x20
        inet6 2409:806a:5af0:2000::f8ab  prefixlen 64  scopeid 0x0
        ether 00:50:56:bd:19:53  txqueuelen 1000  (Ethernet)
        RX packets 1458  bytes 137838 (134.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 999  bytes 124779 (121.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


[root@vga2prdfootk8snew71 ~]# 

我们看到ens160网卡上已经有ipv6dizhi ,

这时直接添加,会报文件已存在

# ifconfig ens160 inet6 add  2409:806a:5af0:2000::f8ab/118
SIOCSIFADDR: 文件已存在

需要先删除

ifconfig ens160 del 2409:806a:5af0:2000::f8ab/64

# ifconfig ens160 del 2409:806a:5af0:2000::f8ab/64
[root@vga2prdfootk8snew71 ~]# 
[root@vga2prdfootk8snew71 ~]# ifconfig
docker0: flags=4099  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:02:db:ce:da  txqueuelen 0  (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

ens160: flags=4163  mtu 1500
        inet 10.200.108.171  netmask 255.255.255.0  broadcast 10.200.108.255
        inet6 fe80::250:56ff:febd:1953  prefixlen 64  scopeid 0x20
        ether 00:50:56:bd:19:53  txqueuelen 1000  (Ethernet)
        RX packets 1585  bytes 149480 (145.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1077  bytes 135639 (132.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

再添加

ifconfig ens160 inet6 add 2409:806a:5af0:2000::f8ab/118

# ifconfig ens160 inet6 add 2409:806a:5af0:2000::f8ab/118
[root@vga2prdfootk8snew71 ~]# 
[root@vga2prdfootk8snew71 ~]# ifconfig
docker0: flags=4099  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:02:db:ce:da  txqueuelen 0  (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

ens160: flags=4163  mtu 1500
        inet 10.200.108.171  netmask 255.255.255.0  broadcast 10.200.108.255
        inet6 fe80::250:56ff:febd:1953  prefixlen 64  scopeid 0x20
        inet6 2409:806a:5af0:2000::f8ab  prefixlen 118  scopeid 0x0
        ether 00:50:56:bd:19:53  txqueuelen 1000  (Ethernet)
        RX packets 1734  bytes 163672 (159.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1146  bytes 146065 (142.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

你可能感兴趣的:(bigData,Linux,linux,java,docker)