- [Show pagesource]
- [Old revisions]
- [[unknown link type]]
- []
This is an old revision of the document!
Server configuration (Linux)
For the vSwitch, you need to configure an interface with the VLAN ID that you have entered on Robot. You should limit the MTU of the interface to 1400.
Example configuration for the network card “enp2s0”, with the VLAN ID 4010
Create a VLAN device
ip link add link enp2s0 name enp2s0.4010 type vlan id 4010 ip link set enp2s0.4010 mtu 1400 ip link set dev enp2s0.4010 up
Configure IP address 10.1.2.3 from the private subnet 10.1.2.0/24
ip addr add 10.1.2.3/24 brd 10.1.2.255 dev enp2s0.4010
Public subnet You need to create an additional routing table for the public subnet so you can configure another default gateway.
Example configuration for IP 13.39.25.50 from the public subnet 13.39.25.48/29, interface enp2s0.4010
echo "1 vswitch" >> /etc/iproute2/rt_tables ip addr add 13.39.25.50/29 dev enp2s0.4010 ip rule add from 13.39.25.50 lookup vswitch ip rule add to 13.39.25.50 lookup vswitch ip route add default via 13.39.25.49 dev enp2s0.4010 table vswitch
Example Debian configuration
Interface enp2s0, VLAN 4010, private network
# /etc/network/interfaces auto enp2s0.4010 iface enp2s0.4010 inet static address 10.1.2.3 netmask 255.255.255.0 vlan-raw-device enp2s0 mtu 1400
Add IP 13.23.25.50 from public subnet 13.23.25.48/29 and IPv6 2001:eeee:aa:ffff::2 from public subnet 2001:eeee:aa:ffff::/64 on the host system.
Create an additional routing table.
echo "1 vswitch" >> /etc/iproute2/rt_tables
# /etc/network/interfaces auto enp2s0.4010 iface enp2s0.4010 inet static address 192.168.100.1 netmask 255.255.255.0 vlan-raw-device enp2s0 mtu 1400 # ipv4 subnet up ip addr add 13.23.25.50/29 dev enp2s0.4010 up ip rule add from 13.23.25.50 lookup vswitch up ip rule add to 13.23.25.50 lookup vswitch up ip route add default via 13.23.25.49 dev enp2s0.4010 table vswitch down ip addr del 13.23.25.50/29 dev enp2s0.4010 down ip route del default via 13.23.25.49 dev enp2s0.4010 table vswitch down ip rule del to 13.23.25.50 lookup vswitch down ip rule del from 13.23.25.50 lookup vswitch # ipv6 subnet up ip -6 addr add 2001:eeee:aa:ffff::2/64 dev enp2s0.4010 up ip -6 rule add from 2001:eeee:aa:ffff::2 lookup vswitch up ip -6 rule add to 2001:eeee:aa:ffff::2 lookup vswitch up ip -6 route add default via 2001:eeee:aa:ffff::1 dev enp2s0.4010 table vswitch down ip -6 addr del 2001:eeee:aa:ffff::2/125 dev enp2s0.4010 down ip -6 route del default via 2001:eeee:aa:ffff::1 dev enp2s0.4010 table vswitch down ip -6 rule del to 2001:eeee:aa:ffff::2 lookup vswitch down ip -6 rule del from 2001:eeee:aa:ffff::2 lookup vswitch