立即生效:
[[email protected] ~]ifconfig eth0:0 192.168.1.101 netmask 255.255.255.0 up
写入本地:
[[email protected] ~]$ cd /etc/sysconfig/network-scripts [[email protected] network-scripts]$ vi ifcfg-eth0:0 DEVICE=eth0:0 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.1.101 NETMASK=255.255.255.0 [[email protected] network-scripts]$ ifconfig eth0:0 up/down
将配置写入本地后,可设置成开机自动就应用虚拟IP。
时间: 2024-10-27 02:47:11