Terve, On Mon, 31 Jan 2005, Nuutti Kotivuori wrote:> How can I set the MAC address for a bridge? The MAC address given forHow about changing all the physical interfaces to use the same MAC address before `brctl addif <ethX> <brY>' ? This probably won't work if you have physical loops in the bridged ethernets and SPT is used, though. (Surely won't work either if you have to use VLANs on cheap switches that have one single MAC address table for all VLANs... like HP 4000M to name one.) Ville -- Ville Mattila, system support specialist, Funet network, CSC PO Box 405, FIN-02101 Espoo, Finland, fax +385 9 457 2302 CSC is the Finnish IT Center for Science, http://www.csc.fi/, email: ville.mattila@csc.fi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 155 bytes Desc: not available Url : http://lists.linux-foundation.org/pipermail/bridge/attachments/20050131/d479e9f0/attachment-0002.pgp
Sorry, if this question has been answered before, but I could not find out with a brief look. How can I set the MAC address for a bridge? The MAC address given for the bridge device seems to be the one it sends network packets with if the bridge device has an IP address set. Apparently the bridge starts with a zero MAC address and when the first interface is attached to it, it takes its MAC address. When I try to set the MAC address, I just get operation unsupported as a result. I know I can probably cheat this by making a dummy interface, giving it the MAC address I want and then attaching it to the bridge, but this is but a crude workaround. -- Naked
On Mon, 31 Jan 2005 12:29:09 +0200 Nuutti Kotivuori <naked@iki.fi> wrote:> Sorry, if this question has been answered before, but I could not find > out with a brief look. > > How can I set the MAC address for a bridge? The MAC address given for > the bridge device seems to be the one it sends network packets with if > the bridge device has an IP address set. Apparently the bridge starts > with a zero MAC address and when the first interface is attached to > it, it takes its MAC address. When I try to set the MAC address, I > just get operation unsupported as a result. > > I know I can probably cheat this by making a dummy interface, giving > it the MAC address I want and then attaching it to the bridge, but > this is but a crude workaround. > > -- NakedThe question is why do you need to set it at all? If this is some ISP mac filtering issue, then set it on the first device before putting it into the bridge. I would be reluctant to change the bridge driver to accept MAC address changes because of Spanning Tree and other standards related issues. -- Stephen Hemminger <shemminger@osdl.org>
Stephen, Is there a patch I can add to 2.4.20 to have this functionality? (Changing the bridge MAC address)? -----Original Message----- From: Stephen Hemminger [mailto:shemminger@osdl.org] Sent: Friday, March 03, 2006 5:38 PM To: Levi Ariel-BAL023 Cc: bridge@lists.osdl.org Subject: Re: [Bridge] bridge MAC address On Fri, 3 Mar 2006 10:03:04 +0200 "Levi Ariel-BAL023" <ariel.levi@motorola.com> wrote:> > Stephen, > > Thanks for your quick respond. > > What do you mean by "later kernels"? I curently use kernel 2.4.20 > Can I add a ioctl that enables modifying the bridge MAC address? > > Thanks, > Ariel >I think I added it for 2.6.15
Hi, I have notice that the bridge gets the "lowest" MAC address of its interfaces. Function: br_stp_recalculate_bridge_id() Is there a meaning behind this or not? Thanks, Ariel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.linux-foundation.org/pipermail/bridge/attachments/20060302/584f2299/attachment-0002.htm
Stephen, Thanks for your quick respond. What do you mean by "later kernels"? I curently use kernel 2.4.20 Can I add a ioctl that enables modifying the bridge MAC address? Thanks, Ariel -----Original Message----- From: Stephen Hemminger [mailto:shemminger@osdl.org] Sent: Thursday, March 02, 2006 10:31 PM To: Levi Ariel-BAL023 Cc: bridge@lists.osdl.org Subject: Re: [Bridge] bridge MAC address On Thu, 2 Mar 2006 20:20:38 +0200 "Levi Ariel-BAL023" <ariel.levi@motorola.com> wrote:> Hi, > > > > I have notice that the bridge gets the "lowest" MAC address of its > interfaces. > > Function: br_stp_recalculate_bridge_id() > > > > Is there a meaning behind this or not? > > > > Thanks, > > Ariel >It's part of the Spanning Tree Protocol in the 802.1d standard. In later kernels you can reset the address to be the same as any of the interfaces being bridged.