Linux下利用VRRP功能实现路由器备份
实验名称:利用VRRP功能实现简单的路由器备份
操作系统:RedHat 7.3
所使用的内核:linux-2.4.24
实验用到的模块: keepalived-1.16.tar.gz
网络结构如下图所示:图中的V-Gate就是VRRP中的VIP。
网络中有两个Linux Router:
(1), Master(eth0:192.168.1.10/24接外网; eth1:192.168.3.1/24接内网)
(2), Backup(eth0:192.168.2.10/24接外网; eth1:192.168.3.2/24接内网)
内网的IP地址段为192.168.3.0/24,网关(V-Gate)为192.168.3.3/24,记住192.168.3.3/24这个地址是在Keepalived启动时生效的。
首先我们在Linux Router Master上安装keepalived-1.1.6.tar.gz
(1)、下载keepalived-1.1.6.tar.gz (http://www.keepalived.org)
(2)、解压缩:
#tar zxvf keepalived-1.1.6.tar.gz
(3)编译keepalived
#cd keepalived-1.1.6
#./configure –prefix=/usr/local/keepalived
#make
(4)安装keepalived
#make install
(5)配置Linux Router Master的VRRP
#vi /usr/local/keepalived/etc/keepalived/keepalived.conf
内容如下:
vrrp_instance VI_1 {
state MASTER
interface eth1
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.3.3
}
}
[2] 下一页
- 最新评论