Community discussions

MikroTik App
 
User avatar
yanryb
just joined
Topic Author
Posts: 3
Joined: Sun Feb 22, 2015 8:11 pm
Contact:

VLAN Help needed

Mon Feb 23, 2015 2:16 pm

Hi
I am new to RouterOS and need a little help.
My setup is like this

From ISP intenet untagged and IPTV Vlan580 to my RB2011.

Tag internet with 1000.
I want

1 port with trunk 580/1000
1 port with 580
1 port with 1000

How configure Vlan on this setup.
Hope you can help me.
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: VLAN Help needed

Tue Feb 24, 2015 1:20 pm

There are two ways to configure VLANS in RouterOS. One way is specific to the device, i.e. the switch chip that it uses - I'm not very familiar with it. Other way is to manually configure bridges and assign vlan interfaces, this is what I have used.
Below an example:
2 Vlans are created, both of them are assigned to ether1 - the trunk port
Vlan 1000 is assigned to the trunk port, but also participates in a bridge with ether2 (untagged)
Vlan 500 is assigned to the trunk port, but also participates in a brige with ether3 (untagged)
Ether2 and 3 play the role of "access" ports. Hope this helps...
/interface bridge
add name=vl1000_br
add name=vl500_br

/interface bridge port
add bridge=vl1000_br interface=vlan1000-ether1
add bridge=vl1000_br interface=ether2
add bridge=vl500_br interface=vlan500-ether1
add bridge=vl500_br interface=ether3

/interface vlan
add interface=ether1 name=vlan1000-ether1 vlan-id=1000
add interface=ether1 name=vlan500-ether1 vlan-id=500
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: VLAN Help needed

Tue Feb 24, 2015 1:22 pm

I also forgot to mention that if your device has a switch chip and you will have large amount of traffic - it would be more efficient to use the switch chip. The sample configuration I gave you, will certainly be less efficient.
For small amount of traffic over the vlans, most likely it will not matter much.
 
User avatar
yanryb
just joined
Topic Author
Posts: 3
Joined: Sun Feb 22, 2015 8:11 pm
Contact:

Re: VLAN Help needed

Tue Feb 24, 2015 6:09 pm

I think this work but I want to try switch hcip to but I dont understand how to configure it...
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: VLAN Help needed

Sat Feb 28, 2015 11:29 pm

Apparently, this is how you could do it...
http://wiki.mikrotik.com/wiki/Manual:Sw ... Vlan_Table

The configuration does not look hard though. In theory, it should be more efficient as all the switching is done in the Switch chip.
 
Edvinas
just joined
Posts: 5
Joined: Sat Feb 28, 2015 8:29 pm

Re: VLAN Help needed

Mon Mar 02, 2015 1:57 am

Hello Guys,

I've have similar problem. I've got CRS109-8G-1S-2Hnd and RB260G for couple weeks now and I cannot figure it out, probably because my networks skills to poor for this. How to set up Vlans properly, tried numerous guides and a LOT of options on SwOS but no luck at all.
So my story:
My ISP provides me with internet (untagged VLAN1) and IPTV (untagged VLAN6).
Update: Got on call with ISP - could be untagged VLAN1 for Internet and IPTV (untagged VLAN6), but dude is not certain.

My desired setup would be: Image

I have only one network cable between router and the switch. Main goal is to have one port on the switch with IPTV and rest 3 ports with simple LAN and internet and have 1Gbps throughput (already thinking about splintig that cable to 2x100Mbps lines).
On the switch there will be TV set up which will stream videos (40-120mbps) from NAS (which will be on router), IPTV consumes about 10-20mbps and also steamOS box for game streaming from main rig, so I need whole 1Gbps on that cable.
I believe this setup should be achievable with this equipment but I can't figure it out.
I'm stuck on this for a week now :(

So far current config:

Ether1 - ISP
Ether2 - Master LAN
Ether3-7 Slave to Ehter2 (LAN and internet)
Ether8 - Only IPTV

Image

Worth mentioning that for IPTV - ISP provides DHCP on different network - not an external IP.
Any links or ideas would be appreciated.
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: VLAN Help needed

Thu Mar 05, 2015 2:33 pm

"My ISP provides me with internet (untagged VLAN1) and IPTV (untagged VLAN6).
Update: Got on call with ISP - could be untagged VLAN1 for Internet and IPTV (untagged VLAN6), but dude is not certain."
You cannot have both VLANS as untagged. Untagged means plain Ethernet frames, if there's no Tag in the Ethernet frame, the switch will not be able to associate them to a particular VLAN. That's an important point to clarify. Normally in an LAN you either have one untagged VLAN or you do not have any at all.
"Untagged" as a term is also used to signify association of access ports to a VLAN. This means, when you associate some ports, but they're used to connect to end hosts, they are "untagged", but they all belonged to the same VLAN association. On the other hand "tagged" (also called trunk ports) are the ones used to connect to other switches or routers. They are "tagged" because the ethernet frames that go over them have additional tags which are used on the remote end to discriminate on L2 the different frames.
That's why this point is important to be clarified in your case.
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: VLAN Help needed

Thu Mar 05, 2015 2:35 pm

Could you also export your config?
Just run export in the CLI. It will generate a text file, which is much more compact and easier to work with. You can remove any sensitive information from the export before posting it off course.
 
User avatar
yanryb
just joined
Topic Author
Posts: 3
Joined: Sun Feb 22, 2015 8:11 pm
Contact:

Re: VLAN Help needed

Mon Mar 09, 2015 11:04 am

This is my setup as I want it.
I dont want to use Bridge becouse there is a lot off trafic on IPTV ( 20 Mbit/s ).
I have heard that it gets high CPU when there are a lot of trafic on bridge.

Image
 
Edvinas
just joined
Posts: 5
Joined: Sat Feb 28, 2015 8:29 pm

Re: VLAN Help needed

Tue Mar 10, 2015 6:00 am

Could you also export your config?
Just run export in the CLI. It will generate a text file, which is much more compact and easier to work with. You can remove any sensitive information from the export before posting it off course.

Hi guys - been a bit off country,

Config attached.Currently for testing purposes switch is connected to port 7 to which IPTV and internet should be sent.
On ether 8 - directly to IPTV box which operates normally.
You do not have the required permissions to view the files attached to this post.
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: VLAN Help needed

Sun Mar 15, 2015 12:08 pm

So you use the embedded switch chip:
/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether2 ] comment=LAN name=ether2-master-LAN
set [ find default-name=ether3 ] master-port=ether2-master-LAN
set [ find default-name=ether4 ] master-port=ether2-master-LAN
set [ find default-name=ether5 ] master-port=ether2-master-LAN
set [ find default-name=ether6 ] master-port=ether2-master-LAN
set [ find default-name=ether7 ] comment="To Switch RB260GS"
set [ find default-name=ether8 ] comment="IPTV Direct Link"
set [ find default-name=sfp1 ] disabled=yes
Ports 2 - 6 are part of your LAN. That's fine.

/interface vlan
add interface=ether1 l2mtu=1584 name=Vlan6-IN vlan-id=6
add interface=ether7 l2mtu=1584 name=vlan6-OUT vlan-id=6
/interface bridge port
add bridge=LAN interface=ether2-master-LAN
add bridge=LAN interface=wlan1
add bridge=LAN disabled=yes interface=sfp1
add bridge=IPTV interface=Vlan6-IN
add bridge=IPTV interface=ether8
add bridge=LAN interface=ether7
add bridge=IPTV interface=vlan6-OUT
So the way I see it, you have your WAN provider, your LAN and IPTV bridge, which is separeted in VLAN with vlan-id 6. What is not working?
 
Edvinas
just joined
Posts: 5
Joined: Sat Feb 28, 2015 8:29 pm

Re: VLAN Help needed

Sun Mar 15, 2015 9:19 pm

So you use the embedded switch chip:
/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether2 ] comment=LAN name=ether2-master-LAN
set [ find default-name=ether3 ] master-port=ether2-master-LAN
set [ find default-name=ether4 ] master-port=ether2-master-LAN
set [ find default-name=ether5 ] master-port=ether2-master-LAN
set [ find default-name=ether6 ] master-port=ether2-master-LAN
set [ find default-name=ether7 ] comment="To Switch RB260GS"
set [ find default-name=ether8 ] comment="IPTV Direct Link"
set [ find default-name=sfp1 ] disabled=yes
Ports 2 - 6 are part of your LAN. That's fine.

/interface vlan
add interface=ether1 l2mtu=1584 name=Vlan6-IN vlan-id=6
add interface=ether7 l2mtu=1584 name=vlan6-OUT vlan-id=6
/interface bridge port
add bridge=LAN interface=ether2-master-LAN
add bridge=LAN interface=wlan1
add bridge=LAN disabled=yes interface=sfp1
add bridge=IPTV interface=Vlan6-IN
add bridge=IPTV interface=ether8
add bridge=LAN interface=ether7
add bridge=IPTV interface=vlan6-OUT
So the way I see it, you have your WAN provider, your LAN and IPTV bridge, which is separeted in VLAN with vlan-id 6. What is not working?

Hi, thanks for the reply.


You've pasted my config, not the "correct" or "other" way to set up it? (Just to clarify - not that familiar with RouterOS yet)
Current config works where:
Ether:
1-Wan
2-6 LAN
7 - test
8- ITPV vlan6 only

My goal is to feed LAN and IPTV to one trunk port on ether7 or 8 and on the other end RB260G split it:
Ether:
1 - Router
2-4 - regular LAN internet
5 - IPTV - vlan6 only.

I tried manuals, wikis and a lot of try and error and still can't make the switch work the way I want. I believe it should be able to handle it - but either something wrong from router side (some tick missing), or I'm too dumb to use SwOS.

SwOS http://s7.postimg.org/ouv6wvj2z/Sw_OS.png
Went with steps in http://wiki.mikrotik.com/wiki/SwOS#VLAN_Tab
Still not working - no idea what i'm doing wrong. I can see IPTV multicast traffic on ether7 when TV box connected to ether8 directly, but switch will not broadcast in on port 5.
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: VLAN Help needed

Mon Mar 16, 2015 9:27 am

Yes, I did post your config. I was just wondering what the goal is. Now it is more clear.
Ok, so you can create another VLAN with vlan-id let's say 7. Attach that VLAN to the port you want it to be trunk. Than add this new VLAN to your LAN bridge. This is how your traffic from the LAN will be also replicated to VLAN 7 which will also tag it over the port you configure. On the remote side you need the same thing, VLAN 7 attached to the trunk port, vlan interface added to the local LAN bridge. If you use a SwOS device on the other end, you could go without the bridge configuration.
 
Edvinas
just joined
Posts: 5
Joined: Sat Feb 28, 2015 8:29 pm

Re: VLAN Help needed

Sun Mar 22, 2015 12:15 am

Yes, I did post your config. I was just wondering what the goal is. Now it is more clear.
Ok, so you can create another VLAN with vlan-id let's say 7. Attach that VLAN to the port you want it to be trunk. Than add this new VLAN to your LAN bridge. This is how your traffic from the LAN will be also replicated to VLAN 7 which will also tag it over the port you configure. On the remote side you need the same thing, VLAN 7 attached to the trunk port, vlan interface added to the local LAN bridge. If you use a SwOS device on the other end, you could go without the bridge configuration.
Well I don't know how i missed that.. Looks so simple now and I got my config right and working properly. Thanks guys.
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: VLAN Help needed

Thu Mar 26, 2015 1:53 pm

That's cool. I'm glad we've fixed it :)

Who is online

Users browsing this forum: gigabyte091, jaclaz, pfturner and 75 guests