Re: Multiple unicast MACs on the same interface

2007-12-23 Thread Norman Baz
 I don't know of NICs that would support this.

 Many NICs support multiple unicast MAC addresses, we even
have driver APIs for this in the Linux kernel.



Hi David,
Can you please explain about which API you mean?

Regards,

-- 
Norman Baz





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-
To unsubscribe from this list: send the line unsubscribe linux-net in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Multiple unicast MACs on the same interface

2007-12-21 Thread Norman Baz
I've tried also with intel NIC (e100 driver) result is the same.
Unicast MAC address was added to multicast cache, 
but I cannot ping system from remote machine with static MAC entry.
On tcpdump output I can see arriving frames with correct address
(the unicast one I addes to multicast filter), 
but for some reason system is not responding.

Can you provide Jeff or anybody else a name of NIC that is capable
to support multiple unicast MAC addresses?

One more question is it possible to deactivate MAC filter
on NIC so that I will receive everything (no matter if this will be efficient 
or not)
and pass it to L3 routines? I tried to set NIC into promisc mode:
ip l set dev eth0 promisc on
but it looks like even with having promisc mode enabled system is not 
responding.


Thanks,

-- 
Norman Baz







  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.
  http://tools.search.yahoo.com/newsearch/category.php?category=shopping





  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
To unsubscribe from this list: send the line unsubscribe linux-net in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Multiple unicast MACs on the same interface

2007-12-21 Thread Jeff Haran
 -Original Message-
 From: David Miller [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 21, 2007 3:21 PM
 To: Jeff Haran
 Cc: [EMAIL PROTECTED]; linux-net@vger.kernel.org
 Subject: Re: Multiple unicast MACs on the same interface
 
 From: Jeff Haran [EMAIL PROTECTED]
 Date: Fri, 21 Dec 2007 15:16:08 -0800
 
  I don't know of NICs that would support this.
 
 Many NICs support multiple unicast MAC addresses, we even
 have driver APIs for this in the Linux kernel.

There are far, far more things in this world that I don't know about
than there are things that I  do know about. Perhaps you could briefly
describe the NICs and the driver APIs for the benefit of Norman, other
readers of this list and posterity.

Thanks,

Jeff Haran
Brocade
-
To unsubscribe from this list: send the line unsubscribe linux-net in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Multiple unicast MACs on the same interface

2007-12-21 Thread Jeff Haran

 -Original Message-
 From: Norman Baz [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 21, 2007 2:56 PM
 To: Jeff Haran; linux-net@vger.kernel.org
 Subject: Re: Multiple unicast MACs on the same interface
 
 I've tried also with intel NIC (e100 driver) result is the same.
 Unicast MAC address was added to multicast cache, 
 but I cannot ping system from remote machine with static MAC entry.
 On tcpdump output I can see arriving frames with correct address
 (the unicast one I addes to multicast filter), 
 but for some reason system is not responding.
 
 Can you provide Jeff or anybody else a name of NIC that is capable
 to support multiple unicast MAC addresses?
 
 One more question is it possible to deactivate MAC filter
 on NIC so that I will receive everything (no matter if this 
 will be efficient or not)
 and pass it to L3 routines? I tried to set NIC into promisc mode:
 ip l set dev eth0 promisc on
 but it looks like even with having promisc mode enabled 
 system is not responding.
 
 
 Thanks,
 
 -- 
 Norman Baz

I don't know of NICs that would support this.

When you run tcpdump, are you doing so such that it puts the interface
in promiscuous mode? Without the -p option, tcpdump will put the
interface in promiscuous mode (at least according to the man pages on my
machine).

If not in promiscuous mode, then I would suspect that your hardware
supports this and thus the problem is in the IP stack above it.

If tcpdump is putting the NIC into promiscuous mode, then the
observation that it receives packets to other MAC addresses proves
nothing about the capabilities of your NIC other than it supports
promiscuous mode, which in my experience just about all of them do.

Jeff Haran
Brocade
-
To unsubscribe from this list: send the line unsubscribe linux-net in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Multiple unicast MACs on the same interface

2007-12-21 Thread David Miller
From: Jeff Haran [EMAIL PROTECTED]
Date: Fri, 21 Dec 2007 15:16:08 -0800

 I don't know of NICs that would support this.

Many NICs support multiple unicast MAC addresses, we even
have driver APIs for this in the Linux kernel.
-
To unsubscribe from this list: send the line unsubscribe linux-net in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Multiple unicast MACs on the same interface

2007-12-21 Thread Bernd Eckenfels
In article [EMAIL PROTECTED] you wrote:
 On tcpdump output I can see arriving frames with correct address
 (the unicast one I addes to multicast filter), 

If you see them in tcpdump without promic mode, then the card was receiving
them correctly and passing them to the network stack. 

 but for some reason system is not responding.

I guess the network
stack is recognizing them as packets for otherhost.

 Can you provide Jeff or anybody else a name of NIC that is capable
 to support multiple unicast MAC addresses?

I dont think its a NIC problem if you see the packets in tcpdump-

 ip l set dev eth0 promisc on
 but it looks like even with having promisc mode enabled system is not 
 responding.

The promis is receiving the packets, but it is not processing the packets
which are not targeted at the own system with the normal IP stack. I am not
sure where you can add the additional MACs to make them beeing recognized.

Gruss
Bernd
-
To unsubscribe from this list: send the line unsubscribe linux-net in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Multiple unicast MACs on the same interface

2007-12-20 Thread Jeff Haran
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Norman Baz
 Sent: Thursday, December 20, 2007 4:42 AM
 To: linux-net@vger.kernel.org
 Subject: Multiple unicast MACs on the same interface
 
 Hello, 
 I'm working on a little security project in which multiple 
 unicast MACs are required 
 on single ethernet interface. It looks like linux do not 
 provide such mechanism for 
 handling more than one unicast mac address (at least I'm not 
 aware of it). 
 Question is it still possible to use SIOCADDMULTI as a workaround? 
  
 I'm not sure why (maybe this is not longer supported) I 
 couldn't made linux 
 to receive ethernet frames sent to unicast MAC address added 
 to multicast filter, 
 ioctl returned without error, system was configured (i.e. 
 output from ip m 
 confirmed that MAC was added as a static), but for some 
 reasons I couldn't 
 ping this host from remote machine with static arp entry. 
 The same experiment but with mcast MAC succeed. 
  
 I wonder if anybody could explain if this workaround is still valid. 
  
 Regards, 
 
 
 -- 
 Norman Baz
 

Are you sure your hardware will support this?

Most of the MACs I've worked with will receive frames destined to a
single station address and can be configured to hash the addresses of
frames received with MAC multicast addresses and do a lookup of the hash
in a bit table to determine whether to DMA the received frame in or not,
but the multicast MAC address space is distinct from the singlecast MAC
address space (least significant bit of first byte, IIRC).

Jeff Haran
Brocade
-
To unsubscribe from this list: send the line unsubscribe linux-net in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Multiple unicast MACs on the same interface

2007-12-20 Thread Norman Baz

 Are you sure your hardware will support this?
 
 Most of the MACs I've worked with will receive frames destined to a
 single station address and can be configured to hash the addresses of
 frames received with MAC multicast addresses and do a lookup of the
 hash
 in a bit table to determine whether to DMA the received frame in or
 not,
 but the multicast MAC address space is distinct from the singlecast MAC
 address space (least significant bit of first byte, IIRC).
 
 Jeff Haran
 Brocade

Hi Jeff,

Thanks for your replay. I didn't realize that the issue is so complex.
So you basically trying to say that SIOCADDMULTI workaround/hack
still works (my kernel version is 2.6.22.3) but it's just a matter which card I 
have.

In my case during development I was using so far cheap RTL8168b/8111b but
will if it's required I will try to get better card then and run 
SIOCADDMULTI/UnicastMac 
tests again. Since application is meat to work on server platform is it somehow 
possible
to detect if NIC will works with multiple unicast MACs, so that during 
complication
I could for example print a warning your NIC is not support?

Not sure why, but I was under false impression that if 802.1Q works on NIC 
and it's possible to assign a different MAC per vlan - it will be also doable 
to assign
multiple unicast Mac - looks I was wrong;-)

Many Thanks,


-- 
Norman Baz






  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
To unsubscribe from this list: send the line unsubscribe linux-net in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html