I have a server at OVH. They have available Ripe blocks of IPs ( mine is x.x.x.48/29 == 8 ip addresses ) you may purchase to have traffic routed from an external network to your server. I was wondering if anyone else out there has correctly configured xen on this server provider's network as I'm struggling with exposing these IPs ( atleast a week now ) to the virtual machines. It may also be important for me to mention I split the block. I have also assigned vMacs to two addressed as I'm very confused as to use them or not according to all the different guides I've seen, granted some of them are old. I've tried multiple solutions but none have worked so far.
Email from OVH in relation to Ripe Block
Further to your request, we have just assigned a block of 8 IP addresses that will be routed via 91.121.8.x: Network IP : x.x.x.48 Broadcast IP : x.x.x.55 Gateway IP : x.x.x.54 (not usable) Netmask : 255.255.255.248 If you want to use this block on a server, all the IPs are usable. The IP network (x.x.x.48) and also the broadcast IP (x.x.x.55). In this case OVH recommends using the netmask '255.255.255.255' so that the configuration remains valid in case of block division. -- Comment: If however this block should be switched to a virtual rack or a Private Cloud offer, it would release the addresses following: Network IP : x.x.x.48 IP for the No. 1 router : x.x.x.52 IP for the No. 2 router : x.x.x.53 IP gateway : x.x.x.54 Broadcast IP : x.x.x.55 Then use the subnet mask 255.255.255.248.
Dom0 / Host Node
root@nsxxxxx:~# grep '^(' /etc/xen/xend-config.sxp (network-script network-route) (vif-script vif-route) (dom0-min-mem 196) (enable-dom0-ballooning yes) (total_available_memory 0) (dom0-cpus 0) (vncpasswd '') Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 188.8.131.52 0.0.0.0 UG 100 0 0 eth0 x.x.x.49 0.0.0.0 255.255.255.255 UH 0 0 0 vif1.0 184.108.40.206 0.0.0.0 255.255.255.0 U 0 0 0 eth0 Chain INPUT (policy ACCEPT 308 packets, 24665 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 12 packets, 842 bytes) pkts bytes target prot opt in out source destination 0 0 ACCEPT all -- any any anywhere anywhere PHYSDEV match --physdev-out vif2.0 --physdev-is-bridged 0 0 ACCEPT udp -- any any anywhere anywhere PHYSDEV match --physdev-in vif2.0 --physdev-is-bridged udp spt:bootpc dpt:bootps 0 0 ACCEPT all -- any any anywhere anywhere PHYSDEV match --physdev-out vif2.0 --physdev-is-bridged 0 0 ACCEPT all -- any any 220.127.116.11 anywhere PHYSDEV match --physdev-in vif2.0 --physdev-is-bridged Chain OUTPUT (policy ACCEPT 265 packets, 45322 bytes) pkts bytes target prot opt in out source destination
I added the gateway to this file according to the email I received about the Ripe IPs and it's gateway that was specified. I thought this would add a route rule to the dom0, however it seems it doesn't work that way. Do I need a routing rule on the Dom0 that will handle communication like this: External Network <-> Dom0 <-> DomU ?
root@nsxxxxx:~# cat ./vmcfg/www.cfg name = 'WWW' vif = ['mac=<vmac>,ip=<ip-associated-with-that-vmac>'] vcpus = 2 memory = 1024 maxmemory = 1024 disk = [ "phy:/dev/vm/www,xvda,w"] mac ='<vmac>' address = '<ip-associated-with-that-vmac>' netmask = '255.255.255.255' gateway = 'x.x.x.54' broadcast = 'x.x.x.55' bootloader = "/usr/bin/pygrub" bootargs = '-q' extra = ' console=hvc0' on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'destroy'
Having the DomU configured in this manner allows me to ping the Dom0/Host Node but not anything else. Could I just be missing a route rule on the Dom0/Host Node?
nano@www:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 18.104.22.168 0.0.0.0 UG 0 0 0 eth0 22.214.171.124 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 nano@www:~$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback auto eth0 iface eth0 inet static address x.x.x.49 netmask 255.255.255.255 post-up /sbin/ip route add "126.96.36.199" dev eth0 post-up /sbin/ip route add default via "188.8.131.52"
Have I Missed something, or overlooked anything? Please let me know!
Any help would be greatly appreciated as I'd love to have hair when I'm 30 ( I'm nearly rubbing my head bald! )