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
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
时间: 2024-10-06 12:32:03