Community discussions

MikroTik App
 
fsebera
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jun 03, 2021 6:19 pm

RouterOS bridges have same MAC address

Fri Aug 13, 2021 10:17 pm

In my inherited physical network setup with 2 MikroTik Cloud Core Routers CCR1009, I notice there are 2 bridges configured with different names but both bridges have somehow been assigned the same identical MAC address. Each bridge sees the other and both report the same MAC address as its bridge MAC. It seems these two bridges are isolated from one another but somehow see the others MAC. When I emulate the physical environment in the virtual environment I notice when I create bridges each bridge get assigned a different MAC.

Could anyone share some insight in this MikroTik setup as far as bridging goes?

Thank you
Frank
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RouterOS bridges have same MAC address

Fri Aug 13, 2021 10:24 pm

You have create the bridge copyng the previous,
or you have put one interface that before is on previous bridge

post results of this command:
/interface bridge export
 
fsebera
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jun 03, 2021 6:19 pm

Re: RouterOS bridges have same MAC address

Sat Aug 14, 2021 4:40 am

I understand that when a new bridge is created, I think this new bridge inherits the MAC address of the first port (interface) assigns to the bridge. If this is the case, Is it possible to have the same port (interface) in two different bridges on the same single router?

Although I would like to understand how RouterOS assigns Mac addresses to newly created bridges, I’d like more to know how I could change the MAC address of at least one bridge AND are there any negative side affects with this sort of change?????

Thank you
Frank
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RouterOS bridges have same MAC address

Sat Aug 14, 2021 11:48 am

End of help from my side.
 
fsebera
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jun 03, 2021 6:19 pm

Re: RouterOS bridges have same MAC address

Mon Aug 16, 2021 8:31 pm

Although I would like to understand how RouterOS assigns Mac addresses to newly created bridges, I’d like more to know how I could change the MAC address of at least one bridge AND are there any negative side affects with this sort of change?????

Thank you
Frank
UPDATE:

Details included in this message to hopefully help others that may run into this same issue - No charge!! :)

Why do I need this change: This change is needed as both bridges currently have the same MAC address assigned, confusion abound.

How I am testing:
I configured 2 bridges named B500 and B600 on hardware platform RB4011iGS+RM version v6.46.4 in my isolated LAB environment
I used this cli command to change the MAC address of the first bridge:
/interface bridge set B500 admin-mac=11:22:33:AA:BB:CC auto-mac=no

I used this cli command to change the MAC address of the 2nd bridge
/interface bridge set B600 admin-mac=11:22:33:DD:EE:FF auto-mac=no

NOTE: Using the Winbox GUI, I didn't see an option to set the other required option auto-mac=no so perhaps the CLI is required for this change.
UPDATE 8-18-2021: In the GUI (Graphical User Interface) it turns out the required option -- auto-mac -- is automatically set to no when you add your own MAC address and save (click ok).
-----
RESULTS:
Strange thing is only bridge B600 will take on and use my newly assigned MAC address. B500 continues to use original MAC and it changes at every reboot.
When bridge B500 is disabled (within Winbox) it shows my manually assigned MAC address (color light gray) but reenabling B500, it reverts back to original MAC assigned to this bridge this time. Rebooting and/or repowering does not make any differences other than dynamically setting a new and different MAC address and of course it just wastes more of my time.

The CLI configurations shows both bridges are configured the same except for different MAC addresses.
[admin@RB02] > /interface bridge print (other bridge details omitted for clarity)
Flags:   X - disabled, R running
0 R name="B500" mac-address=9E:1D:11:EA:78:4F auto-mac=no admin-mac=11:22:33:AA:BB:CC
1 R name="B600" mac-address=11:22:33:DD:EE:FF auto-mac=no admin-mac=11:22:33:DD:EE:FF

[admin@RB02] > export
/interface bridge
add admin-mac=11:22:33:AA:BB:CC auto-mac=no name=B500
add admin-mac=11:22:33:DD:EE:FF auto-mac=no name=B600
-snip--

I tested changing the bridge MAC addresses (as above) on my Cloud Hosted Router version v6.47.10 in my isolated test lab and admin-mac address changed worked as advertised without any problems. Perhaps a RouterOS code bug on the physical infrastructure.

Thanks, more research
Any help would be greatly appreciated
Frank
Last edited by fsebera on Wed Aug 18, 2021 3:03 pm, edited 1 time in total.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: RouterOS bridges have same MAC address

Mon Aug 16, 2021 8:39 pm

Everything you need to know about Bridges is here https://help.mikrotik.com/docs/display/ROS/Bridge
 
ConnyMercier
Forum Veteran
Forum Veteran
Posts: 725
Joined: Tue Dec 17, 2019 1:08 pm

Re: RouterOS bridges have same MAC address

Tue Aug 17, 2021 10:26 am

Good Morning Frank,

I was able to reproduce the "fault" with WinBox.
Using WinBOX i created two Bridges and assigned the same admin.MAC (11:22:33:DD:EE:FF & 11:22:33:AA:BB:CC) and got the same Results you got.

Solution:
I went Online and found a MAC-Address Generator (for Exemple : [reported link removed])
Every MAC-Address i generated, i was able to enter as "admin. MAC Address" and it worked !!!
I didn't even have to use the "auto-mac=no" command.

Try it
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RouterOS bridges have same MAC address

Tue Aug 17, 2021 10:44 am

I went Online and found a MAC-Address Generator (for Exemple : ...)
Every MAC-Address i generated, i was able to enter as "admin. MAC Address" and it worked !!!
Are you kidding?
Do you really take yourself seriously?
Even a MAC Generator !!!
 
pe1chl
Forum Guru
Forum Guru
Posts: 10221
Joined: Mon Jun 08, 2015 12:09 pm

Re: RouterOS bridges have same MAC address

Tue Aug 17, 2021 12:11 pm

In my inherited physical network setup with 2 MikroTik Cloud Core Routers CCR1009, I notice there are 2 bridges configured with different names but both bridges have somehow been assigned the same identical MAC address. Each bridge sees the other and both report the same MAC address as its bridge MAC. It seems these two bridges are isolated from one another but somehow see the others MAC.
I am not sure what is your problem with that. I am running a CCR1009 with several bridges that have the same MAC address and it works just fine.
Of course the bridges are not connected, they are on different VLANs on the same ethernet port and they all use the MAC address of that particular ethernet port.
(I have copied that to the admin-mac address so I am sure it remains static, but that is no different from an automatically assigned address that is derived from the port MAC address and of course is the same for every VLAN)
 
erlinden
Forum Guru
Forum Guru
Posts: 1958
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: RouterOS bridges have same MAC address

Tue Aug 17, 2021 12:19 pm

What is the use case for having more than one bridge on a router?
Solution:
I went Online and found a MAC-Address Generator (for Exemple : ...)
Every MAC-Address i generated, i was able to enter as "admin. MAC Address" and it worked !!!
I didn't even have to use the "auto-mac=no" command.

Try it
Or not!? This is a really terrible advice.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11593
Joined: Thu Mar 03, 2016 10:23 pm

Re: RouterOS bridges have same MAC address

Tue Aug 17, 2021 3:02 pm

What is the use case for having more than one bridge on a router?

Ancient way of dealing with VLANs on devices without switch chip(s). And some other tasks which can be done by (ab)using VLAN functionality (e.g. segmentation of switch).

I agree that in modern times more than one bridge per device is mostly not needed.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10221
Joined: Mon Jun 08, 2015 12:09 pm

Re: RouterOS bridges have same MAC address

Tue Aug 17, 2021 3:34 pm

What is the use case for having more than one bridge on a router?

Ancient way of dealing with VLANs on devices without switch chip(s). And some other tasks which can be done by (ab)using VLAN functionality (e.g. segmentation of switch).

I agree that in modern times more than one bridge per device is mostly not needed.
I have standardized on making a separate bridge for each "application" in the router. I.e. the LAN, the internet connection, the guest network(s), etc.
I put all configuration like IP address, firewall, queues, etc etc on the bridge, then put a single ethernet interface into the bridge.
That way I can port the configuration easily to another router model where the port layout is different, or e.g. change the internet connection from ethernet to SFP.

Usually the bridge has only one port, and in that case the "fast forward" option can be enabled on the bridge and the overhead is less (no host table).
Last edited by pe1chl on Tue Aug 17, 2021 4:51 pm, edited 1 time in total.
 
fsebera
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jun 03, 2021 6:19 pm

Re: RouterOS bridges have same MAC address

Tue Aug 17, 2021 4:16 pm

I am quite sure anyone reading this thread is more than confident enough to create a MAC address but thanks for your assistance.
:
:
I really hope folks don't click on your link, this is a good example of how attacks start.
:
:
Yes, having the same MAC address on 2 different virtual bridges within the same physical MikroTik router works. Any traffic (frames) being forwarded TO either bridge would most likely only be bridge management traffic. However the Management address of this MikroTik router is tied to an L3 router interface not either of the L2 bridge address. The layer-3 portion of this setup will ARP for the next hop to obtain the L2 address to forward a packet, the next hop will be an end-device on a local routed interface or next-hop L3 router address on some VLAN segment running through (not to) either of the 2 bridges. - I get that, traffic (data or management) doesn't really need to communicate with either of the bridge MAC addresses - same MAC or not - I'm guessing no traffic (management nor data) is ever forwarded to either bridge as spanning-tree is disabled- MikroTik documents specifically state spanning-tree be disabled due to CPU oversubscription issues. I'm sure you are aware at L2, MAC addresses are the only unique element used to prevent bridging loops and this vendor requests this feature be disabled because the CPU cannot handle the load. Which leads me to think the bridge MAC address -in this configuration- are never used.

Being new to MikroTik and this environment I find this confusing at best. All I want to do is change the MAC address on at least 1 bridge to distil a little sanity.

Thanks Frank
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: RouterOS bridges have same MAC address

Wed Aug 18, 2021 6:35 pm

An easy way to create a new MAC address is, go to /Interfaces Eoip, click add and then check the Mac address field, you can copy and use that MAC address...
Do not click OK, just exit from EoIP Facility...
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RouterOS bridges have same MAC address

Wed Aug 18, 2021 6:46 pm

But what are we talking about?
MAC addresses do not have verification code inside(*), just type 12 hexadecimal digits randomly
(for those who don't know they range from 0 to 9 and the letters A-B-C-D-E-F)
and put the ":" every 2 characters (start and end excluded)
For example, if I type randomly
82:c3:64:1e:0b:32
oh look, a MAC address !!!

(*) excluding special caase like all 0, all F (no matter now 1st and 2nd less significative bit on 1st Byte)
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: RouterOS bridges have same MAC address

Wed Aug 18, 2021 7:14 pm

just type 12 hexadecimal digits randomly
I gave an option...
You like to type 12 HEX digits, someone else might not ...
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RouterOS bridges have same MAC address

Wed Aug 18, 2021 7:25 pm

I'm pointing out that the idea of ​​putting a random mac-address is a bullshit.
Inside a bridge must be put one mac-address choiced from a real interface inside the bridge,
not one MAC invented without the slightest criterion.
Usually or the bridge do it automatically, or is put the MAC address of the interface IN THE BRIDGE with the smallest MAC,
usually the ethernet IN THE BRIDGE with the smallest number.

But, so much I see, is discovered in this topic the hot water.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: RouterOS bridges have same MAC address

Wed Aug 18, 2021 7:44 pm

I'm pointing out that the idea of ​​putting a random mac-address is a bullshit.
Any actual reference on that instead of your personal opinion ?

The addresses created with the way i described above, are locally administered unicast MAC addresses, as far as i know and remember...
So it does not look that random...

However, just typing random HEX values as you said earlier, is certainly random ...

Also, check here https://wiki.mikrotik.com/wiki/Manual:Interface/EoIP
The address numeration authority IANA allows the use of MAC addresses in the range from 00:00:5E:80:00:00 - 00:00:5E:FF:FF:FF freely
Does that still seem random ?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10221
Joined: Mon Jun 08, 2015 12:09 pm

Re: RouterOS bridges have same MAC address

Wed Aug 18, 2021 8:09 pm

When you "invent" a "random" MAC address for local use, you have to make sure its first byte adheres to some rules:
- the first byte must be an EVEN value. When it is ODD, it will be received by everyone (multicast address)
- the second to last bit of the first byte indicates if it is an address from an officially assigned range, or if it is a locally invented address.

When you want to do it "the official way", you would want to use a locally invented address and your first byte has to be of the form xxxxxx10 (binary), or
when written in HEX it has to be one of the values x2 x6 xA or xE, so e.g. 02 or 46 or 8A or 9E or similar.
The other bytes can be any value 00..FF in this case.

Look at what the router itself does when it auto-generates a MAC address e.g. when you create a new virtual Wireless interface.
When your main MAC address starts with 4C:5E:0C (one of the older ranges assigned to MikroTik), it will make that into 4E:5E:0C for the first automatically
assigned address, which is a locally invented address adhering to the above criteria.

However, when making a bridge which has one or more ethernet ports from the router in it, there is no need to invent a completely new MAC address,
you can just use the MAC of the first (or any) port in the bridge. That is what the router itself also does. You can copy the chosen address to the admin
MAC address to get a stable value (which is desirable e.g. when you run a DHCP server on it).
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RouterOS bridges have same MAC address

Wed Aug 18, 2021 8:15 pm

@pe1chl do not throw your pearls to pigs
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: RouterOS bridges have same MAC address

Wed Aug 18, 2021 8:21 pm

Also, check here https://wiki.mikrotik.com/wiki/Manual:Interface/EoIP
The address numeration authority IANA allows the use of MAC addresses in the range from 00:00:5E:80:00:00 - 00:00:5E:FF:FF:FF freely
Does that still seem random ?

If IANA is the numeration authority for MAC that start with 00:00:5E , the numeration authority say this:
https://www.iana.org/assignments/ethern ... bers.xhtml
80-00-00 to 8F-FF-FF MPLS Multicast [RFC5332]
90-00-00 MPLS-TP p2p [RFC7213]
90-00-01 Bidirectional Forwarding Detection (BFD) on Link Aggregation Group (LAG) Interfaces [RFC7130]
90-00-02 AllL1MI-ISs [RFC8202]
90-00-03 AllL2MI-ISs [RFC8202]
90-00-04 to 90-00-FF Unassigned (small allocations)
90-01-00 TRILL OAM [RFC7455]
90-01-01 to 90-01-FF Unassigned (small allocations requiring both unicast and multicast)
90-02-00 to 90-0F-FF Unassigned
90-10-00 to 90-10-FF Documentation [RFC7042]
90-11-00 to FF-FF-FF Unassigned

I do not see on interval 80:00:00-FF:FF:FF the words "do anything you want"

Who is online

Users browsing this forum: AimiSayo, AshuGite, Bing [Bot], ortdx, rkau045 and 78 guests