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?