centos网卡配置

命令配置centos网络Ip地址,启动自动激活网卡设置

1.[root@localhost ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
BROADCAST="192.168.X.255"
HWADDR="00:XX:XX:XX:XX:XX"
IPADDR="192.168.X.125"
NETMASK="255.255.255.0"
NETWORK="192.168.X.0"
GATEWAY="192.168.X.1"
NM_CONTROLLED="yes"
ONBOOT="yes" #开机启动
TYPE="Ethernet"
DNS1=192.168.X.1
DNS2=XX.XX.XX.XX
UUID="b7924924-40f2-4563-b92c-3aa7628a9400"


2.[root@localhost ~]# service network restart

你可能感兴趣的:(cento命令配置网卡地址)