Hi
I recently bought the hAP ac2 updated to the last version: RouterOS 7.1.1
In order to get familiar with the Router my goal was to
- configure the GW → achieved
- create VLANs → achieved
- create DHCP for each VLAN → achieved
The next step, is to create a Trunk on ether2 (as it would be for a Vmware Host connected to it) and define an access port (ether5) for the management.
I started to read some docs
- http://forum.mikrotik.com/t/using-routeros-to-vlan-your-network/126489/1
- https://wiki.mikrotik.com/wiki/Manual:Switch_Chip_Features
As my scenario is close to the Router-Switch-AP (all in one), but i was surprise to discover, that even copy pasting those examples, it does not work (the computer connected to the port ether5,
does not get IP from DHCP, and even with a manual ip configuration, no way to get router answer to pings (192.168.19.1). Is it do to the fact that this router has the atheros8327? (i read somewhere
that the vlan header is managed diferently).
The DHCP config (and ping to GW) is working as soon as the DHCP server is installed on the etherX interface, but as soon as i install it on any vlan interface… nothing (no IP from DHCP, no ping, no RouterOS connection with MAC).
As i expect to setup the same VLAN on several physical interfaces (f.eg: management), the DHCP server has to be at this level.
#
/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether2 hw=yes
add bridge=bridge1 interface=ether3 hw=yes
add bridge=bridge1 interface=ether4 hw=yes
add bridge=bridge1 interface=ether5 hw=yes
#set bridge=bridge1 ingress-filtering=yes frame-types=admit-only-untagged-and-priority-tagged [find interface=ether5]
/interface ethernet switch vlan
add ports=ether2 switch=switch1 vlan-id=200
add ports=ether2,ether5,bridge1 switch=switch1 vlan-id=99
/interface ethernet switch port
set ether2 vlan-mode=secure vlan-header=add-if-missing
set ether5 vlan-mode=secure vlan-header=always-strip default-vlan-id=99
/interface vlan
add name=vlan200 interface=bridge1 vlan-id=200
add name=vlan_base interface=bridge1 vlan-id=99
/ip pool
add name=pool200 ranges=192.168.10.201-192.168.10.250
add name=pool_base ranges=192.168.19.201-192.168.19.250
/ip dhcp-server network
add address=192.168.10.0/24 dns-server=9.9.9.9 gateway=192.168.10.1
add address=192.168.19.0/24 dns-server=9.9.9.9 gateway=192.168.19.1
/ip dhcp-server
add address-pool=pool200 interface=vlan200 name=dhcp200
add address-pool=pool_base interface=vlan_base name=dhcp_base
/ip address
add address=192.168.249.2/30 interface=ether1
add address=192.168.10.1/24 interface=vlan200
add address=192.168.19.1/24 interface=vlan_base
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=192.168.249.1 routing-table=main suppress-hw-offload=no
Could you please help me to get VLAN and DHCP working, any coments would be apreciated.
Thanks
