立即生效:

[root@server ~]$ ifconfig eth0:0 192.168.1.101 broadcast 192.168.1.255 netmask 255.255.255.0 up
[root@server ~]$ route add -host 192.168.1.101 dev eth0:0

 

写入本地:

[root@server ~]$ cd /etc/sysconfig/network-scripts
[root@server network-scripts]$ vi ifcfg-eth0:0

DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.101
NETMASK=255.255.255.0

[root@server network-scripts]$ ifconfig eth0:0 up/down

 

将配置写入本地后,可设置成开机自动就应用虚拟IP。

相关文章:

  • 2022-12-23
  • 2021-11-23
  • 2021-12-23
  • 2021-10-14
  • 2021-12-25
  • 2022-12-23
  • 2021-10-03
  • 2021-05-28
猜你喜欢
  • 2022-01-02
  • 2022-02-08
  • 2021-09-15
  • 2021-04-10
  • 2022-12-23
  • 2021-08-12
相关资源
相似解决方案