Sorry for my bad English. I have dedicated server on Ubuntu Server 22.04 and 2 ip's in the same network (for example, 192.168.1.15 and 192.168.1.115). I want to create kvm virtual machine with debian and assign second ip to it.
I created the bridge in /etc/netplan/00-installer-config.yaml
network:
ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.1.15/24]
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses: [192.168.1.1]
bridges:
br0:
dhcp4: false
addresses: [192.168.1.115/24]
interfaces: [enp0s3]
version: 2
When I execute netplan generate and netplan apply - the network stops working.
ifconfig:
br0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.1.115 netmask 255.255.255.0 broadcast 192.168.1.255
ether d2:de:ba:da:58:f4 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.15 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:fe16:be74 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:16:be:74 txqueuelen 1000 (Ethernet)
RX packets 1796 bytes 679790 (679.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1110 bytes 189082 (189.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 113 bytes 9644 (9.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 113 bytes 9644 (9.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ip route show:
default via 192.168.1.1 dev enp0s3 proto static
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.115
192.168.1.0/24 dev enp0s3 proto kernel scope link src 192.168.1.15
I have already tried dozens of options and none of them worked... Network without bridge works fine. I will be grateful for any help...