Vmlweb
06-12-2013, 17:03
Ok got it working with some information from the vRack ML.
How to route a block in your vrack ?
1) go to the ovh api url and login :
https://api.ovh.com
2) use the url below to get blocks that can be routed in your vrack (they'll appear in the 'ip' part) :
GET /vrack/{serviceName}/allowedService/
3) use th url below to put a block in your vrack. This will unroute the block from it's current location :
POST /vrack/{serviceName}/ip/
4) now that your block is in your vrack, announce on the area you want :
POST /vrack/{serviceName}/ip/{ip}/announceInZone
5) Once the task is done, you can check your block's gateway (basically it's the last ip of your block - 1) :
GET /vrack/{serviceName}/ip/{ip}
6) Now that your block is announced, affect one of it's ip to a pcc VM or a dedicated server on it's vrack interface :
For example, I want to use ip 1.1.1.1 from block 1.1.1.0/24 on a server whose vrack interface is eth1 :
ifconfig eth1 1.1.1.1 netmask 255.255.255.0
At this point, you should be able to ping your gateway which is 1.1.1.254, then
ip route add default via 1.1.1.254 dev eth1 table 120
ip rule add from 1.1.1.0/24 table 120