Bearbeiten von „VLAN for virtual machines“

Wechseln zu: Navigation, Suche

Warnung: Du bist nicht angemeldet. Deine IP-Adresse wird öffentlich sichtbar, falls du Bearbeitungen durchführst. Sofern du dich anmeldest oder ein Benutzerkonto erstellst, werden deine Bearbeitungen zusammen mit anderen Beiträgen deinem Benutzernamen zugeordnet.

Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und speichere dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.
Aktuelle Version Dein Text
Zeile 159: Zeile 159:
 
The guest gets now an IP-Address on boot and is connected to VLAN 10.
 
The guest gets now an IP-Address on boot and is connected to VLAN 10.
  
=== Discussion ===
+
Hey guys!!!
This works because of [[#References|three conditions]].
+
designs and builds specialty lines of lead oxide production equipment, material handling systems, battery related process machinery, parts, and accessories for the battery, pigment, glass, and chemical industrieshttp://techbasys.com offers technical application and engineering services to help the customer acheive maximum benefit from their equipment and manufacturing processes.
# ageing time is 0: ageing time specifies the number of seconds a MAC Address will be kept in the forwarding database after having a packet received from this MAC Address. Setting it to 0 means there is never a MAC Address stored in the FDB.
 
# unicast flood on interfaces is on: this controls whether the bridge should flood traffic for which an FDB entry is missing and the destination is unknown through this port. Defaults to on.
 
# spanning tree protocol (stp) is disabled: we don't have a forward_delay at startup for the learning phase of spanning tree.
 
I have a running and connected virtual machine:
 
'''harley$''' sudo bridge vlan show
 
port    vlan ids
 
enp1s0  1 PVID Egress Untagged
 
br0      1 PVID Egress Untagged
 
vnet0    1 PVID Egress Untagged
 
'''harley$''' cat /sys/class/net/br0/bridge/ageing_time
 
0
 
'''harley$''' cat /sys/class/net/br0/bridge/forward_delay
 
1500
 
'''harley$''' cat /sys/class/net/br0/bridge/stp_state
 
0
 
Indeed we have forward_delay 1500 (means 15 sec) but it doesn't matter. stp_state is 0 (disabled), no spanning tree. Flood (means unicast flood) is on as I can see:
 
'''harley$''' sudo bridge -d link show
 
''3: enp1s0'' state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 4
 
    hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on
 
''95: vnet0'' state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 100
 
    hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on
 
'''harley$'''
 
 
 
 
 
Let's have a look at flooding on the interfaces. I disable it on the physical interface enp1s0 of the bridge and reboot the guest:
 
'''harley$''' sudo bridge link set dev enp1s0 flood off
 
'''harley$'''
 
The guest gets an IP-Address from the DHCP-Server but then can't ping its gateway. DHCP-REQUEST is broadcast and goes thru enp1s0. DHCP-ANSWER comes back thru it to any other (here only vnet0) interface which has flood on. Ping is unicast and isn't forwareded on enp1s0. If I set enp1s0 flood on and vnet0 flood off and <code>'''deb9-test$ '''sudo systemctl restart systemd-networkd</code>, I get no IP-Address from DHCP-Server and can't ping the interface. Incoming DHCP-ANSWER isn't broadcast and vnet0 doesn't forward it to the guest.
 
 
 
Btw. this method has bad performance as we can see with monitor. We insert MAC-Addresses into FDB for just deleting it immediately, all for nothing.
 
'''harley$''' sudo bridge monitor fdb
 
52:54:00:01:76:20 dev enp1s0 master br0
 
52:54:00:b0:ca:63 dev vnet0 master br0
 
f4:f2:6d:2c:87:f7 dev enp1s0 master br0
 
00:80:3f:2a:31:1a dev enp1s0 master br0
 
Deleted 52:54:00:01:76:20 dev enp1s0 master br0 stale
 
Deleted 52:54:00:b0:ca:63 dev vnet0 master br0 stale
 
Deleted 00:80:3f:2a:31:1a dev enp1s0 master br0 stale
 
Deleted f4:f2:6d:2c:87:f7 dev enp1s0 master br0 stale
 
...
 
  
 
=== References ===
 
=== References ===

Bitte beachte, dass alle Beiträge zu Ingos Wiki von anderen Mitwirkenden bearbeitet, geändert oder gelöscht werden können. Reiche hier keine Texte ein, falls du nicht willst, dass diese ohne Einschränkung geändert werden können.

Du bestätigst hiermit auch, dass du diese Texte selbst geschrieben hast oder diese von einer gemeinfreien Quelle kopiert hast (weitere Einzelheiten unter My wiki:Urheberrechte). ÜBERTRAGE OHNE GENEHMIGUNG KEINE URHEBERRECHTLICH GESCHÜTZTEN INHALTE!

Abbrechen | Bearbeitungshilfe (wird in einem neuen Fenster geöffnet)