在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Linux在内核版本2.2.0以后就支持IPv6了,可查看/proc/net/if_inet6文件是否存在以确定你的系统是否支持IPv6 复制代码 代码如下:vi /etc/network/interfaces # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interface # automatically added when upgrading auto lo iface lo inet loopback auto eth0 iface eth0 inet6 static address 2001:da8:2:10d::2 netmask 64 up route -A inet6 add default gw 2001:da8:2:10d::1 dev $IFACE iface eth0 inet static address 58.1.4.74 netmask 255.255.255.0 up route add default gw 58.1.4.1 dev $IFACE Redhat CentOS Fedora 复制代码 代码如下:[root@server4 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 # Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet DEVICE=eth0 BOOTPROTO=none HWADDR= 00:09 :3D:22:E1:40 IPADDR=202.120.1.1 NETMASK=255.255.255.240 ONBOOT=yes GATEWAY=202.120.1.254 TYPE=Ethernet USERCTL=no IPV6INIT=yes PEERDNS=yes IPV6ADDR=2001:da8:8003:801:202:120:1:1 静态默认网关设置 复制代码 代码如下:[root@server4 ~]# vi /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=yes HOSTNAME=server4 GATEWAY=202.120.1.254 IPV6_DEFAULTGW=2001:da8:8003:801::1%eth0 |
请发表评论