Private networks (VLAN)¶
What is a private network?¶
VLANs (Virtual Local Area Networks) are virtual networks. They allow you to have your servers communicate in a ‘compartmentalized’ manner on a dedicated network. At Gandi, you can create one or more VLANs, and associate private interfaces with them, which you attach to your servers. Only interfaces associated with the same virtual network can communicate with each other.
- More security : The interfaces are private, so they are not accessible from the outside
- More speed : The maximum speed of a private interface is 200 Mbits/s (comparted to 100 Mbits/s for a public interface)
This will allow you, for example, to create clusters of servers, without requiring the acquisition of additional bandwidth or going through public network interfaces. This will also allow you to have a frontend server communicate with a backend server in a secure manner.
You must already have at least 2 servers, in the same datacenter, to be able to setup a VLAN.
- Login to your Gandi account, and go to “CLOUD”.
- Go to “Private Networks”.
- Click on “Create a private network”.
- One the next page, choose a name for your network. Then define a network and mask in CIDR formate (for example : 10.0.0.0/29).
- Défine a gateway within the “range” defined above (example : 10.0.0.1)
- On the next page, click on “Add a server/IP”. Select the server you wish to attach to the VLAN, and define an IP address within the “range” defined above that has not been used yet (example : 10.0.0.2)
- Repeat the above step to add any other servers
Then you just have to connect via SSH to one of the servers in the VLAN to check the availability of the other servers with the assigned IP addresses.
You can create up to 128 VLANs for all of your servers, each containing up to 64 interfaces.
VLANs cannot communicate between different datacenters. For example, a server in France cannot be linked to a VLAN created in Luxembourg.
- From the “CLOUD” section of your account, click on “Private Networks” to access their management.
- Choose the Private Network you want to manage by clicking on its name, or on the arrow to the right.
- On this page you can :
- Attach an additional server
- Or you can detach a server by clicking on the “crossed-out chain” icon to the right of the server contained
- Or you can “”Delete” the network in question
In order to be able to delete the VLAN no servers can be attached to it.