Änderungen

Zur Navigation springen Zur Suche springen
Zeile 639: Zeile 639:     
====Netzwerk Config====
 
====Netzwerk Config====
 +
Installation Open vSwitch
 +
<source lang='text'>
 +
apt-get install openvswitch-switch openvswitch-common
 +
</source>
 +
 +
Anlegen der Open vSwitch Bridges
 +
<source lang='text'>
 +
ovs-vsctl add-br br-eth0
 +
ovs-vsctl add-port br-eth0 eth0
 +
 +
ovs-vsctl add-br br-eth1
 +
ovs-vsctl add-port br-eth1 eth1
 +
 +
ovs-vsctl add-br br-eth3
 +
ovs-vsctl add-port br-eth3 eth3
 +
 +
ovs-vsctl add-br br-eth4
 +
ovs-vsctl add-port br-eth4 eth4
 +
</source>
 +
 +
 
<source lang='text'>
 
<source lang='text'>
 
auto lo
 
auto lo
Zeile 673: Zeile 694:  
auto eth4
 
auto eth4
 
iface eth4 inet manual
 
iface eth4 inet manual
 +
</source>
 +
 +
====Libvirt Networks====
 +
Man legt z.B. nach /tmp/ die Netzwerk Definitionen ab.
 +
 +
Datei /tmp/ovs-eth0.xml
 +
<source lang='xml'>
 +
<network>
 +
<name>ovs-eth0</name>
 +
<forward mode='bridge'/>
 +
<bridge name='br-eth0'/>
 +
<virtualport type='openvswitch'/>
 +
<portgroup name='vlan-all' default='yes'>
 +
  <vlan trunk='yes'>
 +
    <tag id='102'/>
 +
  </vlan>
 +
</portgroup>
 +
</network>
 +
</source>
 +
 +
Datei /tmp/ovs-eth1.xml
 +
<source lang='xml'>
 +
<network>
 +
<name>ovs-eth1</name>
 +
<forward mode='bridge'/>
 +
<bridge name='br-eth1'/>
 +
<virtualport type='openvswitch'/>
 +
<portgroup name='vlan-all' default='yes'>
 +
  <vlan trunk='yes'>
 +
    <tag id='101'/>
 +
  </vlan>
 +
</portgroup>
 +
</network>
 +
</source>
 +
 +
Datei /tmp/ovs-eth3.xml
 +
<source lang='xml'>
 +
<network>
 +
<name>ovs-eth3</name>
 +
<forward mode='bridge'/>
 +
<bridge name='br-eth3'/>
 +
<virtualport type='openvswitch'/>
 +
<portgroup name='vlan-all' default='yes'>
 +
  <vlan trunk='yes'>
 +
    <tag id='50'/>
 +
    <tag id='51'/>
 +
    <tag id='52'/>
 +
    <tag id='53'/>
 +
    <tag id='54'/>
 +
    <tag id='55'/>
 +
    <tag id='56'/>
 +
    <tag id='57'/>
 +
    <tag id='58'/>
 +
    <tag id='59'/>
 +
    <tag id='60'/>
 +
  </vlan>
 +
</portgroup>
 +
</network>
 +
</source>
 +
 +
Datei /tmp/ovs-eth4.xml
 +
<source lang='xml'>
 +
<network>
 +
<name>ovs-eth4</name>
 +
<forward mode='bridge'/>
 +
<bridge name='br-eth4'/>
 +
<virtualport type='openvswitch'/>
 +
<portgroup name='vlan-all' default='yes'>
 +
  <vlan trunk='yes'>
 +
    <tag id='60'/>
 +
    <tag id='61'/>
 +
    <tag id='62'/>
 +
    <tag id='63'/>
 +
    <tag id='64'/>
 +
    <tag id='65'/>
 +
    <tag id='66'/>
 +
    <tag id='67'/>
 +
    <tag id='68'/>
 +
    <tag id='69'/>
 +
    <tag id='70'/>
 +
  </vlan>
 +
</portgroup>
 +
</network>
 +
</source>
 +
 +
Netzwerk-Definitionen einlesen, starten und für den Autostart markieren.
 +
<source lang='text'>
 +
virsh net-define /tmp/ovs-eth0.xml
 +
virsh net-define /tmp/ovs-eth1.xml
 +
virsh net-define /tmp/ovs-eth3.xml
 +
virsh net-define /tmp/ovs-eth4.xml
 +
 +
virsh net-start ovs-eth0
 +
virsh net-start ovs-eth1
 +
virsh net-start ovs-eth3
 +
virsh net-start ovs-eth4
 +
 +
virsh net-autostart ovs-eth0
 +
virsh net-autostart ovs-eth1
 +
virsh net-autostart ovs-eth3
 +
virsh net-autostart ovs-eth4
 
</source>  
 
</source>  
   Zeile 756: Zeile 878:  
       <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
 
       <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
 
     </controller>
 
     </controller>
     <interface type='direct'>
+
     <interface type='bridge'>
 
       <mac address='52:54:00:a6:96:9e'/>
 
       <mac address='52:54:00:a6:96:9e'/>
       <source dev='eth0' mode='passthrough'/>
+
       <source bridge='br-eth0'/>
       <target dev='macvtap0'/>
+
      <vlan trunk='yes'>
 +
        <tag id='102'/>
 +
      </vlan>
 +
      <virtualport type='openvswitch'>
 +
        <parameters interfaceid='f7bb2560-9c5d-46b2-a747-be70c6cd51e8'/>
 +
      </virtualport>
 +
       <target dev='vnet0'/>
 
       <model type='virtio'/>
 
       <model type='virtio'/>
 
       <alias name='net0'/>
 
       <alias name='net0'/>
 
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
 
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
 
     </interface>
 
     </interface>
     <interface type='direct'>
+
     <interface type='bridge'>
 
       <mac address='52:54:00:5d:1d:39'/>
 
       <mac address='52:54:00:5d:1d:39'/>
       <source dev='eth1' mode='passthrough'/>
+
       <source bridge='br-eth1'/>
       <target dev='macvtap1'/>
+
      <vlan trunk='yes'>
 +
        <tag id='101'/>
 +
      </vlan>
 +
      <virtualport type='openvswitch'>
 +
        <parameters interfaceid='fbf6fb20-8ed5-4b53-8dc9-44c71de85cb1'/>
 +
      </virtualport>
 +
       <target dev='vnet1'/>
 
       <model type='virtio'/>
 
       <model type='virtio'/>
 
       <alias name='net1'/>
 
       <alias name='net1'/>
 
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
 
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
 
     </interface>
 
     </interface>
     <interface type='direct'>
+
     <interface type='bridge'>
 
       <mac address='52:54:00:c2:3d:41'/>
 
       <mac address='52:54:00:c2:3d:41'/>
       <source dev='eth3' mode='passthrough'/>
+
       <source bridge='br-eth3'/>
       <target dev='macvtap2'/>
+
      <vlan trunk='yes'>
 +
        <tag id='50'/>
 +
        <tag id='51'/>
 +
        <tag id='52'/>
 +
        <tag id='53'/>
 +
        <tag id='54'/>
 +
        <tag id='55'/>
 +
        <tag id='56'/>
 +
        <tag id='57'/>
 +
        <tag id='58'/>
 +
        <tag id='59'/>
 +
        <tag id='60'/>
 +
      </vlan>
 +
      <virtualport type='openvswitch'>
 +
        <parameters interfaceid='75c18259-f444-42f6-9e50-fc190f8d0c31'/>
 +
      </virtualport>
 +
       <target dev='vnet2'/>
 
       <model type='virtio'/>
 
       <model type='virtio'/>
 
       <alias name='net2'/>
 
       <alias name='net2'/>
 
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
 
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
 
     </interface>
 
     </interface>
     <interface type='direct'>
+
     <interface type='bridge'>
       <mac address='52:54:00:02:d8:6f'/>
+
       <mac address='52:54:00:f8:c8:64'/>
       <source dev='eth4' mode='passthrough'/>
+
       <source bridge='br-ffwi'/>
       <target dev='macvtap3'/>
+
       <target dev='vnet3'/>
 
       <model type='virtio'/>
 
       <model type='virtio'/>
 
       <alias name='net3'/>
 
       <alias name='net3'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
 
     </interface>
 
     </interface>
 
     <interface type='bridge'>
 
     <interface type='bridge'>
       <mac address='52:54:00:f8:c8:64'/>
+
       <mac address='52:54:00:36:16:cc'/>
       <source bridge='br-ffwi'/>
+
       <source bridge='br-eth4'/>
       <target dev='vnet0'/>
+
      <vlan trunk='yes'>
 +
        <tag id='61'/>
 +
        <tag id='62'/>
 +
        <tag id='63'/>
 +
        <tag id='64'/>
 +
        <tag id='65'/>
 +
        <tag id='66'/>
 +
        <tag id='67'/>
 +
        <tag id='68'/>
 +
        <tag id='69'/>
 +
        <tag id='70'/>
 +
      </vlan>
 +
      <virtualport type='openvswitch'>
 +
        <parameters interfaceid='f78d5cf4-a7da-4198-b590-19ab77c045b6'/>
 +
      </virtualport>
 +
       <target dev='vnet4'/>
 
       <model type='virtio'/>
 
       <model type='virtio'/>
 
       <alias name='net4'/>
 
       <alias name='net4'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+
       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
 
     </interface>
 
     </interface>
 
     <serial type='pty'>
 
     <serial type='pty'>
Zeile 853: Zeile 1.018:  
then
 
then
 
   logger "Sim-Papagei: Not available -> Reset VM"
 
   logger "Sim-Papagei: Not available -> Reset VM"
   virsh reset Sim-Papagei
+
   virsh reset Sim-Papagei || virsh start Sim-Papagei
 
   exit 0
 
   exit 0
 
else
 
else
Zeile 866: Zeile 1.031:  
*/20 * * * * /usr/local/bin/vm-watchdog.sh
 
*/20 * * * * /usr/local/bin/vm-watchdog.sh
 
</source>
 
</source>
      
==Gebäudeplan==
 
==Gebäudeplan==

Navigationsmenü