Centos 7.0设置静态IP
时间:2016-07-27 02:25 来源:linux.it.net.cn 作者:IT
1.查看NetworkManager.service
1
systemctl | grep "NetworkManager.service"
2.停止NetworkManager.service
1
systemctl disable NetworkManager.service
3.查看网卡状态
1
ifconfig
4.修改指定网卡配置
1
vim /etc/sysconfig/network-scripts/ifcfg-你的网卡
5.配置项参考
1
2
3
4
5
6
7
8
9
10
11
BOOTPROTO="dhcp|static"
HWADDR="MAC地址(xx:xx:xx:xx:xx:xx)"
IPADDR="ip地址"
NETMASK="子网掩码"
GATEWAY="网关地址"
ONBOOT="yes|no"
6.配置dns地址
1
vim /etc/resolv.conf
7.配置参考
1
nameserver 192.168.1.1
(责任编辑:IT)
1.查看NetworkManager.service
2.停止NetworkManager.service
3.查看网卡状态
4.修改指定网卡配置
5.配置项参考
6.配置dns地址
7.配置参考
|