Score:0

Configuring VLANs on Ubuntu 22.04

au flag

I've tried to configure 2 VLANs on one physical interface ens33. And ens34 is used to access the internet But I can't ping VM from other hosts. The VM network adapter is in 192.168.100.0/22 network.

The /etc/netplan/00-installer-config.yaml:

  ethernets:
    ens33:
      dhcp4: true
    ens34:
      dhcp4: true
  version: 2
  vlans:
    ens33.100:
      id: 100
      link: ens33
      addresses:
      - 192.168.100.70/24
    ens33.101:
      id: 101
      link: ens33
      addresses:
      - 192.168.101.70/24

The ip addr:

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: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:86:1c:1d brd ff:ff:ff:ff:ff:ff
    altname enp2s1
    inet6 fe80::20c:29ff:fe86:1c1d/64 scope link
       valid_lft forever preferred_lft forever
3: ens34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:86:1c:27 brd ff:ff:ff:ff:ff:ff
    altname enp2s2
    inet 192.168.0.5/24 metric 100 brd 192.168.0.255 scope global dynamic ens34
       valid_lft 86371sec preferred_lft 86371sec
    inet6 fe80::20c:29ff:fe86:1c27/64 scope link
       valid_lft forever preferred_lft forever
4: ens33.100@ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:0c:29:86:1c:1d brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.70/24 brd 192.168.100.255 scope global ens33.100
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe86:1c1d/64 scope link
       valid_lft forever preferred_lft forever
5: ens33.101@ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:0c:29:86:1c:1d brd ff:ff:ff:ff:ff:ff
    inet 192.168.101.70/24 brd 192.168.101.255 scope global ens33.101
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe86:1c1d/64 scope link
       valid_lft forever preferred_lft forever

The 802.1q is supported:

root@gateway:~# lsmod | grep 8021q
8021q                  36864  0
garp                   20480  1 8021q
mrp                    20480  1 8021q

And traffic between two VMs is untagged, host 192.168.100.70 don't reply on ARP messages. Traffic

Could you help me to find out the problem, please?

I sit in a Tesla and translated this thread with Ai:

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.