Le mercredi 04 février 2015 à 09:27 +0100, Kirill Peskov a écrit : > Hi All! > > One of my hosting providers has recently enforced the new routing > policy for additional IP-addresses and instead of old good bridging > mode from now on requires that all additional IPs should be routed via > primary IP. I've already found quite a good HOWTO, but unfortunately it > does describe how to configure Linux virtual guest on the Linux KVM > host. My task is a bit different, I have to configure OpenBSD 5.6 guest > on the Linux (Ubuntu) KVM host. Debian/Ubuntu HOWTO document suggests > following configuration:
Hello. I use this setup (kvm with routed network over primary ip, in a debian host). Here are my setup choices : /etc/interfaces is untouched (only eth0 and lo), ip forwarding is activated (/proc/sys/net/ipv4/ip_forward = 1) kvm runs with these parameters for network interface: NET="-net nic,model=virtio -net tap,ifname=${NAME},script=/etc/vm/${NAME}/qemu-ifup" /etc/vm/${NAME}/qemu-ifup: #!/bin/sh NETWORK=60 TAP=`echo $NETWORK+1|bc` VM=`echo $NETWORK+2|bc` BRD=`echo $NETWORK+3|bc` /sbin/ip link set $1 up /sbin/ifconfig $1 10.42.1.$TAP broadcast 10.42.1.$BRD netmask 255.255.255.252 mtu 16000 /sbin/ip route add 10.42.1.${VM}/32 via 10.42.1.$TAP dev $1 in guest, /etc/hostname.vio0: inet 10.42.1.62 255.255.255.252 !ifconfig vio0 mtu 16000 /etc/mygate: 10.42.1.61 Regards, -- Bastien Durel <bast...@durel.org>