How to bridge the traffic (no vlan tag) coming on eth1 with the traffic coming from vlan23 which is also on eth1?
Thanks.
P.S. Looks like this is RotuerOS limitation
This has been discussed multiple times with no resolution.
interface FastEthernet0/1
description VLAN Trunk with native (untagged) VLAN
switchport trunk native vlan 100
switchport trunk allowed vlan 100,101
switchport mode trunk
!
interface FastEthernet0/2
description Access port (no tagging) on VLAN 100
switchport access vlan 100
!
interface FastEthernet0/3
description Access port (no tagging) on VLAN 101
switchport access vlan 101
!
...CURRENTLY NO WAY to somehow split out untagged packets from ether1...
/interface vlan add disabled=no vlan-id=101 interface=ether1 name=ether1_vlan101
/interface bridge add name=vlan100_bridge
...CURRENTLY NO WAY to bridge vlan100_bridge to interface ether1 UNTAGGED...
/interface bridge port add interface=ether2 bridge=vlan100_bridge
/interface bridge add name=vlan101_bridge
/interface bridge port add interface=ether1_vlan101 bridge=vlan101_bridge
/interface bridge port add interface=ether3 bridge=vlan101_bridge
/interface vlan add disabled=no vlan-id=101 interface=ether1 name=ether1_vlan101
/interface vlan add disabled=no vlan-id=0 interface=ether1 name=ether1_untagged
/interface bridge add name=vlan100_bridge
/interface bridge port add interface=ether1_untagged bridge=vlan100_bridge
/interface bridge port add interface=ether2 bridge=vlan100_bridge
/interface bridge add name=vlan101_bridge
/interface bridge port add interface=ether1_vlan101 bridge=vlan101_bridge
/interface bridge port add interface=ether3 bridge=vlan101_bridge
Yes. This is so simple I don't even need to say anything more.... CLI command such that if vlan-id=0 were specified, it would indicate that all untagged packets received on that interface would belong to the named pseudo-vlan interface (and likewise packets outgoing from that pseudo-vlan interface would be untagged on transmission out the physical interface)....
Looking at your cisco configuration i would do it like this:Code:
interface FastEthernet0/1
description VLAN Trunk with native (untagged) VLAN
switchport trunk native vlan 100
switchport trunk allowed vlan 100,101
switchport mode trunk
!
interface FastEthernet0/2
description Access port (no tagging) on VLAN 100
switchport access vlan 100
!
interface FastEthernet0/3
description Access port (no tagging) on VLAN 101
switchport access vlan 101
!
Hi Bill,With all due respect to Jorge,
The fix here seems to define a default VLAN for all untagged traffic arriving on an interface so you can dump it onto an existing VLAN. The concept of the default VLAN is carried though in Cisco equipment and an industry standard term. Untagged traffic wouldn't need to have a special bridge rule then.
This problem caused me a bunch of confusion not too long ago. I was frustrated at this limitation as well and I vote for a fix or attention from the kind Mikrotik support staff.
Cheers.
Bill
Hello again,With all due respect to Jorge,
The fix here seems to define a default VLAN for all untagged traffic arriving on an interface so you can dump it onto an existing VLAN. The concept of the default VLAN is carried though in Cisco equipment and an industry standard term. Untagged traffic wouldn't need to have a special bridge rule then.
This problem caused me a bunch of confusion not too long ago. I was frustrated at this limitation as well and I vote for a fix or attention from the kind Mikrotik support staff.
Cheers.
Bill
unfortunately, 'BRoute' was removed from bridge in last versions (with "it was never worked correctly" comment, AFAIR)By default, the tagged packets are 'brouted' into the bridge code before
the vlan code gets to see them.
To stop this behaviour, you need an ebtables rule like:
ebtables -t broute -A BROUTING -p 802_1Q -i eth0 -j DROP
which tells the bridge code not to touch any 802.1q packets which in
turn lets the vlan code see them.
Looking at your cisco configuration i would do it like this:Code:
interface FastEthernet0/1
description VLAN Trunk with native (untagged) VLAN
switchport trunk native vlan 100
switchport trunk allowed vlan 100,101
switchport mode trunk
!
interface FastEthernet0/2
description Access port (no tagging) on VLAN 100
switchport access vlan 100
!
interface FastEthernet0/3
description Access port (no tagging) on VLAN 101
switchport access vlan 101
!
eth0 = Fa0/1
eth1 = Fa0/2
eth2 = Fa0/3
Here we have tagged and untagged packets going from eth0 to eth1.
/interface bridge add name=br-trunk;
/interface bridge port add eth0 bridge=br-trunk;
/interface bridge port add eth1 bridge=br-trunk;
Now we need to push data with vlan-id=101 to eth2
/interface vlan add name=vlan-101 vlan-id=101 interface=br-trunk;
/interface bridge add name=br-vlan101;
/interface bridge port add interface=vlan-101 bridge=br-vlan101;
/interface bridge port add interface=eth2 bridge=br-vlan101;
The difference here is that we can create vlans on top of bridges and it works very well.
Now lets imagine that on eth0 you have a couple more of vlans arriving, but you only want native vlan to go to eth1, just go to "bridge filter" and add a chain like this: "/interface bridge filter add chain=forward out-interface=eth1 vlan-id=101 action=drop"
Kindly regards,
/interface vlan
add interface=ether2 name=VLAN-20 vlan-id=20
/interface bridge
add name=BR-0
/interface bridge port
add bridge=BR-0 interface=VLAN-20
add bridge=BR-0 interface=ether4
/ip pool
add name=POOL-I-20 ranges=172.17.16.10-172.17.16.254
/ip address
add address=172.17.16.1/24 interface=BR-0
/ip dhcp-server
add name=DHCP-HS-0 add-arp=yes address-pool=POOL-I-20 disabled=no interface=BR-0 lease-time=1h
/ip dhcp-server network
add address=172.17.16.0/24 dns-server=172.17.16.1 gateway=172.17.16.1 ntp-server=172.17.16.1
[admin@MikroTik] > /interface bridge port print
Flags: X - disabled, I - inactive, D - dynamic
# INTERFACE BRIDGE PRIORITY PATH-COST HORIZON
0 ether4 BR-0 0x80 10 none
1 VLAN-20 BR-0 0x80 10 none
[admin@MikroTik] > /interface bridge host print
Flags: L - local, E - external-fdb
BRIDGE MAC-ADDRESS ON-INTERFACE AGE
BR-0 08:00:27:2F:D1:E1 ether4 1m59s
L BR-0 08:00:27:3B:71:AF ether4 0s
L BR-0 08:00:27:71:FB:C0 VLAN-20 0s
BR-0 08:00:27:BC:01:C4 VLAN-20 3s
[admin@MikroTik] > /ip arp print
Flags: X - disabled, I - invalid, H - DHCP, D - dynamic, P - published, C - complete
# ADDRESS MAC-ADDRESS INTERFACE
0 HDC 172.17.16.253 08:00:27:2F:D1:E1 BR-0
1 DC 192.168.88.2 0A:00:27:00:00:04 ether1
2 HDC 172.17.16.254 08:00:27:BC:01:C4 BR-0
[admin@MikroTik] > /ip dhcp-server lease print
Flags: X - disabled, R - radius, D - dynamic, B - blocked
# ADDRESS MAC-ADDRESS HOST-NAME SERVER RATE-LIMIT STATUS
0 D 172.17.16.253 08:00:27:2F:D1:E1 ubuntu DHCP-HS-0 bound
1 D 172.17.16.254 08:00:27:BC:01:C4 ubuntu DHCP-HS-0 bound
[admin@MikroTik] > /ping 172.17.16.254
SEQ HOST SIZE TTL TIME STATUS
0 172.17.16.254 56 64 0ms
1 172.17.16.254 56 64 0ms
2 172.17.16.254 56 64 0ms
sent=3 received=3 packet-loss=0% min-rtt=0ms avg-rtt=0ms max-rtt=0ms
[admin@MikroTik] > /ping 172.17.16.253
SEQ HOST SIZE TTL TIME STATUS
0 172.17.16.253 timeout
1 172.17.16.253 timeout
2 172.17.16.253 timeout
3 172.17.16.253 timeout
sent=4 received=0 packet-loss=100%