madtrick
Goto Top

Mikrotik L3-Switch - Fehlersuche, Konfiguration

Hallo zusammen,
ich benötige eure Hilfe bei unserem Heimnetzwerk.

Struktur:
Internet => Vigor 165 Modem => APU pfSense => Switch Layer3 Mikrotik CRS326-24G-2S+ => mehrere VLANs

Die pfSense stellt dem Netzwerk über pfBlockerNG Werefilter dem Netzwerk das Internet zur Verfügung.
Über das Koppelnetz VLAN99 (10.99.99.0/24) sind pfSense und Switch verbunden.
Der Switch eröffnet dann die verschiedenen VLANs für die verschiedenen Bereiche des Netzwerkes.

Die Firewall des Switches soll Zugriffe von VLAN zu VLAN erlauben oder verbieten. Also manche IP-Bereiche gegeneinander abriegeln oder den Zugriff in einen anderen IP-Bereich erlauben.

IP-Bereiche:
10.99.99.0/24 - VLAN99 - Koppelnetz
10.10.10.0/24 - VLAN1 - Administrative Zugänge zu Geräten (IPMI, GUIs, etc...)
192.168.20.0/24 - VLAN20 - Drucker, Scanner
192.168.30.0/24 - VLAN30 - Mediengeräte, Fernseher, Player, Verstärker, ...
192.168.40.0/24 - VLAN40 - LAN, PCs über Kabel
192.168.41.0/24 - VLAN41 - WLAN, PCs über WLAN
192.168.42.0/24 - VLAN42 - Mobilgeräte, Handys
192.168.90.0/24 - VLAN90 - Gastnetz über WLAN
Es gibt weitere VLANs. Damit es ein wenig übersichtlich bleibt habe ich die Liste etwas eingekürzt.

Das Gastnetz geht durch den Switch den Mikrotik AP Cap.

Was nun passieren darf/soll ist zum Beispiel:
Geräte in VLAN1 bleiben unter sich und kein anderes VLAN darf auf VLAN1 zu greifen.
VLAN40 darf in VLAN20 und VLAN41. Rest verboten.
VLAN20 darf in VLAN40 und VLAN41. Rest verboten.
VLAN30 darf in VLAN20. Rest verboten.
VLAN90 darf nirgendwo hin.

Soweit die Wünsche.
Bisher hatte ich die Konfig nicht wirklich sauber bis zu Ende erstellt. Nach Updates der Firmware und der pfSense bin ich da mal dran gegangen. Die Firewall-Regeln des Switch waren auch nicht ganz korrekt. Nachdem ich da dran gegangen bin, lief dann plötzlich gar nichts mehr, wie es eigentlich sollte. Also habe ich den Switch neu aufgesetzt und möchte nun Schritt für Schritt die Probleme lösen.
Jetzt sind keine Regeln definiert und meinem Verständnis nach sollte ich eigentlich Geräte zwischen den verschiedenen VLANs anpingen können. Das klappt aber leider nicht so ganz und schon gar nicht wie gedacht oder mal gelernt...
Deshalb bitte ich um eure Mithilfe. Möglicherweise stimmt an der Basis-Konfig des Switch grundsätzlich etwas nicht und euch fällt es ggf. auf. Die Konfig stelle ich mal mit online:

# apr/13/2021 16:52:49 by RouterOS 6.48.1
# software id = ####-####
#
# model = CRS326-24G-2S+
# serial number = ###########
/interface bridge
add admin-mac=C4:AD:34:86:FA:F2 auto-mac=no name=bridge1 vlan-filtering=yes
/interface vlan
add interface=bridge1 name=vlan1_Admin vlan-id=1
add interface=bridge1 name=vlan20_Print vlan-id=20
add interface=bridge1 name=vlan30_Media vlan-id=30
add interface=bridge1 name=vlan40_Lan vlan-id=40
add interface=bridge1 name=vlan41_Wlan vlan-id=41
add interface=bridge1 name=vlan42_Phone vlan-id=42
add interface=bridge1 name=vlan90_Gast vlan-id=90
add interface=bridge1 name=vlan99 vlan-id=99
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip dhcp-server option
add code=42 name="NTP Server" value="'10.99.99.1'"  
/ip pool
add comment=admin.madban.de name=pool_vlan1 ranges=10.10.10.200-10.10.10.230
add comment=print.madban.de name=pool_vlan20 ranges=192.168.20.200-192.168.20.230
add comment=media.madban.de name=pool_vlan30 ranges=192.168.30.200-192.168.30.230
add comment=lan.madban.de name=pool_vlan40 ranges=192.168.40.200-192.168.40.230
add comment=wlan.madban.de name=pool_vlan41 ranges=192.168.41.200-192.168.41.230
add comment=phone.madban.de name=pool_vlan42 ranges=192.168.42.200-192.168.42.230
/ip dhcp-server
add address-pool=pool_vlan1 disabled=no interface=vlan1_Admin name=dhcp_vlan1
add address-pool=pool_vlan20 disabled=no interface=vlan20_Print name=dhcp_vlan20
add address-pool=pool_vlan30 disabled=no interface=vlan30_Media name=dhcp_vlan30
add address-pool=pool_vlan40 disabled=no interface=vlan40_Lan name=dhcp_vlan40
add address-pool=pool_vlan41 disabled=no interface=vlan41_Wlan name=dhcp_vlan41
add address-pool=pool_vlan42 disabled=no interface=vlan42_Phone name=dhcp_vlan42
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=ether6
add bridge=bridge1 interface=ether7
add bridge=bridge1 interface=ether8
add bridge=bridge1 interface=ether9
add bridge=bridge1 interface=ether10
add bridge=bridge1 interface=ether11
add bridge=bridge1 interface=ether12
add bridge=bridge1 interface=ether13
add bridge=bridge1 interface=ether14
add bridge=bridge1 interface=ether15
add bridge=bridge1 interface=ether16
add bridge=bridge1 interface=ether17
add bridge=bridge1 interface=ether18
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether19 pvid=20
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether20 pvid=20
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether21 pvid=30
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether22 pvid=40
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether23 pvid=40
add bridge=bridge1 interface=ether24
add bridge=bridge1 interface=sfp-sfpplus1
add bridge=bridge1 interface=sfp-sfpplus2
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan1_Admin
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan20_Print pvid=20
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan30_Media pvid=30
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan40_Lan pvid=40
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan41_Wlan pvid=41
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan42_Phone pvid=42
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan90_Gast pvid=90
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan99 pvid=99
/interface bridge vlan
add bridge=bridge1 tagged=bridge1,vlan1_Admin untagged=ether1,ether24 vlan-ids=1
add bridge=bridge1 tagged=bridge1,vlan20_Print vlan-ids=20
add bridge=bridge1 tagged=bridge1,vlan30_Media vlan-ids=30
add bridge=bridge1 tagged=bridge1,vlan40_Lan vlan-ids=40
add bridge=bridge1 tagged=bridge1,vlan41_Wlan,ether24 vlan-ids=41
add bridge=bridge1 tagged=bridge1,vlan42_Phone,ether24 vlan-ids=42
add bridge=bridge1 tagged=bridge1,vlan90_Gast,ether1,ether24 vlan-ids=90
add bridge=bridge1 tagged=bridge1,vlan99,ether1 vlan-ids=99
/interface list member
add interface=ether1 list=WAN
add interface=bridge1 list=LAN
/ip address
add address=10.10.10.1/24 interface=vlan1_Admin network=10.10.10.0
add address=192.168.20.1/24 interface=vlan20_Print network=192.168.20.0
add address=192.168.30.1/24 interface=vlan30_Media network=192.168.30.0
add address=192.168.40.1/24 interface=vlan40_Lan network=192.168.40.0
add address=192.168.41.1/24 interface=vlan41_Wlan network=192.168.41.0
add address=192.168.42.1/24 interface=vlan42_Phone network=192.168.42.0
add address=10.99.99.254/24 interface=vlan99 network=10.99.99.0
/ip dhcp-server lease
# Leases geleert, der Übersicht halber
/ip dhcp-server network
add address=10.10.10.0/24 dns-server=10.10.10.1 gateway=10.10.10.1 netmask=24 ntp-server=10.99.99.1
add address=10.99.99.0/24 dns-server=10.99.99.254 gateway=10.99.99.254 netmask=24 ntp-server=10.99.99.1
add address=192.168.20.0/24 dns-server=192.168.20.1 gateway=192.168.20.1 netmask=16 ntp-server=10.99.99.1
add address=192.168.30.0/24 dns-server=192.168.30.1 gateway=192.168.30.1 netmask=16 ntp-server=10.99.99.1
add address=192.168.40.0/24 dns-server=192.168.40.1 gateway=192.168.40.1 netmask=16 ntp-server=10.99.99.1
add address=192.168.41.0/24 dns-server=192.168.41.1 gateway=192.168.41.1 netmask=16 ntp-server=10.99.99.1
add address=192.168.42.0/24 dns-server=192.168.42.1 gateway=192.168.42.1 netmask=16 ntp-server=10.99.99.1
/ip dns
set allow-remote-requests=yes servers=10.99.99.1
/ip firewall filter
add action=accept chain=input comment="accept ICMP echo reply" dst-address=192.168.0.0/16 icmp-options=0:0 protocol=icmp src-address=192.168.0.0/16  
add action=accept chain=input comment="accept ICMP destination unreachable" dst-address=192.168.0.0/16 icmp-options=3:0-1 protocol=icmp src-address=192.168.0.0/16  
add action=accept chain=input comment="accept ICMP echo request" dst-address=192.168.0.0/16 icmp-options=8:0 protocol=icmp src-address=192.168.0.0/16  
add action=accept chain=input comment="accept ICMP time exceeded" dst-address=192.168.0.0/16 icmp-options=11:0 protocol=icmp src-address=192.168.0.0/16  
/ip route
add distance=1 gateway=10.99.99.1
/system clock
set time-zone-name=Europe/Berlin
/system identity
set name=switch01
/system ntp client
set enabled=yes primary-ntp=10.99.99.1
/system routerboard settings
set boot-os=router-os

Content-Key: 665703

Url: https://administrator.de/contentid/665703

Ausgedruckt am: 28.03.2024 um 11:03 Uhr