Wondering if I might be able to get some help using netplan. I have it setup as I think it should work, using an Odroid C2 running Ubuntu 22.04.1 LTS (GNU/Linux 3.16.85-65 aarch64):
internet router <<>> odroid c2's wifi <<>> odroid c2's ethernet <<>> client using fixed ip address
Note: I have enabled ipv4 and ipv6 forwarding in /etc/sysctl.conf
The ip address from the router to the odroid is dynamically set, in the 192.168.0.0 network (currently 192.168.0.154)
The IP address of the client is fixed, in the 10.0.5.0 network (10.0.5.100).
Clients connected to the wifi network can all connect to the odroid via SSH, the client on ethernet can ssh to the odroid too, but there's no internet connection to it.
Below is the netplan setup I am using, referencing the 'Configuring source routing' section here:
https://netplan.io/examples/
root@odroid:~# nano /etc/netplan/99_config.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: false
dhcp6: false
addresses:
- 10.0.5.1/24
routes:
- to: default
via: 10.0.5.1
- to: 10.0.5.0/24
via: 10.0.5.1
table: 101
routing-policy:
- from: 10.0.5.0/24
table: 101
wifis:
wlan0:
dhcp4: true
access-points:
"network.name":
password: "network.password"
routes:
- to: 192.168.0.0/24
via: 192.168.0.1
table: 102
routing-policy:
- from: 192.168.0.0/24
table: 102
This gives the following routing on the 10.0.5.100 client:
root@odroid:~# ip route | column -t
10.0.5.0/24 dev eth0 proto kernel scope link src 10.0.5.1
And on a client on the 192.168.0.0 subnet:
root@odroid:~# ip route | column -t
default via 10.0.5.1 dev eth0 proto static
default via 192.168.0.1 dev wlan0 proto dhcp src 192.168.0.154 metric 600
10.0.5.0/24 dev eth0 proto kernel scope link src 10.0.5.1
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.154
192.168.0.1 dev wlan0 proto dhcp scope link src 192.168.0.154 metric 600
Any help would be much appreciated!