VRRP
来源:互联网 发布:npc算法 编辑:程序博客网 时间:2024/05/17 02:47
VRRP
-- Jin 2011.06.01
# Background
The Virtual Router Redundancy Protocol (VRRP) is designed to eliminate the single point of failure inherent in the static default routed environment. VRRP specifies an election protocol that dynamically assigns responsibility for a virtual router to one of the VRRP routers on a LAN. All routers(gateways) that are running VRRP protocol act as one vitural router(gateway).
So, there are master and backup, only master acts as virtual router. there are vitural ip/vitural mac which are the real gateway for access network, and the interfaces should be access port or uplink port in logical.
#Master / Backup Role Election
All election are based on priority from every vrrp router.
Vrrp router defines itself as a Backup unless it's priority is 255 (the virtual ip is the same as it's ip interface), during the Backup state, it just listen and does transimit any vrrp packets,
if the vrrp packet received with the higher than or equal to the local priority, it should be acted as backup router, and set Master_Down_Timer to Master_Down_Interval;
if the vrrp packet received with the priority 0, that indicates master is down, and then set Master_Down_Timer to Skew_Time, which is the seconds to be master, calculated as ( (256 - Priority) / 256 ), so the highest priority with the thinest value;
if the vrrp packet reveived with smaller priority, discard it;
if the backup router doesn't receive any vrrp packtet after Master_Down_Interval timeout, Master_Down_Timer fired, then transimt to be master, send vrrp advertisment, send gratuitous ARP to each vrrp associated ip interface.
The protocol should ensure after Master election that no state transition is triggered by any Backup router of equal or lower preference as long as the Master continues to function properly.
Special rules: (Priority = 255 or = 0)
The only exception is that a VRRP router will always become Master of any virtual router associated with addresses it owns.
When VRRP is enabled on Rtr1 for VRID=1 it will assert itself as Master, with priority=255, since it is the IP address owner for the virtual router IP address.
The priority value zero (0) has special meaning indicating that the current Master has stopped participating in VRRP. This is used to trigger Backup routers to quickly transition to Master without having to wait for the current Master to timeout.
To minimize network traffic, only the Master for each virtual router sends periodic VRRP Advertisement messages.
#Protocol Implementation:
D-MAC: 00-00-5E-00-01-{VRID} , So VRID is up to 255.
Destination IP: 224.0.0.18
S-IP : Virtual IP or IP from one of the vrrp router (Master)
TTL=255
1) use the virtual router MAC as the source in a packet sent by the Master to trigger station learning;
2) trigger a message immediately after transitioning to Master to update the station learning; and
3) trigger periodic messages from the Master to maintain the station learning cache.
When a VRRP router restarts or boots, it SHOULD not send any ARP messages with its physical MAC address for the IP address it owns, it should only send ARP messages that include Virtual MAC addresses.
Track
Regarding to track interfaces, implementation on bnt switch.
priority(Current) = priority(Configured) + (Total numbers of UP interfaces) x (interface-tracking increment)
(Total numbers of other Ports in the same vlan)
(Total numbers of Virtual-Routers)
eg: base priority=100, tracking-priority-increment =2 , vrrp routers = 3, up interfaces =4, ports in the same vlan enabled vrrp = 4 ;
so, priority = 100 + 4x2=108 -- track interfaces
priority = 100 + (4-1)x2= 106 --track ports
priority = 100 + 3x2=106 -- track virtual-routers
Track Ports / Enable tracking ports in VLAN
Track Interfaces / Enable tracking other IP interfaces
Track Virtual-routers / Enable tracking master virtual routers
Jin's_Scooter_Mid(config-vrrp)#virtual-router 1 track
interfaces Enable tracking other IP interfaces
ports Enable tracking ports in VLAN
virtual-routers Enable tracking master virtual routers
Jin's_Scooter_Mid(config-vrrp)#tracking-priority-increment
VRRP tracking priority increment configuration
interfaces Interface increment
ports Port increment
virtual-routers Virtual router increment
# Reference
rfc2338_Virtual Router Redundancy Protocol.pdf
rfc3768_Virtual Router Redundancy Protocol (VRRP).pdf
- VRRP
- VRRP
- VRRP
- VRRP
- VRRP
- VRRP
- VRRP
- VRRP
- 什么是 VRRP
- VRRP协议
- VRRP简介
- VRRP简介
- VRRP协议
- VRRP--RFC5798
- VRRP协议
- VRRP详解
- VRRP协议
- VRRP概述
- IMS对SIP协议的要求及应用
- 《技术领导之路:全面解决问题的途径(中英文对照)》的笔记-第313页
- jquery数据表左右滑动显示
- 提高系统性能数据库设计的横向分割和纵向分割技术
- 爆音处理
- VRRP
- eclipse pydev 设置字体和背景色
- 集合
- js 调用父窗口函数-iframe父窗口和子窗口相互的调用方法
- ssh端口转发(port forwarding)
- 23种模式图 转载
- RC4加密解密算法 for php
- 向git server上传一个新的project
- 获取Android 唯一标识