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
internal:virtualswitch:start [2018/09/02 11:07]
admin
internal:virtualswitch:start [2018/09/02 11:24] (current)
admin [Server configuration (Linux)]
Line 3: Line 3:
 Pro virtualni switch je potreba priradit interface do VLAN. Pro verejne IP je pro vsechny zakazniky ​ shodna VLAN ID = 4010. Dale je treba nastavit MTU na 1400. Pro virtualni switch je potreba priradit interface do VLAN. Pro verejne IP je pro vsechny zakazniky ​ shodna VLAN ID = 4010. Dale je treba nastavit MTU na 1400.
  
-Priklad konfigurace sitove karty "​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=====
Line 23: Line 28:
  
 <code bash> <code bash>
-echo "​1 ​vswitch" >> /​etc/​iproute2/​rt_tables+echo "​1 ​starlab" >> /​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>​ </​code>​
  
Line 49: Line 54:
  
 <code bash> <code bash>
-echo "​1 ​vswitch" >> /​etc/​iproute2/​rt_tables+echo "​1 ​starlab" >> /​etc/​iproute2/​rt_tables
 </​code>​ </​code>​
  
Line 62: 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>​ </​file>​
  
 
internal/virtualswitch/start.1535879240.txt.gz · Last modified: 2018/09/02 11:07 by admin