Redhat设置固定ip:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
IPADDR=172.16.0.5
NETMASK=255.255.255.0
GATEWAY=172.16.0.1
:wq
# service network restart
Debian设置固定ip:
# vi /etc/network/interface
iface eth0 inet static
address 172.16.0.6
netmask 255.255.255.0
gateway 172.16.0.1
:wq
需重启服务器生效
本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/1857200如需转载请自行联系原作者
yangzhimingg