linux ip dns gateway 设置
1.ip设置
ifconfigeth0192.168.14.10netmask255.255.255.0
2.gateway
routeadddefaultgw192.168.1.1(立即生效)
或者
vi/etc/sysconfig/network(重启后生效)
GATEWAY=192.168.0.1
3.dns
修改/etc/resolv.conf(修改后可即时生效)
4.hostname
vi/etc/sysconfig/network
HOSTNAME=hos
5.ip
DEVICE=eth0:1
BOOTPROTO=none
#HWADDR=00:1E:0B:E9:43:16
ONBOOT=yes
DHCP_HOSTNAME=server172
IPADDR=192.168.144.172
NETMASK=255.255.255.0
GATEWAY=192.168.144.1
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes