0

I am currently facing a challenge in QNX, where I have 2 Network Interfaces - viz. one Network port from PCIe Ethernet Expansion card (wm0) and other from the normal Ethernet port (en0). I have assigned static IP to both the interfaces, with different subnet. In order to check the throughput speed and performance between the two interfaces, I have connected via loopback connection, which is the current requirement. I basically want to check for 'ping' between the interfaces.

But when I ping one IP it gets the ICMP response (which is normal scenario), even when the two Network Interfaces are physically disconnected. Thus, my idea of checking the Network connection between the two interface will fail by this, as it gives the ping response even it is disconnected.

In QNX, feature of ping from a specific Network Interface is not there, i.e. "ping -I {Interface} IP" is unavailable and I tried using Packet Filtering, but wasnt able to configure as it is Embedded board with lot of limited utilities.

My requirement is :

If en0 is disabled for receiving, wm0 is disabled for sending, and now I will ping to the IP assigned to wm0, it should work. And the vice versa case to confirm.

Any alternative method, or idea to accomplish the above requirement would be of great help?

1

you are getting responce from disconnected iface because internal routing resolves destination and don't even try to send packets, it simply just deliver it internally.

let's imagine your configuration is:
en0 192.168.0.10/24
wn0 10.0.0.10/24

you should specify some additional routing:
from 192.168.0.10/24 via en0
from 10.0.0.10/24 via wn0

such rules explitely specify sending packets to iface instead of internal routing to destination
BTW, I'm not sure, but probabaly you will also need to disable forwarding on the box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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