Re: Trying to understand multicast packet IP routing - why src IP address affects reception ??//

2009-08-08 Thread Aviv Greenberg
Every incoming packet goes through "input routing". The result of that
routing is either to receive the packet locally, drop, or forward it.

There is a hidden "local" routing table, that is used to do routing
for incoming packets. It is populated automatically (e.g when u add an
new local interface)

You can display this table and it will help you understand the
behaviour of your system:
ip route list table local


On 04/08/2009, Lev Olshvang  wrote:
>
>  Shahar ,
>  Thanks 
>
>  see below :
>  Shachar Shemesh wrote:
>  I'll just point out that my Multicast understanding is a bit tenuous.
>
>  Lev Olshvang wrote:
> Evening all,
>
>
>  But if I change the interface IP address to  other network, these packets
> are ignored at IP layer  (data link layer got it since RX count is running
> according to ifconfig )
>  I have tcp ip forwarding set to 1 and application sets  multicast socket
> option  to join the multicast group.
>
>  Did you change the IP address after the socket is up? Multicast needs to
> perform some handshaking before it can start sending data, and this
> handshake might be done only at the "start".
>
>
> Since this is my network driver , I  reload it and set IP after reload,
> as well I put some printk in it  so I see data link accepts packages in
> either case.  tcpdump also shows these packets.
>
> Also, I would start the debugging by running a sniffer and seeing whether
> the packets actually leave the machine, and if so, with what destination MAC
> address.
>
>I have no problem with MAC ( driver gets the packets), I put also some
> printk in net/ipv4/route.c and I see this packets are discarded at IP layer.
>
> Shachar
>  --
> Shachar Shemesh
> Lingnu Open Source Consulting Ltd.
> http://www.lingnu.com
>
>
>
> ___
>  Linux-il mailing list
>  Linux-il@cs.huji.ac.il
>  http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Trying to understand multicast packet IP routing - why src IP address affects reception ??//

2009-08-04 Thread Lev Olshvang

Shahar ,
Thanks 

see below :
Shachar Shemesh wrote:

I'll just point out that my Multicast understanding is a bit tenuous.

Lev Olshvang wrote:

Evening all,


But if I change the interface IP address to  other network, these 
packets are ignored at IP layer  (data link layer got it since RX 
count is running according to ifconfig )
I have tcp ip forwarding set to 1 and application sets  multicast 
socket option  to join the multicast group.


Did you change the IP address after the socket is up? Multicast needs 
to perform some handshaking before it can start sending data, and this 
handshake might be done only at the "start".




  Since this is my network driver , I  reload it and set IP after 
reload, as well I put some printk in it  so I see data link accepts 
packages in either case.  tcpdump also shows these packets.
Also, I would start the debugging by running a sniffer and seeing 
whether the packets actually leave the machine, and if so, with what 
destination MAC address.


 I have no problem with MAC ( driver gets the packets), I put also some 
printk in net/ipv4/route.c and I see this packets are discarded at IP layer.

Shachar
--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
  



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Trying to understand multicast packet IP routing - why src IP address affects reception ??//

2009-08-04 Thread Shachar Shemesh

I'll just point out that my Multicast understanding is a bit tenuous.

Lev Olshvang wrote:

Evening all,


But if I change the interface IP address to  other network, these 
packets are ignored at IP layer  (data link layer got it since RX 
count is running according to ifconfig )
I have tcp ip forwarding set to 1 and application sets  multicast 
socket option  to join the multicast group.


Did you change the IP address after the socket is up? Multicast needs to 
perform some handshaking before it can start sending data, and this 
handshake might be done only at the "start".


Also, I would start the debugging by running a sniffer and seeing 
whether the packets actually leave the machine, and if so, with what 
destination MAC address.


Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Trying to understand multicast packet IP routing - why src IP address affects reception ??//

2009-08-04 Thread Lev Olshvang

Evening all,

I made some investigation in my Ubuntu Linux , kernel 2.6.30


Here the  case :
I have computer with 2 interfaces. It runs Ubuntu, kernel 2.6.30 and 
application that opens multicast socket and bind it to one of the

interfaces, 192.168.123.1
There are only multicast packets in this net.


Multicast Packets   with dest address 224.45.45.45 and source address 
192.168.123.23  are received by

interface defined in the same network 192.168.123.0 with no problems
and even delivered to application.

But if I change the interface IP address to  other network, these 
packets are ignored at IP layer  (data link layer got it since RX count 
is running according to ifconfig )
I have tcp ip forwarding set to 1 and application sets  multicast socket 
option  to join the multicast group.


I had an understanding that for multicast only  destination MAC address 
really rules  ( interface filters are set to accept specific multicast 
address as a result of muticats join by setsockopt()  )


So the question is -  why   IP SRC address is taken into consideration 
by IP layer and how to disable this feature ??



Thank you very much ..
Lev




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il