假设原来的 IP 是 192.168.0.1 ,现在要把 192.168.0.2 , 192.168.0.3 加上,编辑 /etc/rc.conf ,会看到原來的 IP 设定

ifconfig_fxp=”inet 192.168.0.1 netmask 255.255.255.255″

底下加上

ifconfig_fxp0_alias0=”inet 192.168.0.2  netmask 255.255.255.255”
ifconfig_fxp0_alias0=”inet 192.168.0.3  netmask 255.255.255.255”

新增加的 IP 的 netmask 要用 255.255.255.255!

接下來重新启用网卡配置 /etc/rc.d/netstart ,或是重启服务器即可。
注意:远程操作时候最好在本地先测试过。

相关文章:

  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-11-19
猜你喜欢
  • 2021-07-28
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2021-06-05
  • 2021-07-05
相关资源
相似解决方案