Community discussions

MikroTik App
 
badmodofinga
just joined
Topic Author
Posts: 1
Joined: Tue Mar 21, 2023 12:56 am

"Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 3:33 am

hAP ax³
RouterOS 7.17.1

When I attempt to configure a VPN using the Quick Set I receive the following error:
"Error in Gateway - non zero ip address expected!"
So I then look in the Internet section of Quick Set and see that the Address Acquisition is set to Static which is odd as my cable modem provides a public IP via DHCP. Also the populated config shows that the Internet IP Address is set to match the local LAN IP address (192.168.88.1). I don't know what's populating this info but it's making it so that I'm unable to use Quick Set to configure the VPN. When I try to update the Address Acquisition to Automatic I loose connectivity to the device.

My WAN port is configured to port 5
Is Quick Set still unsupported as widely suggested in this forum and does anyone know where the data is populated from?

Thanks a bunch!
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13198
Joined: Thu Mar 03, 2016 10:23 pm

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 10:09 am

QuickSet is supported as far as initial/simple setup. If you have to set up anything outside QuickSet, you should never ever return to QuickSet page. Not even for unrelated things.
 
holvoetn
Forum Guru
Forum Guru
Posts: 6930
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 4:22 pm

Adding to the previous message:
My WAN port is configured to port 5
Is Quick Set still unsupported as widely suggested in this forum and does anyone know where the data is populated from?
In this snippet is your problem.
Quickset can not know you have changed WAN to ether5.
It is mostly meant to start from default config (and that's with WAN on ether1).

Most here will at most use it directly after startup but then never again on the same device until a full reset has been done again (to make sure the basic setup baseline is correct again).
 
jaclaz
Forum Guru
Forum Guru
Posts: 2221
Joined: Tue Oct 03, 2023 4:21 pm

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 5:06 pm

... and it is not so casually Rule #4 of the (unofficial) Mikrotik Club Rules:
Rules of the Mikrotik Club:
  1. You do not use VLAN1
  2. You DO NOT use VLAN1
  3. You remove default user admin and set a strong password before connecting to the internet.
  4. You do not use Quickset.
  5. You do not use detect internet.
  6. You keep routerboard firmware upgraded to the same release as Ros software update
  7. You manually set admin-mac=<MAC> and auto-mac=no on bridge(s)
  8. ...
The full rule #4 is more like "you can actually use Quickset, but ONLY ONCE as first thing from a reset default configuration, and NEVER again".
 
Josephny
Forum Veteran
Forum Veteran
Posts: 819
Joined: Tue Sep 20, 2022 12:11 am
Location: New York, USA

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 5:11 pm

[*] You manually set admin-mac=<MAC> and auto-mac=no on bridge(s)

Would you mind explaining what this rule means?

Or point me to a thread that explains is.

Thanks!
 
jaclaz
Forum Guru
Forum Guru
Posts: 2221
Joined: Tue Oct 03, 2023 4:21 pm

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 5:39 pm

Would you mind explaining what this rule means?

Or point me to a thread that explains is.
viewtopic.php?t=214219
viewtopic.php?t=209850
viewtopic.php?t=190747

The only possible issue of carving the MAC in stone is that if you restore a backup to another device on the same network (something you should not do anyway) you need to take care of the MAC duplication/conflict.
 
Josephny
Forum Veteran
Forum Veteran
Posts: 819
Joined: Tue Sep 20, 2022 12:11 am
Location: New York, USA

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 5:51 pm

Would you mind explaining what this rule means?

Or point me to a thread that explains is.
viewtopic.php?t=214219
viewtopic.php?t=209850
viewtopic.php?t=190747

The only possible issue of carving the MAC in stone is that if you restore a backup to another device on the same network (something you should not do anyway) you need to take care of the MAC duplication/conflict.
Holy cow! More confusion.

You wrote:

"When auto-mac is enabled (yes) the behaviour of the Mikrotik is to give to the bridge the same address as one of the ports that are part of the bridge.
This is (should be) the first port added to the bridge, but it is susceptible to change when configuration changes, or even after a simple reboot in some cases:"

mkx wrote:

"Read about Locally Adminiatered address (LAA) in article on MAC addresses. In short: take MAC address of ether1 and make the second digit from the left either 2, 6, A or E (which means you can construct 4 such MAC addresses out of every physical interface MAC address on each of your devices; unless you are very lucky they will be unique in your LAN)."

Is it really that bad to just allow the device to pick/assign it's own mac address? Yet another thing to setup and remember is another thing to go wrong.
 
jaclaz
Forum Guru
Forum Guru
Posts: 2221
Joined: Tue Oct 03, 2023 4:21 pm

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 7:01 pm

Is it really that bad to just allow the device to pick/assign it's own mac address? Yet another thing to setup and remember is another thing to go wrong.
Of course it isn't, until it becomes so and bites you.

Resistentialism is a thing when dealing with Mikrotik:
https://en.wikipedia.org/wiki/Resistentialism

If you use default configuration (on devices that do have one) it should be already set.
viewtopic.php?t=190747
viewtopic.php?t=190747#p966670
 
Josephny
Forum Veteran
Forum Veteran
Posts: 819
Joined: Tue Sep 20, 2022 12:11 am
Location: New York, USA

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 7:17 pm

Is it really that bad to just allow the device to pick/assign it's own mac address? Yet another thing to setup and remember is another thing to go wrong.
Of course it isn't, until it becomes so and bites you.

Resistentialism is a thing when dealing with Mikrotik:
https://en.wikipedia.org/wiki/Resistentialism

If you use default configuration (on devices that do have one) it should be already set.
viewtopic.php?t=190747
viewtopic.php?t=190747#p966670
Doesn't everyone get up every morning and light a candle, say a blessing, and bow to the East (depending on where you are) giving thanks to the Internet g-ds that the connection is still up?

Seriously, I don't know what the admin-mac is or what it is used for.

I read some of the threads, faithfully staying in my 20-40% comprehension level, and I see that it is, by default, set to the same mac-address as the lowest numbered eth port, and that there might be a problem is/when restoring from an rsc. That's the extent of my understanding.

I don't know what you mean by "if you use default [config] it should be already set." Set to what? Set to eth1? Set differently from eth1? Set to auto-admin-mac=no?
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1692
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 7:25 pm

Seriously, I don't know what the admin-mac is or what it is used for. I read some of the threads, faithfully staying in my 20-40% comprehension level, and I see that it is, by default, set to the same mac-address as the lowest numbered eth port, and that there might be a problem is/when restoring from an rsc. That's the extent of my understanding. I don't know what you mean by "if you use default [config] it should be already set." Set to what? Set to eth1? Set differently from eth1? Set to auto-admin-mac=no?

It basically comes down to MT developers being lazy and not bothering to find a simple, good solution, so they just dump the responsibility on the user instead. Would be fun to know what that philosophy is called! ;)
 
Josephny
Forum Veteran
Forum Veteran
Posts: 819
Joined: Tue Sep 20, 2022 12:11 am
Location: New York, USA

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 7:37 pm

Seriously, I don't know what the admin-mac is or what it is used for. I read some of the threads, faithfully staying in my 20-40% comprehension level, and I see that it is, by default, set to the same mac-address as the lowest numbered eth port, and that there might be a problem is/when restoring from an rsc. That's the extent of my understanding. I don't know what you mean by "if you use default [config] it should be already set." Set to what? Set to eth1? Set differently from eth1? Set to auto-admin-mac=no?

It basically comes down to MT developers being lazy and not bothering to find a simple, good solution, so they just dump the responsibility on the user instead. Would be fun to know what that philosophy is called! ;)
Pigeropusism (from the latin Piger and Opus). (If this goes viral, I want credit!)

This is a very popular worldwide movement, colloquially known by the cryptic phrase: F'ing kids today.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4490
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 7:37 pm

QuickSet works fine in latest versions. But since some routers come with older versions, some older versions on some devices did have bugs. Specifically one where if you changed the IP address and DHCP range, it only pick up the IP address, and set the /ip/dhcp-server/network to be 0.0.0.0/0. You could work around this by just setting the DHCP range again after doing an Apply on the IP address before hitting OK - as once it knows the IP address, it will set DHCP right.

So I'd recommend connecting to router...
- do an upgrade to latest version (see docs)
- enabling auto-update in /system/routerboard to upgrade the "BIOS" to match RouterOS version(see docs)
- reboot to install any RouterOS software upgrade
- reboot a 2nd time install any RouterOS fireware
- then...do a /system/reset-configuration keep-users=yes
- finally... QuickSet should work

But that is a lot. The last reset-configuration is because the default configuration can change between releases. And QuickSet internally make some assumption about the configuration loaded — so a newer version's QuickSet, may not work with an older version's default configuration. So if you just upgraded, without reset-configuration... you may end up with some oddities in how QuickSet works because of the version mismatch.

If ANY of this does not align, then you're open to bugs in what should be the simple setup process....

Now eventually the new factory unit (and ones on dealer/distrubutors shelves...) will come with version without the QuickSet 0.0.0.0 bug.

Seriously, I don't know what the admin-mac is or what it is used for.

I read some of the threads, faithfully staying in my 20-40% comprehension level, and I see that it is, by default, set to the same mac-address as the lowest numbered eth port, and that there might be a problem is/when restoring from an rsc. That's the extent of my understanding.
If auto-mac is enabled, it's lowest MAC address NOT lowest port number. So with auto-mac things like VETH/etc might become the MAC address used by bridge with auto-mac=yes.

Since it's better if the bridge's MAC is stable... The default configuration (as applied by /system/reset-configuration or on any factory device) will actually search for lowest ethernet in bridge, but then set that as that "static" MAC of bridge & disable the "lowest MAC" auto-mac=no. So that logic is not automatic.

But if you start messing with bridge ports, you can accidentally have a wrong admin-mac, i.e. if you remove something like ether2 from /bridge/port as that normally be the first ethernet port in bridge at defaults, but the act of remove it would not change /interface/bridge's admin-mac automatically - that the "lowest ethernet port" rule is applied when the defaults are applied so only once.

For reference, docs on bridge (https://help.mikrotik.com/docs/spaces/R ... +Switching) say:
By default, bridge MAC address will be chosen automatically, depending on the bridge port configuration. To avoid unwanted MAC address changes, it is recommended to disable "auto-mac" and manually specifying the MAC address by using "admin-mac".
But the default configs,, generally, does something like this:
/interface bridge
                       add name=bridge disabled=no auto-mac=yes protocol-mode=rstp comment=defconf;
                     :local bMACIsSet 0;
                     :foreach k in=[/interface find where !(slave=yes   || name="ether1" || passthrough=yes   || name="ether1" || name~"bridge")] do={
                       :local tmpPortName [/interface get $k name];
                       :if ($bMACIsSet = 0) do={
                         :if ([/interface get $k type] = "ether") do={
                           /interface bridge set "bridge" auto-mac=no admin-mac=[/interface get $tmpPortName mac-address];
                           :set bMACIsSet 1;
                         }
                       }
                         :if (([/interface get $k type] != "ppp-out") && ([/interface get $k type] != "lte")) do={
                           /interface bridge port
                             add bridge=bridge interface=$tmpPortName comment=defconf;
                         }
                       }
(from: https://help.mikrotik.com/docs/spaces/R ... s-APRouter )

And while that logic is same for likely a decade. There are other subtle changes to the default configuration over the various version – why re-apply the latest one from latest stable version at install time is BETTER than doing anything with the factory installed one. Since you'd be missing out on an improvements (or bug fixes) in these defaults.
 
jaclaz
Forum Guru
Forum Guru
Posts: 2221
Joined: Tue Oct 03, 2023 4:21 pm

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 7:59 pm

@Josephny

I didn't mean anything, I only repeated what EdPA wrote here:
viewtopic.php?t=190747#p966670
This is the reason why we recommend setting bridge MAC manually, and all default configurations with bridge involved come out with the "admin-mac" set.
It means that the default (for devices with no configuration) is auto-mac=yes and admin-mac NOT set (empty, no value, the MAC is automatically generated because auto-mac=yes) , AND that since Mikrotik recommends setting bridge MAC manually, ANY device that has a default configuration (by Mikrotik) involving a bridge has the auto-mac=no and the admin-mac set to a value.
https://help.mikrotik.com/docs/spaces/R ... igurations

example in RouterMode.txt:
                     /interface bridge
                       add name=bridge disabled=no auto-mac=yes protocol-mode=rstp comment=defconf;
                     :local bMACIsSet 0;
                     :foreach k in=[/interface find where !(slave=yes   || name="ether1" || passthrough=yes   || name="ether1" || name~"bridge")] do={
                       :local tmpPortName [/interface get $k name];
                       :if ($bMACIsSet = 0) do={
                         :if ([/interface get $k type] = "ether") do={
                           /interface bridge set "bridge" auto-mac=no admin-mac=[/interface get $tmpPortName mac-address];
                           :set bMACIsSet 1;

what this snippet does is:
1) create a bridge interface (with auto-mac=yes)
2) set a flag to 0
3) loop through interfaces (excluding ether1)
4) when an interface of type "ether" is found, if the flag is still 0:
4.1) set the bridge MAC to the found interface MAC
4.2) change auto-mac to no
4.3) set the flag to 1 (so that the MAC settings of the bridge is not changed when another interface of type ether is found in the loop)

These are pretty much equivalent to "manually set the MAC of the bridge to the current MAC of ether2".
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1692
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 8:10 pm

I know why, but I still think making users set the bridge MAC manually is an ugly kludge.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22312
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 8:29 pm

From Larsa the term could be "Klud-gugily", though piger opus seems accurate, as for Kids these days, thats what your parent said ;-P
 
Josephny
Forum Veteran
Forum Veteran
Posts: 819
Joined: Tue Sep 20, 2022 12:11 am
Location: New York, USA

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Mon Feb 03, 2025 11:54 pm

Do I understand correctly that we are addressing the potential problems of having auto-mac=yes, which is the default setting for devices with no configuration?

And by 'no default configuration' we mean no config whatsoever (not even Quickset), right?

I know there are severla threads on this, but the language really is not clear.

And the potential problem (or one of the problems) is that the admin-mac (of the bridge) might be copies from an eth port not a member of the bridge?
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4490
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Tue Feb 04, 2025 2:24 am

Do I understand correctly that we are addressing the potential problems of having auto-mac=yes, which is the default setting for devices with no configuration?

And by 'no default configuration' we mean no config whatsoever (not even Quickset), right?

And the potential problem (or one of the problems) is that the admin-mac (of the bridge) might be copies from an eth port not a member of the bridge?
Yes and yes* and yes.

*QuickSet should follow whatever the bridge had already for auto-mac – I don't think QuickSet changes it.
**... it also means if you add a new bridge at the CLI — either from blank or even a 2nd bridge — any new bridge added will have auto-mac=yes... which will use lowest MAC address as the bridge MAC automatically.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13198
Joined: Thu Mar 03, 2016 10:23 pm

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Tue Feb 04, 2025 11:32 am

**... it also means if you add a new bridge at the CLI — either from blank or even a 2nd bridge — any new bridge added will have auto-mac=yes... which will use lowest MAC address as the bridge MAC automatically.
With a pretty convoluted config this will end up having multiple bridges with same MAC. Example of such config:
/interface bridge
add name=trunk vlan-filtering=yes
/interface vlan
add interface=trunk name=vlan-99 vlan-id=99
/interface bridge
add name=MGMT
/interface bridge port
add bridge=MGMT interface=vlan-99

So bridge trunk gets whichever MAC from one of its ports (or is manually set with admin-mac). Then VLAN interface inherits parent interface's MAC, in this case it's trunk bridge MAC. And bridge MGMT inherits VLAN interface's MAC.

I'm pretty sure that the example above doesn't cause any harm though.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4490
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Tue Feb 04, 2025 2:46 pm

I'm pretty sure that the example above doesn't cause any harm though.
Basically it's helpful in most cases to prevent a totally wrong admin-mac= be "left over". And I'd imagine stuff like RTSP and LLDP might start having issues or oldies if it was wrong, or it kept changing (but that be due to remove bridge ports, and unlikely there be repeated add/removed bridge ports that cause bridge MAC to change). Also, if "wrong" MAC wasn't duplicated anywhere in ARP, it likely won't matter at all - like left over from some upgrade (and restored config) of a retired router. Now I could be missing something too - but either way think y'all be fine.

AFAIK only down side to auto-mac=yes when you have "ethernet-like" things. I put a VETH into a vlan-filtering=yes bridge and the VETH stopped working & took a second to figure out. I do normally start with defconf which would have auto-mac=no but this was a test setup I built from empty, so it got the auto-mac=yes. The whole thing could have been some temporal bug in the VETH/container stuff too... but the bridge assuming the VETH MAC did seem like a bad idea. And some of the "fake" ethernet address MAC with lower numbered high-order bits, might get picked before "real" ethernet MACs.
 
jaclaz
Forum Guru
Forum Guru
Posts: 2221
Joined: Tue Oct 03, 2023 4:21 pm

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Tue Feb 04, 2025 3:14 pm

I see this whole stuff more as "damned if I do it, damned if I don't".

In my understanding:
1. auto-mac=yes <- can cause issues when adding other interfaces to bridge and probably in a number of other "advanced" setups
2. auto-mac-no AND MAC duplicated from first ether port on the bridge<- can cause issues if the ether port with the duplicated MAC is taken off the bridge
3. auto-mac=no (whatever MAC is assigned to bridge) <- can cause issues with restoring backup on another device (which again should not be done, yet ...)
4. auto-mac=no AND MAC different from any port of the bridge, and any other port on the same device <- can cause issues like #3 but not like #2

So, all in all I personally prefer #4, but the default configuration #2 is still IMHO better than #1 (default OS setting when you create a bridge)
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1692
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: "Error in Gateway - non zero ip address expected!" when using Quick Set

Tue Feb 04, 2025 3:27 pm

I prefer "auto-mac=smart" because it adapts to new conditions automatically. ;)