Community discussions

MikroTik App
 
certit
just joined
Topic Author
Posts: 11
Joined: Tue Nov 19, 2013 9:08 pm

Both untagged and tagged ports in RB951-2n

Tue May 06, 2014 7:36 pm

Hi there!
As subject says. Can't I have both untagged and tagged (trunked) ports on the same unit?

Config will follow, but in short terms.

Bridge called "BridgeTRUNK" created
Added interface 2-3 there.

5 vlans, all terminated on "BridgeTRUNK"

1 DHCP for each clan, terminated on the clan-interface.

All this works as it should.

BUT.

When I try to connect an computer directly to port 5 I get troubles.

Config for that.
New bridge called BridgeADMIN
interface 5 and the admin-vlan added to bridge

Then the clan get's in "slave"-mode and the dhcp goes down. Can't I do like this?

Thanks in advance!

##CONFIG##
[user@AP1] /interface> print
Flags: D - dynamic, X - disabled, R - running, S - slave
# NAME TYPE MTU L2MTU MAX-L2MTU MAC-ADDRESS
0 R 1-WAN ether 1500 1600 4076 D4:CA:6D:F2:21:92
1 S 2-TRUNK ether 1500 1598 2028 D4:CA:6D:F2:21:93
2 S 3-TRUNK ether 1500 1598 2028 D4:CA:6D:F2:21:94
3 X 4-SHUTDOWN ether 1500 1598 2028 D4:CA:6D:F2:21:95
4 RS 5-untagged ether 1500 1598 2028 D4:CA:6D:F2:21:96
8 R BridgeAdmin bridge 1500 1598 D4:CA:6D:F2:21:96
9 R BridgeTRUNK bridge 1500 1598 D4:CA:6D:F2:21:94
10 R vlan20-MGMT vlan 1500 1594 D4:CA:6D:F2:21:94
11 R vlan30-ADMIN vlan 1500 1594 D4:CA:6D:F2:21:94
12 R vlan40-GUEST vlan 1500 1594 D4:CA:6D:F2:21:94
13 R vlan50-KONFERENS vlan 1500 1594 D4:CA:6D:F2:21:94
14 R vlan60-HYRESGAST vlan 1500 1594 D4:CA:6D:F2:21:94

[user@AP1] /interface vlan> print
Flags: X - disabled, R - running, S - slave
# NAME MTU ARP VLA
0 R vlan20-MGMT 1500 enabled
1 R vlan30-ADMIN 1500 enabled
2 R vlan40-GUEST 1500 enabled
3 R vlan50-KONFERENS 1500 enabled
4 R vlan60-HYRESGAST 1500 enabled

[user@AP1] /interface bridge> print
Flags: X - disabled, R - running
0 R name="BridgeAdmin" mtu=1500 l2mtu=1598 arp=enabled mac-address=D4:CA:6D:F2:21:96 protocol-mode=rstp priority=0x8000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m
1 R name="BridgeTRUNK" mtu=1500 l2mtu=1598 arp=enabled mac-address=D4:CA:6D:F2:21:94 protocol-mode=rstp priority=0x8000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m


Thanks in advance.
 
certit
just joined
Topic Author
Posts: 11
Joined: Tue Nov 19, 2013 9:08 pm

Re: Both untagged and tagged ports in RB951-2n

Tue May 06, 2014 7:41 pm

I've tried to disabled clan on the switch aswell.

[user@AP1] /interface ethernet switch port> print
Flags: I - invalid
# NAME SWITCH VLAN-MODE VLAN-H
0 2-TRUNK switch1 fallback leave-
1 3-TRUNK switch1 fallback leave-
2 4-SHUTDOWN switch1 fallback leave-
3 5-untagged switch1 disabled leave-
4 switch1-cpu switch1 fallback leave-
 
Rudios
Forum Veteran
Forum Veteran
Posts: 973
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Both untagged and tagged ports in RB951-2n

Tue May 06, 2014 10:21 pm

If the vlan is put into a bridge, the DHCP server should be on the bridge too.
Last edited by Rudios on Thu May 08, 2014 4:30 pm, edited 1 time in total.
 
certit
just joined
Topic Author
Posts: 11
Joined: Tue Nov 19, 2013 9:08 pm

Re: Both untagged and tagged ports in RB951-2n

Wed May 07, 2014 9:39 am

Ok. I'll try that when I get home.

Thanks!
 
certit
just joined
Topic Author
Posts: 11
Joined: Tue Nov 19, 2013 9:08 pm

Re: Both untagged and tagged ports in RB951-2n

Thu May 08, 2014 4:11 pm

Hi again.
I didn't get it to work.

Can't I both have an clan tagged and untagged on an RB951-2n?

I'm terminating all the vlans in the same box, I have the DHCP etc on the same box aswell.
And out from it I wanna have 3 TRUNK/TAGGED ports that transport all the vlans (6) to the other RB951-2n
And 1 untagged port with vlan30 to connect the computer in the same room..

I'm from the "Ciscoworld" where you just put trunk or accessmode on the port. What am I doing wrong? Sounds so easy in my ears but I just can't get it to work :(

Thanks in advance.
 
jkarras
Member Candidate
Member Candidate
Posts: 226
Joined: Fri Sep 06, 2013 3:07 am
Location: Utah, USA

Re: Both untagged and tagged ports in RB951-2n

Fri May 09, 2014 7:16 am

Unfortunately Mikrotik config isn't quite as abstracted as the major vendors config is. Here is how to do what you desire in hardware using the switch chip. A bridge will cause all the traffic to hit CPU which will mean less than line rate L2 packet forwarding.

A good way to compare Mikrotik switchchip vlan management is like a Cisco device that doesn't have the "switchport access vlan" command and everything had to be configured with "switchport trunk vlan <vlan id list>" and "switchport trunk native vlan <vlanID>".
  • 1. Remove the bridge interface
    2. Create VLAN interfaces for each VLAN ID you wish to terminate on the device. This is similar to creating a L3 SVI on a Cisco (int vlan X; ip address blabla)
    3. In the switch menu go to the port tab. Configure the VLAN security on each port to something other than disabled. On the ports you wish to be access ports set the default VLAN as needed. Also change the VLAN header to strip[\b] in the case of a access port. In the case of a trunk port leave it set to leave as is[\b]
    4. In the switch menu go to the VLAN tab. Add all of the VLAN IDs you want to work with and the ports they should be allowed on. This is similar to (switchport trunk vlan <VLANID>). When it comes to the CPU make sure it contains all of the VLAN that may terminate on it including VLAN 0. This is important or you may loose communication with the device.
    5. Setup your DHCP server on the VLAN Interface you wish it to be on.


There is a good example of what I attempted to explain above at the wiki link below.

http://wiki.mikrotik.com/wiki/Manual:Sw ... p_Features
 
certit
just joined
Topic Author
Posts: 11
Joined: Tue Nov 19, 2013 9:08 pm

Re: Both untagged and tagged ports in RB951-2n

Sun May 11, 2014 9:41 pm

Argh!

What am I doing wrong? Just can't get it to work.

/interface ethernet
set [ find default-name=ether1 ] mac-address=D4:CA:6D:F2:21:92 name=1-WAN
set [ find default-name=ether2 ] mac-address=D4:CA:6D:F2:21:93 name=\
    2-TRUNK-master
set [ find default-name=ether3 ] mac-address=D4:CA:6D:F2:21:94 master-port=\
    2-TRUNK-master name=3-TRUNK
set [ find default-name=ether4 ] mac-address=D4:CA:6D:F2:21:95 master-port=\
    2-TRUNK-master name=4-SHUTDOWN
set [ find default-name=ether5 ] mac-address=D4:CA:6D:F2:21:96 master-port=\
    2-TRUNK-master name=5-Untagged-ADMIN
/interface vlan
add interface=2-TRUNK-master l2mtu=1594 name=vlan20-MGMT vlan-id=20
add interface=2-TRUNK-master l2mtu=1594 name=vlan30-ADMIN vlan-id=30
add interface=2-TRUNK-master l2mtu=1594 name=vlan40-GUEST vlan-id=40
add interface=2-TRUNK-master l2mtu=1594 name=vlan50-KONFERENS vlan-id=50
add interface=2-TRUNK-master l2mtu=1594 name=vlan60-HYRESGAST vlan-id=60
/interface ethernet switch port
set 3 default-vlan-id=30 vlan-header=always-strip vlan-mode=secure
/ip pool
add name=ADMIN_POOL ranges=10.30.0.150-10.30.0.254
add name=GUEST_POOL ranges=10.40.0.5-10.40.0.254
add name=KONFERENS_POOL ranges=10.50.0.5-10.50.0.254
add name=HYRESGAST_POOL ranges=10.60.0.5-10.60.0.254
add name=PPTP_POOL ranges=10.70.0.5-10.70.0.254
/ip dhcp-server
add address-pool=ADMIN_POOL disabled=no interface=vlan30-ADMIN name=\
    DHCP_ADMIN
add address-pool=GUEST_POOL disabled=no interface=vlan40-GUEST lease-time=1d \
    name=DHCP_GUEST
add address-pool=KONFERENS_POOL disabled=no interface=vlan50-KONFERENS name=\
    DHCP_KONFERENS
add address-pool=HYRESGAST_POOL disabled=no interface=vlan60-HYRESGAST name=\
    DHCP_HYRESGAST
/interface ethernet switch vlan
add ports=switch1-cpu,5-Untagged-ADMIN switch=switch1 vlan-id=30
/interface pptp-server server
set enabled=yes max-mru=1460 max-mtu=1460
/ip address
add address=10.20.0.1/24 interface=vlan20-MGMT network=10.20.0.0
add address=10.30.0.1/24 interface=vlan30-ADMIN network=10.30.0.0
add address=10.40.0.1/24 interface=vlan40-GUEST network=10.40.0.0
add address=10.50.0.1/24 interface=vlan50-KONFERENS network=10.50.0.0
add address=10.60.0.1/24 interface=vlan60-HYRESGAST network=10.60.0.0
/ip dhcp-server network
add address=10.30.0.0/24 comment="Vlan30 - ADMIN" dns-server=10.30.0.1 \
    gateway=10.30.0.1 netmask=24
add address=10.40.0.0/24 comment="Vlan40 - GUEST" dns-server=10.40.0.1 \
    gateway=10.40.0.1 netmask=24
add address=10.50.0.0/24 comment="Vlan50 - KONFERENS" dns-server=10.50.0.1 \
    gateway=10.60.0.1 netmask=24
add address=10.60.0.0/24 comment="Vlan60 - HYRESGAST" dns-server=10.60.0.1 \
    gateway=10.60.0.1 netmask=24
/ip firewall address-list
add address=10.20.0.0/24 comment="Hela MGMT" list=MGMT
add address=10.30.0.0/24 comment="Hela ADMIN" list=ADMIN
add address=10.40.0.0/24 comment="Hela GUEST" list=GUEST
add address=10.50.0.0/24 comment="Hela KONFERENS" list=KONFERENS
add address=10.60.0.0/24 comment="Hela HYRESGAST" list=HYRESGAST
The tagged ports work just as it should, but I can't get the untagged port to work :(

Tried to change from bridge to switch now as recommended. But I get the same issue.

The tagged port work, but not the untagged one.

Please help.
 
jkarras
Member Candidate
Member Candidate
Posts: 226
Joined: Fri Sep 06, 2013 3:07 am
Location: Utah, USA

Re: Both untagged and tagged ports in RB951-2n

Mon May 12, 2014 7:36 am

What version of ROS are you running 5.x or 6.x?

Also you may want to turn on Independent learning on your vlan 30. Don't forget to add the other VLANs as well.

I'll see if I can't test your config on my 951-2n
 
Rudios
Forum Veteran
Forum Veteran
Posts: 973
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Both untagged and tagged ports in RB951-2n

Mon May 12, 2014 8:58 am

You have to add the vlan on the switch chip and assign the ports

ros code

/interface ethernet switch vlan
add switch=switch1 ports=ether2,ether5 vlan-id=30
If done, ether5 should be an untagged port for VLAN30

[EDIT]
Sorry, misread your configuration. I see you already have the VLAN.
But the trunk port must also be configured there.
 
certit
just joined
Topic Author
Posts: 11
Joined: Tue Nov 19, 2013 9:08 pm

Re: Both untagged and tagged ports in RB951-2n

Mon May 12, 2014 9:55 am

Hi again.
I'm running 6.12 and 3.10 firmware.

I'll add the other vlans when I have 1 up and running. This is not production atm as I can't get it to work..

I've added the masterport now aswell. But the tagged ones worked anyway?

Who is online

Users browsing this forum: Airiasas, Majestic-12 [Bot] and 31 guests