Page 1 of 1

Need help with VLANs and Switch Chips

Posted: Mon Dec 09, 2013 1:35 am
by mrphreak
Hey Guys,

Just got a situation where I'm running a UDP Multicast stream from ether3 on the RB750 through a mess to two output streams on the RB250 at the moment and playback is stuttering and jerking about. And I'd like to run it through the switch chip on the RB2011 to try to cut down latency and eliminate that as a possible cause.

Just drew up a quick diagram, there's stuff missing but most of the relevant info should be there.
Image

Configs are as follows
RB2011
# dec/09/2013 11:59:16 by RouterOS 6.6
# software id = EWCP-QRB1
#
/interface bridge
add l2mtu=1594 name=bridge1

/interface ethernet
set [ find default-name=ether1 ] comment="WAN"
set [ find default-name=ether2 ] comment=""
set [ find default-name=ether3 ] comment="Multicast Out"
set [ find default-name=ether4 ] comment=""
set [ find default-name=ether5 ] comment="(TRUNK to RB750)"
set [ find default-name=ether6 ] comment=""
set [ find default-name=ether7 ] master-port=ether6
set [ find default-name=ether8 ] master-port=ether6
set [ find default-name=ether9 ] master-port=ether6
set [ find default-name=ether10 ] comment="" master-port=ether6
set [ find default-name=sfp1 ] speed=100Mbps

/interface vlan
add interface=ether5 l2mtu=1594 name=vlan1 vlan-id=1
add interface=ether5 l2mtu=1594 name=vlan9 vlan-id=9
add interface=ether3 l2mtu=1594 name=vlan90.3 vlan-id=90
add interface=ether5 l2mtu=1594 name=vlan90.5 vlan-id=90

/ip pool
add name=dhcp_pool1 ranges=192.168.7.100-192.168.7.199
add name=dhcp_pool2 ranges=192.168.11.100-192.168.11.200
add name=dhcp_pool3 ranges=192.168.15.100-192.168.15.200

/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether6 name=7_dhcp
add address-pool=dhcp_pool2 disabled=no interface=ether4 name=11_dhcp
add address-pool=dhcp_pool3 disabled=no interface=ether2 name=15_dhcp

/interface bridge port
add bridge=bridge1 interface=vlan90.3
add bridge=bridge1 interface=vlan90.5

/ip address
add address=192.168.9.254/24 comment="(VLAN 9)" interface=vlan1 network=192.168.9.0
add address=192.168.7.254/24 interface=ether6 network=192.168.7.0
add address=xxx.xxx.xxx.xxx/24 interface=ether1 network=xxx.xxx.xxx.xxx
add address=192.168.11.254/24 interface=ether4 network=192.168.11.0
add address=192.168.15.254/24 interface=ether2 network=192.168.15.0
add address=192.168.90.254/24 interface=vlan90.5 network=192.168.90.0

/ip dhcp-server network
add address=192.168.7.0/24 gateway=192.168.7.254
add address=192.168.11.0/24 gateway=192.168.11.254
add address=192.168.15.0/24 gateway=192.168.15.254

/ip firewall filter
add action=drop chain=input comment="Drop invalid connections" connection-state=invalid
add chain=input comment="Allow est. connections" connection-state=established
add chain=input src-address=xxx.xxx.xxx.xxx/24
add chain=input src-address=xxx.xxx.xxx.xxx/24
add chain=input src-address=xxx.xxx.xxx.xxx/24
add chain=input comment="Allow related connections" connection-state=related
add chain=input comment="Allow UDP" protocol=udp
add chain=input comment="Allow ICMP" protocol=icmp
add chain=input comment=VPN disabled=yes dst-port=1723 protocol=tcp
add chain=input comment="Allow connection to router from local network" in-interface=!ether1
add action=log chain=input comment="Log Dropped Packets"
add action=drop chain=input comment="Drop everything else"
add action=jump chain=forward in-interface=ether1 jump-target=customer
add action=drop chain=customer comment="Drop invalid connection packets" connection-state=invalid
add chain=customer comment="Allow established connections" connection-state=established
add chain=customer comment="Allow related connections" connection-state=related
add action=log chain=customer comment="Log dropped connections" log-prefix=customer_drop
add action=drop chain=customer comment="Drop everything else"


/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1 to-addresses=0.0.0.0

/ip proxy
set parent-proxy=0.0.0.0

/ip route
add distance=1 gateway=xxx.xxx.xxx.xxx

/lcd
set backlight-timeout=never

/lcd interface
set sfp1 interface=sfp1
set ether1 interface=ether1
set ether2 interface=ether2
set ether3 interface=ether3
set ether4 interface=ether4
set ether5 interface=ether5
set ether6 interface=ether6
set ether7 interface=ether7
set ether8 interface=ether8
set ether9 interface=ether9
set ether10 interface=ether10

/queue interface
set sfp1 queue=ethernet-default
set ether1 queue=ethernet-default
set ether2 queue=ethernet-default
set ether3 queue=ethernet-default
set ether4 queue=ethernet-default
set ether5 queue=ethernet-default
set ether6 queue=ethernet-default
set ether7 queue=ethernet-default
set ether8 queue=ethernet-default
set ether9 queue=ethernet-default
set ether10 queue=ethernet-default
RB750
# jan/07/1970 03:28:10 by RouterOS 6.6
# software id = KUFJ-NBG7
#
/interface bridge
add comment="Outside World" name=bridge1
/interface ethernet
set [ find default-name=ether1 ] comment="(TRUNK)"
set [ find default-name=ether2 ] comment="(VLAN 9)" master-port=ether1
set [ find default-name=ether3 ] comment="(VLAN 90)" master-port=ether1
set [ find default-name=ether4 ] master-port=ether1
set [ find default-name=ether5 ] master-port=ether1

/interface ethernet switch port
set 0 default-vlan-id=1 vlan-header=add-if-missing vlan-mode=fallback
set 1 default-vlan-id=1 vlan-header=always-strip
set 2 default-vlan-id=90 vlan-header=always-strip vlan-mode=secure
set 3 default-vlan-id=90 vlan-header=add-if-missing vlan-mode=secure
set 4 default-vlan-id=90 vlan-header=always-strip vlan-mode=fallback

/interface ethernet switch vlan
add independent-learning=no ports=ether1,ether3,ether4,ether5 switch=switch1 vlan-id=90
add independent-learning=no ports=ether1,ether2,ether5 switch=switch1 vlan-id=1
add independent-learning=no ports=ether1,ether2 switch=switch1
add independent-learning=no ports=ether1,ether2 switch=switch1 vlan-id=9

/ip address
add address=192.168.9.253/24 interface=ether1 network=192.168.9.0

/ip firewall connection tracking
set enabled=no

/ip route
add distance=1 gateway=192.168.9.254
I added ether5 as a master for ether3 and set up the vlan table, but everything failed miserably and being a production network, people starting complaining. Just looking for some guidance so I can plan to have another shot out of hours.

Cheers,
Darryn.

Re: Need help with VLANs and Switch Chips

Posted: Mon Dec 09, 2013 1:36 am
by mrphreak
And just to confuse the issue, the traffic destined for Vlan9 is currently running on 1 at the moment, planning on switching it over after other problems are sorted.

Re: Need help with VLANs and Switch Chips

Posted: Mon Dec 09, 2013 2:47 am
by efaden
And just to confuse the issue, the traffic destined for Vlan9 is currently running on 1 at the moment, planning on switching it over after other problems are sorted.
The switch chip settings are really odd...

I actually made a spreadsheet that helped me work through the settings...

https://docs.google.com/spreadsheet/ccc ... sp=sharing

Look through that... I can try to look through your config and see if I see issues in a day or two...

Re: Need help with VLANs and Switch Chips

Posted: Mon Dec 09, 2013 3:26 am
by mrphreak
Cheers

Yeah, I've lost connectivity or management a few times while I'm trying to wrap my head around the implementation, which isn't fun when the two devices are 10km away.

Re: Need help with VLANs and Switch Chips

Posted: Mon Dec 09, 2013 3:28 am
by efaden
Cheers

Yeah, I've lost connectivity or management a few times while I'm trying to wrap my head around the implementation, which isn't fun when the two devices are 10km away.
Yeah... the settings are a little confusing and not super well documented. I worked through this with the help of the MikroTik support so I am pretty sure it is correct. Let me know if you have questions.

Re: Need help with VLANs and Switch Chips

Posted: Mon Dec 16, 2013 11:14 pm
by mrphreak
Also, how would I add IP addresses to the RB750 (Running as a switch), tried adding VLAN interfaces to the master port, and adding addresses to those, but no joy.