I got a vm (on proxmox) to which I passthrough 2 physical NIC.
- ens16f0: LAN connected (which is behind a routeur connected to a different WAN)
- ens16f1: WAN directly connected
Both work as they should if configured individually, but when I try to set up netplan to make both work as I want, I only got the ens16f1 working,inbound and outbound. If I ping WAN ips or WAN domain name, everything worked.
But nothing works from or to the ens16f0.
Here is the neplan yaml file (obviously, ips were changed)
network:
version: 2
renderer: networkd
ethernets:
ens16f0:
addresses: [192.168.1.36/24]
nameservers:
addresses: [192.168.1.18]
routes:
- to: 192.168.1.0/24
via: 192.168.1.1
table: 101
routing-policy:
- from: 192.168.1.0/24
table: 101
priority: 300
ens16f1:
addresses: [140.140.140.180/29]
nameservers:
addresses: [1.1.1.1,1.0.0.1]
routes:
- to: 0.0.0.0/0
via: 140.140.140.177
table: 102
routing-policy:
- from: 0.0.0.0/0
table: 102
priority: 350
Here is the output of ip a
:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens16f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether b5:2a:72:da:d2:5d brd ff:ff:ff:ff:ff:ff
altname enp0s16f0
inet 192.168.1.36/24 brd 192.168.1.255 scope global ens16f0
valid_lft forever preferred_lft forever
inet6 fe80::be2a:72ff:fcdc:d25d/64 scope link
valid_lft forever preferred_lft forever
3: ens16f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether b8:2f:b1:df:d2:2a brd ff:ff:ff:ff:ff:ff
altname enp0s16f1
inet 140.140.140.180/29 brd 140.140.140.183 scope global ens16f1
valid_lft forever preferred_lft forever
inet6 fe80::be2a:72ff:fcdc:d25e/64 scope link
valid_lft forever preferred_lft forever
Here is the output of ip route
:
140.140.140.176/29 dev ens16f1 proto kernel scope link src 140.140.140.180
192.168.1.0/24 dev ens16f0 proto kernel scope link src 192.168.1.36