Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:dedicated-server:network:network-configuration-with-netplan [2018/06/25 15:47]
dedibox
en:dedicated-server:network:network-configuration-with-netplan [2019/11/21 12:31] (current)
dedibox [Configuration of the RPNv2 interface on a Dedibox]
Line 115: Line 115:
  
 {{:​en:​dedicated-server:​network:​rpn-san-ping.png?​600|}} {{:​en:​dedicated-server:​network:​rpn-san-ping.png?​600|}}
 +
 +
 +===== Configuration of the RPNv2 interface on a Dedibox =====
 +
 +=== Step 1 - Create a RPNv2 Group ===
 +
 +To use the RPNv2 with your Dedibox, you need to create a RPNv2 group with at least two servers from the [[https://​console.online.net/​en/​server/​rpn/​v2|management console]]: ​
 +
 +{{:​en:​dedicated-server:​network:​rpnv2group.png?​600|}}
 +
 +=== Step 2 - Detect the network interface names of your server ===
 +
 +The name of the network interfaces may be different from server to server, as it depends on the hardware configuration. \\
 +To detect the name of your RPN interface run ''​ifconfig -a''​ and check in the list of all interfaces which one corresponds to the RPN interface by comparing the MAC addresses (1). The name of the RPN interface will be shown in the list (2): 
 +
 +{{:​en:​dedicated-server:​network:​find-rpn-mac.png|}}
 +
 +=== Step 3 - Configuration of the interfaces file ===
 +
 +In our example, the RPN network interface is named ''​enp1s0f1''​. We have to configure this interface now in the file ''/​etc/​netplan/​01-netcfg.yaml''​. Also, the VLAN needs to be configured with the ''​VLAN-ID''​ corresponding to the server in the RPN group. As the RPNv2 does not provide an IP via DHCP, you need to configure the IP manually from an internal range (for example: ''​192.168.0.0/​24''​):​
 +
 +<​code>​
 +# This file describes the network interfaces available on your system
 +# For more information,​ see netplan(5).
 +network:
 +  version: 2
 +  renderer: networkd
 +  ethernets:
 +    enp1s0f0:
 +      dhcp4: yes
 +    enp1s0f1: {}
 +  vlans:
 +    vlan2004:
 +      addresses:
 +        - 192.168.1.4/​24
 +      id: 2004
 +      link: enp1s0f1
 + </​code>​
 +
 +Once you have added the configuration,​ save the file and apply the network configuration by running: ​
 +
 +<​code>​
 +sudo netplan apply
 +</​code>​
 +
 +=== Step 4 - Test the configuration ===
 +
 +In the following test, we assume two servers are already configured:
 +  * Dedibox A with the VLAN ''​2004''​ and the IP ''​192.168.1.4''​
 +  * Dedibox B with the VLAN ''​2005''​ and the IP ''​192.168.1.5''​
 +
 +Test the connection between the two servers by running a ''​ping''​ from Dedibox A to Dedibox B: 
 +<​code>​
 +myuser@dedibox-a:​~$ ping 192.168.1.5
 +PING 192.168.1.5 (192.168.1.5) 56(84) bytes of data.
 +64 bytes from 192.168.1.5:​ icmp_seq=1 ttl=64 time=0.033 ms
 +64 bytes from 192.168.1.5:​ icmp_seq=2 ttl=64 time=0.046 ms
 +64 bytes from 192.168.1.5:​ icmp_seq=3 ttl=64 time=0.046 ms
 +64 bytes from 192.168.1.5:​ icmp_seq=4 ttl=64 time=0.048 ms
 +
 +--- 192.168.1.5 ping statistics ---
 +4 packets transmitted,​ 4 received, 0% packet loss, time 3068ms
 +rtt min/​avg/​max/​mdev = 0.033/​0.043/​0.048/​0.007 ms
 +</​code>​
  
 ===== Configuration of the RPNv1 Gateway ===== ===== Configuration of the RPNv1 Gateway =====