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: 22.214.171.124/28, then we will have the following addresses:
126.96.36.199/28 188.8.131.52 184.108.40.206 First usable IP 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 184.108.40.206 Last usable IP 220.127.116.11 Gateway 18.104.22.168
We will first configure the first usable IP of 22.214.171.124 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 126.96.36.199 netmask 255.255.255.240 broadcast 188.8.131.52
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 184.108.40.206. 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 220.127.116.11 netmask 255.255.255.240 broadcast 18.104.22.168 post-up ip route add 22.214.171.124/28 dev eth1 table vrack post-up ip route add default via 126.96.36.199 dev eth1 table vrack post-up ip rule add from 188.8.131.52/28 table vrack post-up ip rule add to 184.108.40.206/28 table vrack