The vRack can mange both public IP and private IP. For private IP your free to define any IP under the private range with 192.168.0.1 being the most common. It is also possible to have public IP under the vRack, this is for public connections to the servers where by the IP traffic goes via the vRack port rather than the standard public ethernet port of eth0.
For a public IP vrack set up, you would need the following as a minimum.
1) vRack compatible server
2) vRack service assigned (Free)
3) Public IP block with a minimum size of /28 (16 IP addresses)
For our guide we will setting the server OS to be Ubuntu 14.04 LTS, by default the OS will be installed and the server IP will be pingable. For the vRack service we need to apply for this in our account, this is a free service however you would still need to complete the order itself. The service typically will be called PN-12345. We will submit both the vRack server and the public IP block to the vRack service.
Our 16 IP needs to be configured on the server so that it becomes usable. Of the 16 IP, certain IP’s are reserved. This was mentioned previously at: IP addressing.
|IP position||IP value||Status||Usage|
|1||192.168.0.1||Reserved||Usage: Network address|
|15||192.168.0.15||Reserved||Usage: Network gateway|
|16||192.168.0.16||Reserved||Usage: Network broadcast|
If we have the IP block of: 18.104.22.168/28, then we will have the following addresses:
22.214.171.124/28 126.96.36.199 188.8.131.52 First usable IP 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 Last usable IP 184.108.40.206 Gateway 220.127.116.11
We will first configure the first usable IP of 18.104.22.168 against our server so that it can be usable, we will be replicating the same settings as we did for the vRack under private IP, the difference is that we will be setting public IP with a subnet mask of 255.255.255.240 for our /28 (16 IP addresses).
/etc/network/interfaces auto eth1 iface eth1 inet static address 22.214.171.124 netmask 255.255.255.240 broadcast 126.96.36.199
By default the routing is passing throughout the servers gateway. The server gateway is for the server IP, as our IP is in the vRack we would define our gateway to be 188.8.131.52. We will be looking to make adjustments to the routing table at:
/etc/iproute2/rt_tables # # reserved values # 255 local 254 main 253 default 0 unspec # # local # #1 inr.ruhep 1 vrack
In the routing tables we have added a new entry called vRack. We will be using the vRack route for the public IP under the server. This would mean adjustments to our configuration at:
/etc/network/interfaces auto eth1 iface eth1 inet static address 184.108.40.206 netmask 255.255.255.240 broadcast 220.127.116.11 post-up ip route add 18.104.22.168/28 dev eth1 table vrack post-up ip route add default via 22.214.171.124 dev eth1 table vrack post-up ip rule add from 126.96.36.199/28 table vrack post-up ip rule add to 188.8.131.52/28 table vrack