Community discussions

MikroTik App
 
carlossu
just joined
Topic Author
Posts: 15
Joined: Tue Jul 29, 2014 5:32 am

VRRP

Wed Dec 03, 2014 8:59 pm

Hi, I just need some help configuring VRRP. I have two routers, one is a Routerboard 1100AH and the other one is a Routerboard 1100AHx2, actually I already configure the VRRP following the guide that I found on the Mikrotik Web page, however I having an issue and is the fact that in both routers the VRRP interface is running but both as a master with diferent priority, so I need to know if it is fine or one VRRP interface has to say back-up, thanks.
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: VRRP

Wed Dec 03, 2014 9:56 pm

If you're only running a single VRRP instance (one protected gateway), then one router should be listed as master and the rest should be backups.

A couple things to verify:

1) Make sure that all routers in the VRRP instance have the same VRID number. This number identifies the VRRP instance.

2) Make sure the router you want to act as primary has the highest priority. By default, I use 254. All other routers should have a lower priority.

3) Make sure that your routers are actually able to communicate to each other directly. They should be on the same LAN segment and should have different IPs.
An example VRRP config with 2 routers would have an IP assigned to the VRRP interface (and would be the same on both routers) - 192.168.1.1.
Router1 would have a different IP address assigned to the LAN interface - 192.168.1.2.
Router2 would have a different IP assigned to LAN - 192.168.1.3.

Also note: I've had difficulties going with the default recommended setup of making the VRRP protected gateway IP a /32. Usually what I end up doing is using a mask that matches the size of the subnet. Eg, if your subnet is 192.168.1.0/24, your VRRP gateway IP assigned to the VRRP interfaces should also be /24.
 
carlossu
just joined
Topic Author
Posts: 15
Joined: Tue Jul 29, 2014 5:32 am

Re: VRRP

Thu Dec 04, 2014 12:03 am

Well, actually I just did it as you said but I´m still having problems on the VRRP configuration, I don´t know if the fact that the routers are different (1100AH and 1100 AHx2) might affect in somehow??
 
AlexS
Member Candidate
Member Candidate
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: VRRP

Thu Dec 04, 2014 5:19 am

can they ping each other
have you blocked the multicast address that they communicate on ..

maybe do
/inter vrrp export
on both and print here
 
carlossu
just joined
Topic Author
Posts: 15
Joined: Tue Jul 29, 2014 5:32 am

Re: VRRP

Thu Dec 04, 2014 11:05 pm

The router that I want as a Master:
RM name="vrrp1" mtu=1500 mac-address=00:00:5E:00:01:32 arp=enabled
interface=ether1 vrid=50 priority=255 interval=1 preemption-mode=yes
authentication=none password="" on-backup="" on-master=""

The router that I want as a Backup:
RM name="vrrp1" mtu=1500 mac-address=00:00:5E:00:01:32 arp=enabled
interface=ether1 vrid=50 priority=100 interval=1 preemption-mode=yes
authentication=none password="" on-backup="" on-master=""
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: VRRP

Fri Dec 05, 2014 12:27 am

Try adjusting your interval a bit - maybe something like 2 or 5. It's possible maybe not all of the packets are reaching the destination (in time) when broadcasting every second so the backup is assuming the master router is down.

I use 5 second failover on mine. Fast enough to keep people happy, slow enough not to worry about transit delays.
 
carlossu
just joined
Topic Author
Posts: 15
Joined: Tue Jul 29, 2014 5:32 am

Re: VRRP

Fri Dec 05, 2014 1:20 am

I already tried it and the router change to backup state but just for a few minutes, what I realized is that I can not ping from the master router to the backup router, however if I turn off the VRRP interface, the ping actually works and if I turn on the VRRP interface the ping fails...

I don´t know why
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: VRRP

Fri Dec 05, 2014 8:40 pm

Can you provide some additional configuration information on your setup (including IP addresses, subnets, bridge/switch information)?

Also, are your two routers directly connected to each other or connected via a switch?
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: VRRP

Fri Dec 05, 2014 10:47 pm

I suggest to try /32 for virtual IP. Unlike rmmccann, I had the opposite problem in the past, things did not work well with virtual IP having /24 netmask (same as real IPs), but everything was always fine with /32. I'm not sure what was wrong. All sources just say that it must be /32, period. And no explanation why. The tricky thing about this is that it appears to work just fine even with non-/32 mask most of the time.

I played with it yesterday for a while and I managed to have both routers running as masters, but as strange as it may sound, I was not able to reliably tell why. It probably has something to do with the fact, that master router has same subnet available on two interfaces (real and virtual one) and I guess it probably under some circumstances somehow confuses something. Great explanation, I know. ;) If someone has any better, I'd be interested to hear it.
 
carlossu
just joined
Topic Author
Posts: 15
Joined: Tue Jul 29, 2014 5:32 am

Re: VRRP

Sat Dec 06, 2014 6:27 pm

Well, first of all thanks for the help, it seems to be that is working perfectly now, the routers are connected via a switch and I had to change a few things in the configuration, basically what I changed was the following:

1- I adjusted the interval to 5s.
2- The R1100AHx2 has the possibility to set the version of the VRRP (by default is 3), however the R1100AH does not have that possibility and I guess that it works in version 2 so I changed the version on the R1100AHx2 and it is working fine, I tested it and the router is running as a backup and as soon as the master router fails, the backup becomes to master almost immediately.
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: VRRP

Mon Dec 08, 2014 4:00 pm

Well, first of all thanks for the help, it seems to be that is working perfectly now, the routers are connected via a switch and I had to change a few things in the configuration, basically what I changed was the following:

1- I adjusted the interval to 5s.
2- The R1100AHx2 has the possibility to set the version of the VRRP (by default is 3), however the R1100AH does not have that possibility and I guess that it works in version 2 so I changed the version on the R1100AHx2 and it is working fine, I tested it and the router is running as a backup and as soon as the master router fails, the backup becomes to master almost immediately.
#2 was your issue if you had one running v2 and the other running v3. They need to be speaking the same language to work. It's likely just a difference in software versions - I would recommend getting both your routers on the same software load.

The primary difference between v2 and v3 is IPv6 support. I run v3 but with IPv4. I don't know what else under-the-hood has changed, but it works good.

Otherwise, glad you got it working.
 
carlossu
just joined
Topic Author
Posts: 15
Joined: Tue Jul 29, 2014 5:32 am

Re: VRRP

Mon Dec 08, 2014 8:56 pm


#2 was your issue if you had one running v2 and the other running v3. They need to be speaking the same language to work. It's likely just a difference in software versions - I would recommend getting both your routers on the same software load.

The primary difference between v2 and v3 is IPv6 support. I run v3 but with IPv4. I don't know what else under-the-hood has changed, but it works good.

Otherwise, glad you got it working.
Yeah, actually the solution was easy, however due the reason that in one router I cannot configure the version, I had to research in what version it works to change it in the other router. finally it is working now, thanks for the help..