How to exactly create a virtual network?

Hi :slight_smile:

I’m trying to create a virtual network to my VMs, but I can’t access the internet from VMs. I’ve checked some tutorials and documentation, but I don’t know exactly what I have to do. My host is running on Debian 11.

  • I need to manually create a bridge on node-kvm?
  • I need to set my physical device (enp33s0f0)?

Here is my node-kvm interfaces:

root@d01:~# 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 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp33s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether d0:50:99:ff:ef:b0 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic enp33s0f0
       valid_lft 56691sec preferred_lft 56691sec
    inet6 xxxx::xxxx:xxxx:xxxx:xxxx/64 scope link 
       valid_lft forever preferred_lft forever
3: enp33s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether d0:50:99:ff:ef:b1 brd ff:ff:ff:ff:ff:ff
4: enx0eeea98fe43e: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 0e:ee:a9:8f:e4:3e brd ff:ff:ff:ff:ff:ff

And here is my /etc/network/interfaces.d/50-cloud-init:

auto lo
iface lo inet loopback

auto enp33s0f0
iface enp33s0f0 inet dhcp

enp33s0f0 is the main interface, where I have a public IP.

Thank you for any docs, tips or tutorials.

Well, I am trying to use a 802.1Q network. But I don’t know how I can make it access the host or internet. I don’t know the gateway I have to use too.

onevnet show VLAN1 
VIRTUAL NETWORK 6 INFORMATION                                                   
ID                       : 6                   
NAME                     : VLAN1               
USER                     : oneadmin            
GROUP                    : oneadmin            
LOCK                     : None                
CLUSTERS                 : 0                   
BRIDGE                   : onebr.101           
STATE                    : READY               
VN_MAD                   : 802.1Q              
PHYSICAL DEVICE          : enp33s0f0           
VLAN ID                  : 101                 
AUTOMATIC VLAN ID        : NO                  
AUTOMATIC OUTER VLAN ID  : NO                  
USED LEASES              : 1                   

OWNER                    : um-                 
GROUP                    : ---                 
OTHER                    : ---                 

VIRTUAL NETWORK TEMPLATE                                                        

ADDRESS RANGE POOL                                                              
AR 0                                                                            
SIZE           : 100                 
LEASES         : 1                   

RANGE                                   FIRST                               LAST
MAC                         02:00:0a:00:05:64                  02:00:0a:00:05:c7

AR  OWNER                    MAC         IP PORT_FORWARD   IP6
0   V:12       02:00:0a:00:05:64     -     -


VIRTUAL MACHINES                                                                
UPDATED        : 12                  
OUTDATED       :                     
ERROR          : 

When I use virbr1 (libvirt bridge) I can access the internet from VMs. But I lose this connection after a host reboot - virbr0 loses the IP