Community discussions

MikroTik App
 
molesza
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Thu Jun 20, 2013 12:02 pm

Vlan by MAC Address?

Thu Jun 20, 2013 12:25 pm

Is it possible to assign specific mac addresses to a certain vlan?

Basically I want all new clients who do not have a specified mac address to default to one vlan. Then I want to set up rules where if the mac address is known it is assigned to a different Vlan. It is not possible to do this with different ports on the board because we have a mixture of pc's which will need to go to either vlan in different buildings.

Hope it can be done!
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1131
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: Vlan by MAC Address?

Thu Jun 20, 2013 1:36 pm

Use MAC-based vlans on your switch to do this...
Unimus - configuration management, automation and backup solution
Mass Config Push, network-wide RouterOS upgrades, and more!
 
molesza
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Thu Jun 20, 2013 12:02 pm

Re: Vlan by MAC Address?

Thu Jun 20, 2013 4:55 pm

Thanks. Can this be done on the RB751G and where do I find the info?
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1131
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: Vlan by MAC Address?

Thu Jun 20, 2013 5:09 pm

Yes, see this wiki article on how switch chip works with vlans. (user ROS v6)
http://wiki.mikrotik.com/wiki/Manual:Sw ... outerOS_v6

After you have the VLANs setup and working, use the rule table to add desired MACs to desired VLANs.
/interface ethernet switch rule add switch=$switchName src-mac-address=$mac new-vlan-id=$vlanID
Unimus - configuration management, automation and backup solution
Mass Config Push, network-wide RouterOS upgrades, and more!
 
molesza
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Thu Jun 20, 2013 12:02 pm

Re: Vlan by MAC Address?

Tue Jun 25, 2013 1:27 pm

Thanks! Will read up and see how I go.

Who is online

Users browsing this forum: No registered users and 68 guests