centos設定ip地址
阿新 • • 發佈:2018-12-13
下面分別設定閘道器、ip地址+子網掩碼、DNS地址:
[[email protected] ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=xjbpc
GATEWAY=10.186.106.253
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=08:00:27:87:FC:A7
TYPE=Ethernet
UUID=fea9d8b1-d0b3-42b2-935c-5c08e90c5663
ONBOOT= yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=10.186.106.48
NETMASK=255.255.255.0
[[email protected] ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search DHCP HOST
nameserver 202.102.152.3
nameserver 186.76.76.76
nameserver 114.114.114.114