Architektura Sieciowa

Architektura sieciowa
---
config:
  theme: neo
  layout: dagre
---
flowchart LR
 subgraph ETH["Ethernet LAN"]
        ETH2["ether 2<br>(LAN-01)"]
        ETH3["ether 3<br>(LAN-02)"]
        ETH4["ether 4<br>(LAN-03)"]
        ETH9["ether 9<br>(LAN-08)"]
        ETH10["ether 10<br>(LAN-09)"]
  end
 subgraph VLAN2["VLAN"]
        VLAN2D["VLAN 10<br>(LAN-01)"]
        VLAN2I["VLAN 20 - DMZ<br>(LAN-01)"]
  end
 subgraph VLAN3["VLAN"]
        VLAN3D["VLAN 10<br>(LAN-02)"]
        VLAN3I["VLAN 20 - DMZ<br>(LAN-02)"]
  end
 subgraph VLAN4["VLAN"]
        VLAN4D["VLAN 10<br>(LAN-03)"]
        VLAN4I["VLAN 20 - DMZ<br>(LAN-03)"]
  end
 subgraph BRIDGE["BRIDGES"]
        BRIDGESTORAGE["BRIDGE-STORAGE"]
        BRIDGE2["BRIDGE-PROXMOX"]
        BRIDGE3["BRIDGE-VMS-DMZ"]
        BRIDGE4["BRIDGE-VMS-INTERNAL"]
        BRIDGE5["BRIDGE-CLIENTS"]
  end
 subgraph DHCP["DHCP SERVERS"]
        DHCPSTORAGE["BRIDGE-STORAGE"]
        DHCP2["BRIDGE-PROXMOX"]
        DHCP3["DHCP-VMS-DMZ"]
        DHCP4["DHCP-VMS-INTERNAL"]
        DHCP5@{ label: "<span style=\"color:\">DHCP-CLIENTS</span>" }
  end
 subgraph LB["Router"]
        ROU0[("router.rachuna-net.pl")]
        ETH1["ether 1<br>WAN"]
        ROUB1["BONDING-STORAGE"]
        ETH
        VLAN2
        VLAN3
        VLAN4
        BRIDGE
        DHCP
  end
 subgraph PROXMOX["PROXMOX CLUSTER"]
        PVE-S1["PVE-S3"]
        PVE-S2["PVE-S2"]
        PVE-S3["PVE-S1"]
  end
    WAN["WAN"] ==> ETH1
    ETH1 ==> ROU0
    DHCPSTORAGE ==> BRIDGESTORAGE
    BRIDGESTORAGE ==> ROUB1
    ETH2 ==> PVE-S1
    ETH3 ==> PVE-S2
    ETH4 ==> PVE-S3
    VLAN2D ==> ETH2
    VLAN3D ==> ETH3
    VLAN4D ==> ETH4
    VLAN2I ==> ETH2
    VLAN3I ==> ETH3
    VLAN4I ==> ETH4
    DHCP2 ==> BRIDGE2
    BRIDGE2 ==> ETH2 & ETH3 & ETH4
    BRIDGE3 ==> VLAN4I & VLAN2I & VLAN3I
    BRIDGE4 ==> VLAN2D & VLAN3D & VLAN4D
    DHCP3 ==> BRIDGE3
    DHCP4 ==> BRIDGE4
    DHCP5 ==> BRIDGE5
    ROUB1 ==> ETH9 & ETH10
    ETH9 ==> STORAGE["storage.rachuna-net.pl"]
    ETH10 ==> STORAGE

    DHCP5@{ shape: rect}
    ROUB1@{ shape: rect}
    style ETH fill:#C8E6C9, color: #000000
    style BRIDGE fill:#E1BEE7, color: #000000
    style DHCP fill:#FFCDD2, color: #000000
    click ETH2 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/ethernet/ether2.tf?ref_type=heads"
    click ETH3 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/ethernet/ether3.tf?ref_type=heads"
    click ETH4 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/ethernet/ether4.tf?ref_type=heads"
    click ETH9 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/ethernet/ether9.tf?ref_type=heads"
    click ETH10 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/ethernet/ether10.tf?ref_type=heads"
    click VLAN2D "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/vlan/ether2-vlan-vms-internal.tf?ref_type=heads"
    click VLAN2I "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/vlan/ether2-vlan-vms-dmz.tf?ref_type=heads"
    click VLAN3D "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/vlan/ether3-vlan-vms-internal.tf?ref_type=heads"
    click VLAN3I "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/vlan/ether3-vlan-vms-dmz.tf?ref_type=heads"
    click VLAN4D "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/vlan/ether4-vlan-vms-internal.tf?ref_type=heads"
    click VLAN4I "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/vlan/ether4-vlan-vms-dmz.tf?ref_type=heads"
    click BRIDGESTORAGE "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/bridge/bridge-storage.tf?ref_type=heads"
    click BRIDGE2 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/bridge/bridge-proxmox.tf?ref_type=heads"
    click BRIDGE3 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/bridge/bridge-vms-dmz.tf?ref_type=heads"
    click BRIDGE4 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/bridge/bridge-vms-internal.tf?ref_type=heads"
    click BRIDGE5 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/bridge/bridge-clients.tf?ref_type=heads"
    click DHCPSTORAGE "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/dhcp-servers/dhcp-storage.tf"
    click DHCP2 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/dhcp-servers/dhcp-proxmox.tf"
    click DHCP3 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/dhcp-servers/dhcp-vms-dmz.tf"
    click DHCP4 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/dhcp-servers/dhcp-vms-internal.tf"
    click DHCP5 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/dhcp-servers/dhcp-clients.tf"
    click ETH1 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/ethernet/ether1.tf?ref_type=heads"
    click ROUB1 "https://gitlab.rachuna-net.pl/pl.rachuna-net/infrastructure/opentofu/iac-mikrotik/-/blob/main/router.rachuna-net.pl/interfaces/bonding/bonding-storage.tf?ref_type=heads"
    linkStyle 7 stroke:#D50000,fill:none
    linkStyle 8 stroke:#D50000,fill:none
    linkStyle 9 stroke:#D50000,fill:none
    linkStyle 10 stroke:#2962FF,fill:none
    linkStyle 11 stroke:#2962FF,fill:none
    linkStyle 12 stroke:#2962FF
    linkStyle 17 stroke:#2962FF,fill:none
    linkStyle 18 stroke:#2962FF,fill:none
    linkStyle 19 stroke:#2962FF,fill:none
    linkStyle 20 stroke:#D50000,fill:none
    linkStyle 21 stroke:#D50000,fill:none
    linkStyle 22 stroke:#D50000,fill:none
    linkStyle 23 stroke:#2962FF,fill:none
    linkStyle 24 stroke:#D50000,fill:none

1. Węzeł centralny – router brzegowy

Centralnym elementem architektury jest router router.rachuna-net.pl, który pełni funkcję:

  • bramy wyjściowej do Internetu (WAN),
  • głównego punktu dystrybucyjnego sieci LAN,
  • terminatora VLAN,
  • koncentratora mostów (bridge),
  • serwera DHCP dla wydzielonych segmentów sieci.

Interfejs ether1 pracuje jako port WAN i zapewnia bezpośredni dostęp do sieci Internet. Pozostałe interfejsy Ethernet są wykorzystywane jako porty dostępowe (LAN) dla serwerów, urządzeń końcowych oraz infrastruktury pomocniczej.


2. Segmentacja sieci i VLAN

Architektura oparta jest na logicznym podziale sieci przy użyciu VLAN-ów i mostów (bridge), co umożliwia separację ruchu oraz kontrolę bezpieczeństwa.

Na portach ether2, ether3 oraz ether4 skonfigurowano następujące sieci logiczne:

  • VLAN 20 – VMS-DMZ
  • VLAN 10 – VMS-INTERNAL

Porty te są fizycznie podłączone do węzłów wirtualizacyjnych:

  • pve-s3 – ether2 i ether3
  • pve-s2 – ether4

Ruch z tych interfejsów trafia do wspólnego węzła logicznego, który rozdziela go do trzech mostów:

  • BRIDGE-VMS-DMZ – dla maszyn wystawionych do strefy DMZ
  • BRIDGE-VMS-INTERNAL – dla maszyn wewnętrznych
  • BRIDGE-PROXMOX – sieć zarządzająca hypervisorami

Każdy z powyższych mostów posiada dedykowany serwer DHCP.


3. Sieć storage – agregacja łączy (bonding)

Bonding kart sieciowych został zastosowany w celu zwiększenia niezawodności oraz wydajności komunikacji z infrastrukturą storage, która stanowi krytyczny element całego środowiska.

Sieć storage jest całkowicie odseparowana logicznie od pozostałych segmentów (VMS, DMZ, CLIENTS), co minimalizuje ryzyko kolizji ruchu oraz wpływu obciążeń użytkowych na operacje magazynowania danych.

Most BRIDGE-STORAGE posiada dedykowany serwer DHCP, a ruch w tej sieci jest ograniczony wyłącznie do komunikacji pomiędzy węzłami klastra a systemem storage.


4. Sieć klientów (BRIDGE-CLIENTS)

Porty:

  • ether5 – router domowy
  • ether6 – drukarka
  • ether7nbo-002-mr
  • ether8nbo-001-mr

są podłączone do wspólnego mostu:

  • BRIDGE-CLIENTS

Most ten odpowiada za obsługę urządzeń końcowych i posiada oddzielny serwer DHCP dla klientów. Dodatkowo na ether5 zestawiony jest VLAN dedykowany dla ruchu klienckiego.


5. Sieć storage – agregacja łączy

Interfejsy:

  • ether9
  • ether10

zostały połączone logicznie w interfejs:

  • BONDING-STORAGE

Agregacja zapewnia:

  • większą przepustowość,
  • redundancję połączeń.

Interfejs bondingowy prowadzi do serwera storage, który następnie podłączony jest do:

  • BRIDGE-STORAGE

Most ten posiada dedykowany serwer DHCP dla sieci storage.


6. Warstwa serwerów DHCP

W architekturze funkcjonuje pięć niezależnych serwerów DHCP:

Segment Most Funkcja
VMS-DMZ BRIDGE-VMS-DMZ Adresacja maszyn w strefie DMZ
PROXMOX BRIDGE-PROXMOX Adresacja hypervisorów
VMS-INTERNAL BRIDGE-VMS-INTERNAL Adresacja maszyn wewnętrznych
CLIENTS BRIDGE-CLIENTS Adresacja urządzeń użytkowników
STORAGE BRIDGE-STORAGE Adresacja systemów magazynu danych

Taki podział gwarantuje pełną separację domen rozgłoszeniowych (broadcast) oraz umożliwia stosowanie niezależnych polityk bezpieczeństwa.


7. Dostęp do Internetu

Ruch wychodzący ze wszystkich mostów jest routowany przez:

  • ether1 (WAN) → Internet

Router pełni rolę centralnej bramy NAT oraz punktu kontroli bezpieczeństwa dla całej infrastruktury.


8. Zarządzanie konfiguracją (IaC)

Cała konfiguracja interfejsów, VLAN-ów, bondingów, mostów oraz serwerów DHCP zarządzana jest w modelu Infrastructure as Code przy użyciu OpenTofu/Terraform.

Każdy element topologii posiada odpowiadający mu plik konfiguracyjny, m.in.:

  • interfejsy Ethernet,
  • VLAN,
  • bonding,
  • bridge,
  • serwery DHCP.

Umożliwia to:

  • pełną wersjonowalność konfiguracji,
  • automatyczne odtwarzanie środowiska,
  • spójność konfiguracyjną między środowiskami.

Last modified December 19, 2025: docs: Update (72bba37)