linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to set multicast MAC ligitemately?
@ 2003-09-26 18:53 Alexey V. Yurchenko
  2003-09-26 19:03 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey V. Yurchenko @ 2003-09-26 18:53 UTC (permalink / raw)
  To: linux-net, linux-kernel


Hi, everybody

In view of include/linux/etherdevice.h:

...
/**
 * is_valid_ether_addr - Determine if the given Ethernet address is valid
 * @addr: Pointer to a six-byte array containing the Ethernet address
 *
 * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not
 * a multicast address, and is not FF:FF:FF:FF:FF:FF.  The multicast
 * and FF:FF:... tests are combined into the single test "!(addr[0]&1)".
 *
 * Return true if the address is valid.
 */
static inline int is_valid_ether_addr( u8 *addr )
{
        const char zaddr[6] = {0,};
                                                                          
        return !(addr[0]&1) && memcmp( addr, zaddr, 6);
}
...

how it is possible to set up multicast MAC address legitemately if NIC driver resorts to use of this function. Why are multicast addresses forbidden and who is the right person to ask?

(I really do need to set a multicast MAC address, and if multicast MAC addresses exist, why are they forbidden?)

Regards,
Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how to set multicast MAC ligitemately?
  2003-09-26 18:53 how to set multicast MAC ligitemately? Alexey V. Yurchenko
@ 2003-09-26 19:03 ` Stephen Hemminger
  2003-09-27 13:04   ` Alexey V. Yurchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2003-09-26 19:03 UTC (permalink / raw)
  To: Alexey V. Yurchenko; +Cc: linux-net, linux-kernel

On Fri, 26 Sep 2003 21:53:26 +0300
"Alexey V. Yurchenko" <ayurchen@path.emicnetworks.com> wrote:

> 
> Hi, everybody
> 
> In view of include/linux/etherdevice.h:
> 
> ...
> /**
>  * is_valid_ether_addr - Determine if the given Ethernet address is valid
>  * @addr: Pointer to a six-byte array containing the Ethernet address
>  *
>  * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not
>  * a multicast address, and is not FF:FF:FF:FF:FF:FF.  The multicast
>  * and FF:FF:... tests are combined into the single test "!(addr[0]&1)".
>  *
>  * Return true if the address is valid.
>  */
> static inline int is_valid_ether_addr( u8 *addr )
> {
>         const char zaddr[6] = {0,};
>                                                                           
>         return !(addr[0]&1) && memcmp( addr, zaddr, 6);
> }
> ...
> 
> how it is possible to set up multicast MAC address legitemately if NIC driver resorts to use of this function. Why are multicast addresses forbidden and who is the right person to ask?
> 
> (I really do need to set a multicast MAC address, and if multicast MAC addresses exist, why are they forbidden?)
> 
> Regards,
> Alex

Not interface should have a multicast MAC address. A multicast address
should only exist as a destination address, never a source.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how to set multicast MAC ligitemately?
  2003-09-26 19:03 ` Stephen Hemminger
@ 2003-09-27 13:04   ` Alexey V. Yurchenko
  2003-09-27 13:23     ` Jeroen Massar
  2003-09-27 13:40     ` Pekka Savola
  0 siblings, 2 replies; 5+ messages in thread
From: Alexey V. Yurchenko @ 2003-09-27 13:04 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: linux-net, linux-kernel

On Fri, 26 Sep 2003 12:03:45 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:

> 
> Not interface should have a multicast MAC address. A multicast address
> should only exist as a destination address, never a source.

Well, that's in theory. In practice I need several computers connected to a switch to share a single interface and look to the rest of LAN as a single node. All those computers must receive all packets desitned to that interface. Using non-multicast MAC confuses many switches.

Any suggestions? (Except not using a switch ;))

Regards,
Alex

PS isn't this approach (forbidding certain addresses) a tad Microsoftish? Like saving users from themselves? If

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: how to set multicast MAC ligitemately?
  2003-09-27 13:04   ` Alexey V. Yurchenko
@ 2003-09-27 13:23     ` Jeroen Massar
  2003-09-27 13:40     ` Pekka Savola
  1 sibling, 0 replies; 5+ messages in thread
From: Jeroen Massar @ 2003-09-27 13:23 UTC (permalink / raw)
  To: 'Alexey V. Yurchenko', 'Stephen Hemminger'
  Cc: linux-net, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----

Alexey V. Yurchenko wrote:

> On Fri, 26 Sep 2003 12:03:45 -0700
> Stephen Hemminger <shemminger@osdl.org> wrote:
> 
> > 
> > Not interface should have a multicast MAC address. A 
> multicast address
> > should only exist as a destination address, never a source.
> 
> Well, that's in theory. In practice I need several computers 
> connected to a switch to share a single interface and look to 
> the rest of LAN as a single node. All those computers must 
> receive all packets desitned to that interface. Using 
> non-multicast MAC confuses many switches.
> 
> Any suggestions? (Except not using a switch ;))

Enable the ports to be mirror ports and then they will get
all the traffic targetted at the switch.
But you do have to have a real switch to support that feature ;)

Greets,
 Jeroen

-----BEGIN PGP SIGNATURE-----
Version: Unfix PGP for Outlook Alpha 13 Int.
Comment: Jeroen Massar / jeroen@unfix.org / http://unfix.org/~jeroen/

iQA/AwUBP3WPYSmqKFIzPnwjEQI0qQCfVKaVANvW1H3SnLe6zV7PWYil6QUAnA5z
/CGLoEVQG7l3FqaVp6Ulba9l
=0zfR
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how to set multicast MAC ligitemately?
  2003-09-27 13:04   ` Alexey V. Yurchenko
  2003-09-27 13:23     ` Jeroen Massar
@ 2003-09-27 13:40     ` Pekka Savola
  1 sibling, 0 replies; 5+ messages in thread
From: Pekka Savola @ 2003-09-27 13:40 UTC (permalink / raw)
  To: Alexey V. Yurchenko; +Cc: Stephen Hemminger, linux-net, linux-kernel

On Sat, 27 Sep 2003, Alexey V. Yurchenko wrote:
> On Fri, 26 Sep 2003 12:03:45 -0700
> Stephen Hemminger <shemminger@osdl.org> wrote:
> 
> > 
> > Not interface should have a multicast MAC address. A multicast address
> > should only exist as a destination address, never a source.
> 
> Well, that's in theory. In practice I need several computers connected
> to a switch to share a single interface and look to the rest of LAN as a
> single node. All those computers must receive all packets desitned to
> that interface. Using non-multicast MAC confuses many switches.

This likely breaks with IGMP snooping switches, btw.

> Any suggestions? (Except not using a switch ;))
> 
> PS isn't this approach (forbidding certain addresses) a tad
> Microsoftish? Like saving users from themselves?

The rules are there to prevent users from shooting themselves in the foot, 
or the users thinking using multicast MAC address as source is a right way 
to solve a problem.

But Linux is Free Software and Open Source.  You can change these things 
if you really want.

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-09-27 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-26 18:53 how to set multicast MAC ligitemately? Alexey V. Yurchenko
2003-09-26 19:03 ` Stephen Hemminger
2003-09-27 13:04   ` Alexey V. Yurchenko
2003-09-27 13:23     ` Jeroen Massar
2003-09-27 13:40     ` Pekka Savola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).