Page 1 of 1

RB450G switch chip - question

Posted: Mon May 28, 2012 4:21 am
by LukasSVK
Hello Mikrotik-Forum, i have RB450G in testlab. My question is about switch chip Atheros 8316 (same as in RB250GS).

RB250GS with AR8316 support jumbo frames. How can enable jumbo frames on RB450G? (Or switch chip support jumbo frames, but cpu_port does not??)

How can set Default vlan? (similarly as http://wiki.mikrotik.com/wiki/SwOS -> Default VLAN).
How can set via switch chip for example tagged vlan 200 in port ether1, untagged vlan 200 in port ether2, untagged vlan 200 on switch1_cpu port?


Thanks L.

Re: RB450G switch chip - question

Posted: Mon May 28, 2012 12:21 pm
by kirshteins
The CPU of RB450G does not support jumbo frames, so this features is also not supported for the switch chip.

VLANs are managed in sligtly different way in RB450G. You can check out the following example:
http://wiki.mikrotik.com/wiki/Switch_Ch ... heros_8316

Re: RB450G switch chip - question

Posted: Mon May 28, 2012 3:34 pm
by LukasSVK
Hello kirshteins,
Example in wiki, RB works as switch (only switch). I need switch functionality (as is in wiki) BUT need router functionality too.

Something as in cisco L3 switches or cisco routers with hw switch card (tagged + untagged ports with vlans and SVI L3 ifaces in vlans).

Can you pls post example with this?

Re: RB450G switch chip - question

Posted: Mon May 28, 2012 3:41 pm
by kirshteins
Switched traffic is not going through the CPU, so you should handle VLAN with bridges and VLAN interfaces. Here is an example: http://wiki.mikrotik.com/wiki/Vlans_on_ ... nvironment

Re: RB450G switch chip - question

Posted: Mon May 28, 2012 5:11 pm
by LukasSVK
Ok, i understand .. router (cpu ) is single unit and switch is single unit connected to router viac switch1_cpu_port. I do some tests.

Client1 ------ (ether1, 192.168.1.4/24) RB450G Ros 5.16 (ether2, 192.168.2.1/24) ------- (ether1, 192.168.2.2/24) RB750 Ros 5.16 (ether2, 192.168.88.1/24) ----- Client 2

---
For example Vlan translation from ports eth2, eth3 <-> to router from VID 200 to VID 201, in switch chip RB450G:

/interface vlan
add arp=enabled disabled=no interface=ether2-master-local l2mtu=1516 mtu=1500 name=vlan201 use-service-tag=no vlan-id=201

[admin@RB450G] /interface ethernet switch> /interface ethernet switch export
# jan/02/1970 00:35:01 by RouterOS 5.16
# software id = 5ZTM-0AFP
#
/interface ethernet switch
set 0 mirror-source=none mirror-target=none name=switch1 switch-all-ports=no
/interface ethernet switch port
set 0 vlan-header=leave-as-is vlan-mode=secure
set 1 vlan-header=leave-as-is vlan-mode=fallback
set 2 vlan-header=leave-as-is vlan-mode=fallback
set 3 vlan-header=leave-as-is vlan-mode=fallback
set 4 vlan-header=leave-as-is vlan-mode=secure
/interface ethernet switch rule
add copy-to-cpu=no disabled=no mirror=no new-dst-ports=switch1_cpu new-vlan-id=201 ports=ether2-master-local,ether3-slave-local redirect-to-cpu=no switch=switch1 vlan-header=present \
vlan-id=200
add copy-to-cpu=no disabled=no mirror=no new-dst-ports=ether2-master-local,ether3-slave-local new-vlan-id=200 ports=switch1_cpu redirect-to-cpu=no switch=switch1 vlan-header=present \
vlan-id=201
/interface ethernet switch vlan
add disabled=no ports=switch1_cpu switch=switch1 vlan-id=201
add disabled=no ports=ether2-master-local switch=switch1 vlan-id=200
----
RB 750
Standard configuration, Vlan ID 200 on ether1 port..
----

This works
[admin@RB450G] /interface ethernet switch> /ping 192.168.2.2
HOST SIZE TTL TIME STATUS
192.168.2.2 56 64 3ms
192.168.2.2 56 64 0ms
192.168.2.2 56 64 0ms
sent=3 received=3 packet-loss=0% min-rtt=0ms avg-rtt=1ms max-rtt=3ms

If it works from switch1_cpu port to ether2,3 ports it can works for example between ether4 and ether5..

Can sameone post another example with switch chip? I will to try another testscenarios.

Re: RB450G switch chip - question

Posted: Mon May 28, 2012 7:45 pm
by LukasSVK
Ok, setup: 450g, vlan 200 (192.168.2.1), 1 x access interface(untagged) eth 5 connected to notebook (192.168.2.3), 1 x tagged interface eth2 connected to rb750g (192.168.2.2).
see picture.

It works, but UI for switch in Routerboard is terrible.

Config RB450G:

/interface ethernet switch
set 0 mirror-source=none mirror-target=none name=switch1 switch-all-ports=no
/interface ethernet switch port
set 0 vlan-header=add-if-missing vlan-mode=secure
set 1 vlan-header=leave-as-is vlan-mode=secure
set 2 vlan-header=leave-as-is vlan-mode=secure
set 3 vlan-header=always-strip vlan-mode=secure
set 4 vlan-header=add-if-missing vlan-mode=secure
/interface ethernet switch rule
add copy-to-cpu=no disabled=no mirror=no new-dst-ports=switch1_cpu,ether2-master-local new-vlan-id=200 ports=ether5-slave-local redirect-to-cpu=no switch=switch1 vlan-header=\
not-present
add copy-to-cpu=no disabled=no mirror=no new-dst-ports=ether5-slave-local,ether2-master-local ports=switch1_cpu redirect-to-cpu=no switch=switch1 vlan-header=present vlan-id=200
add copy-to-cpu=no disabled=no mirror=no new-dst-ports=switch1_cpu,ether5-slave-local ports=ether2-master-local redirect-to-cpu=no switch=switch1 vlan-header=present vlan-id=200
/interface ethernet switch vlan
add disabled=no ports=ether2-master-local,ether3-slave-local,switch1_cpu switch=switch1 vlan-id=200
add disabled=no ports=ether5-slave-local switch=switch1 vlan-id=0
[admin@RB450G] >


RB750 configuration is standard, only vlan200 on ether1.

Re: RB450G switch chip - question

Posted: Mon May 28, 2012 9:57 pm
by LukasSVK
similar topic: 1 year ago, http://forum.mikrotik.com/viewtopic.php ... &view=next

kirshteins: if i have 2 tagged ports ether2 and switch1_cpu, vlan mode secure and vlan header add-if-missing.
If untagged frame enter into port ethe2, what vlan tag will have after leaving port switch1_cpu??

2.) How i need setup /interface ethernet switch vlan? I have

add disabled=no ports=ether5-slave-local,ether2-master-local,switch1_cpu switch=switch1 vlan-id=0

but i dont know if it's correct?
I need somewhere set default vlan for untagged traffic, but this setting isn't in UI.


[admin@RB450G] /interface ethernet switch port> print
Flags: I - invalid
# NAME SWITCH VLAN-MODE VLAN-HEADER
0 ether2-master-local switch1 secure add-if-missing

1 ether3-slave-local switch1 secure leave-as-is
2 ether4-slave-local switch1 secure leave-as-is
3 ether5-slave-local switch1 secure always-strip
4 switch1_cpu switch1 secure add-if-missing
[admin@RB450G] /interface ethernet switch port>

Re: RB450G switch chip - question

Posted: Tue Jun 05, 2012 1:16 pm
by LukasSVK
kirshteins, can you pls answer?

Thanks L.

Re: RB450G switch chip - question

Posted: Tue Jun 05, 2012 1:47 pm
by kirshteins
You cannot configure VLAN header mode for CPU ports, so any VLAN tagged traffic remains unchanged. Exactly what configuration are you trying to achieve with VLAN table?

Re: RB450G switch chip - question

Posted: Sun Jul 01, 2012 4:01 am
by LukasSVK
kirshteins: vlan table is optional, whole config is only for testing purposes.

Questions:
Why i cannot configure VLAN Header mode for CPU ports??
Would love to be able to use the 450G as a switch with a router on a stick on the cpu port, to get fast switching + routing. With vlans, obviously.

In Openwrt i can use switch chip with vlans on RB450G or Routerstation pro, see config:
http://wiki.openwrt.org/toh/ubiquiti/routerstation.pro
http://wiki.openwrt.org/toh/mikrotik/rb ... .for.vlans
In config, there is pvid config option, how can set this in ROS?

Thanks L.
config 'interface' 'lan'
        option 'ifname' 'eth1'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'ipaddr' '10.11.12.13'
        option 'type' 'sta'

config 'switch'
        option 'name' 'eth1'
        option 'reset' '1'
        option 'enable_vlan' '1'

config 'switch_vlan'
        option 'device' 'eth1'
        option 'vlan' '1'
        option 'vid' '1'
        option 'ports' '0 1 2 3 4'

config 'switch_port'
        option 'pvid' '1'
        option 'port' '0'

config 'switch_port'
        option 'pvid' '1'
        option 'port' '1'

config 'switch_port'
        option 'pvid' '1'
        option 'port' '2'

config 'switch_port'
        option 'pvid' '1'
        option 'port' '3'

config 'switch_port'
        option 'pvid' '1'
        option 'port' '4'

config 'switch_port'
        option 'pvid' '1'
        option 'port' '5'

Re: RB450G switch chip - question

Posted: Sun Jul 22, 2012 1:34 am
by LukasSVK
kirshteins, can you pls ? :)

thx L.