Skip to content

VLAN configuration between servers

Information

If you order several servers, it is possible to switch between them. VLAN allows you to unit traffic on servers into a local network. In this case, traffic between servers is not counted. Another benefit of configuring a VLAN between servers is to improve data security.

The procedure for the organization of switching the servers depends on the location of the client's servers. The cost and options for connecting the service are presented here.

Note

If you need to configure a VLAN between servers located at a considerable distance from each other, then you should contact our engineers. They will set up the connection and perform the necessary network settings.

Attention

If the servers are located in the same rack, you need to contact our engineers, and they will plug in additional network cards. The servers will be connected directly. In this case, the network settings can be made independently.

For network adapter settings, use IP addresses from the range of gray subnets (i.e. those addresses that are not used):

  • 10.0.0.0/8;
  • 172.16.0.0/12;
  • 192.168.0.0/16.

VLAN configuration on servers of Linux family

To connect to the server, you can use the SSH protocol or one of the remote access methods provided in the Invapi control panel. After connecting to the server, you must perform the following actions:

  1. Check the name of the second network interface:

    ip link show
    
    In the following examples, the name of the network interface eth1 will be used. The title may differ.

  2. Configure the second network interface

    The network interface configuration can be done in two ways:

    • Using the ip command;;;
    • By changing the configuration file. This method is preferred because it allows you to save network settings after turning off the hardware.

IP command

Performed on the server with the first network interface:

ip address add 192.168.0.1/24 dev eth1
ip link set eth1 up

In the above example, the second network interface eth1 is configured to the first IP address from the gray subnet 192.168.0.0/24. In each case, different addresses can be used, but they must be unique within the same subnet.

Similar action must be performed on the second dedicated server (if there are more than two, then on each). The setting is produced to the second address from the selected subnet. In our example – 192.168.0.2:

ip address add 192.168.0.2/24 dev eth1
ip link set eth1 up

Method of changing the configuration file

Information

The location of the configuration file differs depending on the operating system.

On CentOS, the network configuration is located:

/etc/sysconfig/network-scripts/ifcfg-eth1(”interface_name”)

On the first server, the configuration file must be edited as follows:

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPADDR=192.168.0.1
NETMASK=255.255.255.0
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID= "UUID_ID"
DEVICE=eth1
ONBOOT=yes

On the second:

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPADDR=192.168.0.2
NETMASK=255.255.255.0
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID= "UUID_ID"
DEVICE=eth1
ONBOOT=yes

To use the new configuration, you must restart the network service on all servers that are united into a single VLAN:

systemctl restart network

To check connection:

ping -c 3 192.168.0.2

VLAN configuration on Windows servers

o connect to the server, you can use the RDP protocol or one of the remote access methods provided in the Invapi control panel. After connecting to the server, you must perform the following actions:

  1. Network interface configuration.

    Viewing the name of the second network interface:

    netsh interface ip show config | findstr "interface"
    

    Setting up a second network interface on the first server:

    netsh interface ipv4 add address "Ethernet 2" 192.168.0.1 255.255.255.0
    

    Review of the application of settings

    netsh interface ip show addresses "Ethernet 2"
    

    Attention

    These operations must be performed on each of the servers connected to the VLAN. The IP addresses are changed according to the server's serial number when connected.

  2. Checking the switching:

    ping -c 3 192.168.0.2