Virtual Switch VPC Configuration Guide (Elastic Cloud Internal Network Communication)

Published: 2020-02-04

```html

For the VPC service description, please refer to: https://www.west.cn/news/list.asp?newsid=866 , for specific settings, please refer to the instructions below:

1. In the Management Center, under [Server Management], click [Virtual Switch]

image.png

2. Add a switch, as shown in the figure below

image.png

3. Activate the virtual switch (subnet connection)

image.png

After entering the management page, all servers in the cluster will be displayed by default. Click the "Connect" button at the end to join the virtual switch.

Then go into the server to set the private network IP. After configuration, private network communication can be performed. Servers that have not joined the connection cannot perform private network communication.image.png

If you want to delete this virtual switch, click the "Disconnect" button to disconnect all servers, and then delete it from the virtual switch list.

Special Notes

  • After connecting a cloud host to the virtual switch, for cloud hosts activated before December 23, 2019, you need to manually log in to the server to configure the private IP address and set the MTU, and the MTU must be set to 1450 (See the tutorial for details); for newly created cloud hosts, the system will automatically configure the IP and MTU, and manual configuration is not required.


Supplement:

If the private network service has continuous data exchange, this setting is not required.

If a server has no private network communication for a long time (such as a test environment or standby machine), it is recommended to add this scheduled task, Ping the private network gateway or a neighboring server once per hour, which can effectively avoid the private network connection "hanging" or unexpectedly disconnecting due to "ARP aging" or "switch port idle".

Replace the IP with the private network IP address of another server under the virtual switch.


Linux (CentOS/Ubuntu/Debian common):

(crontab -l 2>/dev/null; echo "0 * * * * ping -c 4 -W 1 192.168.X.X > /dev/null 2>&1") | crontab -

Windows (CMD Administrator):

schtasks /create /tn "HourlyPing" /tr "ping -n 4 -w 1000 192.168.X.X > nul" /sc hourly /mo 1 /f


```