1、首先安裝文本編輯文件nano,執(zhí)行命令
sudo apt install -y nano
2、編輯Debian網(wǎng)絡配置文件
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 為實際分配的網(wǎng)關
netmask 為實際分配的網(wǎng)址范圍
dns-nameservers 為DNS服務器,實例里的IP為google的DNS服務器無需修改。