Community discussions

MikroTik App
 
marypoppins
newbie
Topic Author
Posts: 30
Joined: Wed Nov 27, 2019 3:38 pm

vrrp and egress interface selection

Thu Apr 02, 2020 12:19 am

Dear All,

I would like to ask where the decision is made about which interface will be the output interface where forwarding packets? I don't care about the simple examples, where there is only one interface in a network.
For example, there is a router with interfaces like this (the if_lan and the vrrp_lan2 is connect to the same network):
if_lan1
if_lan2
vrrp_lan2
The ip addresses doesn't matter in the case of question (it matters only when it is an ingress gw address).
So the situation is: a packet comming from lan1 and travels through the router into (or through) the lan2 network. So the router has to push it to the lan2 (or to the lan2 gw). How the router select the output interface (and in the end the source mac address)? It is select the vrrp mac for the source mac, but why and where is the selection point?

However locally generated packets traverse out from the box:
If I ping sg in the lan2 from the router, the output interface will be the if_lan2 interface and the mac its mac. This is clear, the "/ip route print" shows that the source ip address for the route into the lan2 will be use the if_lan2 ip address as the preferred source address, so it will be use that interface mac as source mac.
However it can be change if you specify the vrrp_lan2 ip as the source ip for the ping. I don't care about.

But again, when the packet forward where the decision is made to use the vrrp interface as output interface?
thank you
 
marypoppins
newbie
Topic Author
Posts: 30
Joined: Wed Nov 27, 2019 3:38 pm

Re: vrrp and egress interface selection

Thu May 07, 2020 11:04 am

It is select the vrrp mac for the source mac, but why and where is the selection point?
It seems sometimes select the vrrp, sometimes the vlan interface. So I had to make doubled the jump rules like:
ip firewall filter add chain=input action=jump jump-target=lan1 interface-out=vlan10
ip firewall filter add chain=input action=jump jump-target=lan1 interface-out=vrrp10
See interface-out!

Any ideas why is this?
Thank you

Who is online

Users browsing this forum: Ahrefs [Bot] and 95 guests