Setup: raspberry pi 4b as a client on eth0 interface: 220.127.116.11 , this lan has other clients but no gateway to the internet, no router to the internet in this address range. The lan is used to ssh back and forth between other lan clients and the pi. : also as a client on the wireless lan on wlan0 interface: this time as a dhcp client, the address is attributed by the wireless router which has a route to the wlan(internet). In occurrence, the pi is attributed as an address 10.42.0.215 by the router(10.42.0.1) which has a route to the internet.
Both (eth0 interface) and (wlan0 interface) work flawlessly when only one of both is up. (sudo ifconfig eth0 down/up and ditto for the lan). The wlan0 interface being up, and eth0 being down, allows for access to all lan clients in address range(10.42.0.0) AND access to the wlan(internet), addresses are resolved.
When eth0 and wlan0 are up both, addresses on both lan networks, the wlan0 served address range and the eth0 address range can then be accessed from and to the pi. (using ping, ssh, whatever). What is no longer possible is having the requests to wlan hosts (internet hosts as "https://wheather.com").
The configuration was not edited in between. What the wlan0 interface was capable of when eth0 interface being down, is no longer possible. exterior addresses(wlan alas internet) can no longer be resolved, and no longer be accessed using their ip.
The configuration as used and only, single file altered is the /etc/network/interfaces file. Here is the configuration as we used, again no other configuration files have been manipulated.
Intent: both eth0 and wlan0 interfaces up with the distinction that also exterior to the lan wlan clients(the internet) can be accessed from the pi.
Configuration of /etc/network/interfaces
auto eth0 allow -hotplug eth0 iface eth0 inet static address 18.104.22.168 netmask 255.255.255.0 broadcast 22.214.171.124 gateway 126.96.36.199
auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf address 10.42.0.215 netmask 255.255.255.0 broadcast 10.42.0.255 gateway 10.42.0.255