Differences

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

Link to this comparison view

Next revision
Previous revision
internal:virtualswitch:start [2018/09/02 11:00]
admin created
internal:virtualswitch:start [2018/09/02 11:24] (current)
admin [Server configuration (Linux)]
Line 1: Line 1:
-=====Server configuration (Linux)=====+======Server configuration (Linux)======
  
-For the vSwitch, you need to configure an interface ​with the VLAN ID that you have entered on RobotYou should limit the MTU of the interface to 1400.+Pro virtualni switch je potreba priradit ​interface ​do VLAN. Pro verejne IP je pro vsechny zakazniky ​ shodna ​VLAN ID = 4010Dale je treba nastavit ​MTU na 1400.
  
-Example configuration for the network card "​enp2s0", ​with the VLAN ID 4010+Priklad konfigurace sitove karty "​enp2s0", ​ VLAN ID 4010 pro segment **159.69.131.224/​27** 
 +<​code>​ 
 +Gateway: 159.69.131.225 
 +Netmask: 255.255.255.224 
 +Broadcast: 159.69.131.255 
 +</​code>​
  
 ===== Create a VLAN device===== ===== Create a VLAN device=====
  
 +<code bash>
 ip link add link enp2s0 name enp2s0.4010 type vlan id 4010 ip link add link enp2s0 name enp2s0.4010 type vlan id 4010
 ip link set enp2s0.4010 mtu 1400 ip link set enp2s0.4010 mtu 1400
 ip link set dev enp2s0.4010 up ip link set dev enp2s0.4010 up
 +</​code>​
  
-Configure ​IP address ​10.1.2.3 ​from the private subnet ​10.1.2.0/24+===== Nastaveni ​IP adresy ​10.1.2.3 ​z privatniho subnetu ​10.1.2.0/24=====
  
-ip addr add 10.1.2.3/24 brd 10.1.2.255 dev enp2s0.4010+<code bash> 
 +   ip addr add 10.1.2.3/24 brd 10.1.2.255 dev enp2s0.4010 
 +</​code>​ 
 +Pro verejne IP adresy je treba jeste nastavit podminene routovani. Nastavi se druha default gw pro danou verejnou IP
  
-Public subnet You need to create an additional routing table for the public subnet so you can configure another default gateway.+Priklad nastaveni pro IP 13.39.25.50 z verejneho subnetu 13.39.25.48/​29,​ interface enp2s0.4010
  
-Example configuration for IP 13.39.25.50 from the public subnet 13.39.25.48/​29,​ interface enp2s0.4010 +<code bash> 
- +echo "​1 ​starlab" >> /​etc/​iproute2/​rt_tables
-echo "​1 ​vswitch" >> /​etc/​iproute2/​rt_tables+
 ip addr add 13.39.25.50/​29 dev enp2s0.4010 ip addr add 13.39.25.50/​29 dev enp2s0.4010
-ip rule add from 13.39.25.50 lookup ​vswitch +ip rule add from 13.39.25.50 lookup ​starlab 
-ip rule add to 13.39.25.50 lookup ​vswitch +ip rule add to 13.39.25.50 lookup ​starlab 
-ip route add default via 13.39.25.49 dev enp2s0.4010 table vswitch+ip route add default via 13.39.25.49 dev enp2s0.4010 table starlab 
 +</​code>​
  
-Example ​Debian ​configuration+===== Priklad konfigurace pro Debian=====
  
-Interface ​enp2s0, VLAN 4010, private network+Sitova karta enp2s0, VLAN 4010, privatni rozsah
  
 +<file /​etc/​network/​interfaces>​
 # /​etc/​network/​interfaces # /​etc/​network/​interfaces
 auto enp2s0.4010 auto enp2s0.4010
Line 36: Line 47:
   vlan-raw-device enp2s0   vlan-raw-device enp2s0
   mtu 1400   mtu 1400
 +</​file>​
  
-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.+Pridani ​IP 13.23.25.50 ​s verejneho subnetu ​13.23.25.48/​29 ​IPv6 2001:​eeee:​aa:​ffff::​2 ​taktez z verejneho subnetu ​2001:​eeee:​aa:​ffff::/​64 ​na vas server.
  
-Create an additional routing table.+Je treba pridat routovaci pravidlo
  
-echo "​1 ​vswitch" >> /​etc/​iproute2/​rt_tables+<code bash> 
 +echo "​1 ​starlab" >> /​etc/​iproute2/​rt_tables 
 +</​code>​
  
 +<file /​etc/​network/​interfaces>​
 # /​etc/​network/​interfaces # /​etc/​network/​interfaces
 auto enp2s0.4010 auto enp2s0.4010
Line 52: Line 67:
   # ipv4 subnet   # ipv4 subnet
   up ip addr add 13.23.25.50/​29 dev enp2s0.4010   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 from 13.23.25.50 lookup ​starlab 
-  up ip rule add to 13.23.25.50 lookup ​vswitch +  up ip rule add to 13.23.25.50 lookup ​starlab 
-  up ip route add default via 13.23.25.49 dev enp2s0.4010 table vswitch+  up ip route add default via 13.23.25.49 dev enp2s0.4010 table starlab
   down ip addr del 13.23.25.50/​29 dev enp2s0.4010   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 route del default via 13.23.25.49 dev enp2s0.4010 table starlab 
-  down ip rule del to 13.23.25.50 lookup ​vswitch +  down ip rule del to 13.23.25.50 lookup ​starlab 
-  down ip rule del from 13.23.25.50 lookup ​vswitch+  down ip rule del from 13.23.25.50 lookup ​starlab
   # ipv6 subnet   # ipv6 subnet
   up ip -6 addr add 2001:​eeee:​aa:​ffff::​2/​64 dev enp2s0.4010   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 from 2001:​eeee:​aa:​ffff::​2 lookup ​starlab 
-  up ip -6 rule add to 2001:​eeee:​aa:​ffff::​2 lookup ​vswitch +  up ip -6 rule add to 2001:​eeee:​aa:​ffff::​2 lookup ​starlab 
-  up ip -6 route add default via 2001:​eeee:​aa:​ffff::​1 dev enp2s0.4010 table vswitch+  up ip -6 route add default via 2001:​eeee:​aa:​ffff::​1 dev enp2s0.4010 table starlab
   down ip -6 addr del 2001:​eeee:​aa:​ffff::​2/​125 dev enp2s0.4010   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 route del default via 2001:​eeee:​aa:​ffff::​1 dev enp2s0.4010 table starlab 
-  down ip -6 rule del to 2001:​eeee:​aa:​ffff::​2 lookup ​vswitch +  down ip -6 rule del to 2001:​eeee:​aa:​ffff::​2 lookup ​starlab 
-  down ip -6 rule del from 2001:​eeee:​aa:​ffff::​2 lookup ​vswitch+  down ip -6 rule del from 2001:​eeee:​aa:​ffff::​2 lookup ​starlab 
 +</​file>​
  
 
internal/virtualswitch/start.1535878802.txt.gz · Last modified: 2018/09/02 11:00 by admin