host to route

I have two ethernet adapters on two different subnets in the system,
does the QNX has the capabilities to store an ethernet gateway for each
adapter. Currently there is only one default gateway and does not seem
to be a way to associate a gateway with an adapater.

Alternatively, is there a way to set up the route table, so the Gateway
is really the IP address of the adapter and have QNX route to the
appropriate gateway. (Like host to route in Linux)

Thanks for any advise.

-Beth

Beth <id@address.com> wrote:

I have two ethernet adapters on two different subnets in the system,
does the QNX has the capabilities to store an ethernet gateway for each
adapter. Currently there is only one default gateway and does not seem
to be a way to associate a gateway with an adapater.

Alternatively, is there a way to set up the route table, so the Gateway
is really the IP address of the adapter and have QNX route to the
appropriate gateway. (Like host to route in Linux)

Thanks for any advise.

-Beth

I don’t think you can have more than one “default” gateway.
Each ethernet addapter can/(should) be on a different network.
Let’s assume you have 192.168.1.1 on 192.168.1 and 192.168.2.1
on 192.168.2. Let’s assume that there are two gateways on these
nets at 192.168.1.100 & 192.168.2.100.

You can do:
route add default 192.168.1.100
route add 192.168.3.0 192.168.2.100
route add 192.168.4.0 192.168.2.100
route add 192.168.7.47 192.168.2.100

This basically says:
Anything destined for net 192.168.1 goes out 192.168.1.1,
the ethernet addapter on that net.
Anything destined for net 192.168.2 goes out 192.168.2.1,
the ethernet addapter on that net.
Anything destined for net 192.168.3 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.
Anything destined for net 192.168.4 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.
Anything destined for host 192.168.7.47 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.

You can add as many of the additional routes as you want.

Bill, thanks for your response. I am not sure I understand clearly since there
is
no adapter name listed in your table.

If I have:
en0, IP address is 192.168.1.1 gateway 192.168.1.100
en1, IP address is 192.168.2.1 gateway 192.168.2.100

Since I can only have one default gateway, 192.168.1.100.

I can understand routing the traffic to en0 through default route.

What do I need to do to route the traffic to en1?
First how do I assigned the gateway address for en1?
If I can assigned the gateway address for en1, how do
I retrieve that address so that I can do what you have suggested

route add 192.168.3.0 192.168.2.100

Thanks,
-Beth Chen


Bill Caroselli wrote:

Beth <> id@address.com> > wrote:
I have two ethernet adapters on two different subnets in the system,
does the QNX has the capabilities to store an ethernet gateway for each
adapter. Currently there is only one default gateway and does not seem
to be a way to associate a gateway with an adapater.

Alternatively, is there a way to set up the route table, so the Gateway
is really the IP address of the adapter and have QNX route to the
appropriate gateway. (Like host to route in Linux)

Thanks for any advise.

-Beth

I don’t think you can have more than one “default” gateway.
Each ethernet addapter can/(should) be on a different network.
Let’s assume you have 192.168.1.1 on 192.168.1 and 192.168.2.1
on 192.168.2. Let’s assume that there are two gateways on these
nets at 192.168.1.100 & 192.168.2.100.

You can do:
route add default 192.168.1.100
route add 192.168.3.0 192.168.2.100
route add 192.168.4.0 192.168.2.100
route add 192.168.7.47 192.168.2.100

This basically says:
Anything destined for net 192.168.1 goes out 192.168.1.1,
the ethernet addapter on that net.
Anything destined for net 192.168.2 goes out 192.168.2.1,
the ethernet addapter on that net.
Anything destined for net 192.168.3 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.
Anything destined for net 192.168.4 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.
Anything destined for host 192.168.7.47 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.

You can add as many of the additional routes as you want.

There is only one default route. To add a route more
specifically to 192.168.2.100:

route add -net 10.0.0.0 -netmask 255.0.0.0 192.168.2.100

-seanb

Beth <id@address.com> wrote:

Bill, thanks for your response. I am not sure I understand clearly since there
is
no adapter name listed in your table.

If I have:
en0, IP address is 192.168.1.1 gateway 192.168.1.100
en1, IP address is 192.168.2.1 gateway 192.168.2.100

Since I can only have one default gateway, 192.168.1.100.

I can understand routing the traffic to en0 through default route.

What do I need to do to route the traffic to en1?
First how do I assigned the gateway address for en1?
If I can assigned the gateway address for en1, how do
I retrieve that address so that I can do what you have suggested

route add 192.168.3.0 192.168.2.100

Thanks,
-Beth Chen



Bill Caroselli wrote:

Beth <> id@address.com> > wrote:
I have two ethernet adapters on two different subnets in the system,
does the QNX has the capabilities to store an ethernet gateway for each
adapter. Currently there is only one default gateway and does not seem
to be a way to associate a gateway with an adapater.

Alternatively, is there a way to set up the route table, so the Gateway
is really the IP address of the adapter and have QNX route to the
appropriate gateway. (Like host to route in Linux)

Thanks for any advise.

-Beth

I don’t think you can have more than one “default” gateway.
Each ethernet addapter can/(should) be on a different network.
Let’s assume you have 192.168.1.1 on 192.168.1 and 192.168.2.1
on 192.168.2. Let’s assume that there are two gateways on these
nets at 192.168.1.100 & 192.168.2.100.

You can do:
route add default 192.168.1.100
route add 192.168.3.0 192.168.2.100
route add 192.168.4.0 192.168.2.100
route add 192.168.7.47 192.168.2.100

This basically says:
Anything destined for net 192.168.1 goes out 192.168.1.1,
the ethernet addapter on that net.
Anything destined for net 192.168.2 goes out 192.168.2.1,
the ethernet addapter on that net.
Anything destined for net 192.168.3 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.
Anything destined for net 192.168.4 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.
Anything destined for host 192.168.7.47 is routed to gateway 192.168.2.100
and goes out 192.168.2.1, the ethernet addapter on net 192.168.2.

You can add as many of the additional routes as you want.