Ubuntu: Can't load websites when bridging enp0s3 with static IP



Question:

So I was trying to bridge the enp0s3 in a VM in ubuntu 16.04 LTS (64 Bit). The VM gets its internet connection through "bridged adapter", no NAT. If I go with the DHCP configuration everything works fine. In this case my /etc/network/interfaces looks like this:

auto lo br0  iface lo inet loopback    iface enp0s3 inet manual    iface br0 inet dhcp    bridge_ports enp0s3  

The DHCP assigns 192.168.1.130 to my VM. Everything working.
But if I try to use static values for my bridge br0 instead of DHCP like this:

auto lo br0  iface lo inet loopback    iface enp0s3 inet manual    iface br0 inet static   address      192.168.1.130   netmask      255.255.255.0   network      192.168.1.0   gateway      192.168.1.1   broadcast    192.168.1.255    bridge_ports enp0s3  

something with my DNS or whatever breaks. I can still ping 8.8.8.8 but I can't load any website anymore. I already checked if enp0s3 was correctly added to br0 with brctl show which outputs

bridge name    bridge id    STP enabled    interfaces  br0            8000.090Xe1  no             enp0s3  

It seems to be some kind of weird stupid problem and is probably easy to solve. Yet I can't see why its not working properly


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »