CentosIP配置 |
centos6.X云为例:
(1)对网卡配置文件编辑 vi /etc/sysconfig/network-scripts/ifcfg-eth0
(2)以福州双线云:117.27.159.90/103.223.133.90 为例 DEVICE=seth0 BOOTPROTO=none ONBOOT=yes TYPE=Ethernet DEFROUTE=yes IPV6INIT=no IPV4_FAILURE_FATAL=yes PEERDNS=yes NAME=VPSNetCard HWADDR=00:15:5d:9f:6c:04 IPADDR=117.27.159.90 NETMASK=255.255.255.0 GATEWAY=117.27.159.1 DNS1=114.114.114.114 DNS2=8.8.8.8 IPADDR2=103.223.133.90 NETMASK2=255.255.255.0 GATEWAY2=117.27.159.1 DNS3=114.114.114.114 DNS4=8.8.8.8
(3)编辑好之后,按“esc键”退出编辑模式,输入“:wq”(小写字符)然后按回车键确认
(4)输入 service network restart 命令重启网络。
|