vRack public

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
2 192.168.0.2 Available
3 192.168.0.3 Available
4 192.168.0.4 Available
5 192.168.0.5 Available
6 192.168.0.6 Available
7 192.168.0.7 Available
8 192.168.0.8 Available
9 192.168.0.9 Available
10 192.168.0.10 Available
11 192.168.0.11 Available
12 192.168.0.12 Available
13 192.168.0.13 Available
14 192.168.0.14 Available
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: 46.105.135.96/28, then we will have the following addresses:

46.105.135.96/28

46.105.135.96
46.105.135.97  First usable IP
46.105.135.98
46.105.135.99
46.105.135.100
46.105.135.101
46.105.135.102
46.105.135.103
46.105.135.104
46.105.135.105
46.105.135.106
46.105.135.107
46.105.135.108
46.105.135.109  Last usable IP
46.105.135.110  Gateway
46.105.135.111

We will first configure the first usable IP of 46.105.135.97 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 46.105.135.97
netmask 255.255.255.240
broadcast 46.105.135.111

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 46.105.135.110. 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 46.105.135.97
netmask 255.255.255.240
broadcast 46.105.135.111
post-up ip route add 46.105.135.96/28 dev eth1 table vrack
post-up ip route add default via 46.105.135.110 dev eth1 table vrack
post-up ip rule add from 46.105.135.96/28 table vrack
post-up ip rule add to 46.105.135.96/28 table vrack