免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1205 | 回复: 0
打印 上一主题 下一主题

vrrpd 简介 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-13 20:50 |只看该作者 |倒序浏览
http://nchc.dl.sourceforge.net/sourceforge/vrrpd/vrrpd-1.0.tar.gz
下载
tar -zxvf vrrpd-1.0.tar.gz
cd vrrpd-1.0
[root@work_monitor vrrpd-1.0]# vi INSTALL
1. uncompress the source
2. cd in the directory
3. type 'make'
4. if everything is ok, there is now a file 'vrrpd' in the directory
5. copy vrrpd in your path (e.g /usr/sbin) and vrrpd.8 in your man path
   (e.g. /usr/man/man8)
it requires to be run as root.
[root@work_monitor vrrpd-1.0]# cp vrrpd /usr/bin/.
[root@work_monitor vrrpd-1.0]# vrrpd -h
vrrpd version 0.4
Usage: vrrpd -i ifname -v vrid [-f piddir] [-s] [-a auth] [-p prio] [-nh] ipaddr
  -h       : display this short inlined help
  -n       : Dont handle the virtual mac address
  -i ifname: the interface name to run on
  -v vrid  : the id of the virtual server [1-255]
  -s       : Switch the preemption mode (Enabled by default)
  -a auth  : (not yet implemented) set the authentification type
             auth=(none|pass/hexkey|ah/hexkey) hexkey=0x[0-9a-fA-F]+
  -p prio  : Set the priority of this host in the virtual server (dfl: 100)
  -f piddir: specify the directory where the pid file is stored (dfl: /var/run)
  -d delay : Set the advertisement interval (in sec) (dfl: 1)
  ipaddr   : the ip address(es) of the virtual server
[root@work_monitor vrrpd-1.0]#vrrpd -i eth0 -v 100 -f /var/run 192.168.1.178
192.168.1.178来做virtual server
[root@work_monitor vrrpd-1.0]#ip add show
1: lo:  mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:00:5e:00:01:64 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.105/24 brd 255.255.255.255 scope global eth0
    inet 192.168.1.178/32 scope global eth0
    inet6 fe80::200:5eff:fe00:164/64 scope link
       valid_lft forever preferred_lft forever
3: sit0:  mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0
命令运行后vip就产生了
用这个vrrp可以来做web的ha,当然也可做很多的ha,用两台相同机器来对外服务以提高可用性
用vrrp协议来确认当前一台为master,别外一台为backup,当master 挂了,backup自动接管以对外提供服务,提供高可用性的服务
当然用vrrp也可以用来路由的双路备份,对内部客户端透明
这种应用在现实中有相当多的例子
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/40462/showart_687099.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP