很多教程展示了如何使用ifconfig:https://www.netbsd.org/docs/guide/en/chap-carp.html来设置鲤鱼。
我想知道是否可以使用/etc/网络/接口进行同样的操作?
例如,如何复制:
# ifconfig carp0 create
# ifconfig carp0 vhid 1 pass lanpasswd \
carpdev em0 advskew 100 10.0.0.1 255.255.255.0在/etc/网络/接口中?
谢谢!!
发布于 2014-12-08 14:26:13
尝试使用预置和向上选项的手动界面。首先,我想:
auto carp0
iface carp0 manual
pre-up ifconfig carp0 create | true
up ifconfig carp0 vhid1 pass lanpasswd carpdev em0 advskew 100 10.0.0.1 255.255.255.0
down ifconfig carp0 downman interfaces命令应该为您提供关于如何使用/etc/network/interfaces的文档。
发布于 2014-12-17 20:29:48
是的,这是可能的。下面是/etc/网络/接口的示例配置:
# The primary network interface
auto eth1
iface eth1 inet static
address 192.168.5.2
netmask 255.255.254.0
gateway 192.168.5.1
dns-nameservers 192.168.5.1
#######################
# ucarp configuration
#######################
# vid : The ID of the virtual server [1-255]
ucarp-vid 1
# vip : The virtual address
ucarp-vip 192.168.5.3
# password : A password used to encrypt Carp communications
ucarp-password secret
# advskew : Advertisement skew [1-255]
ucarp-advskew 1
# advbase : Interval in seconds that advertisements will occur
ucarp-advbase 1
# master : determine if this server is the master
ucarp-master no
# The carp network interface, on top of eth0
iface eth1:ucarp inet static
address 192.168.5.3
netmask 255.255.255.0干杯
https://serverfault.com/questions/649967
复制相似问题