I have two network interface in my linux pc. One is eth0, another is eth1. here is netplan yaml file :
network: version: 2 renderer: NetworkManager ethernets: eth0: addresses: [192.168.20.3/24] gateway4: 192.168.20.1 nameservers: addresses: [192.168.10.1] routes: - to: 184.108.40.206/24 via: 192.168.20.1 eth1: addresses: [192.168.20.3/24,192.168.10.8/24] nameservers: addresses: [192.168.10.1]
eth1 and eth0 have same network segement 192.168.20.x
ther is a sensor which ip is 192.168.20.13, but i can not ping it ok, I can and a route command :
route add -host 192.168.20.13 dev eth1
it can ping successfully.
My question is how can I set the rule in the netplan yaml file?