非桌面版debian 11 增加自动获取ipv6以及静态ipv4

实用教程 admin 12个月前 (05-22) 429次浏览 0个评论

1,设置动态IPv6
在/etc/network/interfaces文件最下面加入
iface ens18 inet6 dhcp
重启即可,ens18为网卡接口名称,根据实际修改

2,设置静态IPv4(例子)
auto eth1
iface eth1 inet static
address 192.168.8.87
netmask 255.255.255.0
gateway 192.168.8.1

3,设置静态IPv4和动态IPv6(例子)
allow-hotplug enp1s0
iface enp1s0 inet static
address 192.168.2.10
netmask 255.255.255.0
gateway 192.168.2.1
dns-nameservers 192.168.2.1 223.5.5.5 223.6.6.6

iface enp1s0 inet6 auto


原文:

http://ganky.top/index.php/archives/15/


VPS小白 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:非桌面版debian 11 增加自动获取ipv6以及静态ipv4
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址