編輯
vi /etc/sysconfig/network-scripts/ifcfg-xxx
DEVICE=eth0 HWADDR=00:0C:29:F5:1D:6A TYPE=Ethernet UUID=8f49ebc2-5b1b-4135-863b-6acb0c84453f ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static #設(shè)置為靜態(tài) IPADDR=192.168.179.13 #ip NETMASK=255.255.255.0 GATEWAY=192.168.179.2#網(wǎng)關(guān) DNS1=192.168.179.2 #配置網(wǎng)關(guān)連接外網(wǎng)
#source /etc/sysconfig/network-scripts/ifcfg-xxx
service network restart #重新啟動
|