Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

can any one pls help me in the following question.

Background : Two PC's(PC1 n PC2) with two VLAN interfaces in each (eth0.2 and eth0.3) respectively.The PC's are connected by WRT54GL router in between.

My aim is to send multicast(by MAC not IP) data from eth0.2(PC1)-->eth0.2(PC2) similarly for eth0.3 interface too.

Now the problem is when I multicast the data eth0.2 receives, but eth0.3 also receives it. I need data to be received on eth0.2 only.

Is it possible to receive data on a particular VLAN interface ? if so please direct me.

Thank you.

share|improve this question

I think if you want to send MAC multicast packets, you may want to configure each interface with a specific MAC multicast address.

The command you'd use to do this is ip maddress add <MAC> <DEV> MAC and DEV are the mac address and device you want to add them to.

share|improve this answer
Thank you for your help. I am not clear on how to use ip maddress, can you pls share me a link which explains about this command usage. – arr May 20 '13 at 4:03

I will share my understanding for the above problem.

when I run TCPDUMP for both interfaces i.e eth0.2 and eth0.3, only the intended receiver(ie. eth0.2 in the above case) received the packets. There was no packets on eth0.3 interface.

I was using PF_PACKET socket in client to receive the multicast data. As my aim was to receive from a particular interface, I used setsockopt(Sock,SO_BINDTODEVICE,...), to bind to a interface. But after referring to man page of socket, I understood SO_BINDTODEVICE will not be supported for packet sockets. so I used simple bind(), to bind to particular interface. It worked as expected.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.