How to assign router/gateway to non-default interface?

I am currently have two interfaces (WiFi + Ethernet), however only one is ever brought up at any given time.

Both interfaces default to DHCP 0, with an ip address of 0.0.0.0

The Ethernet interface is being set as the default, so whenever ANY interface is brought up using DHCP, a router/gateway is ALWAYS assigned to the Ethernet interface… even if it hasn’t been brought up yet, or if it has no ip address set…

I can’t seem to figure out how to override this behavior, it’s just assigning the router to the default interface always.

Here’s the router table debugging printouts…
When ETH0 is brought up using DHCP (router is found):

IP addr. Mask Up Lnk Type MTU Flags Peer/router

0 192.168.10.18 255.255.255.0 yes yes eth 1500 *DD 192.168.10.1
2 0.0.0.0 0.0.0.0 no no wifi 1500

Router table:

Flags Address i/f Net/preference Mask/exp(sec)

0 D H 192.168.10.1 0 0 0

And when WIFI0 is brought up using DHCP (no router assigned):

IP addr. Mask Up Lnk Type MTU Flags Peer/router

0 0.0.0.0 0.0.0.0 no yes eth 1500 *
2 192.168.10.100 255.255.255.0 yes yes wifi 1500

Router table:

Flags Address i/f Net/preference Mask/exp(sec)

0 P 192.168.10.1 0 0.0.0.0 0.0.0.0

What’s the process to get the router recognized by the WiFi interface at runtime? I am unable to perform any pinging when the WiFi interface is brought up… it does however resolve non-local remote addresses without a problem.

according to the documentation… IFS_ROUTER_SET doesn’t care about the interface “because it’s not specific to an interface”… but it sure does seem like it is given my current situation

Thanks

1 Like

Should be resolved by this commit, which will ship with Dynamic C 10.72D:

https://github.com/digidotcom/DCRabbit_10/commit/89cf78849625243511e77fd42c16edf56ec2e7f9