安裝ucarp(支援IP的動態替換)

2021-06-13 04:22:07 字數 3251 閱讀 1463

libpcap ( must be installed on your system, with

development files (headers).

假設你的版本是:libpcap-1.2.1.tar.gz

tar -zxf libpcap-1.2.1.tar.gz

cd libpcap-1.2.1

./configure

configure: error: your operating system's lex is insufficient to compile

libpcap. flex is a lex replacement that has many advantages, including

being able to compile libpcap. for more information, see

.

如果你linux沒安裝bz2的解圧程式,那先安裝

tar -zxf bzip2-1.0.6.tar.gz

cd bzip2-1.0.6
sudo make install
安裝完成之後,解壓 flex-2.5.37.tar.bz2

tar -jxvf flex-2.5.37.tar.bz2

cd flex-2.5.37

./configure

出現如下錯誤

checking for m4 that supports -p... configure: error: could not find m4 that supports -p

去安裝好m4之後,安裝flex成功

再安裝libpcap

所有的這些都安裝好,libpcap總算安裝好。

我的版本是1.5.2

安裝,應該沒什麼問題了。

執行

/usr/local/sbin/ucarp
提示錯誤:

/usr/local/sbin/ucarp: error while loading shared libraries: libpcap.so.1: cannot open shared object file: no such file or directory

經過驗證,發現libpcap.so.1在/usr/local/lib下

執行以下命令

sudo cp /usr/local/lib/libpcap.so.1 /usr/lib

再執行ucarp

搞定

ucarp 1.5.2 - mar 20 2013

--inte***ce=(-i ): bind inte***ce --srcip=(-s ): source (real) ip address of that host

--vhid=(-v ): virtual ip identifier (1-255)

--pass=(-p ): password

--passfile=(-o ): read password from file

--preempt (-p): becomes a master as soon as possible

--neutral (-n): don't run downscript at start if backup

--addr=(-a ): virtual shared ip address

--help (-h): summary of command-line options

--advbase=(-b ): advertisement frequency

--advskew=(-k ): advertisement skew (0-255)

--upscript=(-u ): run to become a master

--downscript=(-d ): run to become a backup

--deadratio=(-r ): ratio to consider a host as dead

--shutdown (-z): call shutdown script at exit

--daemonize (-b): run in background

--ignoreifstate (-s): ignore inte***ce state (down, no carrier)

--nomcast (-m): use broadcast (instead of multicast) advertisements

--facility=(-f): set syslog facility (default=daemon)

--xparam=(-x): extra parameter to send to up/down scripts

sample usage:

manage the 10.1.1.252 shared virtual address on inte***ce eth0, with

1 as a virtual address idenfitier, mypassword as a password, and

10.1.1.1 as a real permanent address for this host.

call /etc/vip-up.sh when the host becomes a master, and

/etc/vip-down.sh when the virtual ip address has to be disabled.

ucarp --inte***ce=eth0 --srcip=10.1.1.1 --vhid=1 --pass=mypassword \

--addr=10.1.1.252 \

--upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh

please report bugs to bugs at ucarp dot org.

談談UDX對多IP的支援

現在很多機房提供雙線,三線或四線伺服器,雖然有很多硬體解決方案,但是對於我們遊戲開發公司來說,或多或少要對多ip進行支援。udx在這方面也提供了解決方案。udx可以對多個ip port進行繫結,從而提供多ip的支援。而繫結了多個ip的udx物件即是對多個ip提供相同的服務,同時對於這個udx的所有客...

談談UDX對多IP的支援

現在很多機房提供雙線,三線或四線伺服器,雖然有很多硬體解決方案,但是對於我們遊戲開發公司來說,或多或少要對多ip進行支援。udx在這方面也提供了解決方案。udx可以對多個ip port進行繫結,從而提供多ip的支援。而繫結了多個ip的udx物件即是對多個ip提供相同的服務,同時對於這個udx的所有客...

IP位址的動態分配

相對於靜態分配 bootp 而言,動態分配 dhcp 不僅提高了ip位址的利用率,還能夠節約有限資源。dhcp 動態主機配置協議 使伺服器能夠動態地為網路中的其他主機提供ip位址,而且可以不給intranet 內聯 網中除dhcp dns和wins伺服器外的任何伺服器設定和維護靜態ip位址。使用dh...