[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] IP forwarding to/from PPP working for one netif, but no
From: |
address@hidden |
Subject: |
Re: [lwip-users] IP forwarding to/from PPP working for one netif, but not another |
Date: |
Tue, 11 Feb 2020 11:47:04 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 |
Am 11.02.2020 um 10:20 schrieb Andrew Pullin:
> [..]
>
> The part that I am stuck on presently is that Host2 has no knowledge of
> how to route packets from PPP out to the WAN, say, 8.8.8.8.
> Between ip4_forward, IP_FORWARD, ip4_route_src, LWIP_HOOK_IP4_ROUTE,
> LWIP_HOOK_IP4_ROUTE_SRC, and the ESP32 port modifications, I am not
> quite sure where to make the right intervention. It is ... a lot to take in.
>
> As far as I understand the standard usage of the stack for a single
> netif, outgoing packets elide the entire forwarding/routing system
> because they are specified to be transmitted on a particular netif? Is
> that right?
>
> Fundamentally, I only have eth0 and pp1 (to use the lwip netif naming
> system) and anything not specifically with IP dest = eth0 or pp1 should
> be sent on towards Host2's gateway (after NAT source address IP rewriting).
> Is that logically complete, and if so, where should it be implemented?
I would think you'd just set the ppp netif as default netif (so it is
just used for all outgoing trafic where no better route is found) and
keep eth0 without a gateway (which should ensure only matching subnet
packets are transmitted on this netif).
Regards,
Simon
signature.asc
Description: OpenPGP digital signature