Redhat&&CentOS下IPv6地址和默认网关设置

近日,家里的电信adsl运营商给了IPV6,windows,mac图形桌面都自动获取到了,linux没有开自动获取,需要手动设置.

静态IPv6 地址的配置

[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=none

HWADDR=00:07:5D:22:EA:40

IPADDR=192.168.2.1

NETMASK=255.255.255.0

ONBOOT=yes

GATEWAY=192.168.2.254

TYPE=Ethernet

USERCTL=no

IPV6INIT=yes

PEERDNS=yes

IPV6ADDR=240e:33d:9906:6900:a0e0:ad9e:28ad:a0d0

IPV6认静态网关设置

[root@localhost ~]# vim /etc/sysconfig/network

NETWORKING=yes

NETWORKING_IPV6=yes

HOSTNAME=server4

GATEWAY=192.168.2.254

IPV6_DEFAULTGW=240e:33d:9906:6900::1%eth0

重启网络服务生效

systemctl restart network.service 
或者
service network restart 

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native