[SOLVED] Selbe Subnetze, unterschiedliche Bridges?

Dunuin

Distinguished Member
Jun 30, 2020
14,339
4,209
243
Germany
Moin,

Man soll ja keinem Host zwei IPs aus dem selben Subnetz verpassen, weil dann komische Situationen entstehen können. Also sowas wäre nicht gut:
Code:
+------------------+     +-----------------+
|                  |     |                 |
|      NIC A       |     |     NIC B       |
|                  |     |                 |
+--------+---------+     +--------+--------+
         |                        |
         v                        v
+--------+---------+     +--------+--------+
|                  |     |                 |
|      vmbr0       |     |      vmbr1      |
| 192.168.1.1      |     |  192.168.1.2    |
+------------------+     +-----------------+

Wie sieht es aber aus wenn ich zwei Bridges habe, über die Pakete aus dem selben Subnetz laufen, aber der Host selbst nur eine IP hat und die andere IP innerhalb eines Gastes ist? Also z.B. so:
Code:
+------------------+     +-----------------+
|                  |     |                 |
|      NIC A       |     |     NIC B       |
|                  |     |                 |
+--------+---------+     +--------+--------+
         |                        |
         v                        v
+--------+---------+     +--------+--------+
|                  |     |                 |
|      vmbr0       |     |      vmbr1      |
| 192.168.1.1      |     |                 |
+------------------+     +--------+--------+
                                  |
                                  |
                        +------------------+
                        | +-------v------+ |
                        | | 192.168.1.2  | |
                        | | Virtio       | |
                        | +--------------+ |
                        |      VM          |
                        |                  |
                        +------------------+

Ist das dann ok, weil die andere IP ja im Gast ist?
Oder ist das auch schon problematisch, weil der Host ja die Pakete über die Bridges routen muss und man dann zwei getrennte Bridges hat welche Pakete des selben Subnetztes leiten?
 
Ohne es explizit getestet zu haben - nehme ich an, dass das prinzipiell funktionieren sollte:
Das Problem mit 2 IPs aus dem gleichen Subnetz auf dem selben host, ist, dass es nur eine routing table (layer 3) gibt*, und es dann auf die (nicht immer deterministische) reihenfolge der 2 routen ankommt, bei welchem interface ein neues paket rausgeht.

Eine bridge ist aber ein reines layer 2 device und sollte sich den IP header nicht ansehen.

Ich hoffe das hilft!

* es ist sehr wohl möglich auch mehrere routing tables zu konfigurieren, nur dass dies normalerweise weit mehr Komplexität in das Setup bringt, als Nutzen
 
  • Like
Reactions: Dunuin

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!