OVH Community, your new community space.

kvm host bridge on SYS


Spydi
23-11-2015, 02:43
Quote Originally Posted by yasen
Strange as it is, after trying several times vith the same configs and commands, the bridge finally started working!

To sum up:

echo 1 >/proc/sys/net/ipv4/ip_forward
echo 1> /proc/sys/net/ipv4/conf/all/proxy_arp

/etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding= 1
net.ipv6.conf.br0.forwarding = 1
net.ipv6.conf.default.forwarding = 1

/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 1.1.1.1
netmask 255.255.255.0
gateway 1.1.1.254
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
iface br0 inet6 static
address ip6addr::1
netmask 64
post-up /sbin/ip -f inet6 route add ip6addr:ff:ff:ff:ff dev br0
post-up /sbin/ip -f inet6 route add default via ip6addr:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del default via ip6addr:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del ip6addr:ff:ff:ff:ff dev br0

/etc/init.d/networking restart

and you should be fine
Thank you for your post. This works in Ubuntu Wily, though you have to install bridge-utils first (of course) and also deal with other routes previously set up. I had to comment out the content of this file:

/etc/network/if-up.d/ipv6-routes

For the Ubuntu Wily install on my SoYouStart server (also OVH). Now it works.

yasen
30-06-2015, 20:17
Strange as it is, after trying several times vith the same configs and commands, the bridge finally started working!

To sum up:

echo 1 >/proc/sys/net/ipv4/ip_forward
echo 1> /proc/sys/net/ipv4/conf/all/proxy_arp

/etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding= 1
net.ipv6.conf.br0.forwarding = 1
net.ipv6.conf.default.forwarding = 1

/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 1.1.1.1
netmask 255.255.255.0
gateway 1.1.1.254
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
iface br0 inet6 static
address ip6addr::1
netmask 64
post-up /sbin/ip -f inet6 route add ip6addr:ff:ff:ff:ff dev br0
post-up /sbin/ip -f inet6 route add default via ip6addr:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del default via ip6addr:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del ip6addr:ff:ff:ff:ff dev br0

/etc/init.d/networking restart

and you should be fine

yasen
30-06-2015, 17:45
Thanks alex, I'll try to translate this to Debian. I don't use SolusVM, I just create VMs in the shell and/or remotely with virt-manager.

I tried the following:

echo 1 >/proc/sys/net/ipv4/ip_forward
echo 1> /proc/sys/net/ipv4/conf/all/proxy_arp

brctl show
brctl addbr br0
brctl addif br0 eth0



or also tried through the config file /etc/network/interfaces:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 1.1.1.1
netmask 255.255.255.0
gateway 1.1.1.254
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
iface br0 inet6 static
address ip6addr::1
netmask 64
post-up /sbin/ip -f inet6 route add ip6addr:ff:ff:ff:ff dev br0
post-up /sbin/ip -f inet6 route add default via ip6addr:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del default via ip6addr:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del ip6addr:ff:ff:ff:ff dev br0

then /etc/init.d/networking restart and...

I'll try again with your settings and see what I can do.

Just wondering -- is there something that SYS have to do on their side network-wize to allow me to create the bridge? Is it something they allow on-demand?

I'm reluctant to open another ticket because it takes them almost a week to write a reply........

alex
30-06-2015, 17:12
Has anyone installed KVM on SYS server?
I have setup the XEN servers in OVH enviroment, as for KVM you need to have the following settings, example:

1.1.1.1 = Primary IPv4 of your server
2.2.2.1/27 = /27(32 addresses but it does not matter what subnet you have e.g /26, /25, /24 etc)IPv4 subnet assigned to your server
2001:41d0:a:abcd::/64 = IPv6 subnet assigned to your server
CentOS = Operating System
SolusVM = VPS control Panel

/etc/sysconfig/network
NETWORKING_IPV6=yes
IPV6FORWARDING=yes

Add IPv6 subnet to the server
# /sbin/ifconfig eth0 inet6 add 2001:41d0:a:abcd::1/64
# route -A inet6 add default gw 2001:41d0:a:abff:ff:ff:ff:ff dev

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
ONBOOT="yes"
BRIDGE="br0"

/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE="br0"
TYPE="Bridge"
BOOTPROTO="static"
IPADDR="1.1.1.1"
NETMASK="255.255.255.0"
ONBOOT="yes"
GATEWAY="1.1.1.254"
DELAY="0"
IPV6INIT="yes"
IPV6_AUTOCONF="no"
IPV6ADDR="2001:41d0:a:abcd::1/64"
ARPCHECK="no"

/etc/sysconfig/network-scripts/ifcfg-br0:0
DEVICE="br0:0"
BOOTPROTO="static"
IPADDR="2.2.2.31"
NETMASK="255.255.255.224"
ONBOOT="yes"

Note: Gateway above will be 2nd last IP of your subnet.

/etc/sysconfig/network-scripts/route6-br0
2001:41d0:a:abff:ff:ff:ff:ff dev br0
default via 2001:41d0:a:abff:ff:ff:ff:ff

/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:25:82:G3:7G:31
TYPE=Ethernet
UUID=21a4afc3-e2fe-405e-acd3-e16fec816ba1
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp

Replace HWADDR & UUID with that of your server

/etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding= 1
net.ipv6.conf.br0.forwarding = 1
net.ipv6.conf.default.forwarding = 1

restart network
#/etc/init.d/network restart

flush firewall
#iptables --flush
#service iptables restart

Now login to your SolusVM admin panel IP blocks -----> List IP blocks -----> Add IPv4 block
Block Name: Whatever you wish
Gateway: 2.2.2.31
Netmask: 255.255.255.224
Nameserver: 213.186.33.99
Save

IP blocks -----> List IP blocks -----> Add IPv6 block
Block Name: Whatever you wish
Gateway: 2001:41d0:000a:abff:00ff:00ff:00ff:00ff
Nameserver: 2001:41d0:3:163::1
Save

Go to your OVH manager & generate Virtual MAC for each of your IP addresses that you are going to use for deploying your KVM virtual servers.

Also put those Virtual MACs for each IP in SolusVM otherwise SolusVM will allocate MAC addresses automatically which will result in failure of your virtual servers' network hence they will not work properly

Are there any official howtos or guides from SYS?
No, I have asked OVH a several years ago to add SolusVM Slave for XEN and KVM templates and they still in process, haha, never will be done.

yasen
30-06-2015, 16:35
I'm having trouble setting up bridge for kvm host, no matter what I try I end up with unreachable network

I'm sure I've done it in the past on an OVH server, but I have no luck now.

Has anyone installed KVM on SYS server?

Are there any official howtos or guides from SYS?