1

Using vif-route with multiple IPs for a Xen domU

Just a little tip for those of you using vif-route for your networking in Xen. I needed to do this recently for a server at OVH as bridging cannot be used.

Set up multiple IPs by separating them with a space like follows in the domU config:

vif = [ 'ip=78.129.140.250 78.129.140.251' ]

You can also add more IPs to the domU without having to restart it using the following syntax replacing 78.129.140.1 with your gateway and vif101.0 with the interface name associated with the domU in your dom0:

ip route add 78.129.140.251 dev vif101.0 src 78.129.140.1

Your domU should now be able to use the extra IP!

In my case, I was trying to forward the IP to an OpenVZ VE within a domU -- this works perfectly fine with the above and no further configuration is required within the domU (other than obviously adding the IP to the OpenVZ container).

This entry was posted in HyperVM, OpenVZ, Virtualisation, Xen and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Trackback

  1. By Using vif-route with multiple IPs for a Xen domU on September 26, 2009 at 11:29 am

    [...] article at ModernAdmin saved me alot of time. I was looking how to add multiple IPs to a Xen DomU in routed [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>