Community discussions

MikroTik App
 
olydoc
just joined
Topic Author
Posts: 12
Joined: Mon Mar 27, 2006 11:24 pm

Bridge Auto-Mac Issue

Tue Nov 08, 2022 11:02 pm

Re: RB750gr3, v6.48.6

I found an odd issue when Mikrotik auto assigns a mac address for bridge interface on Mikrotik routers. According to Mikrotik documentation (https://wiki.mikrotik.com/wiki/Manual:I ... face_Setup), the MAC address is chosen from the first added bridge port and after a reboot, the bridge MAC can change depending on the port-number. That second part is important, “the bridge MAC can change after reboot.”

In this scenario, I have two RB750 routers connected to each other through two WAP60ad’s serving as wireless bridges. For the sake of this discussion we will call the two routers Router-A and Router-B. Everything centers on the actions of Router-B.

Both routers are set up nearly identical with all ports in a single bridge. When I first configured Router-B, using a script that adds the bridge interface with auto-mac enabled, it assigned the MAC address of Ether1 to the bridge interface. That was as expected. The problem came in when I took it out and installed it in the field connected to Router-A through the wireless bridge.
After powering off Router-B and connecting it in the field, where it is now bridged with the two WAP60ad and Router-A, upon reboot the bridge interface for Router-B took on the MAC address of the bridge interface on Router-A.

At first I thought this was some odd fluke, so I full reset and reloaded the script, after which it came up with the correct MAC address (Ether1 of Router-B) as it had when I initially set it up. All well and good I thought, but after another reboot, the bridge once again reverted back to the “stolen” MAC address of Router-A.

Thinking that I might have something strange going on with this particular router, I tried changing out Router-B with another RB750, but the results were the same.

The solution was to set the MAC address for the bridge interface manually using “admin-mac=[Ether1-Mac]” and “auto-mac=no.” Now that the MAC address is set manually and it survives reboot without change. I guess this will be my default method for creating bridges going forward.
 
EdPa
MikroTik Support
MikroTik Support
Posts: 274
Joined: Fri Sep 15, 2017 10:05 am
Location: Riga
Contact:

Re: Bridge Auto-Mac Issue

Wed Nov 09, 2022 11:05 am

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.

But I did not fully understand this part:
upon reboot the bridge interface for Router-B took on the MAC address of the bridge interface on Router-A.
The "auto-mac" cannot take MAC address from another device. Could it be that you have duplicate MACs on Ethernet interfaces on multiple devices? Only then there is a chance that bridges end up with the same MAC.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Bridge Auto-Mac Issue

Wed Nov 09, 2022 11:47 am

@olydoc

As usual, without BOTH "/export"
it may be that you used the .backup to configure the other device and duplicate the MACs...

Also, if you are using the .rsc file of a device with auto-mac=NO, it probably duplicates the MAC address on another device.
The auto-mac has to be set up manually later if you don't know how to insert the correct instructions into the configuration script.
 
olydoc
just joined
Topic Author
Posts: 12
Joined: Mon Mar 27, 2006 11:24 pm

Re: Bridge Auto-Mac Issue

Thu Nov 17, 2022 4:42 am

The "auto-mac" cannot take MAC address from another device:

Based on my recent experience this is not true. I have a WAP60ad serving as a PTMP AP. I had a newly setup WAP60ad client radio (station-bridge) claim the MAC address of the AP bridge for its own bridge immediately following a power cycle. This has happened more than once and with other units. At first, I thought as you did, that this was not possible, so I have changed out devices verified my configs and verified all of the MAC's in the network. Today, using a cleaning installed client radio, I saw the radio come up the first time with the correct MAC (still in auto-mac mode), then immediately following a power cycle, it claimed the MAC of the AP for it's bridge.

Could it be that you have duplicate MACs on Ethernet interfaces on multiple devices? No, it is an extensive L2 network, but I have verified the MAC's on all devices.

Yes, I will be setting the MAC address manually for all devices going forward. Part of the learning curve I guess....
 
olydoc
just joined
Topic Author
Posts: 12
Joined: Mon Mar 27, 2006 11:24 pm

Re: Bridge Auto-Mac Issue

Thu Nov 17, 2022 4:57 am

@rextended

I familiar with the issue of using .backup files to configure other devices, so this is not the case.

I am using an .rsc file to configure the radios, but the file is a custom script with no reference to MAC address in it. Because of the number of VLAN's in the network, it is much easier to set these units up using an .rsc file (simply change variables in the script, load the file and reset the config with the .rsc file as the load after resete). I wasn't aware of the auto-mac issue before, so I was just allowing auto-mac. Going forward, I am now modifying my script to include admin-mac=xx:xx:xx:xx:xx:xx and auto-mac=no and will be doing so for all bridge setups in the future.

The real surprise in this was that the device was actually able to take a MAC address from another device in the network. I am still a little confused as to how that happens and would not have thought it possible if I had not seen first hand multiple times.

Who is online

Users browsing this forum: ItchyAnkle, menyarito and 83 guests