I want to set up a bridge so that guest VMs on my headless server use the LAN DHCP and not dnsmasq. I followed these instructions: https://jamielinux.com/docs/libvirt-networking-handbook/bridged-network.html#bridge-debian. Looking at the ifconfig
results, it seems to give me exactly what I was looking for:
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.210 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::4216:7eff:fe63:7516 prefixlen 64 scopeid 0x20<link>
ether 40:16:7e:63:75:16 txqueuelen 1000 (Ethernet)
RX packets 8255 bytes 653898 (653.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 633 bytes 60185 (60.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.195 netmask 255.255.255.0 broadcast 192.168.1.255
ether 40:16:7e:63:75:16 txqueuelen 1000 (Ethernet)
RX packets 42190 bytes 48646124 (48.6 MB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 9808 bytes 889965 (889.9 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 2215 bytes 510180 (510.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2215 bytes 510180 (510.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:7a:ca:5e 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
However, if I try to SSH into my server (192.168.1.195) from another machine (192.168.1.196), I can't connect. Pings from the server can't seem to reach other devices on my LAN, but pings from the server to 8.8.8.8 seem to work OK. My /etc/network/interfaces
file looks like the below (the MAC is my server's NIC):
iface enp3s0 inet manual
auto br0
iface br0 inet static
# Use the MAC address identified above.
hwaddress ether 40:16:7e:63:75:16
address 192.168.1.210
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports enp3s0
# If you want to turn on Spanning Tree Protocol, ask your hosting
# provider first as it may conflict with their network.
bridge_stp on
# If STP is off, set to 0. If STP is on, set to 2 (or greater).
bridge_fd 0
I've spent the last two days googling, and re-imaged my server a couple of times as well when things got too broken, and I think I'm just losing the plot... My server is Ubuntu 18.04.2, completely stock other than the libvirt and ssh packages installed. How can I get the server to be reachable by my other network machines?