Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

March 09 2011

OVH Xen with multiple Failover IPs and a Load Balancing IP

As the previous post with bridged Xen setup was not good to make the LoadBalance IP running,
I again fiddled with routed setup and the things I learned from my friend TH. And, against
all the warnings in propably older OVH docs I just use now dev ethX as default gw in my
routing table(s). (I think before they introduced the virtual MAC they always blocked unknown
MACs (and therefore also random ones from virtualisation as well) on their switches. This
seems not to be the case anymore).

first, get two of your 3 failover IPs and attach them to your rootserver.

second, get at least a second rootserver and attach a LoadBalancing infrastructure to both
of them and then enable only your test candidate for now.

get your Xen in routed mode (xend-config.sxp):

(network-script network-route)
(vif-script     vif-route)

don't forget to restart xend!

and in domU /etc/network/interfaces easy as this: (where 2.2.2.254) is the default gw of your dom0)

auto lo
iface lo inet loopback

# fixed IP
auto eth0
iface eth0 inet static
    address 1.1.1.1
    netmask 255.255.255.255
    broadcast 1.1.1.1
    post-up /sbin/ip route add 2.2.2.2 dev eth0
    post-up /sbin/ip route add default dev eth0
    post-down /sbin/ip route del 2.2.2.2 dev eth0
    post-down /sbin/ip route del default dev eth0

# moving failover IP
auto eth1
iface eth1 inet static
    address 1.1.1.2
    netmask 255.255.255.255
    broadcast 1.1.1.2
    post-up /sbin/ip rule  add from 1.1.1.2 lookup 100
    post-up /sbin/ip route add 2.2.2.2 dev eth1 table 100
    post-up /sbin/ip route add default dev eth1 table 100
    post-down /sbin/ip rule  del from 1.1.1.2 lookup 100
    post-down /sbin/ip route del 2.2.2.2 dev eth1 table 100
    post-down /sbin/ip route del default dev eth1 table 100

# moving loadbalance IP
auto eth2
iface eth2 inet static
    address 1.1.1.3
    netmask 255.255.255.255
    broadcast 1.1.1.3
    post-up /sbin/ip rule add from 1.1.1.3 lookup 200
    post-up /sbin/ip route add 2.2.2.2 dev eth2 table 200
    post-up /sbin/ip route add default dev eth2 table 200
    post-down /sbin/ip rule  del from 1.1.1.3 lookup 200
    post-down /sbin/ip route del 2.2.2.2 dev eth2 table 200
    post-down /sbin/ip route del default dev eth2 table 200

now: profit!

March 08 2011

OVH Xen with mre than one IP

Getting new sh*t around the block, having new roots at OVH, cool offers, nice machines, decent services, okay price, worst UI for management webinterface ever :_)

first, get two of your 3 failover IPs and attach them to your rootserver.

to get xen bridged running you need to create virtual mac addresses in the ovh manager. assign those to the vif section of the domU config:

vif         = [ 'ip=1.3.3.7,mac=02:00:00:00:00:01,vifname=vif.serv01',
                'ip=1.3.3.8,mac=02:00:00:00:00:02,vifname=vif.serv02' ]

use in xend-config.sxp

(network-script 'network-bridge antispoof=yes')
(vif-script vif-bridge)

and in domU /etc/network/interfaces easy as this:

auto eth0
iface eth0 inet static
    address 1.3.3.7
    netmask 255.255.255.255
    broadcast 1.3.3.7
    post-up /sbin/ip route add default dev eth0

auto eth1
iface eth1 inet static
    address 1.3.3.8
    netmask 255.255.255.255
    broadcast 1.3.3.8
    post-up /sbin/ip rule add from 1.3.3.8 lookup 100
    post-up /sbin/ip route add default dev eth1 table 100
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!

Schweinderl