Community discussions

MikroTik App
 
kunago
just joined
Topic Author
Posts: 18
Joined: Sun Mar 09, 2014 1:58 pm

DHCP server with VLAN and CAPsMAN

Tue Mar 13, 2018 9:54 am

What I am trying to achieve and failing to do so is to have a DHCP server that would serve IPs to my LAN and to CAPsMAN clients while being in a single VLAN. All clients in this VLAN should be able to reach each other while isolated from other VLANs.

So far I was able to make it work for CAPsMAN only. With the following setup my CAPsMAN clients properly receive IPs and receive VLAN tag, while it does not work for LAN clients. Those are unreachable by any means, do not receive an IP address from DHCP server. I tried to have the LAN clients to connect directly to Mikrotik where I have the DHCP server but it does not seem to work. Those interfaces I am connecting to are in bridge and that bridge has a VLAN interface.

Could someone please help?
/interface bridge
add fast-forward=no name="bridge company"
add fast-forward=no name="bridge company host"

/interface ethernet
set [ find default-name=ether1 ] name=ether01
set [ find default-name=ether2 ] name=ether02
set [ find default-name=ether3 ] name=ether03
set [ find default-name=ether4 ] name=ether04
set [ find default-name=ether5 ] name=ether05
set [ find default-name=ether6 ] name=ether06
set [ find default-name=ether7 ] name=ether07
set [ find default-name=ether8 ] name=ether08
set [ find default-name=ether9 ] name=ether09
set [ find default-name=ether10 ] poe-out=off
set [ find default-name=sfp1 ] name=sfp

/interface vlan
add interface="bridge company" name="VLAN company" vlan-id=8
add interface="bridge company host" name="VLAN company host" vlan-id=10

/ip address
add address=172.27.8.1/23 interface="VLAN company" network=172.27.8.0
add address=172.27.10.1/24 interface="VLAN company host" network=172.27.10.0

/caps-man datapath
add bridge="bridge company" client-to-client-forwarding=yes local-forwarding=no vlan-id=8 vlan-mode=use-tag name=company
add bridge="bridge company host" client-to-client-forwarding=no local-forwarding=no vlan-id=10 vlan-mode=use-tag name="company host"

/caps-man provisioning
add action=create-dynamic-enabled hw-supported-modes=gn identity-regexp=wifi1 master-configuration="2,4 GHz company" name-format=identity slave-configurations="2,4 GHz company slave - host"
add action=create-dynamic-enabled hw-supported-modes=gn identity-regexp=wifi2 master-configuration="2,4 GHz company" name-format=identity slave-configurations="2,4 GHz company slave - host"

/interface bridge port
add bridge="bridge company" hw=no interface=ether03
add bridge="bridge company" hw=no interface=ether04
add bridge="bridge company" hw=no interface=ether05
add bridge="bridge company" hw=no interface=ether06
add bridge="bridge company" hw=no interface=ether07
add bridge="bridge company" interface=ether08
add bridge="bridge company" hw=no interface=ether09
add bridge="bridge company" hw=no interface=ether10
add bridge="bridge company" hw=no interface=sfp

/interface bridge settings
set allow-fast-path=no use-ip-firewall=yes

/ip address
add address=172.27.8.1/23 interface="VLAN company" network=172.27.8.0
add address=172.27.10.1/24 interface="VLAN company host" network=172.27.10.0

/ip dhcp-client
add default-route-distance=21 dhcp-options=hostname,clientid disabled=no interface=ether01 use-peer-dns=no use-peer-ntp=no

/ip dhcp-server
add add-arp=yes address-pool="pool company" authoritative=after-2sec-delay disabled=no interface="VLAN company" lease-time=8h name="dhcp company"
add add-arp=yes address-pool="pool company host" authoritative=after-2sec-delay disabled=no interface="VLAN company host" lease-time=2h name="dhcp company host"

/ip dhcp-server network
add address=172.27.8.0/23 dns-server=172.27.8.1 gateway=172.27.8.1 netmask=23
add address=172.27.10.0/24 dns-server=172.27.10.1 gateway=172.27.10.1 netmask=24

/ip pool
add name="pool company" ranges=172.27.9.64/27
add name="pool company host" ranges=172.27.10.64/27

Who is online

Users browsing this forum: Google [Bot] and 218 guests