Hi everyone,
I've been using Mikrotik for several years now, and while I wouldn't call myself an expert, I've never had too many problems. Sometimes things are a bit tricky to get going, but then you get the hang of it, and wow!
For a few months now, I've been using proxy-arp mode on an interface, and I have to say it's very interesting, and I've gotten exactly the behavior I wanted. However, every now and then—once a month?—I connect and see the internet sign missing... apparently, what's happening is as if the three addresses I have on the interface are rotating, and the output address isn't the original one.
Let me try to explain better by describing the environment:
I have two networks:
Technicolor AGHP 19.4 --> 192.168.1.0/24
- 192.168.1.110 ether1 Mikrotik hAP ac^2 6.43.10 --> 192.168.88.0/24
On the ether1 interface in proxy-arp mode, there are two other IP addresses: 192.168.1.180 and 192.168.1.181. These allow me to reach the respective IP addresses of the 192.168.88.0/24 subnet, 192.168.88.180 and 192.168.88.178, from 192.168.1.0/24
[bonea@MikroTik] > ip firewall natprint
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; defconf: masquerade
chain=srcnat action=masquerade out-interface-list=WAN log=no log-prefix="" ipsec-policy=out,none
1 chain=dstnat action=dst-nat to-addresses=192.168.88.180 dst-address=192.168.1.180 log=no log-prefix=""
2 chain=dstnat action=dst-nat to-addresses=192.168.88.178 dst-address=192.168.1.181 log=no log-prefix=""
[bonea@MikroTik] > ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 ;;; defconf
192.168.88.1/24 192.168.88.0 ether2
1 192.168.1.180/24 192.168.1.0 ether1
2 192.168.1.181/24 192.168.1.0 ether1
3 192.168.1.110/24 192.168.1.0 ether1
This is the IP address order I see when it works. When it doesn't, the order looks like this:
[bonea@MikroTik] /ip address> print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 ;;; defconf
192.168.88.1/24 192.168.88.0 ether2
1 192.168.1.110/24 192.168.1.0 ether1
2 192.168.1.180/24 192.168.1.0 ether1
3 192.168.1.181/24 192.168.1.0 ether1
I'm asking for help from the forum because, as a computer scientist, I'd like to understand:
- why this is happening
- where I can see what happened in the logs
- and, of course, how to prevent it from happening again.
Thank you very much, and I apologize for the automatic translation.
PS
Looking around, I found this: "The problem is probably related to the fact that the default masquerade takes the first available IP on the interface. If the order changes, the outgoing IP changes. You could solve this by using action=src-nat instead of masquerade, specifying the IP 192.168.1.110 in the to-addresses field." What do you think? If this is the right tip, why do the addresses change? I'm a bit interested in the ramifications of this seemingly unpredictable behavior.