Manual:VRRP-examples: Difference between revisions
No edit summary |
No edit summary |
||
Line 58: | Line 58: | ||
/ip address add address=192.168.1.2/24 interface=ether1 | /ip address add address=192.168.1.2/24 interface=ether1 | ||
/interface vrrp add interface=ether1 vrid=49 | /interface vrrp add interface=ether1 vrid=49 | ||
/interface vrrp add interface=ether1 vrid=77 priority= | /interface vrrp add interface=ether1 vrid=77 priority=255 | ||
/ip address add address=192.168.1.1/32 interface=vrrp1 | /ip address add address=192.168.1.1/32 interface=vrrp1 | ||
/ip address add address=192.168.1.2/32 interface=vrrp2 | /ip address add address=192.168.1.2/32 interface=vrrp2 | ||
Line 64: | Line 64: | ||
</p> | </p> | ||
<h3>VRRP without Owner</h3> | |||
<p> | |||
Both previous examples had an Owner router. But it is possible to have Virtual Router without Owner router. | |||
</p> | |||
[[Image:vrrp-no-owner.png|VRRP without Owner|400px|VRRP without Owner ]] | |||
<p> | |||
All Virtual Router (V1) members are configured so that virtual IP is not the same as physical IP. Such Virtual address can be called floating or pure virtual IP address. | |||
Advantage of this setup is flexibility given to the administrator. Since the virtual IP address is not the real address of any one of the participant routers, the administrator can change these physical routers or their addresses without any need to reconfigure the virtual router itself. | |||
</p> | |||
[[Category:Manual]] | [[Category:Manual]] | ||
[[Category:Unfinished]] | [[Category:Unfinished]] |
Revision as of 14:20, 3 October 2008
VRRP Configuration Examples
This section contains several useful VRRP configuration examples
Basic Setup
This is the basic VRRP configuration example.
According to this configuration, as long as the master, R1, is functional, all traffic destined to the external network gets directed to R1. But as soon as R1 fails, R2 takes over as the master and starts handling packets forwarded to the interface associated with IP(R1). In this setup Router R2 is completely idle during Backup period.
Configuration
R1 configuration:
/ip address add address=192.168.1.1/24 interface=ether1 /interface vrrp add interface=ether1 vrid=49 priority=255 /ip address add address=192.168.1.1/32 interface=vrrp1
R2 configuration:
/ip address add address=192.168.1.2/24 interface=ether1 /interface vrrp add interface=ether1 vrid=49 /ip address add address=192.168.1.1/32 interface=vrrp1
Testing
Load sharing
In basic configuration example R2 is completely idle during Backup state. This behavior may be considered as waste of valuable resources. In such circumstances R2 router can be set as gateway for some clients.
The obvious advantage of this configuration is the establishment of a load-sharing scheme. But by doing so R2 router is not protected by current VRRP setup.
To make this setup work we need two virtual routers.
Configuration for V1 virtual router will be identical to configuration in basic example - R1 is the Owner and R2 is backup router. In V2 Owner is R2 and backup is R1.
With this configuration, we establish a load-sharing between R1 and R2; moreover, we create protection setup by having two routers acting as backups for each other.
Configuration
R1 configuration:
/ip address add address=192.168.1.1/24 interface=ether1 /interface vrrp add interface=ether1 vrid=49 priority=255 /interface vrrp add interface=ether1 vrid=77 /ip address add address=192.168.1.1/32 interface=vrrp1 /ip address add address=192.168.1.2/32 interface=vrrp2
R2 configuration:
/ip address add address=192.168.1.2/24 interface=ether1 /interface vrrp add interface=ether1 vrid=49 /interface vrrp add interface=ether1 vrid=77 priority=255 /ip address add address=192.168.1.1/32 interface=vrrp1 /ip address add address=192.168.1.2/32 interface=vrrp2
VRRP without Owner
Both previous examples had an Owner router. But it is possible to have Virtual Router without Owner router.
All Virtual Router (V1) members are configured so that virtual IP is not the same as physical IP. Such Virtual address can be called floating or pure virtual IP address. Advantage of this setup is flexibility given to the administrator. Since the virtual IP address is not the real address of any one of the participant routers, the administrator can change these physical routers or their addresses without any need to reconfigure the virtual router itself.