user589831
user589831

Reputation:

Debian KVM Bridge Networking on remote host

I have a dedicated server that I'd like to run some VMs on using KVM.

I'm trying to set up bridge networking so the VMs can be accessed from the outside with dedicated IPs.

I tried doing this using this article, but once I bring up br0 I lose connectivity to my server over ssh (and anything else for that matter).

Here is my /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 66.147.230.23
        netmask 255.255.255.0
        network 66.147.230.0
        broadcast 66.147.230.255
        gateway 66.147.230.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 208.67.222.222 208.67.220.220
        dns-search samgwydir.com

# bridge
auto br0
iface br0 inet static
#       address 216.120.250.44
#       netmask 255.255.255.0
#       network 216.120.250.0
#       broadcast 216.120.250.255
#       gateway 216.120.250.1
        address 192.168.1.1
        network 192.168.1.0
        netmask 255.255.255.0
        broadcast 192.168.1.255
        gateway 192.168.1.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

I have commented out a failed setup that had br0 use a dedicated IP and instead tried a local IP to no avail.

Upvotes: 0

Views: 893

Answers (1)

umläute
umläute

Reputation: 31264

don't configure the eth0, as eth0 is the bridge device (with the IP 192.168.1.1):

auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet manual

# bridge
auto br0
iface br0 inet static
        address 192.168.1.1
        network 192.168.1.0
        netmask 255.255.255.0
        broadcast 192.168.1.255
        gateway 192.168.1.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

you might be able to assign multiple IP addresses to br0, if you want your host to be multihomed

Upvotes: 1

Related Questions