Route via device

I have problems setting up a spesial routing case:

I have one instance of io-net running.

I have to interfaces (en0 & en1), these two interfaces have the same IP address, and the same MAC address.

Now I want to set up a route to go via interface en1, on linux I would use:

route add dev

This is not supported in QNX, is there anyway to do this via the ROUTE API in QNX?

-Anders

Anders,

From looking at the route command in the helpviewer docs it appears you can do what you want. It would be something like:

route add -interface <en0/en1>

However I am confused when you say both en0 and en1 have the same IP and MAC address. I didn’t think that was legal.

Tim

route add -iface

or

route add -link en0:

Where is an iface’s ip addr.
Note the trailing colon with the -link variant.

-seanb

Hi,

The : # route add -link en0:

What just what I was after, no I only need to find out how to do this
via the ROUTE api :slight_smile:

The reason for having two identical interfaces is for internal routing only, so
only one interface is visible from the outside.

Thanks, Anders

Hi Again,

Just when I though I had something working… :frowning:

I add a route

route add 8.8.8.8 -link en0:

Then I try with a ping:

ping 8.8.8.8

And get the message:

ping: sendto: no route to host :frowning:

I try another one:

route add 8.8.8.9 -link en0: -iface

Try to ping 8.8.8.9

Now I get a bit furter, it seems like it tries to ping, but no packet is
sent - it seems like it never comes out of the IP stack. With my own ethernet driver nothing is received in my driver. With a commersial ethernet card - nothing is sent out on the ethernet interface.

Any ideas?

-Anders