Community discussions

MikroTik App
 
User avatar
Xymox
Member
Member
Topic Author
Posts: 416
Joined: Thu Jan 21, 2010 5:04 pm
Location: Phoenix, Arizona US
Contact:

No way to change MAC of Bonded interface ?

Sun Apr 21, 2019 4:29 am

I do not see a way to change the MAC address of a bonded interface ?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11629
Joined: Thu Mar 03, 2016 10:23 pm

Re: No way to change MAC of Bonded interface ?

Sun Apr 21, 2019 10:31 am

What if you change MACs of member ports before bonding them? Usually bond takes up MAC of one of participating ports ...
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3300
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: No way to change MAC of Bonded interface ?

Sun Apr 21, 2019 11:02 am

From the manual:
forced-mac-address (MAC address; Default: none)

By default, bonding interface will use MAC address of the first selected slave interface. This property allows to configure static MAC address for the bond interface (all zeros, broadcast or multicast addresses will not apply). RouterOS will automatically change the MAC address for slave interfaces and it will be visible in /interface ethernet configuration export
It may be possible to make a script that takes down the interface, removes the bond, change mac address on the first interface, bound it with another and turn port on again. (Just an idea)
 
User avatar
Xymox
Member
Member
Topic Author
Posts: 416
Joined: Thu Jan 21, 2010 5:04 pm
Location: Phoenix, Arizona US
Contact:

Re: No way to change MAC of Bonded interface ?

Mon Apr 22, 2019 4:15 am

Changing the MAC of the members did not work.

After a lot of playing I found something that did. This script gives me a new MAC each time I run it. I have NO idea why. This is sloppy and I need to clean it up some as it leaves a interface list member dangling.

I need to change the MAC of the bonded 802.3ad link in order to force the cable modem ( Arris SB8200 ) to get a new dynamically assigned IP.

Previously I randomized the single ethernet MAC and rebooted the modem. This would give me a new IP..

Now with the newly added LAG of 2 ports on the modem I can get past 1Gbps but I need to be able to run a script and get a new IP on a regular basis. I get new IPs from the ISP to prevent ad targeting and tracking..

When i remove and add back the bonding interface this scrambles the DHCP client and interface WAN list. My script puts those back in place..
/interface bonding remove Modem1;
/interface bonding add name=Modem1 mode=802.3ad slaves=ether7,ether8 transmit-hash-policy=layer-3-and-4;
/ip dhcp-client set 0 interface=Modem1;
/interface list member add interface=Modem1 list=WAN
BUT this leaves a interface list member entry i cant remove.. Well I can from command line with remove 1,, but not from the script..

Now why this generates a new MAC for the 802.3ad bonded interface, I dont know. But it does for sure..

Who is online

Users browsing this forum: Bing [Bot], clambert, Google [Bot], pmcsill and 215 guests