Hybrid VLAN port on mikrotik
While setting up my MikroTik RB5009 router, I wanted to configure a hybrid VLAN port. This took me longer than expected and I didn't get it working just from reading the docs. What I missed the most is a simple example that doesn't configure DHCP and whatever else that is unrelated to the actual problem. To help future me and maybe others, I decided to share a minimal example how to configure hybrid VLAN ports. For an explanation how VLANs work and what hybrid ports are, there are plenty of better examples in the internet. Just google it.
VLAN 10 is for untagged traffic. VLAN 99 is for tagged traffic.
# ----------------------------------------
# MikroTik Hybrid VLAN port example config
# ----------------------------------------
# create a bridge
/interface bridge
add frame-types=admit-only-vlan-tagged name=bridge1
# add a port to the bridge, set the VLAN for untagged traffic
/interface bridge port
add bridge=bridge1 interface=ether1 pvid=10
# configure the VLAN "routing" table
/interface bridge vlan
add bridge=bridge1 tagged=ether1,bridge1 vlan-ids=99
add bridge=bridge1 tagged=bridge1 untagged=ether1 vlan-ids=10
# add vlan interfaces to test the setup
/interface vlan
add interface=bridge1 name=DEFAULT-VLAN vlan-id=10
add interface=bridge1 name=MGMT-VLAN vlan-id=99
# add IP addresses to test the setup
/ip address
add address=192.168.99.1/24 interface=MGMT-VLAN network=192.168.99.0
add address=192.168.10.1/24 interface=DEFAULT-VLAN network=192.168.10.0
# enable vlan filtering
/interface bridge
set 0 vlan-filtering=yes
To test it you can ping 192.168.10.1 for the untagged traffic and 192.168.99.1 for the tagged traffic. You'll have to manually configure the network interfaces on your client device.