centos 6.4 minimal静态IP配置


centos 6.4 minimal静态IP配置
 
linuxcentos网络配置 
1、设置静态IP和DNS 
Shell代码  
vi /etc/sysconfig/network-scripts/ifcfg-eth0  
DEVICE="eth0"  
  
BOOTPROTO="static"  
  
HWADDR="00:0C:29:86:3D:16"  
  
IPV6INIT="yes"  
  
NM_CONTROLLED="yes"  
  
ONBOOT="yes"  
  
TYPE="Ethernet"  
  
UUID="dcf18d86-45ea-4b5c-9627-e75b19b3b6e7"  
  
IPADDR=192.168.1.88  
  
NETMAST=255.255.255.0  
  
DNS1=61.139.2.69  
 
2、网关设置 
Shell代码  
在文件 vi /etc/sysconfig/network最后一行加入:  
  
GATEWAY=192.168.1.1  
 
 
3.网络命令 
Shell代码  
ifdown eth0 //关闭网络  
ifconfig eth0 down //关闭网络  
ifup eth0 //开启网络  
ifconfig eth0 up //开启网络  
service network start //启动网络服务  
service network stop //停止网络服务  
service network restart //重启网络服务  
service network status //查看网络服务状态  
ifconfig -a //查看所有网卡的参数  
 

相关内容

    暂无相关文章