Score:0

Ubuntu 20.04 setting up 2 network interface on 2 differents subnet (1 WAN and 1 LAN)

th flag

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 

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.