Community discussions

MikroTik App
 
Tdaddysimi
Member Candidate
Member Candidate
Topic Author
Posts: 108
Joined: Wed Sep 28, 2016 4:37 pm
Location: Minnesota

How to make a router plugged into an interface only see a VLAN

Wed Apr 07, 2021 4:49 pm

Hello Everyone

I have a CCR1036. I have a router plugged into it on one of its interfaces. When it dials out a PPPoE Session to the CCR, I want it to authenticate it on the VLAN. I know I could set a VLAN on the router and have it dial out to the CCR and have it work that way, But I want this setup to be no matter what they plug into a certain interface, they only hit that vlan. Does that make sense??

CCR---VLANXX--Router

Thanks in advance.
 
Tdaddysimi
Member Candidate
Member Candidate
Topic Author
Posts: 108
Joined: Wed Sep 28, 2016 4:37 pm
Location: Minnesota

Re: How to make a router plugged into an interface only see a VLAN

Wed Apr 07, 2021 4:57 pm

I know you could put a switch in and Tag/Untag the vlan on a port to make them only see a vlan that way, but I am wondering if you could do something similar just on a Mikrotik itself. AGain thanks in advance.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11381
Joined: Thu Mar 03, 2016 10:23 pm

Re: How to make a router plugged into an interface only see a VLAN

Wed Apr 07, 2021 5:22 pm

Just to make it clear: which device (CCR or anonymous router) should take care of VLANs? If it's CCR, then you can use bridge, which is kind of a software bridge and can deal with VLAN tags as well. Have a look at this fine tutorial, applies to CCR as well.
 
Tdaddysimi
Member Candidate
Member Candidate
Topic Author
Posts: 108
Joined: Wed Sep 28, 2016 4:37 pm
Location: Minnesota

Re: How to make a router plugged into an interface only see a VLAN

Wed Apr 07, 2021 11:23 pm

The CHR has the VLAN/PPPoE Server. I already have it doing a bunch of vlan stuff with other ports and its doing great. But specifically, i have ether4 unbridged on its own interface with vlan1234 on it. And I want anything that plugs into ether4 to be under vlan1234. I read some of that guide and put ether4 on its own bridge but the instructions aren't very clear on that post. Its a lot of information. Once I know how to do it, it'll be easy to learn but I am struggling getting it to work. I even tried moving vlan1234 to the bridge I put ether4 on and tried playing with pvid (whatever that is) lol.

Any assistance would be appreciated. I have a router dialing out a pppoe session plugged into port 4, and I just wanna see it authenticate under vlan1234 without having to put that vlan on the test router and dialing out the pppoe session from under it first.

Hopefully that makes sense!!!
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11381
Joined: Thu Mar 03, 2016 10:23 pm

Re: How to make a router plugged into an interface only see a VLAN

Fri Apr 09, 2021 12:09 am

Add configuration something like this;

/interface bridge
add name=bridge1234 vlan-filtering=yes
/interface bridge port
add bridge=bridge1234 interface=ether4 pvid=1234 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
/interface bridge vlan
add bridge=bridge1234 tagged=bridge1234 untagged=ether4 vlan-ids=1234
/interface vlan
add interface=bridge1234 name=vlan1234 vlan-id=1234

This setup will create new VLAN-enabled bridge with single pirt ether4. Ether4 will accept only untagged frames on ingress and will tag them with VLAN 1234 on ingress and untag them on egress. It will drop any tagged frames on ingress. The last config (vlan1234 interface) will allow router to interact with device(s) connected to ether4, e.g. you can run PPPoE server off interface vlan1234.

The whole setup above is meaningless as at the end router still communicates with devices and whole communication (apart from reall short timespan spent tagged on bridge) uses untagged frames.
So basically you want to do something else with tagged frames, but I've no idea what you want to achieve. If you want to mix frames from ether4 (now tagged) with tagged frames with same VID, you have to add ether4 as access port to the bridge already carrying traffic for VLAN 1234.

Who is online

Users browsing this forum: No registered users and 57 guests