Community discussions

MikroTik App
 
adeeadee
just joined
Topic Author
Posts: 4
Joined: Sun Aug 21, 2011 8:23 pm

Default route pref-src

Wed Feb 19, 2014 12:52 pm

Hello there,

I have an odd situation with a RB1100AHX2. Until last week it was running ROS v5.25. Since I've upgraded it to 6.9(6.10) it has a strange behavior for outgoing packets: I have several IPs declared on outside interface (eg: 12,13,14,100,150). Default route pref-src was not set and for some reason the src IP for outgoing connection was the first I configured, let's say 100. After the upgrade, the outbound src IP was 12. I set the "pref-src" for default route to 100 and still making outgoing from 12.

It's quite strange. Can you please give me a hint what I'm doing wrong?
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Default route pref-src

Wed Feb 19, 2014 12:58 pm

Are you using a masquerade on that interface? If so, you should use src-nat instead.

What are you using to determine which of those ips should be used as a src-address in communication with internet devices?
 
adeeadee
just joined
Topic Author
Posts: 4
Joined: Sun Aug 21, 2011 8:23 pm

Re: Default route pref-src

Wed Feb 19, 2014 1:11 pm

Thanks.

Migrating from masq to srcnat and it worked just fine. Don't know what's wrong with me these days, I knew that... :)


Q: What are you using to determine which of those ips should be used as a src-address in communication with internet devices?
A: Nothing, just masq. Actually this is what's strange. Until the upgrade the connections made through masq rule was set to 100.... and I don't know why...
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Default route pref-src

Wed Feb 19, 2014 1:20 pm

I did a bit of experimenting a few years ago, and found the masquerade used the last ip entered in "/ip address" for that interface as the masquerade. After your upgrade, it may have rearranged that order and used the lowest ip.

It is always best to use src-nat when you have multiple ips assigned to the same interface. That insures it uses the ip you are expecting.

Who is online

Users browsing this forum: bias89, critter, ihexley, jfibergran, oskarsk and 117 guests