centos6.6添加静态ip
需求:配置pod43管理网静态ip。
前提:虚拟机热添加网卡,选vlan1991。
进入机器:
1.vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=static
IPADDR=10.13.133.131
DNS1=210.73.209.50
DNS2=103.192.215.186
DEFROUTE=yes
NETMASK=255.255.252.0
NAME=eth0
DEVICE=eth0
ONBOOT=yes
2.vi /etc/resolv.conf
nameserver 127.0.0.1
nameserver 114.114.114.114
nameserver 210.73.209.50
nameserver 103.192.215.186
search localdomain
3.vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
GATEWAY=10.13.135.254
4./etc/init.d/network restart