You can configure your server with:
– Private IPs
– Public ISs
– Or both.
In the following guide for the public IPs, we will use:
IP : IP to configure (for example : 5.39.2.114)
RANGEBLOC : IP block to use (example : 5.39.2.112/28)
GATEWAYBLOC : The gateway to our block (example : 5.5.39.2.126 (penultimate ip)
BROADCASTBLOC : Ip broadcast block ( 5.39.2.127 (last ip)
You can determine the netmask -r 5.39.2.112/28 order in our example.
Note: In a block IPs, 3 IPs are not usable (the first, the penultimate and the last) |
Note: The interface for vrack 1.5 is not tagged even if you decide to communicate with IPs in vrack 1.0 interface. |
Important: For the interface to configure linux or pro rescue mode : List the interfaces: ifconfig -a | grep eth | awk ‘{print $1}’
example: #ifconfig -a | grep eth | awk ‘{print $1}’
eth0 eth1 eth0 is already our interface, you can see your ip with ifconfig then do: #ifconfig eth1 up
#ethtool eth1 | grep “Link detected” Link detected: yes if you have no back to “Link detected” then it is not good quality and do : #ifconfig eth1 down
and do the same with others. In our example we will keep eth1.. If you put your server for the first time in a vrack 1.5, you must run the command: #arping -i eth1 1.1.1.1
After you configure your eth1 or 3 interface on the server . If your distribution does not have this command you can do in rescue pro. |
You need to edit the following configuration file :/etc/network/interfaces
and add at the end of the file:
iface eth1 inet static
address 172.16.0.1
netmask 255.240.0.0
broadcast 172.31.255.255
Then restart your network interface :
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5, I can communicate with servers on the network in the vrack 1.0. |
To add a second ip:
Add example:
post-down /sbin/ip addr del 172.16.2.100/12 dev eth1
this gives:
iface eth1 inet static
address 172.16.0.1
netmask 255.240.0.0
broadcast 172.31.255.255
post-up /sbin/ip addr add 172.16.2.100/12 dev eth1
pre-down /sbin/ip addr del 172.16.2.100/12 dev eth1
Then restart your network interface:
In our example we will add the ip 5.39.2.114 our block: 5.39.2.112/28.
you must configure your eth1 interface as follows:
iface eth1 inet static
address IP
netmask NETMASKBLOC
broadcast BROADCAST
post-up /sbin/ip route add default via GATEWAYBLOC dev eth1 table 125
post-up /sbin/ip rule add from RANGEBLOC table 125
pre-down /sbin/ip route del default via GATEWAYBLOC dev eth1 table 125
pre-down /sbin/ip rule del from RANGEBLOC table 125
in our example this gives:
iface eth1 inet static
address 5.39.2.114
netmask 255.255.255.240
post-up /sbin/ip route add default via 5.39.2.126 dev eth1 table 125
post-up /sbin/ip rule add from 5.39.2.112/28 table 125
pre-down /sbin/ip rule del from 5.39.2.112/28 table 125
pre-down /sbin/ip route del default via 5.39.2.126 dev eth1 table 125
Then restart your network interface :
Add a second ip same ip block just add:
post-down /sbin/ip addr del 5.39.2.113/28 dev eth1
this gives :
iface eth1 inet static
address 5.39.2.114
netmask 255.255.255.240
post-up /sbin/ip route add default via 5.39.2.126 dev eth1 table 125
post-up /sbin/ip rule add from 5.39.2.112/28 table 125
pre-down /sbin/ip rule del from 5.39.2.112/28 table 125
pre-down /sbin/ip route del default via 5.39.2.126 dev eth1 table 125
post-up /sbin/ip addr add 5.39.2.113/28 dev eth1
post-down /sbin/ip addr del 5.39.2.113/28 dev eth1
Then restart your network interface :
Add a second IP bloc
add this to the configuration of eth1.
post-up /sbin/ip route add default via GATEWAYBLOC dev eth1 table 126
post-up /sbin/ip rule add from RANGEBLOC table 126
pre-down /sbin/ip route del default via GATEWAYBLOC dev eth1 table 126
pre-down /sbin/ip rule del from RANGEBLOC table 126
post-down /sbin/ip addr del IPBLOC2/SLASHBLOC dev eth1
Then restart your network interface:
As you can see we have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5, I can communicate with servers on the network in the vrack 1.0.
post-down /sbin/ip addr del 172.16.2.100/12 dev eth1
Then restart your network interface:
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5, I can communicate with servers on the network in the vrack 1.0. |
To configure a private IP on your server for your vrack 1.5
Create a configuration file: /etc/sysconfig/network-scripts/ifcfg-eth1
With the contents:
IPADDR=172.16.0.1
NETMASK=255.240.0.0
ONBOOT=yes
BROADCAST=172.31.255.255
DEVICE=eth1
Finally mount your interface:
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5, I can communicate with servers on the network in the vrack 1.0. |
Add a second ip:
Create a file: /etc/sysconfig/network-scripts/ifcfg-eth1:X
X is replaced by 0,1,2 , …. based on the number of already created alias.
with content for the same thing as before but changing the Ip .
example in the file:
/etc/sysconfig/network-scripts/ifcfg-eth1:0 :
IPADDR=172.16.0.2
NETMASK=255.240.0.0
ONBOOT=yes
BROADCAST=172.31.255.255
DEVICE=eth1:0
and then mount your interface:
Create a configuration file:
/etc/sysconfig/network-scripts/ifcfg-eth1 with the content:
IPADDR=IP
NETMASK=NETMASK
ONBOOT=yes
BROADCAST=BROADCASTBLOC
DEVICE=eth1
Then create a file /etc/sysconfig/network-scripts/rule-eth1 with the content:
Finally create a file with route- eth1 for content:
which gives us in our example:
in /etc/sysconfig/network-scripts/ifcfg-eth1 :
IPADDR=5.39.2.113
NETMASK=255.255.255.240
ONBOOT=yes
BROADCAST=5.39.2.127
DEVICE=eth1
In /etc/sysconfig/network-scripts/rule-eth1:
in the file: /etc/sysconfig/network-scripts/route-eth1
Finally mount your interface :
Add a second IP of bloc
Simply add a file:
/etc/sysconfig/network-scripts/route-eth1:X
X can be : 0,1,2,3 … depending on the number of aliases that you have already created .
finally made one:
Add a second IP bloc
You rename ifcfg-eth1:X, rule-eth1:X, route-eth1:X is your second block.
then make a
Simply repeating the previous configurations for public and private incrementing the number of aliases for file ifcfg- eth1 eth1 rule- and route- eth1.
then make a
To configure a private IP you simply add in your configuration file: /etc/conf.d/net
"IP/TYPESLASH"
)
for example, we will configure the IP network 172.16.0.1 du réseau 172.16.0.0/12
this gives :
"172.16.0.1/12"
)
then restart your eth1 interface :
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5 , I can communicate with servers on the network in the vrack 1.0. |
Add a 2nd IP
in paragraph config_eth1 add your second ip .
"172.16.0.1/12"
"172.16.0.2/12"
)
then restart your eth1 interface :
To configure a private IP you must add in your configuration file: /etc/conf.d/net
“IP/TYPESLASH”
)
routes_eth1=(
“default via GATEWAYBLOC table 125”
)
rules_eth1=(
“from RANGEBLOC table 125”
)
What gives this in our example:
“5.39.2.113/28”
)
routes_eth1=(
“default via 5.39.2.126 table 125”
)
rules_eth1=(
“from 5.39.2.112/28 table 125”
)
But this is not enough for distributions other than gentoo2013 must add two functions to the consideration of our rules , still in the file: /etc/conf.d/net
add at the end:
# Apply any rules we may want
x=”rules_${ifvar}[@]”
local -a rules=( “${!x}” )
if [[ -n ${rules} ]] ; then
einfo “Adding IP policy routing rules”
eindent
# Ensure that the kernel supports policy routing
if ! ip rule list | grep -q “^” ; theneerror “You need to enable IP Policy Routing (CONFIG_IP_MULTIPLE_TABLES)”
eerror “in your kernel to use ip rules”else
for x in “${rules[@]}” ; do
ebegin “${x}”
ip rule add ${x}
eend $?done
fi
eoutdent
fi
# Flush the route cache
ip route flush cache
}
predown() {local iface=”$1″
# Remove all rules defined and related to $iface
x=”rules_${ifvar}[@]”
local -a rules=( “${!x}” )
if [[ -n ${rules} ]] ; then
einfo “Removing IP policy routing rules”
eindent
for x in “${rules[@]}” ; doebegin “${x}”
ip rule del ${x}
eend $?done
fi
eoutdent
}
Note: This addition to the postup and predown will make only once. |
then restart eth1:
Add a second ip bloc
add the second ip in paragraph config_eth1
which gives:
“5.39.2.113/28”
“5.39.2.114/28”
)
then restart eth1:
Add a second IP block
Simply change the config_eth1 paragraphs rules_eth1 and routes_eth1 to add the ip, the routing table and routes for the second block.
then restart eth1:
You just need to use the two preceding paragraph by putting the various configuration sections:
config_eth1
rule_eth1
route_1
exemple:
“172.16.0.1/12”
“5.39.2.113/28”
)
routes_eth1=(
“default via 5.39.2.126 table 125”
)
rules_eth1=(
“from 5.39.2.112/28 table 125”
)
and do not forget the post-up and pre-down functions
then restart eth1:
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5, I can communicate with servers on the network in the vrack 1.0. |
I invite you to follow the centos part of this guide.
You must configure your ip as mentioned for Centos or Ubuntu based system where Plesk is installed.
Then for plesk can take into account these ips go to plesk, server tab:
then “IP address”
and finally click “Reread IP”
You should initially follow the game on Debian configuration ip.
Then in ISPConfig go home, and click the System icon:
Then in the left menu , click “IP Addresses server”
Then “New IP Address”
And finally fill out the form by specifying the IP address that you added in your network configuration above and click “save”.
– Go to the “Start Menu” > Control Panel > Network and Internet > Network and Sharing center > change adapter settings (in the left menu).
– Made a right click on Local Area Connection #2
– Click on Properties
– Select Internet Protocol Version 4 (TCP/IPv4) and click Properties
– Provide the following information: (ip, netmask of the block)
then select ” validate settings on exit” and click “ok”
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5 , I can communicate with servers on the network in the vrack 1.0. |
– Go to the “Start Menu” > Control Panel > Network and Internet > Network and Sharing Center > modify paramettres card ( in the left menu ) .
– Made a right click on Local Area Connection #2
– Click on Properties
– Select Internet Protocol Version 4 (TCP/IPv4) and click Properties
– Then select “validate settings on exit” and click “ok” .
then select “validate settings on exit” and click “ok” .
Make your configuration of your public ip using the directions of the preceding paragraph.
then:
– Go to the menu START > Control Panel > Network and Internet > Network and Sharing Center > modify paramettres card ( in the left menu ) .
– Made a right click on Local Area Connection # 2
– Click on Properties
– Select Internet Protocol Version 4 (TCP/IPv4) and click Properties
– click on “Advanced”
and then click Add in the “IP Address”
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5 , I can communicate with servers on the network in the vrack 1.0. |
– In the management server, go to the dashboard left.
– Select “Local Server” then you will see two Ethernet parts:
You have an interface with your public ip and ip Ethernet2 here that begins with “169.254” by Ethernet.
-Click on the ip that starts with “169.254”.
– Click on the interface corresponding to that of vrack in our case Ethernet.
– Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
– Provide the following information: (ip , netmask of the block)
then select “validate settings on exit” and click “ok”
Note: You can assign an ip 172.16.0.0/12 block , if your vrack 1.0 was added to vrack 1.5, you can communicate with servers on the network in the vrack 1.0. |
– In the Server Management, Go Part dashboard left
– Select “Local Server” then you will see two Ethernet parts:
You have an interface with your public ip and ip Ethernet2 here that begins with “169.254” by Ethernet.
– Click on the ip that starts with “169.254 .”
– Select Internet Protocol Version 4 (TCP/IPv4) and click Properties
– Provide the following information : (ip , netmask of the block, the block gateway)
Then select “validate settings on exit” and click “ok”
Make your configuration of your public ip using the directions of the preceding paragraph.
then:
– In the Server Management , Go into the dashboard left.
– Select “Local Server” then you will see two Ethernet parts:
You have an interface with your public ip here Ethernet2 and one for your public ip of your vrack 1.5
– Click on the public IP of your vrack.
– Click on the interface corresponding to that of vrack in our case Ethernet.
– Select Internet Protocol Version 4 (TCP/IPv4) and click Properties
– Then click on “Advanced”
then click “Add” in the “IP Address”
Then select “validate settings on exit” and click “ok”
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5 , I can communicate with servers on the network in the vrack 1.0. |
To configure your esxi with vrack 1.5, you must go to your vSphere configuration tab. Then in the left menu “networking”
You need to create a switch for this click “Add Networking”
You get this:
click Virtual Machine
Click Use vSwitch1 which corresponds to vmnic1.
Name the vswitch here we vlan but you can put whatever you want .
and do not put VLAN ID.
Finally, when you create your virtual machine, you can select which network the virtual network adaptor in your virtual machine will be connected.
Then create your virtual machine a typical configuration for your public ip ips your block. Or anyone that without private IP gateway for your configuration.
IP: IP of your block
NETMASKBLOC: netmask of your block
GATEWAYBLOC: gateway to block throughout
Example configuration file for your Debian VM:
iface lo inet loopback
auto eth0
iface eth0 inet static
address IP
netmask NETMASKBLOC
gateway GATEWAYBLOC
Note: If you assign an ip 172.16.0.0/12 block and your vrack 1.0 was added to vrack 1.5, you can communicate with servers on the network in the vrack 1.0. |
To create virtual machines with the Ips vrack 1.5, you must configure an additional bridge.
Add this in your configuration file: /etc/network/interfaces
auto vmbr2
iface vmbr2 inet manual
bridge_ports eth1
bridge_stp off
bridge_fd 0
Now when you create your virtual machine on vrack 1.5
Now when you create your virtual machine on vrack 1.5
Then when creating your “container” or your VM , you need to select the brige mode (vmbr2) and configure the network, then your vm with the following information:
IP: IP of your block
NETMASKBLOC: netmask of your block
GATEWAYBLOC: gateway to block throughout
example configuration file for your vm debian:
iface lo inet loopback
auto eth0
iface eth0 inet static
address IP
netmask NETMASKBLOC
gateway GATEWAYBLOC
Note: As you can see I have given an ip 172.16.0.0/12 block, if my vrack 1.0 was added to vrack 1.5 , I can communicate with servers on the network in the vrack 1.0. |
For your virtual machines can connect via vrack 1.5, I suggest you firstly in XenCenter? to change the description of your second network card to remember what it is ( tab ” Networking” ) .
Select your second card and click “Properties”
Then change the description.
Finally, when you create your virtual machine you need to select the appropriate network vrack 1.5.
Then create your virtual machine a typical configuration for your public ip ips your block routed on vrack or use any private IP it without your gateway configuration depending on what you want to do.
IP: IP of your block
NETMASKBLOC: netmask of your block
GATEWAYBLOC: gateway to block throughout
Sample configuration file for your vm debian:
iface lo inet loopback
auto eth0
iface eth0 inet static
address IP
netmask NETMASKBLOC
broadcast BROADCASTBLOC
gateway GATEWAYBLOC
dns-nameservers 213.186.33.99
dns-search ovh.net