VRRP - 仮想ルーター冗長プロトコル(RFC 2338)
ルータの多重化(冗長構成)を行うためのプロトコルである。
VRRPに対応した複数のルータ(Linux BOXなども含む)を、
1つのグループに所属させ、通常、グループ内のルータの1つが通信を行う。
通信中に障害が発生した場合には、グループ内のルータが自動で
通信を受け継ぐ。また、ルータは、別グループに属することもできる。
仮想Macアドレス、仮想IPアドレスを付与することになる。
- 機能的には、OSPFでも行えるが、PC側では、デフォルト・ゲートウェイとして
IPアドレスをスタティックに切るため、このVRRPでの仮想ルータ向けIPアドレスを
指定することで、障害時でもPC側の設定を変更することなく、
冗長構成への対応を可能としたものである。
類似したプロトコルとして、Cisco Systems社製のルータに実装されている、
HSRP(Hot Standby Routing Protocol)
という(RFC2281で定義)がある。
- RFC
- VRRPについて
- VRRP関連ソフト
- 関連リンク
VRRPD導入
取得
導入
$ tar fxvpz vrrpd-current.tgz
$ cd vrrpd
$ mae
$ su
# install -s vrrpd /usr/local/sbin/
# cp vrrpd.8 /usr/local/share/man/man8/
オンラインマニュアル
- 名前
vrrpd - Virtual Router Redundancy Protocol Deamon
- 書式
vrrpd -i ifname -v vrid [-s] [-a auth] [-p prio] [-nh] ipaddr
- 概要
vrrpd は、RFC2338で規定されているVRRPv2の実装である。
Linuxではユーザ空間で稼動する。In short, VRRP is a protocol which elects a
master server on a LAN and the master answers to a '仮想IPアドレス'.
失敗時には、バックアップ・サーバのIPアドレスが引き継がれる。
A longuer answer in the rfc2338 abstract : "This memo defines the Virtual
Router Redundancy Protocol (VRRP).
VRRP specifies an election
protocol that dynamically assigns responsibility for a virtual router
to one of the VRRP routers on a LAN.
The VRRP router controlling the
IP address(es) associated with a virtual router is called the Master,
and forwards packets sent to these IP addresses.
The election process
provides dynamic fail over in the forwarding responsibility should the
Master become unavailable.
This allows any of the virtual router IP
addresses on the LAN to be used as the default first hop router by endhosts.
The advantage gained from using VRRP is a higher availability
default path without requiring configuration of dynamic routing or
router discovery protocols on every end-host."
- オプション
| オプション | 説明 |
| -h | この短いヘルプ |
| -n | 仮想MACアドレスを扱わない |
| -i ifname | 実行するインターフェイス |
| -v vrid | 仮想サーバID [1-255] |
| -s | プリエンプション(preemption)モードへの切り替え(省略時は有効) |
| -a auth | (未実装) 認証タイプの設定 |
| -p prio | 仮想サーバ(省略時: 100)でのホストの優先順位を設定 |
| -f piddir | pidファイルをどこに保存するかを指定 (省略時:/var/run) |
| -d delay | Set the advertisement interval (in sec) (省略時: 1) |
| ipaddr | 仮想サーバのIPアドレス |
仮想IPアドレスとして 10.0.0.1および、仮想ID 50としたeth0インターフェース上で
vrrp を稼動させる。