Debian /Centos 配置网卡

416次阅读
没有评论

提醒:本文最后更新于2022-12-18 17:56,文中所关联的信息可能已发生改变,请知悉!

Debian编辑/etc/network/interfaces文件:

配置IPv6

auto ens3 
iface ens3 inet6 static       #IPv6配置
  pre-up modprobe ipv6
  address 1200:7e45:0:f6::1e4a:3705    #IPv6地址
  netmask 48   #掩码
  gateway 1200:7e45:0:f6::1    #IPv6网关

重启网卡:/etc/init.d/networking restart

centos7配置网卡

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=172.111.49.198
NETMASK=255.255.255.224
GATEWAY=172.111.49.193


IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6ADDR=2606:fc40:0000:0d04:0000:0000:0000:0001/64

IPV6_DEFAULTGW=2606:fc40:0:d00::1

谷歌dns地址

IPv4 地址
8.8.8.8 (google-public-dns-a.google.com)
8.8.4.4 (google-public-dns-b.google.com)
IPv6 地址 [1]
2001:4860:4860::8888
2001:4860:4860::8844
正文完
 
评论(没有评论)