Online.net 的ubuntu增加ipv6地址

2018-01-28 0 3,564 百度已收录

配置 ipv6 block

Online.net 的ubuntu增加ipv6地址

打开 https://console.online.net/en/network/ 创建子网

Online.net 的ubuntu增加ipv6地址

配置 仓储地址

编辑 sources.list

sudo vim /etc/apt/sources.list 

在末尾增加dhcp6的源地址

#DHCP6 Client
deb http://httpredir.debian.org/debian experimental main  

然后创建 apt 偏好文件

sudo vim /etc/apt/apt.conf.d/99defaultrelease  

这里 14.04填写

APT::Default-Release "jessie";  

16.04填写

APT::Default-Release "xenial";  

更新apt源

sudo apt update

安装设置DHCP6 客户端

sudo apt-get install odhcp6c  

然后测试命令

odhcp6c -P 掩码(一般是56) -c DUID(网络配置中有) eth0(网卡名称 可以用ifconfig查看) -d  

然后注册 ipv6

ip -6 a a 2001:bc8:3d8b:100::0/56(这里就是配置的子网) dev eth0(网卡地址)  

然后ping测试

ping6 online.net

然后你必须看到想这样的,说明已经有ipv6了

PING online.net(www.online.net) 56 data bytes  
64 bytes from www.online.net: icmp_seq=1 ttl=61 time=0.286 ms  
64 bytes from www.online.net: icmp_seq=2 ttl=61 time=0.318 ms  
64 bytes from www.online.net: icmp_seq=3 ttl=61 time=0.372 ms  
64 bytes from www.online.net: icmp_seq=4 ttl=61 time=0.285 ms  
64 bytes from www.online.net: icmp_seq=5 ttl=61 time=0.326 ms  
^C
--- online.net ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4004ms  
rtt min/avg/max/mdev = 0.285/0.317/0.372/0.035 ms 

设置开机自动注册ipv6

编辑显卡配置文件

sudo vim /etc/network/interfaces

添加配置

#DHCP6 client
post-up odhcp6c -P 56 -c 00:03:00:00:00:00:00:00:00:00 eth0 -d  
post-up ip -6 a a 2001:bc8:3d8b:100::0/56 dev eth0  

下面是我的配置 仅供参考

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s20f0
iface enp0s20f0 inet dhcp

#DHCP6 client
post-up odhcp6c -P 56 -c 00:03:00:01:fc:7d:xx:xx:xx:xx enp0s20f0 -d
post-up ip -6 a a 2001:bc8:3c10:100::0/56 dev enp0s20f0

如果你想绑定多个ip的话 那就多往下写一个 ip 这样类似的配置就可以了

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

栗子博客 程序 Online.net 的ubuntu增加ipv6地址 https://www.lizi.tw/program/4403.html

建筑工地上施工员,闲暇时弄个博客打发时间,

常见问题
  • 1、杰齐1.7仅适用于PHP5.2 2、需Zend支持 3、尽量使用宝塔面板 4、尽量使用Windows 系统,关关对Linux支持不太友好。
查看详情

相关文章

评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务

Online.net 的ubuntu增加ipv6地址-海报

分享本文封面