LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2012, 09:57 AM   #1
kc28
LQ Newbie
 
Registered: Aug 2012
Posts: 3

Rep: Reputation: Disabled
Multicast Packets Being Dropped/Blocked


Hello,

This question stems from a programming task that I am trying to achieve but when I run the program (written in Java) on a Linux machine it does not always work whereas if I run the same Java application on a Windows XP machine I do not have any problems. First I'll explain what I am trying to achieve with my Java application.

I've written an application to detect Digi ConnectPort serial to Ethernet converters connected to a host machine. The application does this by sending out Multicast UDP packets to IP address 224.0.5.128 port 2362. In my host machine I have a network adapter dedicated for this purpose and I have set it to a static IP address of 172.27.12.2. Using 'tcpdump' I am able to see the Multicast packets go out of the host machine and I can see the response from any Digi ConnectPort device so there is no question that my application is not sending packets nor that any connected Digi is not responding.

Now if the Digi device happens to already have an IP address which is of the same IP range of my network adapter e.g. the Digi has an IP of 172.27.12.155 then the response packet (from the Digi) makes its way all the way up through the network stack and to my Java application. However if the Digi has an IP of say 169.24.3.153 then although 'tcpdump' shows the response packet coming into the network adapter, the packet itself does NOT make it's way up the network stack and to my Java application. Again this ONLY happens on a Linux machine and not windows XP.

My first thoughts were to check 'iptables' but there are no rules set and the policy ACCEPT is set for all the chains (INPUT, OUTPUT and FORWARD).

I am at a loss as how to proceed now. For some reason the Linux kernel is not passing these particular packets up the network stack and I am unable to find out why and therefore how to stop it. I need to be able to receive the Multicast response regardless of the IP address of the sender (the Digi).

I have tried this on 3 Linux machines and all do exactly the same. They are an Ubuntu 10.04 machine (although this has further issues with Java security permissions I will not go into here), a WattOS 5 machine (which is based on Ubuntu 11.XX I believe) and an Ubuntu 9 machine.

Could anyone help?
 
Old 08-12-2012, 11:20 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
What happens if you assign an additional IP address in the 169.254.0.0/16 range to the NIC?
 
Old 08-12-2012, 11:50 AM   #3
kc28
LQ Newbie
 
Registered: Aug 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
What happens if you assign an additional IP address in the 169.254.0.0/16 range to the NIC?
If I do that then it works. Provided my adapter and the Digi are in the same network range the application gets the packet from the network stack. It's only when they are not in the same range the packet doesn't get all the way up through the network stack.

The application needs to work with Digis which might have an IP set within the full range of IP addresses available and it will only do this on a Windows machine.
 
Old 08-12-2012, 01:12 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
This could be caused by reverse path filtering. Check /proc/sys/net/ipv4/conf/<interface>/rp_filter; it needs to be 0.
 
Old 08-12-2012, 04:20 PM   #5
kc28
LQ Newbie
 
Registered: Aug 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
This could be caused by reverse path filtering. Check /proc/sys/net/ipv4/conf/<interface>/rp_filter; it needs to be 0.
Yes that was exactly the problem. I set it to zero using the instructions I found here.

Thanks for your help Ser Olmy!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dropped or blocked packets iamalinuxnoob Linux - Networking 0 07-07-2012 09:37 AM
Not seeing multicast packets former33t Linux - Networking 2 04-08-2008 03:59 PM
Dropped packets Doolspin Linux - Software 1 10-22-2006 01:22 PM
too much dropped packets...Hi.. alaios Linux - Networking 2 02-10-2005 04:49 AM
dropped packets... sohmc Linux - Software 3 05-29-2003 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration