This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Ethernet and PPP interface use

Hi,

I am developing an application require the use of the Ethernet and PPP interfaces. The latter for a GPRS modem.

Keil's PPP seems to have several limitations, the main ones being limited runtime configuration and the control of whether Ethernet or PPP is used for routing of IP data.

My application requires Ethernet for some services and PPP for others but this seems impossible because Middleware 7.2.0 has a PPP_DEFAULT_GW config value which can only be changed at compile-time and even if it could be changed at runtime, it it global, not per IP service.

My understanding is that when it is ON the library will send packets via PPP, if the destination address is within the subnet of the PPP interface. It is the same for any other interface. If the destination address does not fit in any subnet, it will be send to the default gateway.

So for example, if my Ethernet and PPP(GPRS) interface are using DHCP and ...

Ethernet IP Address: 192.168.1.226
Ethernet Subnet: 255.255.255.0

PPP IP Address: 31.111.217.203
PPP Subnet: 255.255.255.255 (this doesn't seem to be configurable in "Net_Config_PPP.h" but is shown in localm[NETIF_PPP].NetMask)

PPP_DEFAULT_GW is ON:
Destination 192.168.1.218 uses Ethernet as within Ethernet subnet
Destination 212.227.17.174 is outside of both subnets so PPP is used as PPP_DEFAULT_GW is ON

PPP_DEFAULT_GW is OFF:
Destination 192.168.1.218 uses Ethernet as within Ethernet subnet
Destination 212.227.17.174 is outside of both subnets so Ethernet is used as PPP_DEFAULT_GW is OFF

The problem with all of this is that one of my IP services is a DDNS client and is using the PPP interface but I want it to use the Ethernet interface as this is the IP address I want to give to the DDNS provider (for remote Web Server connections etc). I can't do this without changing the PPP config, which then affects my other IP services.

Has anyone else had any experience of this? Is my understanding correct? Are there any workarounds/tricks to solve this issue?

Thanks.