KVM Host Network
Network Tools
Get the good old ifconfig command back.
apt-get install net-tools
Network Interfaces
The new network naming scheme does not fit me. I rather like the good old ethX names. The new naming scheme makes a lot of considerations abot the hardware before giving it a name, which sometimes results in very long and weird interfaces names. This especially happens when using USB network devices.
The first thing to do is to tell the kernel that we want the old naming scheme. Edit /etc/default/grub.
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
Make sure to update the grub configuration.
update-grub
Since we are changing a kernel parameter this calls for a reboot.
Identify Network Interfaces
Take your time to identify your network interfaces. Mark the physical network port with a sticker on the system. This will come in handy later on. You can change the device names using udev. Edit /etc/udev/rules.d/70-persistent-net.rules.
# PCI device 0x10ec:0x8168 (r8169) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:3b:0f:1b:8a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" Update the grub configuration
Bridging Network Interfaces
Since you KVM Guests will use the same network interface as your KVM Host, bridging those network interfaces is a must. Configuring bridging will most likely put you in a situation where a misconfiguration renders the system unreachable on the network. For that reason it is a very good idea to have physical access to the system while setting up the network bridging.
apt-get install brigde-utils
edit /etc/network/interfaces.
# bring up network interfaces iface eth0 inet manual # bridging eth0 as br0 auto br0 iface br0 inet static # bridge specific settings bridge_stp on bridge_maxwait 0 bridge_fd 0 bridge_ports eth0 # network settings address 192.168.1.33 netmask 255.255.255.0 network 192.168.1.0 gateway 192.168.1.1
Restart networking
service networking restart