关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

Debian 10/11/12 如何设置IPv6网络

发布时间:2024/6/13 11:07:37
香港云服务器

1、首先安装文本编辑文件nano,执行命令
sudo apt install -y nano

2、编辑debian网络配置文件
sudo nano /etc/network/interfaces

3、按照以下格式填写正确的IPv6配置
# The primary network interface
auto eth0
iface eth0 inet static
address 45.150.226.75/26
gateway 45.150.226.65
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8 1.1.1.1
dns-search debian
iface eth0 inet6 static
address 2604:9cc0:c:122e:c17c:48f0:70b8:630a
netmask 48
gateway 2604:9cc0:1:10::2d
dns-nameservers 2001:4860:4860::8888 2606:4700:4700::1111

上面IP地址请自行更换成自己的
iface eth0 inet static 为IPv4配置
iface eth0 inet6 static 为IPv6配置
address 为实际分配的IP地址
gateway 为实际分配的网关
netmask 为实际分配的网址范围
dns-nameservers 为DNS服务器,实例里的IP为google的DNS服务器无需修改。