MikroTik CapsMan és switch egyben VLANokkal probléma

Sziasztok,

adott egy hAP ac² , mint router, ahol az ether3 és ether4-es portokra fel van véve a CapsMan elérés és 3 darab VLAN (Private - 47, Guest - 43 és Company - 41), DHCP-vel együtt. A Router ezen portjaira rá van kötve 1-1 RB260GSP switch, hogy több további hAP ac² eszközt lehessen rádugni POE-n keresztül.

A CapsMan működik is az összes eszközön, de pár eszközön be szeretnénk állítani azt is, hogy ha valaki vezetékesen csatlakozik az eszközre, akkor a VLAN41 Company hálózatot el tudja érni. Ehhez létre is hozok egy 41-es VLAN-t az ether1-hez, beteszem egy bridge-be ezt és a szükséges fizikai portokat, beállítom a gateway-t.

Így működik is a vezetékes kapcsolat, de ha a CapsMan által kezelt Wi-Fi-s Company hálózatra felcsatlakozik valaki, akkor nem kap DHCP-t és az internetet sem lehet elérni, ha saját kezűleg is írom be az IP-t, Gateway-t és az álhálózati maszkot.

Beszúrom a kiexportált beállításokat is:

/interface bridge

add name=bridge1

add name=bridge2

/interface wireless

# managed by CAPsMAN

# channel: 2412/20-Ce/gn(17dBm), SSID: SSID1, local forwarding

set [ find default-name=wlan1 ] disabled=no ssid=MikroTik

set [ find default-name=wlan2 ] ssid=MikroTik

/interface vlan

add interface=ether1 name=VLAN411 vlan-id=41

/interface wireless security-profiles

set [ find default=yes ] supplicant-identity=MikroTik

/ip hotspot profile

set [ find default=yes ] html-directory=flash/hotspot

/interface bridge port

add bridge=bridge1 interface=VLAN411

add bridge=bridge1 interface=ether2

add bridge=bridge1 interface=ether3

add bridge=bridge1 interface=ether4

add bridge=bridge2 interface=ether1

/interface wireless cap

set bridge=bridge2 discovery-interfaces=bridge2 enabled=yes interfaces=wlan1

/ip dns

set servers=1.1.1.1

/ip route

add distance=1 gateway=192.168.41.1

/system clock

set time-zone-name=Europe/Budapest

Próbáltam előtte egy Factory Reset-et, mert gondoltam, hogy az ezelőtti beállításaim bekavarhattak, de így sem oldódott meg a probléma. Mi lehet a megoldás?

Előre is köszönöm a segítséget.

Hozzászólások

Szerkesztve: 2020. 06. 29., h – 15:31

Szia !

Bocs, csak végigfutottam a problémán, sok idő nem volt rá...

Gyorsan : vlan filtering bridgeben van megvalósítva.

Én capsman capsman-t (manager) forwarding módban használom, mivel van egy régi d-link switch, amiben nem igazán sikerül vlant beállítani,- konkrétan nincs, vagy csak én nem látom.

Többet ér a példa a sok beszéd helyett :

Ötlet : https://wiki.mikrotik.com/wiki/Manual:CAPsMAN_with_VLANs

Local forwarding : In Local Forwarding Mode the CAPsMAN router is distributing the configuration across all CAPs that are being provisioned by the CAPsMAN router. In Local Forwarding Mode traffic is not required to be sent to the CAPsMAN router, rather it can be sent to a different router without involving the CAPsMAN router when forwarding traffic. This mode allows you to tag traffic to a certain VLAN ID before it is being sent to your network from your Wireless client, which adds possibilities to use a switch to limit certain VLAN IDs to certain ports. In Local Forwarding Mode traffic is not encapsulated with a special CAPsMAN header, which can only be removed by a CAPsMAN router.

 

CAPsMAN forwarding : In CAPsMAN Forwarding Mode all traffic that is coming from a CAP is encapsulated with a special CAPsMAN header, which can only be removed by a CAPsMAN router, this means that a switch will not be able to distinguish the VLAN ID set by the CAP since the VLAN tag is also going to be encapsulated. This mode limits the possibility to divert traffic in Layer2 networks, but gives you the possibility to forward traffic from each CAP over Layer3 networks for a distant CAPsMAN router to process the traffic, this mode is useful when you want to control multiple CAPs in remote locations, but want to use a central gateway.

 

bocs, most kevés az időm,  lényeg kiemelve. Ha nem ok, később tudok segíteni. üdv

Volt egy kis időm újra foglalkozni a MikroTik hálózattal, mostmár Forwarding van beállítva, de az AP már nem akar csatlakozni a Company VLAN-ra.

A hivatalos leírásban az ether1-hez rendeli a 10-es VLAN-t, az ether2-höz pedig a 20-ast. De nekem csak az ether2-höz kell a 41-est, de így a WLAN-ok közül csak a 41-es Company működik, így hozzáadtam egy kis VLAN-t a bridge-hez:

/interface bridge vlan

add bridge=DefaultBridge tagged=DefaultBridge untagged=ether2,ether3,ether4,ether5 vlan-ids=41

add bridge=DefaultBridge tagged=DefaultBridge untagged=ether3,ether4,ether5 vlan-ids=43

add bridge=DefaultBridge tagged=DefaultBridge untagged=ether3,ether4,ether5 vlan-ids=47

Jelenleg így állok:

Router:

/interface bridge

add name=DefaultBridge vlan-filtering=yes

/interface wireless

set [ find default-name=wlan1 ] ssid=MikroTik

set [ find default-name=wlan2 ] ssid=MikroTik

/interface vlan

add interface=DefaultBridge name=VLAN41 vlan-id=41

add interface=DefaultBridge name=VLAN43 vlan-id=43

add interface=DefaultBridge name=VLAN47 vlan-id=47

/caps-man configuration

add country=latvia datapath.bridge=DefaultBridge datapath.vlan-id=41 datapath.vlan-mode=use-tag name=Config_Work security.authentication-types=wpa-psk,wpa2-psk \

    security.passphrase=password ssid=WiFi_Work

add country=latvia datapath.bridge=DefaultBridge datapath.vlan-id=43 datapath.vlan-mode=use-tag name=Config_Guest security.authentication-types=wpa-psk,wpa2-psk \

    security.passphrase=password ssid=WiFi_Guest

add country=latvia datapath.bridge=DefaultBridge datapath.vlan-id=47 datapath.vlan-mode=use-tag name=Config_Private security.authentication-types=wpa-psk,wpa2-psk \

    security.passphrase=password ssid=WiFi_Private

/interface wireless security-profiles

set [ find default=yes ] supplicant-identity=MikroTik

/ip pool

add name=dhcp_pool41 ranges=192.168.41.2-192.168.41.254

add name=dhcp_pool43 ranges=192.168.43.2-192.168.43.254

add name=dhcp_pool47 ranges=192.168.47.2-192.168.47.254

/ip dhcp-server

add address-pool=dhcp_pool41 disabled=no interface=VLAN41 name=dhcp41

add address-pool=dhcp_pool43 disabled=no interface=VLAN43 name=dhcp43

add address-pool=dhcp_pool47 disabled=no interface=VLAN47 name=dhcp47

/caps-man manager

set enabled=yes

/caps-man manager interface

set [ find default=yes ] forbid=yes

add disabled=no interface=ether3

add disabled=no interface=ether4

add disabled=no interface=ether5

/caps-man provisioning

add action=create-dynamic-enabled master-configuration=Config_Work slave-configurations=Config_Guest,Config_Private

/interface bridge port

add bridge=DefaultBridge interface=ether2 pvid=41

/interface bridge vlan

add bridge=DefaultBridge tagged=DefaultBridge untagged=ether2,ether3,ether4,ether5 vlan-ids=41

add bridge=DefaultBridge tagged=DefaultBridge untagged=ether3,ether4,ether5 vlan-ids=43

add bridge=DefaultBridge tagged=DefaultBridge untagged=ether3,ether4,ether5 vlan-ids=47

/ip address

add address=192.168.41.1/24 interface=VLAN41 network=192.168.41.0

add address=192.168.43.1/24 interface=VLAN43 network=192.168.43.0

add address=192.168.47.1/24 interface=VLAN47 network=192.168.47.0

/ip dhcp-server network

add address=192.168.41.0/24 dns-server=8.8.8.8 gateway=192.168.41.1

add address=192.168.43.0/24 dns-server=8.8.8.8 gateway=192.168.43.1

add address=192.168.47.0/24 dns-server=8.8.8.8 gateway=192.168.47.1

/system identity

set name=Router

 

Az AP:

/interface bridge

add name=bridge

/interface wireless

set [ find default-name=wlan1 ] ssid=MikroTik

set [ find default-name=wlan2 ] ssid=MikroTik

/interface vlan

add interface=ether1 name=VLAN411 vlan-id=41

/interface wireless security-profiles

set [ find default=yes ] supplicant-identity=MikroTik

/interface bridge port

add bridge=bridge interface=ether1

add bridge=bridge interface=ether2

add bridge=bridge interface=ether3

add bridge=bridge interface=ether4

add bridge=bridge interface=VLAN411

/ip address

add address=192.168.41.100/24 interface=VLAN411 network=192.168.41.0

/ip dhcp-client

add dhcp-options=hostname,clientid interface=bridge

/ip dns

set servers=1.1.1.1

/ip route

add distance=1 gateway=192.168.41.1

 

Ebben az esetben már nem tudom pingelni a gatewayt vezetéken.

Szia, a router-en próbáltam ilyen módon is beállítani, de az AP WLAN-on keresztül továbbra sem használható a VLAN41-es hálózat.

Az AP-n local forwarding miatt alapból van egy bridge1, ahová az ether1, wlan1-3 interface-ek vannak add-olva.

Na már most, ha én hozzáadok egy VLAN41-est az ether1-hez (mert a POE miatt arra van rádugva a router-re), létrehozok egy bridge2-t, hozzáadom a VLAN41-est és az ether2-5-öt, beállítom a gatewayt, akkor működik vezetékesen, de WLAN-on nem. De ha ahogy te írtad, eltávolítom a VLAN41-et a bridge2-ből és az ether1 interface-ről és bridge vlan filteringet használok, akkor WLAN-on meg, de vezetékesen nem és ping-elni sem tudom a routert.

Jelenleg így állok:

AP:

/interface bridge
add name=LAN
add name=WLAN
/interface wireless
set [ find default-name=wlan1 ] disabled=no ssid=MikroTik
set [ find default-name=wlan2 ] ssid=MikroTik
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/interface bridge port
add bridge=WLAN interface=ether1
add bridge=LAN interface=ether2
add bridge=LAN interface=ether3
add bridge=LAN interface=ether4
/interface bridge vlan
add bridge=LAN tagged=ether1 untagged=ether2,ether3,ether4,ether5 vlan-ids=41
/interface wireless cap
set bridge=WLAN discovery-interfaces=WLAN enabled=yes interfaces=wlan1
/ip address
add address=192.168.41.100/24 interface=LAN network=192.168.41.0
/ip dns
set servers=1.1.1.1
/ip route
add distance=1 gateway=192.168.41.1
/system identity
set name=Client

VLAN interface-es router:

/caps-man configuration
add country=hungary datapath.local-forwarding=yes datapath.vlan-id=41 datapath.vlan-mode=use-tag hide-ssid=no mode=ap name=Company security.authentication-types=wpa2-psk \
    security.passphrase=companypassword ssid=Company
add country=hungary datapath.local-forwarding=yes datapath.vlan-id=43 datapath.vlan-mode=use-tag hide-ssid=no mode=ap name=Guest security.authentication-types=wpa2-psk \
    security.passphrase=guestpassword ssid=Guest
add country=hungary datapath.local-forwarding=yes datapath.vlan-id=47 datapath.vlan-mode=use-tag hide-ssid=no mode=ap name=Private security.authentication-types=wpa2-psk \
    security.passphrase=privatepassword ssid=Private
/interface bridge
add name=CompanyBridge
add name=GuestBridge
add name=PrivateBridge
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
set [ find default-name=wlan2 ] ssid=MikroTik
/interface vlan
add interface=ether3 name=VLAN413 vlan-id=41
add interface=ether4 name=VLAN414 vlan-id=41
add interface=ether3 name=VLAN433 vlan-id=43
add interface=ether4 name=VLAN434 vlan-id=43
add interface=ether3 name=VLAN473 vlan-id=47
add interface=ether4 name=VLAN474 vlan-id=47
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=CompanyPool ranges=192.168.41.100-192.168.41.200
add name=GuestPool ranges=192.168.43.100-192.168.43.200
add name=PrivatePool ranges=192.168.47.100-192.168.47.200
/ip dhcp-server
add address-pool=CompanyPool disabled=no interface=CompanyBridge name=CompanyDHCP
add address-pool=GuestPool disabled=no interface=GuestBridge name=GuestDHCP
add address-pool=PrivatePool disabled=no interface=PrivateBridge name=PrivateDHCP
/caps-man manager
set enabled=yes
/caps-man manager interface
set [ find default=yes ] forbid=yes
add disabled=no interface=ether3
add disabled=no interface=ether4
/caps-man provisioning
add action=create-dynamic-enabled master-configuration=Company slave-configurations=Guest,Private
/interface bridge port
add bridge=CompanyBridge interface=ether2
add bridge=CompanyBridge interface=VLAN413
add bridge=CompanyBridge interface=VLAN414
add bridge=GuestBridge interface=VLAN433
add bridge=GuestBridge interface=VLAN434
add bridge=PrivateBridge interface=VLAN473
add bridge=PrivateBridge interface=VLAN474
/ip address
add address=192.168.41.1/24 interface=CompanyBridge network=192.168.41.0
add address=192.168.43.1/24 interface=GuestBridge network=192.168.43.0
add address=192.168.47.1/24 interface=PrivateBridge network=192.168.47.0
/ip dhcp-server network
add address=192.168.41.0/24 dns-server=1.1.1.1 gateway=192.168.41.1
add address=192.168.43.0/24 dns-server=1.1.1.1 gateway=192.168.43.1
add address=192.168.47.0/24 dns-server=1.1.1.1 gateway=192.168.47.1
/ip dns
set servers=1.1.1.1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Budapest
/system identity
set name=Router

Ugyanez a router, csak ahogy te mondtad:

/caps-man configuration
add country=hungary datapath.local-forwarding=yes datapath.vlan-id=41 datapath.vlan-mode=use-tag hide-ssid=no mode=ap name=Company \
    security.authentication-types=wpa2-psk security.passphrase=companypassword ssid=Company
add country=hungary datapath.local-forwarding=yes datapath.vlan-id=43 datapath.vlan-mode=use-tag hide-ssid=no mode=ap name=Guest \
    security.authentication-types=wpa2-psk security.passphrase=guestpassword ssid=Guest
add country=hungary datapath.local-forwarding=yes datapath.vlan-id=47 datapath.vlan-mode=use-tag hide-ssid=no mode=ap name=Private \
    security.authentication-types=wpa2-psk security.passphrase=privatepassword ssid=Private
/interface bridge
add name=CompanyBridge pvid=41 vlan-filtering=yes
add name=GuestBridge
add name=PrivateBridge
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
set [ find default-name=wlan2 ] ssid=MikroTik
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=CompanyPool ranges=192.168.41.100-192.168.41.200
add name=GuestPool ranges=192.168.43.100-192.168.43.200
add name=PrivatePool ranges=192.168.47.100-192.168.47.200
/ip dhcp-server
add address-pool=CompanyPool disabled=no interface=CompanyBridge name=CompanyDHCP
add address-pool=GuestPool disabled=no interface=GuestBridge name=GuestDHCP
add address-pool=PrivatePool disabled=no interface=PrivateBridge name=PrivateDHCP
/caps-man manager
set enabled=yes
/caps-man manager interface
set [ find default=yes ] forbid=yes
add disabled=no interface=ether3
add disabled=no interface=ether4
/caps-man provisioning
add action=create-dynamic-enabled master-configuration=Company slave-configurations=Guest,Private
/interface bridge vlan
add bridge=CompanyBridge tagged=ether2,ether3,ether4 vlan-ids=41
add bridge=GuestBridge tagged=ether3,ether4 vlan-ids=43
add bridge=PrivateBridge tagged=ether3,ether4 vlan-ids=47
/ip address
add address=192.168.41.1/24 interface=CompanyBridge network=192.168.41.0
add address=192.168.43.1/24 interface=GuestBridge network=192.168.43.0
add address=192.168.47.1/24 interface=PrivateBridge network=192.168.47.0
/ip dhcp-server network
add address=192.168.41.0/24 dns-server=1.1.1.1 gateway=192.168.41.1
add address=192.168.43.0/24 dns-server=1.1.1.1 gateway=192.168.43.1
add address=192.168.47.0/24 dns-server=1.1.1.1 gateway=192.168.47.1
/ip dns
set servers=1.1.1.1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Budapest
/system identity
set name=Router

Itt sajnos az ether2-re kiadott 41-es VLAN hálózat nem működik már.

Egyreszt kellene a caps-man konfighoz a datapath.bridge (hogy tudja melyik bridge-be tegye a wlan-t), masreszt a tobbi bridge-re is kellene a vlan filtering (meg kellene valami mod is rajuk, mondjuk MSTP) mert csak egynel kapcsoltad be a 3 kozul.

az interface bridge port hogy nez ki?

A masodik exportnal teljesen hianyzik az interface bridge port resz, ha ott nem definialtal semmit akkor anelkul tuti nem fog menni.

 

Szerk: amugy lehet azt kellene csinalnod, hogy capsman forwardingot csinalsz statikus interface-ekkel (create enabled a create dynamic enabled helyett) es akkor a caps manageren berakod az interface-eket a megfelelo bridge-ekbe. Ha nincs nagy helyi forgalom, akkor a local forwarding elveszteset karpotolja a lenyegesen egyszerubb menedzsment.

Szia,

közben sikerült megoldani: létrehoztam 3 bridge-et, beleraktam az etherX portokat abba, amelyik hálózaton (bridge-en) szeretném használni. A CapsMan config-on belül ráraktam a datapath-re is a megfelelő bridge-eket és meg is volna. Ha rádugom a routerre az AP-t, akkor kapok is az ether1-re IP-t (később én magam állítottam be, hogy fix legyen), az AP-n belerakom az összes portot egy bridge-be, beállítom a CAP-t és megy vezetékesen és WLAN-on is.

Köszönöm a segítségeteket.

Sziasztok,

egy kis segítséget szeretnék kérni tőletek. Én is hasonló problémával küzdök. A Wi-FI rész rendben van, de az AP-n vezetéken nem kap ip címet a kliensem a DHCP szervertől.

A "VLAN interface-es router" konfigurációját beütöttem a CAPsMAN eszközbe, az AP konfigurációja pedig az előtte lévő bekezdésben az "AP:".

"az AP-n belerakom az összes portot egy bridge-be, beállítom a CAP-t és megy vezetékesen és WLAN-on is." - ez egészen pontosan melyik bridge az AP-n? A WAN vagy a LAN? ...vagy teljesen félre értelmeztem az utolsó bejegyzésedet?

A konfigurációkat nem mellékelm, mert teljesen ugyan azok, mint a fentiek ("VLAN interface-es router" és "AP")

Segítségeteket előre is köszönöm.