ip地址,子网掩码, 网关
设置ip地址,子网掩码并激活
#ifconfig eth0 10.192.77.250 netmask 255.255.255.0 up
注:ip,,掩码,网关都设置到 /etc/sysconfig/network-scripts/ifcfg-eth0里面了。
设置多ip
可以为一个网卡设置多个ip,不用的可以down,使用时再up。这样可以在多个ip上切换
#ifconfig eth0:0 10.192.77.251 netmask 255.255.255.0 up
#ifconfig eth0:1 10.192.77.252 netmask 255.255.255.0 up
。。。
设置ip地址,子网掩码并激活
#ifconfig eth0 10.192.77.250 netmask 255.255.255.0 up
注:ip,,掩码,网关都设置到 /etc/sysconfig/network-scripts/ifcfg-eth0里面了。
设置多ip
可以为一个网卡设置多个ip,不用的可以down,使用时再up。这样可以在多个ip上切换
#ifconfig eth0:0 10.192.77.251 netmask 255.255.255.0 up
#ifconfig eth0:1 10.192.77.252 netmask 255.255.255.0 up
。。。
添加默认网关
#route add default gw IP
DNS
dns被设置在: etc/resolv.conf
主机名
显示主机名
#hostname
更改主机名
#hostname myhost
设置在/etc/sysconfig/network