Thank you for taking the time to respond. The NETGEAR documentation team uses your feedback to improve our knowledge base content.

Rating Submitted

Do you have a suggestion for improving this article?

Characters Left : 500

NETGEAR logo

MyNETGEAR® Account

Welcome back

Access your NETGEAR

mac address vlan assignment

NETGEAR Support

What is a MAC-based VLAN and how does it work with my managed switch?

Was this article helpful?    Yes      No

Image

The MAC-based VLAN feature allows incoming untagged packets to be assigned to a VLAN and thus classify traffic based on the source MAC address of the packet.

You define a MAC to VLAN mapping by configuring an entry in the MAC to VLAN table. An entry is specified using a source MAC address and the appropriate VLAN ID. The MAC to VLAN configurations are shared across all ports of the device (i.e., there is a system-wide table that has MAC address to VLAN ID mappings).

When untagged or priority tagged packets arrive at the switch and entries exist in the MAC to VLAN table, the source MAC address of the packet is looked up. If an entry is found, the corresponding VLAN ID is assigned to the packet. If the packet is already priority tagged it will maintain this value; otherwise, the priority will be set to 0 (zero). The assigned VLAN ID is verified against the VLAN table. If the VLAN is valid, ingress processing on the packet continues; otherwise, the packet is dropped. This implies that you can configure a MAC address mapping to a VLAN that has not been created on the system.

For more information, see the following support articles:

  • What is a virtual LAN (VLAN) and how does it work with my managed switch?
  • How do I create a MAC-based VLAN using CLI commands on my managed switch?
  • How do I assign a MAC-based VLAN using the web interface on my managed switch?

This article applies to the following managed switches and their respective firmware:

  • M5300 - firmware version 10.0.0.x
  • M5300-28G (GSM7228S)
  • M5300-5G (GSM7252S)
  • M5300-28G3 (GSM7328Sv2h2)
  • M5300-52G3 (GSM7352Sv2h2)
  • M5300-28G_POE+ (GSM7228PSv1h2)
  • M5300-52G-POE+ (GSM7252PSv1h2)
  • M5300-28GF3 (GSM7328FSv2)
  • M4100 - firmware version 10.0.1.x
  • M4100-26G (GSM7224v2h2)
  • M4100-50G (GSM7248v2h2)
  • M4100-26G-POE (GSM7226Pv1h1)
  • M4100-50G-POE+ (GSM7248Pv1h1)
  • M4100-26G-POE (FSM7226Pv1h1)
  • M4100-50-POE (FSM7250Pv1h1)
  • M4100-D12G (GSM5212v1h1)
  • M4100-D10-POE (FSM5210Pv1h1)
  • M7100 - firmware version 10.0.1.x
  • M7100-24X (XSM7224)
  • XSM7224S - firmware version 9.0.1.x

Last Updated:07/16/2022 | Article ID: 21586

Was this article helpful?

This article applies to:.

  • GSM4230PX (TAA)
  • GSM4248PX (TAA)
  • M4200-10MG-PoE+ (GSM4210P)
  • M4250-10G2F-PoE+ (GSM4212P)
  • M4250-10G2XF-PoE+ (GSM4212PX)
  • M4250-10G2XF-PoE++ (GSM4212UX)
  • M4250-12M2XF (MSM4214X)
  • M4250-16XF (XSM4216F)
  • M4250-26G4F-PoE+ (GSM4230P)
  • M4250-26G4F-PoE++ (GSM4230UP)
  • M4250-26G4XF-PoE+ (GSM4230PX)
  • M4250-40G8F-PoE+ (GSM4248P)
  • M4250-40G8XF-PoE+ (GSM4248PX)
  • M4250-40G8XF-PoE++ (GSM4248UX)
  • M4250-8G2XF-PoE+ (GSM4210PX)
  • M4250-9G1F-PoE+ (GSM4210PD)
  • M4300-12X12F (XSM4324S)
  • M4300-16X (XSM4316PA)
  • M4300-16X (XSM4316PB)
  • M4300-24X (XSM4324CS)
  • M4300-24X24F (XSM4348S)
  • M4300-24XF (XSM4324FS)
  • M4300-28G (GSM4328S)
  • M4300-28G-PoE+ (GSM4328PA)
  • M4300-28G-PoE+ (GSM4328PB)
  • M4300-48X (XSM4348CS)
  • M4300-48XF (XSM4348FS)
  • M4300-52G (GSM4352S)
  • M4300-52G-PoE+ (GSM4352PA)
  • M4300-52G-PoE+ (GSM4352PB)
  • M4300-8X8F (XSM4316S)
  • M5300-28G-POE+ (GSM7228PSv1h2)
  • M5300-52G (GSM7252S)
  • MSM4214X (TAA)
  • M4100-26-POE (FSM7226Pv1h1)
  • M4100-26G-POE (GSM7226LPv1h1)

Read this article in another language:

Looking for more about your product.

Get information, documentation, videos and more for your specific product.

Can’t find what you’re looking for?

Quick and easy solutions are available for you in the NETGEAR community.

Need to Contact NETGEAR Support?

With NETGEAR’s round-the-clock premium support, help is just a phone call away.

Complimentary Support

NETGEAR provides complimentary technical support for NETGEAR products for 90 days from the original date of purchase.

NETGEAR Premium Support

Gearhead support for home users.

GearHead Support is a technical support service for NETGEAR devices and all other connected devices in your home. Advanced remote support tools are used to fix issues on any of your devices. The service includes support for the following:

  • Desktop and Notebook PCs, Wired and Wireless Routers, Modems, Printers, Scanners, Fax Machines, USB devices and Sound Cards
  • Windows Operating Systems (2000, XP or Vista), MS Word, Excel, PowerPoint, Outlook and Adobe Acrobat
  • Anti-virus and Anti-Spyware: McAfee, Norton, AVG, eTrust and BitDefender

ProSUPPORT Services for Business Users

NETGEAR ProSUPPORT services are available to supplement your technical support and warranty entitlements. NETGEAR offers a variety of ProSUPPORT services that allow you to access NETGEAR's expertise in a way that best meets your needs:

  • Product Installation
  • Professional Wireless Site Survey
  • Defective Drive Retention (DDR) Service

Where to Find Your Model Number

To find the model/version number, check the bottom or back panel of your NETGEAR device.

Select a product or category below for specific instructions.

mac address vlan assignment

Nighthawk Routers

mac address vlan assignment

Powerline and Wall Plug Extenders

mac address vlan assignment

Cable and DSL Modem Routers

mac address vlan assignment

ReadyNAS Network Storage

mac address vlan assignment

Wireless Access Points

mac address vlan assignment

Other Business Products

mac address vlan assignment

Mobile Broadband

Network Guys

Share your knowledge!

How to use 802.1x/mac-auth and dynamic VLAN assignment

Hello guys! Today I want to show you how to secure your edge-switches with 802.1x and mac-authentication fallback in combination with HPE comware-based switches. The 802.1x protocol is used for network access control. For devices like printers, cameras, etc. we will use mac-authentication as a fallback. We will also use dynamic VLAN assignment for the connected ports.

Our radius server will be Microsoft NPS. You can activate this role on the Windows server:

mac address vlan assignment

After the installation, open the NPS console and register the radius server in your Active Directory:

mac address vlan assignment

add your switches or your management network as a radius-client:

mac address vlan assignment

the shared secret will be used in the switch configuration. In created two groups within my test environment:

  • “ VLAN2-802.1x ” containing computer accounts
  • “ VLAN3-MAC-Auth ” containing user accounts (username+password = mac-address of the device)

So we will now configure two network policies for our network access control:

mac address vlan assignment

I also configured a NAS Identifier so no other device can use the radius server. The clients will use their computer certificate so you will need a running internal certification authority. Choose PEAP only as the authentication method:

mac address vlan assignment

the next step is for our dynamic VLAN assignment. Dot1x devices are bound to VLAN 2:

mac address vlan assignment

the final dot1x configuration in the NPS:

mac address vlan assignment

the second network policy is for the mac-based authentication:

mac address vlan assignment

Comware switches are sending MAC-Auth-requests via PAP (maybe you know how to change it to CHAP):

mac address vlan assignment

final MAC auth profile:

mac address vlan assignment

for now we have built up our authentication server. Now let’s go to the switch configuration. You have global configuration parameters and parameters for each interface. The best way is to use interface-range command to be safe at your configuration. Users who cant authenticate, will be forced to VLAN 999 (quarantine VLAN with no gateway). Here are the global parameters with explanations inline:

now we will configure the interfaces: Added 2 entries

the last part is to configure all windows clients to send 802.1x auth data to the cable network. I’ve done this via a global group policy. You can find the settings under Computer Configuration / Policies / Windows Settings / Security Settings / Wired Network (IEEE 802.3) Policies:

mac address vlan assignment

So how does a working 802.1x-auth looks like?

%Jan 3 01:59:59:531 2013 edge-switch-01 DOT1X/6/DOT1X_LOGIN_SUCC: -IfName=GigabitEthernet1/0/10-MACAddr=0023-2415-42a3-AccessVLANID=1- AuthorizationVLANID=2 -Username= host/PC123.mycompany.local ; User passed 802.1X authentication and came online.

Successful Mac-Authentication of a printer:

%Jan 3 01:31:28:782 2013 de-pad-l19-edg01 MACA/6/MACA_LOGIN_SUCC: -IfName=GigabitEthernet1/0/9-MACAddr=0017-c82d-e9bf-AccessVLANID=1- AuthorizationVLANID=3 -Username= 0017c82de9bf -UsernameFormat=MAC address; User passed MAC authentication and came online.

I tried to draw a flow chart which shows the authentication process, I hope it’s ok for you :)

mac address vlan assignment

Do you have questions? Feel free to write them into the comments and I will try to answer.

Have a nice and sunny day!

/edit: If you can’t see success and failure events, follow this instruction:  NPS / Radius Server is not logging

/edit 2018-05-14: I corrected the global and interface configuration, we had problems with the old configuration

12 Responses

Thanks for this, I need to setup dynamic VLAN assignment in the near future but for Juniper equipment.

This at least gives me a good starting point, thanks for the write up.

Many thanks for the perfect tutorial on How to use 802.1x/Mac-Auth and dynamic VLAN assignment. Many of us can take help from it. Really nice.

Nice write-up. This was a great starting point for configuring the base for dynamic polices. Thanks!

hi Mike, how ‘s about hybrid port with voice-vlan? does it work?

thanks Tung Duong

we had several problems with this config, currently we are investigating hyprid ports with “port security” command. I will update this post if we have prooved this version.

Can you tell me why I would do this over conventional static VLANs? What are the benefits radius dynamic VLANs?

we have customers which want to divide the network for clients, printers and “special devices”. So you have different group/radius-policies to directly place the devices in the right VLAN. Dynamic VLAN is only a bonus feature which you can use. Of course, you can use only the 802.1x and Mac authentication for security purpose.

I’m on the desktop side of things, so apologies if I use any incorrect terminology here.

Our Infrastructure team are looking at introducing 8021x in our schools. They have a test setup where all 8021x devices pick up a data centre VLAN regardless of which building they’re in – eg 10.100.50.

Each building WIRED has its own unique IP – SchoolA=10.120, SchoolB = 10.130 and so on.

I’ve asked if the 8021x setup can be where 8021x devices in SchoolA will get 10.120.50; SchoolB will get 10.130.50

This would allow us to easily determine which building LaptopA actually is, in the same way as we can with our wired desktops. It also saves on SCCM boundary issues causing applications/updates to be pulled over the WAN rather than the LAN.

It’s been suggested that this may not be possible. Could someone confirm this?

Thanks in advance.

Hello! This is of course possible!

My idea (with examples):

SchoolA=10.120 (Location: Chicago) SchoolB=10.130 (Location: Dallas)

So at Chicago you will have VLAN 333, every device is getting an IP address with 10.120.x.x. At Dallas every device in VLAN 333 is getting an IP address with 10.130.x.x. So the VLAN ID “333” is the same at every school but the DHCP scope and default gateway has it’s own address. So the device is getting the VLAN 333 at every location but another IP address. It’s very simple.

It’s not working if all schools are connected via Layer2 so VLAN333 can’t be a “standalone VLAN” at each geographical location.

Ask me any questions, I will try to help you.

  • Pingback: 802.1x, MAC-Authentication and VLAN assignment at ProCurve/aruba Switches – Network Guy
  • Pingback: Port Auth, Dynamic VLAN and Radius | samuelnotes
  • Pingback: HPE Comware problem with mac authentication and printer - Network Guy

Leave a Reply Cancel reply

Click on the button to load the content from jetpack.wordpress.com.

Load content

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Certificates

ekahau Certified Survey Engineer

Post Categories

Post archives, recent posts.

  • Sophos UTM 9.712-13 HA update problem 14. November 2022
  • Sophos UTM 9.712-12 update released 24. August 2022
  • Aruba OS Switch automatic vlan assignment for aruba APs 5. May 2022
  • Sophos UTM 9.711-5 update released 22. April 2022
  • Sophos UTM 9.710-1 update released 20. March 2022

Recent Comments

  • Sophos Ssl Vpn Client Anmeldung - Login and Portal on Auto-Logon with Sophos SSL VPN Client (OpenVPN)
  • Russell on Install Sophos UTM from USB Stick
  • arno on Problems with incoming mails
  • GigaTech IT on Installing Realtek Driver on ESXi 6.7
  • Sophos User Portal Login Ssl Vpn - Online Login on Auto-Logon with Sophos SSL VPN Client (OpenVPN)

Franky’s Web  Website from my friend Frank. News and Tricks about Microsoft products, primarly Exchange Server

Copyright by networkguy.de

Imprint · Privacy Policy

Configuring MAC VLAN

1. Overview

2. MAC VLAN Configuration

3. Configuration Example

4. Appendix: Default Parameters

This guide applies to:

T1500G-8T v2 or above, T1500G-10PS v2 or above, T1500G-10MPS v2 or above, T1500-28PCT v3 or above, T1600G-18TS v2 or above, T1600G-28TS v3 or above, T1600G-28PS v3 or above, T1600G-52TS v3 or above, T1600G-52PS v3 or above, T1700X-16TS v3 or above, T1700G-28TQ v3 or above, T2500G-10TS v2 or above, T2600G-18TS v2 or above, T2600G-28TS v3 or above, T2600G-28MPS v3 or above, T2600G-28SQ v1 or above, T2600G-52TS v3 or above.

VLAN is generally divided by ports. It is a common way of division but isn’t suitable for those networks that require frequent topology changes. With the popularity of mobile office, at different times a terminal device may access the network via different ports. For example, a terminal device that accessed the switch via port 1 last time may change to port 2 this time. If port 1 and port 2 belong to different VLANs, the user has to re-configure the switch to access the original VLAN. Using MAC VLAN can free the user from such a problem. It divides VLANs based on the MAC addresses of terminal devices. In this way, terminal devices always belong to their MAC VLANs even when their access ports change.

The figure below shows a common application scenario of MAC VLAN.

Figure 1-1 Common Application Scenario of MAC VLAN

mac address vlan assignment

Two departments share all the meeting rooms in the company, but use different servers and laptops. Department A uses Server A and Laptop A, while Department B uses Server B and Laptop B. Server A is in VLAN 10 while Server B is in VLAN 20. It is required that Laptop A can only access Server A and Laptop B can only access Server B, no matter which meeting room the laptops are being used in. To meet this requirement, simply bind the MAC addresses of the laptops to the corresponding VLANs respectively. In this way, the MAC address determines the VLAN each laptop joins. Each laptop can access only the server in the VLAN it joins.

2 MAC VLAN Configuration

To complete MAC VLAN configuration, follow these steps:

1) Configure 802.1Q VLAN.

2) Bind the MAC address to the VLAN.

3) Enable MAC VLAN for the port.

Configuration Guidelines

When a port in a MAC VLAN receives an untagged data packet, the switch will first check whether the source MAC address of the data packet has been bound to the MAC VLAN. If yes, the switch will insert the corresponding tag to the data packet and forward it within the VLAN. If no, the switch will continue to match the data packet with the matching rules of other VLANs (such as the protocol VLAN). If there is a match, the switch will forward the data packet. Otherwise, the switch will process the data packet according to the processing rule of the 802.1 Q VLAN. When the port receives a tagged data packet, the switch will directly process the data packet according to the processing rule of the 802.1Q VLAN.

2.1 Using the GUI

2.1.1 Configuring 802.1Q VLAN

Before configuring MAC VLAN, create an 802.1Q VLAN and set the port type according to network requirements. For details, refer to Configuring 802.1Q VLAN .

2.1.2 Binding the MAC Address to the VLAN

Figure 2-1 Creating MAC VLAN

mac address vlan assignment

Follow these steps to bind the MAC address to the 802.1Q VLAN:

1) Enter the MAC address of the device, give it a description, and enter the VLAN ID to bind it to the VLAN.

MAC Address

Enter the MAC address of the device in the format of 00-00-00-00-00-01.

Description

Give a MAC address description for identification with up to 8 characters.

VLAN ID/Name

Enter the ID number or name of the 802.1Q VLAN that will be bound to the MAC VLAN..

2) Click Create .

Note:

One MAC address can be bound to only one VLAN.

2.1.3 Enabling MAC VLAN for the Port

By default, MAC VLAN is disabled on all ports. You need to enable MAC VLAN for your desired ports manually.

Choose the menu L2 FEATURES > VLAN > MAC VLAN to load the following page.

Figure 2-2 Enabling MAC VLAN for the Port

mac address vlan assignment

In the Port Enable section, select the desired ports to enable MAC VLAN, and click Apply .

Note:

The member port of an LAG (Link Aggregation Group) follows the configuration of the LAG and not its own. The configurations of the port can take effect only after it leaves the LAG.

2.2 Using the CLI

2.2.1 Configuring 802.1Q VLAN

2.2.2 Binding the MAC Address to the VLAN

Follow these steps to bind the MAC address to the VLAN:

Step 1

configure

Enter global configuration mode.

Step 2

mac-vlan mac-address mac-addr vlan vlan-id [description descript]

Bind the MAC address to the VLAN.

mac-addr: Specify the MAC address of the device in the format of xx:xx:xx:xx:xx:xx.

vlan-id: Enter the ID number of the 802.1Q VLAN that will be bound to the MAC VLAN.

descript: Specify the MAC address description for identification, with up to 8 characters.

Step 3

show mac-vlan { all | mac-address mac-addr | vlan vlan-id }

Verify the configuration of MAC VLAN.

vid: Specify the MAC VLAN to be displayed.

Step 4

end

Return to privileged EXEC mode.

Step 5

copy running-config startup-config

Save the settings in the configuration file.

The following example shows how to bind the MAC address 00:19:56:8A:4C:71 to VLAN 10, with the address description as Dept.A.

Switch#configure

Switch(config)#mac-vlan mac-address 00:19:56:8a:4c:71 vlan 10 description Dept.A

Switch(config)#show mac-vlan vlan 10

MAC-Addr Name VLAN-ID

-------------- ----------- ------------

00:19:56:8A:4C:71 Dept.A 10

Switch(config)#end

Switch# copy running-config startup-config

2.2.3 Enabling MAC VLAN for the Port

Follow these steps to enable MAC VLAN for the port:

Step 1

configure

Enter global configuration mode.

Step 2

interface {fastEthernet port | range fastEthernet port-list | gigabitEthernet port | range gigabitEthernet port-list | ten-gigabitEthernet port | range ten-gigabitEthernet port-list | port-channel port-channel-id | range port-channel port-channel-list}

Enter interface configuration mode.

Step 3

mac-vlan

Enable MAC VLAN for the port.

Step 4

show mac-vlan interface

Verify the configuration of MAC VLAN on each interface.

Step 5

end

Return to privileged EXEC mode.

Step 6

copy running-config startup-config

Save the settings in the configuration file.

The following example shows how to enable MAC VLAN for port 1/0/1.

Switch(config)#interface gigabitEthernet 1/0/1

Switch(config-if)#mac-vlan

Switch(config-if)#show mac-vlan interface

Port STATUS

------- -----------

Gi1/0/1 Enable

Gi1/0/2 Disable

Switch(config-if)#end

Switch#copy running-config startup-config

3 Configuration Example

3.1 Network Requirements

Two departments share all the meeting rooms in the company, but use different servers and laptops. Department A uses Server A and Laptop A, while Department B uses Server B and Laptop B. Server A is in VLAN 10 while Server B is in VLAN 20. It is required that Laptop A can only access Server A and Laptop B can only access Server B, no matter which meeting room the laptops are being used in. The figure below shows the network topology.

Figure 3-1 Network Topology

mac address vlan assignment

3.2 Configuration Scheme

You can configure MAC VLAN to meet this requirement. On Switch 1 and Switch 2, bind the MAC addresses of the laptops to the corresponding VLANs respectively. In this way, each laptop can access only the server in the VLAN it joins, no matter which meeting room the laptops are being used in. The overview of the configuration is as follows:

1) Create VLAN 10 and VLAN 20 on each of the three switches and add the ports to the VLANs based on the network topology. For the ports connecting the laptops, set the egress rule as Untagged; for the ports connecting to other switch, set the egress rule as Tagged.

2) On Switch 1 and Switch 2, bind the MAC addresses of the laptops to their corresponding VLANs, and enable MAC VLAN for the ports.

Demonstrated with T2600G-28TS, the following sections provide configuration procedure in two ways: using the GUI and using the CLI.

3.3 Using the GUI

 Configurations for Switch 1 and Switch 2

The configurations of Switch 1 and Switch 2 are similar. The following introductions take Switch 1 as an example.

Figure 3-2 Creating VLAN 10

mac address vlan assignment

Figure 3-3 Creating VLAN 20

mac address vlan assignment

Figure 3-4 Creating MAC VLAN

mac address vlan assignment

4) Choose the menu L2 FEATURES > VLAN > MAC VLAN to load the following page. In the Port Enable section select port 1/0/1 and click Apply to enable MAC VLAN.

Figure 3-5 Enabing MAC VLAN for the Port

mac address vlan assignment

 Configurations for Switch 3

Figure 3-6 Creating VLAN 10

mac address vlan assignment

2) Click Create to load the following page. Create VLAN 20, and add untagged port 1/0/5 and tagged ports 1/0/2-3 to VLAN 20. Click Create .

Figure 3-7 Creating VLAN 20

mac address vlan assignment

3.4 Using the CLI

The configurations of Switch 1 and Switch 2 are the same. The following introductions take Switch 1 as an example.

1) Create VLAN 10 for Department A and create VLAN 20 for Department B.

Switch_1#configure

Switch_1(config)#vlan 10

Switch_1(config-vlan)#name deptA

Switch_1(config-vlan)#exit

Switch_1(config)#vlan 20

Switch_1(config-vlan)#name deptB

2) Add tagged port 1/0/2 and untagged port 1/0/1 to both VLAN 10 and VLAN 20. Then enable MAC VLAN on port 1/0/1.

Switch_1(config)#interface gigabitEthernet 1/0/2

Switch_1(config-if)#switchport general allowed vlan 10,20 tagged

Switch_1(config-if)#exit

Switch_1(config)#interface gigabitEthernet 1/0/1

Switch_1(config-if)#switchport general allowed vlan 10,20 untagged

Switch_1(config-if)#mac-vlan

3) Bind the MAC address of Laptop A to VLAN 10 and bind the MAC address of Laptop B to VLAN 20.

Switch_1(config)#mac-vlan mac-address 00:19:56:8A:4C:71 vlan 10 description PCA

Switch_1(config)#mac-vlan mac-address 00:19:56:82:3B:70 vlan 20 description PCB

Switch_1(config)#end

Switch_1#copy running-config startup-config

Switch_3#configure

Switch_3(config)#vlan 10

Switch_3(config-vlan)#name deptA

Switch_3(config-vlan)#exit

Switch_3(config)#vlan 20

Switch_3(config-vlan)#name deptB

2) Add tagged port 1/0/2 and port 1/0/3 to both VLAN 10 and VLAN 20.

Switch_3(config)#interface gigabitEthernet 1/0/2

Switch_3(config-if)#switchport general allowed vlan 10,20 tagged

Switch_3(config-if)#exit

Switch_3(config)#interface gigabitEthernet 1/0/3

3) Add untagged port 1/0/4 to VLAN 10 and untagged port 1/0/5 to VLAN 20.

Switch_3(config)#interface gigabitEthernet 1/0/4

Switch_3(config-if)#switchport general allowed vlan 10 untagged

Switch_3(config)#interface gigabitEthernet 1/0/5

Switch_3(config-if)#switchport general allowed vlan 20 untagged

Switch_3(config-if)#end

Switch_3#copy running-config startup-config

Verify the Configurations

Switch_1#show mac-vlan all

MAC Add Name VLAN-ID

---------------------- ----------------- ----------

00:19:56:8A:4C:71 PCA 10

00:19:56:82:3B:70 PCB 20

---------------------------------------------------------------------

Switch_2#show mac-vlan all

MAC Address Description VLAN

---------------------- --------------------- -----------

-------------------------------------------------------------------------

Switch_3#show vlan

VLAN Name Status Ports

-------- --------------- ------------- -------------------------------------

1 System-VLAN active Gi1/0/1, Gi1/0/2, Gi1/0/3, Gi1/0/4,

Gi1/0/5, Gi1/0/6, Gi1/0/7, Gi1/0/8

10 DeptA active Gi1/0/2, Gi1/0/3, Gi1/0/4

20 DeptB active Gi1/0/2, Gi1/0/3, Gi1/0/5

4 Appendix: Default Parameters

Default settings of MAC VLAN are listed in the following table.

Table 4-1 Default Settings of MAC VLAN

Parameter

Default Setting

MAC Address

None

Description

None

VLAN ID

None

Port Enable

Disabled

  • Skip to content
  • Skip to search
  • Skip to footer

Configuring Dynamic VLAN Membership

Available languages, download options.

  • PDF (281.0 KB) View with Adobe Reader on a variety of devices

Bias-Free Language

The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.

Table Of Contents Configuring Dynamic VLAN Membership Understanding VMPS VMPS Server Overview Security Modes for VMPS Server Open mode Secure mode Multiple mode Fall-back VLAN Illegal VMPS client requests Understanding VMPS clients Dynamic VLAN Membership Overview Default VMPS Client Configuration Configuring a Switch as a VMPS Client Configuring the IP Address of the VMPS Server Configuring Dynamic Access Ports on a VMPS Client Reconfirming VLAN Memberships Configuring Reconfirmation Interval Configuring the Retry Interval Administering and Monitoring the VMPS Troubleshooting Dynamic Port VLAN Membership Dynamic Port VLAN Membership Configuration Example VMPS Database Configuration File Example Configuring Dynamic VLAN Membership This chapter describes how to configure dynamic port VLAN membership by using the VLAN Membership Policy Server (VMPS). This chapter includes the following major sections: • Understanding VMPS • Understanding VMPS clients Note For complete syntax and usage information for the switch commands used in this chapter, refer to the C atalyst 4500 Series Switch Cisco IOS Command Reference and related publications at http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/index.htm. Understanding VMPS The following subsections describe what a VMPS server does and how it operates. The following topics are included: • VMPS Server Overview • Security Modes for VMPS Server • Fall-back VLAN • Illegal VMPS client requests VMPS Server Overview A VLAN Membership Policy Server (VMPS) provides a centralized server for selecting the VLAN for a port dynamically based on the MAC address of the device connected to the port. When the host moves from a port on one switch in the network to a port on another switch in the network, that switch dynamically assigns the new port to the proper VLAN for that host. A Catalyst 4500 series switch running Cisco IOS software does not support the functionality of a VMPS. It can only function as a VLAN Query Protocol (VQP) client, which communicates with a VMPS through the VQP. For VMPS functionality, you need to use a Catalyst 4500 series switch (or Catalyst 6500 series switch) running Catalyst operating system (OS) software. VMPS uses a UDP port to listen to VQP requests from clients, so, it is not necessary for VMPS clients to know if the VMPS resides on a local or remote device on the network. Upon receiving a valid request from a VMPS client, a VMPS server searches its database for an entry of a MAC-address to VLAN mapping. In response to a request, the VMPS takes one of the following actions: • If the assigned VLAN is restricted to a group of ports, the VMPS verifies the requesting port against this group and responds as follows: – If the VLAN is allowed on the port, the VMPS sends the VLAN name to the client in response. – If the VLAN is not allowed on the port and the VMPS is not in secure mode, the VMPS sends an " access-denied" response. – If the VLAN is not allowed on the port and the VMPS is in secure mode, the VMPS sends a "port-shutdown" response. • If the VLAN in the database does not match the current VLAN on the port and there are active hosts on the port, the VMPS sends an " access-denied" (open), a "fallback VLAN name" (open with fallback VLAN configured), a " port-shutdown" (secure) , or a " new VLAN name" (multiple) response, depending on the secure mode setting of the VMPS. If the switch receives an " access-denied" response from the VMPS, the switch continues to block traffic from the MAC address to or from the port. The switch continues to monitor the packets directed to the port and sends a query to the VMPS when it identifies a new address. If the switch receives a "port-shutdown" response from the VMPS, the switch disables the port. The port must be manually re-enabled by using the CLI, Cisco Visual Switch Manager (CVSM), or SNMP. You can also use an explicit entry in the configuration table to deny access to specific MAC addresses for security reasons. If you enter the none keyword for the VLAN name, the VMPS sends an "access-denied" or " port-shutdown" response. For more information on a Catalyst 6500 series switch VMPS running Catalyst operating system software, refer to the "Configuring Dynamic Port VLAN Membership with VMPS" chapter at the URL: http://www.cisco.com/univercd/cc/td/doc/product/lan/cat6000/sw_8_3/confg_gd/vmps.htm Security Modes for VMPS Server VMPS operates in three different modes. The way a VMPS server responds to illegal requests depends on the mode in which the VMPS is configured: • Open mode • Secure mode • Multiple mode Open mode If the assigned VLAN is restricted to a group of ports, VMPS verifies the requesting port against this group: • If the VLAN is allowed on the port, the VLAN name is returned to the client. • If the VLAN is not allowed on the port, the host receives an "access denied" response. • If a VLAN in the database does not match the current VLAN on the port and a fallback VLAN name is configured, VMPS sends the fallback VLAN name to the client. • If a VLAN in the database does not match the current VLAN on the port and a fallback VLAN name is not configured, the host receives an "access denied" response. Secure mode If the assigned VLAN is restricted to a group of ports, VMPS verifies the requesting port against this group: • If the VLAN is allowed on the port, the VLAN name is returned to the client. • If the VLAN is not allowed on the port, the port is shut down. • If a VLAN in the database does not match the current VLAN on the port, the port is shutdown, even if a fallback VLAN name is configured. Multiple mode Multiple hosts (MAC addresses) can be active on a dynamic port if they are all in the same VLAN. If the link goes down on a dynamic port, the port returns to the unassigned state. Any hosts that come online through the port are checked again with VMPS before the port is assigned to a VLAN. If multiple hosts connected to a dynamic port belong to different VLANs, the VLAN matching the MAC address in the last request is returned to the client, provided that multiple mode is configured on the VMPS server. Note Although Catalyst 4500 series and Catalyst 6500 series switches running Catalyst operating system software support VMPS in all three operation modes, the Cisco network management tool URT (User Registration Tool) supports open mode only. Fall-back VLAN You can configure a fallback VLAN name on a VMPS server. If you connect a device with a MAC address that is not in the database, the VMPS sends the fallback VLAN name to the client. If you do not configure a fallback VLAN name and the MAC address does not exist in the database, the VMPS sends an " access-denied" response. If the VMPS is in secure mode, it sends a " port-shutdown" response, whether or not a fallback VLAN has been configured on the server. Illegal VMPS client requests Two examples of illegal VMPS client requests are as follows: • When a MAC-address mapping is not present in the VMPS database and "no fall back" VLAN is configured on the VMPS. • When a port is already assigned a VLAN (and the VMPS mode is not "multiple") but a second VMPS client request is received on the VMPS for a different MAC-address. Understanding VMPS clients The following subsections describe how to configure a switch as a VMPS client and configure its ports for dynamic VLAN membership. The following topics are included: • Dynamic VLAN Membership Overview • Default VMPS Client Configuration • Configuring a Switch as a VMPS Client • Administering and Monitoring the VMPS • Troubleshooting Dynamic Port VLAN Membership Dynamic VLAN Membership Overview When a port is configured as "dynamic," it receives VLAN information based on the MAC-address that is on the port. The VLAN is not statically assigned to the port; it is dynamically acquired from the VMPS based on the MAC-address on the port. A dynamic port can belong to one VLAN only. When the link becomes active, the switch does not forward traffic to or from this port until the port is assigned to a VLAN. The source MAC address from the first packet of a new host on the dynamic port is sent to the VMPS as part of the VQP request, which attempts to match the MAC address to a VLAN in the VMPS database. If there is a match, the VMPS sends the VLAN number for that port. If there is no match, the VMPS either denies the request or shuts down the port (depending on the VMPS security mode setting). See the "Understanding VMPS" section for a complete description of possible VMPS responses. Multiple hosts (MAC addresses) can be active on a dynamic port if all are in the same VLAN. If the link goes down on a dynamic port, the port returns to the unassigned state and does not belong to a VLAN. Any hosts that come online through the port are checked again with the VMPS before the port is assigned to a VLAN. For this behavior to work, the client device must be able to reach the VMPS. A VMPS client sends VQP requests as UDP packets, trying a certain number of times before giving up. For details on how to set the retry interval, refer to section "Configuring the Retry Interval" on page 8 . The VMPS client also periodically reconfirms the VLAN membership. For details on how to set the reconfirm frequency, refer to section "Administering and Monitoring the VMPS" on page 8 . A maximum of 50 hosts are supported on a given port at any given time. Once this maximum is exceeded, the port is shut down, irrespective of the operating mode of the VMPS server. Note The VMPS shuts down a dynamic port if more than 50 hosts are active on that port. Default VMPS Client Configuration Table 11-1 shows the default VMPS and dynamic port configuration on client switches. Table 11-1 Default VMPS Client and Dynamic Port Configuration Feature Default Configuration VMPS domain server None VMPS reconfirm interval 60 minutes VMPS server retry count 3 Dynamic ports None configured Configuring a Switch as a VMPS Client This section contains the following topics: • Configuring the IP Address of the VMPS Server • Configuring Dynamic Access Ports on a VMPS Client • Reconfirming VLAN Memberships • Configuring Reconfirmation Interval • Reconfirming VLAN Memberships Configuring the IP Address of the VMPS Server To configure a Catalyst 4500 series switch as a VMPS client, you must enter the IP address or hostname of the switch acting as the VMPS. To define the primary and secondary VMPS on a Catalyst 4500 series switch, perform this task:   Command Purpose Step 1  Switch# configure terminal Enters global configuration mode. Step 2  Switch(config)# vmps server { ipaddress | hostname } primary Specifies the IP address or hostname of the switch acting as the primary VMPS server. Step 3  Switch(config)# vmps server { ipaddress | hostname } Specifies the IP address or hostname of the switch acting as a secondary VMPS server. Step 4  Switch(config)# end Returns to privileged EXEC mode. Step 5  Switch# show vmps Verifies the VMPS server entry. This example shows how to define the primary and secondary VMPS devices: Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# vmps server 172.20.128.179 primary Switch(config)# vmps server 172.20.128.178 Switch(config)# end Note You can configure up to four VMPS servers using this CLI on the VMPS client. Switch# show vmps VQP Client Status: -------------------- VMPS VQP Version: 1 Reconfirm Interval: 60 min Server Retry Count: 3 VMPS domain server: 172.20.128.179 (primary, current) 172.20.128.178 Reconfirmation status --------------------- VMPS Action: No Dynamic Port Configuring Dynamic Access Ports on a VMPS Client To configure a dynamic access port on a VMPS client switch, perform this task:   Command Purpose Step 1  Switch# configure terminal Enters global configuration mode. Step 2  Switch(config)# interface interface Enters interface configuration mode and specifies the port to be configured. Step 3  Switch(config -if )# switchport mode access Sets the port to access mode. Step 4  Switch(config -if )# switchport access vlan dynamic Configures the port as eligible for dynamic VLAN access. Step 5  Switch(config-if)# end Returns to privileged EXEC mode. Step 6  Switch# show interface interface switchport Verifies the entry. This example shows how to configure a dynamic access port and then verify the entry: Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# interface fa1/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan dynamic Switch(config-if)# end Switch# show interface fa1/1 switchport Name: Fa0/1 Switchport: Enabled Administrative mode: dynamic auto Operational Mode: dynamic access Administrative Trunking Encapsulation: isl Operational Trunking Encapsulation: isl Negotiation of Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: NONE Pruning VLANs Enabled: NONE Voice Ports If a VVID (voice VLAN ID) is configured on a dynamic access port, the port can belong to both an access VLAN and a voice VLAN. Consequently, an access port configured for connecting an IP phone can have separate VLANs for the following: • Data traffic to and from the PC that is connected to the switch through the access port of the IP phone (access VLAN) • Voice traffic to and from the IP phone (voice VLAN) Reconfirming VLAN Memberships To confirm the dynamic port VLAN membership assignments that the switch has received from the VMPS, perform this task:   Command Purpose Step 1  Switch# vmps reconfirm Reconfirms dynamic port VLAN membership. Step 2  Switch# show vmps Verifies the dynamic VLAN reconfirmation status. Configuring Reconfirmation Interval VMPS clients periodically reconfirm the VLAN membership information received from the VMPS. You can set the number of minutes the VMPS client waits before reconfirming the VLAN-to-MAC-address assignments. To configure the reconfirmation interval, perform this task:   Command Purpose Step 1  Switch# configure terminal Enters global configuration mode. Step 2  Switch(config)# vmps reconfirm minutes Specifies the number of minutes between reconfirmations of the dynamic VLAN membership. Step 3  Switch(config)# end Returns to privileged EXEC mode. Step 4  Switch# show vmps Verifies the dynamic VLAN reconfirmation status. This example shows how to change the reconfirmation interval to 60 minutes and verify the change: Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# vmps reconfirm 60 Switch(config)# end Switch# show vmps VQP Client Status: -------------------- VMPS VQP Version: 1 Reconfirm Interval: 60 min Server Retry Count: 10 VMPS domain server: 172.20.130.50 (primary, current) Reconfirmation status --------------------- VMPS Action: No Host Configuring the Retry Interval You can set the number of times that the VMPS client attempts to contact the VMPS before querying the next server. To set the retry interval, perform this task:   Command Purpose Step 1  Switch# configure terminal Enters global configuration mode. Step 2  Switch(config)# vmps retry count Specifies the retry count for the VPQ queries. Default is 3. Range is from 1 to 10. Step 3  Switch(config)# end Returns to privileged EXEC mode. Step 4  Switch# show vmps Verifies the retry count. This example shows how to change the retry count to 5 and to verify the change: Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# vmps retry 5 Switch(config)# end Switch# show vmps VQP Client Status: -------------------- VMPS VQP Version: 1 Reconfirm Interval: 60 min Server Retry Count: 5 VMPS domain server: 172.20.130.50 (primary, current) Reconfirmation status --------------------- VMPS Action: No Host Administering and Monitoring the VMPS You can display the following information about the VMPS with the show vmps command: VQP Version The version of VQP used to communicate with the VMPS. The switch queries the VMPS using VQP Version 1. Reconfirm Interval The number of minutes the switch waits before reconfirming the VLAN-to-MAC-address assignments. Server Retry Count The number of times VQP resends a query to the VMPS. If no response is received after this many tries, the switch starts to query the secondary VMPS. VMPS domain server The IP address of the configured VLAN membership policy servers. The switch currently sends queries to the one marked "current." The one marked "primary" is the primary server. VMPS Action The result of the most-recent reconfirmation attempt. This action can occur automatically when the reconfirmation interval expired, or you can force it by entering the vmps reconfirm command or its CVSM or SNMP equivalent. The following example shows how to display VMPS information: Switch# show vmps VQP Client Status: -------------------- VMPS VQP Version: 1 Reconfirm Interval: 60 min Server Retry Count: 3 VMPS domain server: Reconfirmation status --------------------- VMPS Action: other The following example shows how to display VMPS statistics: Switch# show vmps statistics VMPS Client Statistics ---------------------- VQP Queries: 0 VQP Responses: 0 VMPS Changes: 0 VQP Shutdowns: 0 VQP Denied: 0 VQP Wrong Domain: 0 VQP Wrong Version: 0 VQP Insufficient Resource: 0 Note Refer to the C atalyst 4500 Series Switch Cisco IOS Command Reference for details on VMPS statistics. Troubleshooting Dynamic Port VLAN Membership VMPS errdisables a dynamic port under the following conditions: • The VMPS is in secure mode, and it will not allow the host to connect to the port. The VMPS errdisables the port to prevent the host from connecting to the network. • More than 50 active hosts reside on a dynamic port. For information on how to display the status of interfaces in error-disabled state, refer to Chapter 5, "Checking Port Status and Connectivity" . To recover an errdisabled port, use the errdisable recovery cause vmps global configuration command . Dynamic Port VLAN Membership Configuration Example Figure 11-1 shows a network with a VMPS servers and VMPS client switches with dynamic ports. In this example, these assumptions apply: • The VMPS server and the VMPS client are separate switches. • The Catalyst 4000 family Switch 1 (running CatOS) is the primary VMPS server. • The Catalyst 6000 family Switch 3 (running CatOS) and the URT are secondary VMPS servers. • End stations are connected to these clients: – Catalyst 4500 series XL Switch 2 (running Catalyst IOS) – Catalyst 4500 series XL Switch 9 (running Catalyst IOS) • The database configuration file is called Bldg-G.db and is stored on the TFTP server with the IP address 172.20.22.7. Figure 11-1 Dynamic Port VLAN Membership Configuration In the following procedure, the Catalyst 4000 and Catalyst 6000 series switches (running CatOS) are the VMPS servers. Use this procedure to configure the Catalyst 4500 series switch clients in the network: Step 1 Configure the VMPS server addresses on Switch 2, the client switch. a. Starting from privileged EXEC mode, enter global configuration mode: switch# configuration terminal b. Enter the primary VMPS server IP address: switch(config)# vmps server 172.20.26.150 primary c. Enter the secondary VMPS server IP addresses: switch(config)# vmps server 172.20.26.152 d. To verify your entry of the VMPS IP addresses, return to privileged EXEC mode: switch#(config) exit e. Display VMPS information configured for the switch: switch# show vmps VQP Client Status: -------------------- VMPS VQP Version: 1 Reconfirm Interval: 60 min Server Retry Count: 3 VMPS domain server: 172.20.26.152 172.20.26.150 (primary, current Step 2 Configure port Fa0/1 on Switch 2 as a dynamic port. a. Return to global configuration mode: switch# configure terminal b. Enter interface configuration mode: switch(config)# interface fa2/1 c. Configure the VLAN membership mode for static-access ports: switch(config-if)# switchport mode access d. Assign the port dynamic VLAN membership: switch(config-if)# switchport access vlan dynamic e. Return to privileged EXEC mode: switch(config-if)# exit switch# Step 3 Connect End Station 2 on port Fa2/1. When End Station 2 sends a packet, Switch 2 sends a query to the primary VMPS server, Switch 1. Switch 1 responds with the VLAN ID for port Fa2/1. Because spanning-tree PortFast mode is enabled by default on dynamic ports, port Fa2/1 connects immediately and begins forwarding. Step 4 Set the VMPS reconfirmation period to 60 minutes. The reconfirmation period is the number of minutes the switch waits before reconfirming the VLAN to MAC address assignments. switch# config terminal switch(config)# vmps reconfirm 60 Step 5 Confirm the entry from privileged EXEC mode: switch# show vmps VQP Client Status: -------------------- VMPS VQP Version: 1 Reconfirm Interval: 60 min Server Retry Count: 3 VMPS domain server: Reconfirmation status --------------------- VMPS Action: No Dynamic Port Step 6 Repeat Steps 1 and 2 to configure the VMPS server addresses, and assign dynamic ports on each VMPS client switch. VMPS Database Configuration File Example This example shows a sample VMPS database configuration file as it appears on a VMPS server. A VMPS database configuration file is an ASCII text file that is stored on a TFTP server accessible to the switch that functions as the VMPS server. !vmps domain <domain-name> ! The VMPS domain must be defined. !vmps mode { open | secure } ! The default mode is open. !vmps fallback <vlan-name> !vmps no-domain-req { allow | deny } ! ! The default value is allow. vmps domain WBU vmps mode open vmps fallback default vmps no-domain-req deny ! ! !MAC Addresses ! vmps-mac-addrs ! ! address <addr> vlan-name <vlan_name> ! address 0012.2233.4455 vlan-name hardware address 0000.6509.a080 vlan-name hardware address aabb.ccdd.eeff vlan-name Green address 1223.5678.9abc vlan-name ExecStaff address fedc.ba98.7654 vlan-name --NONE-- address fedc.ba23.1245 vlan-name Purple ! !Port Groups ! !vmps-port-group <group-name> ! device <device-id> { port <port-name> | all-ports } ! vmps-port-group WiringCloset1 device 198.92.30.32 port Fa1/3 device 172.20.26.141 port Fa1/4 vmps-port-group "Executive Row" device 198.4.254.222 port es5%Fa0/1 device 198.4.254.222 port es5%Fa0/2 device 198.4.254.223 all-ports ! !VLAN groups ! !vmps-vlan-group <group-name> ! vlan-name <vlan-name> ! vmps-vlan-group Engineering vlan-name hardware vlan-name software ! !VLAN port Policies ! !vmps-port-policies {vlan-name <vlan_name> | vlan-group <group-name> } ! { port-group <group-name> | device <device-id> port <port-name> } ! vmps-port-policies vlan-group Engineering port-group WiringCloset1 vmps-port-policies vlan-name Green device 198.92.30.32 port Fa0/9 vmps-port-policies vlan-name Purple device 198.4.254.22 port Fa0/10 port-group "Executive Row"

Was this Document Helpful?

Feedback

Contact Cisco

login required

  • (Requires a Cisco Service Contract )

mac address vlan assignment

 > Configuring dynamic MAC-based VLAN assignment

 

 

Configuring dynamic MAC-based VLAN assignment

Configuration restrictions and guidelines.

When you configure dynamic MAC-based VLAN assignment, follow these restrictions and guideline:

As a best practice to ensure correct operation of 802.1X and MAC authentication, do not use dynamic MAC-based VLAN assignment with 802.1X or MAC authentication.

When dynamic MAC-based VLAN assignment is enabled on a port, the configuration of disabling of MAC address learning does not take effect.

For successful dynamic MAC-based VLAN assignment, use static VLANs when you create MAC-to-VLAN entries.

As a best practice, do not use dynamic MAC-based VLAN assignment with MSTP. In MSTP mode, if a port is blocked in the MSTI of its target VLAN, the port drops the received packets instead of delivering them to the CPU. As a result, the port will not be dynamically assigned to the target VLAN.

As a best practice, do not use dynamic MAC-based VLAN assignment with PVST. In PVST mode, if the target VLAN of a port is not permitted on the port, the port is placed in blocked state. The port drops the received packets instead of delivering them to the CPU. As a result, the port will not be dynamically assigned to the target VLAN.

As a best practice, do not configure both dynamic MAC-based VLAN assignment and automatic voice VLAN assignment mode on a port. They can have a negative impact on each other.

Configuration procedure

To configure dynamic MAC-based VLAN assignment:

Step

Command

Remarks

. Enter system view.

N/A

. Create a MAC-to-VLAN entry.

[ ]

By default, no MAC-to-VLAN entries exist.

. Enter interface view.

N/A

. Set the port link type to hybrid.

By default, all ports are access ports.

. Enable the MAC-based VLAN feature.

By default, MAC-based VLAN is disabled.

. Enable dynamic MAC-based VLAN assignment.

By default, dynamic MAC-based VLAN assignment is disabled.

The VLAN assignment for a port is triggered only when the source MAC address of its receiving packet exactly matches the MAC address in a MAC-to-VLAN entry.

. (Optional.) Configure the system to assign VLANs based on the MAC address preferentially.

By default, the system assigns VLANs based on the MAC address preferentially when both the MAC-based VLAN and IP subnet-based VLAN are configured on a port.

. (Optional.) Disable the port from forwarding packets that fail the exact MAC address match in its PVID.

By default, when a port receives packets whose source MAC addresses fail the exact match, the port forwards them in its PVID.

 

 

Configuring static MAC-based VLAN assignment 

 Configuring server-assigned MAC-based VLAN

© Copyright 2017 Hewlett Packard Enterprise Development LP

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

VLAN assignment based on mac-address or RADIUS attribute

I'd like to know how to assign someone's client device to a different VLAN based on MAC address of that device.What kind of hardware/software would make this solution possible (if possible at all)? Would it be possbible to achieve the same using RADIUS authorization credentials instead of MAC addresses?

The reason why I'm asking this is because I'd like to migrate my company's internal network structure to something divided into separate subnets, isolating specific departments from each other, and providing separated, intranet isolated, guest accessible internet access. Would the method above be a right solution for this?

  • mac-address

Mike Pennington's user avatar

  • 1 Have you considered 802.1x ? What kind of switches do you have? –  Mike Pennington Commented Oct 30, 2013 at 7:07
  • 1 Yes, I have. Our network is built around one server acting as a gateway (running virtualized IPFire, but we're making progress towards replacing it with a Netasq UTM 250) and everything behind that is (unluckily) simple network hardware like TP-Link wireless APs and some cheap, dumb switches from Dlink. What I'd like to end up with is a solution where a client computer tries to connect to the network, gets authenticated via 802.1x, RADIUS, or plain MAC and is then assigned to a VLAN of my choice. So that it can be either separated from, or provided with access to our intranet. Sound doable? –  pietrek Commented Oct 30, 2013 at 7:42
  • 1 Specific product recommendations are going to be off-topic. Is it okay if we give you the most secure way of implementing the service? –  Mike Pennington Commented Oct 30, 2013 at 12:37
  • Sure. I'm just looking for suggestions, or examples of working solutions. –  pietrek Commented Oct 31, 2013 at 8:23
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. –  Ron Maupin ♦ Commented Aug 8, 2017 at 15:28

I am on the 1st phase of implementing a similar solution. 802.1x it's been for a while now and although it's grown up and globally supported it's vulnerable when meeting local OS network stack. I have deployed it several times on small and medium networks and usually it works for 90% of the workstations, maybe 95%. There is always an old Windows install that simply turns off your day.

Based on that I am working with FreeRadius . It requires broader knowledge except basic networking, but it doesn't interact in any way with the workstations, it's transparent for the user.

You can also try FreeNAC which is similar still it's been discontinued for some time now.

laf's user avatar

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged vlan mac-address radius or ask your own question .

  • Featured on Meta
  • Upcoming initiatives on Stack Overflow and across the Stack Exchange network...
  • We spent a sprint addressing your requests — here’s how it went

Hot Network Questions

  • If someone clearly believes that he has witnessed something extraordinary very clearly, why is it more reasonable to believe that they hallucinated?
  • Citation hunting: Floer on spectral sequences
  • Understanding top memory bar
  • Identify the story about an author whose work-in-progress is completed by a computer
  • What is the difference between 居る and 要る?
  • Are you radical enough to solve this SURDOKU?
  • Signature of Rav Ovadia Hedaya
  • Should I apologise to a professor after a gift authorship attempt, which they refused?
  • Equivalence of first/second choice with naive probability - I don't buy it
  • Sci fi book that has a tunnel. Depending on where you go through wall, go to different planet
  • Using "Delight" Without a Preposition
  • Animate multiple material transitions smoothly
  • How can I search File Explorer for files only (i.e. exclude folders) in Windows 10?
  • Is it alright to display mean CPU usage of algorithm instead of CPU cores available?
  • Keyboard Ping Pong
  • Is it possible to have multiple versions of MacOS on the same laptop at the same time?
  • Does the number of parameters in the model affect its intelligence?
  • Decomposing the homology of a finite-index subgroup into isotypic components
  • Fill the grid subject to product, sum and knight move constraints
  • Coping with consequences of a dog bite before buying a puppy
  • How can I get the value of the f(1/2) is 11/4 not 2.75 when I use \pgfmathprintnumber\pgfmathresult?
  • Is ElGamal homomorphic encryption using additive groups works only for Discrete Log ElGamal? What about EC ElGamal?
  • Are the North Star and the moon ever visible in the night sky at the same time?
  • Can computer components be damaged if they stay off for a long time?

mac address vlan assignment

Dynamic MAC-based VLAN assignment for OpenWrt network

I'm looking for any documentation or tutorial how to configure dynamic MAC-based VLAN assignent on the OpenWrt router.

Precondition:

  • There is main OpenWrt router with 2 VLANs configured on it: LAN, and Guest.

Goal details :

  • scenario_1 (default): any device that will be connected to the Ethernet port of OpenWrt router should be auto-assigned to the Guest VLAN (to get Guest IP address).
  • scenario_2 : any device that will be connected to the Ethernet port of OpenWrt router AND the MAC address of the device is present in the "LAN" mac list , should be auto-assigned to the LAN VLAN (to get LAN IP address).

Any suggestion (the simplest way) how to start using MAC based authentication for the scenarios defined above on the OpenWrt v.21.0x or higher with DSA framework?

I do not think this is how VLANs actually work (they work on a per port basis not on a per-host basis independent of how you identify hosts)... so you want some special sauce here... if the end device is not using VLAN tags itself you require an untagged port, now if one of your guest MACs (hopefully your guests do not know how to spoof MAC addresses or have MAC randomization activated) shows up you will need to figure out the port they are switch/LAN they are connecting over, and then add/move that port to the guest VLAN (which might be empty). However if the switch port is connected to another switch and you see both guest and non-guest MACs on the same port you need to figure out how you want to to deal with it.

The more traditional approach is to statically assign one or more switch ports to the guest VLAN and only connect guest devices to those ports, and for WiFi you need to create a dedicated guest SSID and bridge it to the guest VLAN as well.

Honestly? Not at all, MACs are easily changed so they are no reliable identifiers for strict security isolation (however if your adversaries are not all that sophisticated MAC based isolation might be enough of a stumbling block to be worth your while).

BTW. I would not maintain two sets of MACs (because what to do with MACs in neither list) but would auto assign everything to guest and only elevate select devices to the lan if the MAC is in your allowlist...

Radius config can be used. Known Mac addresses gets defined vlan (private tunnel group id) and everything without a match a default vlan. Void phones, printer and other dump stuff without proper 802.1x support get their vlan this way in enterprise lan networks.

Edit: typos

yes, exactly. I would like to know if OpenWrt architecture theoretically allows config when multiple clients on a single switch port to receive different untagged VLAN assignments. If yes, then we can proceed with this.

Yes, but it more for flexibility. The idea is not related to security (although some minimum level of security is added here), but rather to flexible connection. All the requirements in the description are simplified, and there can be a much more VLANs, and I just need to allow clients to use any free untagged LAN ports in the specific public room, and any LAN-connected laptop should be auto-assigned to appropriate VLAN customer group based on the MAC.

I find your goal interesting and would like to see a proof on concept for wired 802.1x on OpenWrt too. Atm I have not the time to dig deeper into it but I found at least this somehow useful to get a rough idea: https://docs.nvidia.com/networking-ethernet-software/cumulus-linux-40/Layer-1-and-Switch-Ports/802.1X-Interfaces/ Please keep us updated on your progress! Atm I only have Mac addresses based vlan assignment on wifi with traditional PSK/wpa2 without wpa2-enterprise. But would like to get it for wired clients too. For the same reason: I'm lazy and want to just plugin a cable and at home I have no high security requirements ^^

Not sure if my level of experience with OpenWrt would allow me to configure it by my own from scratch.

I am currently just trying to get confirmation if this is even possible for OpenWrt. That's why i've started there with question, because there are a lot of info that can be googled for this "solution" for other projects or brands, but unfortunately nothing for OpenWrt i've found.

This looks promising: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/assembly_setting-up-an-802-1x-network-authentication-service-for-lan-clients-using-hostapd-with-freeradius-backend_configuring-and-managing-networking The last point 20.6. Configuring hostapd as an authenticator in a wired network

I guess yes and no... your switchport by itself will not be able to differentiate between different untagged packet sources, however you should be able to configure the switch such that all packets are passed to the kernel isolated and the kernel should be able to do what ever it likes based on whatever criterion. However that will create high traffic on the CPU-2-switch port, since now every packet between machines on the LAN needs to traverse the CPU port twice...

I still wonder what kind of flexibility you are looking for here, how many devices (wired and wireless) are you expecting in your network?

I respectfully argue, the default OpenWrt works out of the box by simply plugging devices in. Not saying your use-case is not justified, but it does not appear the most lazy/hands-off approach.

As OpenWrt nowadays runs on switches too with 10, 16, 24, .. ports you simple would not reconfigure Ports everytime you plug in a device. Especially based on the fact that you can not configure Ports like on an enterprise switch. You need to restart half the network stack which effects all connected devises. If however it's possible to configure easily individual ports on DSA please tell me I will be more then have an open ear. If I get me dsg1210 debricked soon I will try to configure hostapd with the red hat document because it looks really simple (as I mentioned I have the hostapd and freeradius setup already in place to put unknown wifi clients in a default guest vlan).

This is the promise of DSA individual ports can just be configured using the normal kernel tools for interfaces, in fact to make a switch a switch, you need to create a bridge over all its ports...

You have seen the note that hostpad will not do any interface configuration for you, so expect some shell scripting to get the required 'magic' performed.

Sweet! However I am simply minded enough that offering a guest and a non-guest SSID and configuring each device to select the desired one (for IoT devices that means never ever entering the password for the non-guest SSID). But I am only wrangling a small number of devices in a generally friendly setting, so I assume I am simply too naive/daft to see what a radius based approach can offer.

Log in to ask questions, share your expertise, or stay connected to content. Don’t have a login? Join now.  

Airheads Community logo. This will take you to the homepage

  • Community Home
  • Topic Thread

Controllerless Networks

mac address vlan assignment

  • Discussion 31.2K
  • Library 937
  • Members 1.6K

Simple vlan assignment using mac address

1.  simple vlan assignment using mac address, 2.  re: simple vlan assignment using mac address.

mac address vlan assignment

3.  RE: Simple vlan assignment using mac address

4.  re: simple vlan assignment using mac address.

mac address vlan assignment

5.  RE: Simple vlan assignment using mac address

6.  re: simple vlan assignment using mac address, 7.  re: simple vlan assignment using mac address, 8.  re: simple vlan assignment using mac address.

mac address vlan assignment

9.  RE: Simple vlan assignment using mac address

New best answer.

 Aruba Networks

  • Environmental Citizenship
  • Support Services
  • Contact Support
  • Training & Certification
  • Software Downloads
  • Licensing Login
  • Find a Partner
  • Become a Partner
  • Partner Ready for Networking
  • Technology Partner Programs
  • Privacy policy
  • Terms of service

© Copyright 2024 Hewlett Packard Enterprise Development LP All Rights Reserved.

eSecurity Planet

What is a VLAN? Ultimate Guide to How VLANs Work

Maine Basan

eSecurity Planet content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More .

Key Takeaways

  • • VLANs enable logical partitioning of networks, improving security and performance by isolating traffic into separate broadcast domains. (Jump to Section)
  • • Advantages include enhanced network performance, reduced latency, improved security, and simplified device management, making them essential for efficient network operations. (Jump to Section)
  • • Types include port-based, protocol-based, and MAC-based VLANs, each serving specific purposes like managing device functions or isolating traffic based on protocol. (Jump to Section)

A VLAN (Virtual Local Area Network) is a logical grouping of devices that are all connected to the same network regardless of physical location. VLANs are an essential component of contemporary networking, allowing network traffic to be segmented and managed.

VLANs enable logical partitioning inside a single switch, resulting in multiple virtual local area networks where physical switch segmentation is not a possibility. These partitions enable the division of a large network into smaller, more manageable broadcast domains, thereby improving network security , efficiency, and flexibility. In this comprehensive guide, we will look at how VLANs function, when to use them, the benefits and drawbacks they provide, and the types of VLANs.

  • How Do VLANs Work?

When to Use a VLAN

  • Advantages of VLANs
  • Disadvantages of VLANs
  • Common Types of VLANs

Bottom Line: VLANs

How do vlans work .

How VLANs work infographic by eSecurity Planet.

VLANs are assigned unique numbers, which enable network administrators to arrange and separate network traffic. A VLAN number is a label or tag that is applied to certain packets in order to determine their VLAN classification. The valid VLAN number range is typically 1 to 4094, providing adequate flexibility to build many VLANs within a network configuration.

VLAN numbers are assigned to switch ports to associate VLAN membership with network devices. The switch then permits data to be transmitted across ports that are part of the same VLAN. Network administrators can regulate the flow of traffic within the network by establishing VLAN membership for particular ports. By giving the right VLAN number to each port on a VLAN switch, ports may be identified as belonging to a certain VLAN. VLAN tagging, which adds a tiny header to Ethernet frames, is used by switches to identify the VLAN to which the frame belongs. This tagging guarantees that traffic is channeled correctly inside the VLAN and does not leak to other VLANs.

Since practically all networks include more than one switch, VLANs provide a means to transport traffic between them. After assigning VLAN numbers to switch ports, the switch ensures that data destined for devices in the same VLAN is transferred correctly. When two or more ports on the same switch are assigned the same VLAN number, the switch permits communication between those ports while isolating traffic from other ports. This segmentation improves network security, performance, and administration capabilities.

Because most networks are bigger than a single switch, it is necessary to facilitate communication across VLANs on various switches. A simple way to accomplish this is to configure particular ports on each switch to be part of a common VLAN and to make physical connections (usually through cables) between these designated ports. Switches enable inter-VLAN traffic to flow by connecting these ports, allowing communication between devices in different VLANs.

Also read: How to Implement Microsegmentation

VLANs provide several advantages in network management, performance enhancement, and security. They offer the flexibility and control required in enterprise network settings, whether it is the logical separation of devices based on function, the creation of isolated guest networks, the prioritization of critical traffic, or the optimization of large-scale networks. VLANs are particularly useful in situations such as:

  • High-traffic environments and networks with over 200 devices: VLANs provide efficient traffic flow and easier administration by effectively controlling and arranging a large number of devices.
  • Optimizing network performance in high-traffic LANs: Congestion may be decreased by splitting traffic into distinct VLANs, resulting in smoother data transfer and lower latency. This improvement enables more effective network resource utilization and increases overall network efficiency.
  • Creating multiple switches from a single switch: Network managers can create independent broadcast domains by segmenting ports into various VLANs, thus splitting a single switch into many logical switches. This separation increases network performance, security, and administration.
  • Adding security measures and controlling excessive broadcast traffic: Separating groups into separate VLANs increases security while reducing performance difficulties caused by excessive broadcast traffic.
  • Prioritizing voice and video traffic: For real-time communication applications, this segmentation assures quality of service (QoS). VLANs reduce latency and packet loss by prioritizing this sort of traffic, improving the overall user experience and ensuring seamless communication.
  • Creating isolated guest networks: VLANs prevent unauthorized access and associated security issues by isolating guest devices from the internal network. This isolation guarantees that visitors have access to the resources they require while safeguarding the internal network’s integrity and security.
  • Separating logical devices: VLANs allow devices to be logically separated based on their purpose, department, or security needs. Network administrators can enhance network performance and security by grouping devices with similar tasks or security requirements into VLANs. This segmentation decreases broadcast traffic, safeguards against potential security breaches, and enables focused administration and control.
  • When simplifying network management: VLANs are critical in constructing virtual networks that transcend physical servers in virtualized and cloud computing environments. This adaptability simplifies network administration, increases scalability, and allows for more effective resource consumption. VLANs in these contexts provide smooth connectivity between virtual computers and assist enterprises in managing their infrastructure more efficiently.

See how one managed service provider used VLANs to protect backups from ransomware: Building a Ransomware Resilient Architecture

8 Advantages of VLANs

VLANs enable enterprises to improve network efficiency, scalability, and security while also simplifying network administration, increasing security, and boosting overall performance. Here are some of the advantages of using VLANs.

  • Logically segment networks: VLANs allow for the logical segmentation of networks and the administration of geographically scattered sites. Administrators may efficiently manage network resources, apply specific security measures, and guarantee seamless communication across locations by building distinct VLANs for various sites or departments.
  • Improve network security: By logically grouping devices and separating network traffic, VLANs create an extra layer of network security. Network administrators may manage access and ensure that sensitive information remains segregated by defining different VLANs depending on departments, project teams, or roles. VLANs keep unauthorized users out of restricted regions and provide a strong security foundation for safeguarding valuable data, similar to zero trust concepts.
  • Increase operational efficiency: VLANs provide operational benefits by allowing administrators to modify users’ IP subnets using software rather than physically changing network equipment. This flexibility simplifies network maintenance, minimizes downtime, and improves the network infrastructure’s overall agility.
  • Enhance performance and decrease latency: VLANs improve network performance by lowering latency and increasing total data transmission rates. VLANs prioritize traffic flow inside each VLAN by segmenting networks depending on functional needs, guaranteeing effective network resource usage, quicker data transfer and a better user experience.
  • Reduce costs and hardware requirements: By maximizing the existing network infrastructure, VLANs remove the need for extra physical hardware and wiring. This reduction in hardware needs saves money while also simplifying network management and maintenance.
  • Simplify device management: VLANs make device administration easier and more efficient by letting administrators organize devices based on their function or purpose rather than their physical location. This logical grouping simplifies device configuration, monitoring, and troubleshooting.
  • Solve broadcast problems and reduce broadcast domains: When a network is partitioned into many VLANs, broadcast traffic is confined within each VLAN, preventing it from congesting the whole network. This separation decreases broadcast storms while also increasing network efficiency and overall performance.
  • Streamline network topology: Typical network structures may need complex setups that include several switches, routers, and connections. By implementing VLANs, network topology can be simplified, resulting in a reduced number of devices. VLANs organize network devices conceptually, decreasing the complexity of physical connections and increasing network scalability.

Also read: Network Protection: How to Secure a Network

7 Disadvantages of VLANs

While VLANs provide substantial benefits in network management and security, it is critical to understand their potential downsides. Understanding these drawbacks allows network managers to handle them proactively and guarantee a successful VLAN implementation that meets their unique organizational needs.

  • Additional network complexity. The additional network complexity caused by VLANs is one of the key problems of adopting them. VLAN management in bigger networks may be a difficult operation that involves precise design, configuration, and constant monitoring. Misconfigurations can lead to network instability or even outages if correct knowledge and documentation are not used.
  • Cybersecurity risks. If an injected packet succeeds in breaching a VLAN’s borders, it could jeopardize the network’s integrity and security. Furthermore, a threat emanating from a single machine within a VLAN has the ability to propagate viruses or malware throughout the whole logical network, demanding strong security measures. Further segmentation and zero trust controls could limit any damage.
  • Interoperability concerns. Different network devices, particularly those from different suppliers, may have inconsistent compatibility with VLAN technologies, making smooth integration and consistent functioning problematic. Before establishing VLANs in such situations, it is critical to guarantee compatibility and undertake extensive testing.
  • Limited VLAN traffic relay. Each VLAN runs as its own logical network, and VLANs cannot forward network traffic to other VLANs by default. While this isolation provides security benefits, it might cause problems when communicating between VLANs. To enable traffic routing between VLANs, further setup and the usage of Layer 3 devices are necessary, adding complexity to network architecture and operation.
  • Possible risk of broadcast storms. Improper VLAN configuration can lead to broadcast storms, which happen when too much broadcast traffic overwhelms the network infrastructure. To avoid these disruptive incidents, VLAN design and setup must be carefully considered.
  • Reliance on Layer 3 devices. When Layer 3 devices have problems or become overloaded, it can have a major impact on VLAN connectivity. Layer 3 equipment, such as routers or Layer 3 switches, are widely used in inter-VLAN connections. These devices are in charge of routing traffic between VLANs, and their availability and correct setup are critical for VLAN operation.
  • Unintentional packet leakage. Packets can mistakenly leak from one VLAN to another in rare instances. This leakage might arise as a result of incorrect setups, poor access control , or insufficient network segmentation. Packet leakage jeopardizes VLAN security and isolation, exposing critical data to unauthorized users.

See the Top Microsegmentation Software

3 Common Types of VLANs

There are several types of VLANs commonly used in networking.

Port-based VLAN chart,

  • Data VLAN: This type is often known as a user VLAN, and is dedicated solely to user-generated data. Data VLANs are designed to isolate and organize network traffic based on device function, department, or security requirements. The organizational structure of data virtual LANs is used to classify them. It is strongly encouraged to properly evaluate how users could be appropriately classified while taking into account all configuration choices. These clusters might be departmental or work-related. Administrators can boost network efficiency and security by grouping devices with similar tasks or security needs into Data VLANs to reduce broadcast traffic, isolate security vulnerabilities, and facilitate network monitoring and control.
  • Default VLAN: Typically, default VLANs are allocated to switch ports that have not been expressly defined for any specific VLAN. They serve as a backup alternative for devices that lack VLAN designations. Administrators can guarantee that devices without explicit VLAN assignments remain operational and can interact inside the network by selecting a default VLAN.
  • Native VLAN: An access port, also known as an untagged port, is a switch port that carries traffic for a single VLAN, whereas a trunk port, also known as a tagged port, carries data for several Virtual LANs. Native VLANs are linked to trunk lines, which connect switches. These VLANs are untagged on the trunk link, which means that frames sent across the link do not contain VLAN tags. When traffic arrives on a port without a VLAN tag, it is assigned to the Native VLAN; however, it is critical to set the Native VLAN consistently on both ends of the trunk connection to avoid connectivity difficulties and potential security risks.
  • Management VLAN: Management VLANs are VLANs that are dedicated to network administration and management responsibilities. This particular type is recommended for the most sensitive management activities, such as monitoring, system logging, SNMP, and so on. This not only provides security benefits, but also provides capacity for these management duties even in high-traffic scenarios. Administrators may assure safe access to network devices, ease network monitoring and troubleshooting, and protect key network infrastructure from illegal access or interference by isolating management traffic onto a distinct VLAN.
  • Voice VLAN: Voice VLANs are designed to prioritize and handle voice traffic in a network context, such as Voice over IP (VoIP) calls. Network administrators can assure Quality of Service (QoS) for real-time communication by allocating voice devices to a distinct VLAN, minimizing latency or packet loss issues that may affect the user experience during voice calls.

Protocol-based VLAN chart.

  • Protocol-based VLAN: Protocol-based VLANs classify VLAN membership according to the traffic protocol in use. In a Protocol-based VLAN, the frame contains the layer-3 protocol information that specifies VLAN membership. While this method is effective in multi-protocol environments, it may not be feasible in IP-only networks. Other protocols’ traffic, such as IP, IPX, or AppleTalk, can be routed to their respective VLANs. This form of VLAN filters traffic based on protocol and offers untagged packet criteria.

MAC-based VLAN chart.

  • MAC-based VLAN: This type of VLAN is ideal when network administrators require granular control over device placement. A MAC-based VLAN uses the MAC address of a device to identify it as a member of that VLAN. Each VLAN on the switch has its own MAC address. This type of VLAN is typically used when device segmentation by MAC address is necessary.  Untagged inbound packets are allocated virtual LANs through the use of MAC-based VLANs, allowing traffic to be categorized depending on the source address.

See the Best Next-Generation Firewalls (NGFWs)

VLANs are a powerful network strategy that enables efficient traffic control, better security, and optimal network performance. These are critical functions in modern network environments, allowing network traffic to be segregated and controlled. By assigning VLAN numbers to switch ports, network administrators may create logical network segments and regulate data flow inside and between VLANs.

VLANs provide the flexibility and control required in contemporary network settings, whether it is the logical separation of devices based on function, the creation of isolated guest networks, the prioritization of critical traffic, or the optimization of large-scale networks. Understanding the functions and advantages of VLAN types helps administrators to create efficient network configurations tailored to their organization’s needs.

  • Best Network Monitoring Tools
  • Top Network Detection & Response (NDR) Solutions

Get the Free Cybersecurity Newsletter

Strengthen your organization’s IT security defenses by keeping up to date on the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday

Previous article

Next article

Maine Basan Avatar

Subscribe to Cybersecurity Insider

Strengthen your organization’s IT security defenses by keeping abreast of the latest cybersecurity news, solutions, and best practices.

IT Security Resources

Vulnerability recap 7/8/24 – intel, cisco & more face risks.

Glowing pink triangular warning sign with exclamation mark floats in digital space.

Chrome to Block Entrust Certificates in November 2024

Google Chrome logo spotlighted on black background.

Vulnerability Recap 7/1/24 – Apple, GitLab, AI Platforms at Risk

mac address vlan assignment

What Is Cloud Workload Security? Ultimate Guide

There is a prominent large cloud icon on the right with interconnected polygons and small icons on a dark blue background.

Top Cybersecurity Companies

Get the free newsletter.

Subscribe to Cybersecurity Insider for top news, trends & analysis

Related Articles

Flat vector illustration of a blue lock icon at the end of a virtual tunnel in cyberspace.

What Is a Secure Web Gateway? Features, Benefits & Challenges

Glowing digital shield on abstract technology background.

What Are Network Firewalls? Benefits, Types & Best Practices

Virtual shield and globe surrounded by a network related icons.

Secure Web Gateway vs Firewall: Learn the Difference

Get the Reddit app

OpenWrt news, tools, tips and discussion. Related projects, such as DD-WRT, Tomato and OpenSAN, are also on-topic.

Vlan assignment by MAC address?

I'm running Openwrt 22.03 on a mini pc with the following config:

eth0 - LAN connected to a 8 port gigabit switch

eth1 - WAN connected to 1gbps internet

eth2 - AP (Asus AC87u in AP mode)

eth2 has both IOT devices (fridge, dishwasher, smart lightbulbs etc), Laptops, Firestick, TV's etc.

I want to enable time scheduling on the kids devices which are all connected to the AP on eth2, so want them in their own vlan. I was thinking if I could associate a device to a vlan by MAC address.

Is this possible with my current setup?

  • Support Forum
  • Customer Service
  • Internal Article Nominations
  • FortiClient
  • FortiAnalyzer
  • FortiBridge
  • FortiAuthenticator
  • FortiCarrier
  • FortiConnect
  • FortiConverter
  • FortiDevSec
  • FortiDeceptor
  • FortiDirector
  • FortiGate Cloud
  • FortiExtender
  • FortiHypervisor
  • FortiInsight
  • FortiIsolator
  • FortiMonitor
  • FortiManager
  • FortiNDR (on-premise)
  • FortiNDRCloud
  • FortiPortal
  • FortiRecorder
  • FortiSandbox
  • FortiSwitch
  • FortiTester
  • Wireless Controller
  • FortiWebCloud
  • RMA Information and Announcements
  • FortiCloud Products
  • 4D Documents
  • Engage Services
  • The EPSP Platform
  • The ETSP Platform
  • Discussions & Onboarding Information
  • Technical Learning
  • Discussions
  • Knowledge Base
  • Idea Exchange
  • Announcements
  • Getting Started Resources
  • Fortinet Community
  • Re: Can FortiNAC identify where I connect a FortiA...
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Printer Friendly Page

kdot

Created on ‎06-21-2024 02:11 PM

  • Mark as New
  • Report Inappropriate Content

Can FortiNAC identify where I connect a FortiAP and dynamically assign a management VLAN?

  • All forum topics
  • Previous Topic

Anthony_E

Created on ‎06-24-2024 12:42 AM

ebilcari

Created on ‎06-24-2024 06:14 AM

ap-policy.PNG

Created on ‎07-02-2024 01:54 PM

Created on ‎07-03-2024 04:43 AM

EdwinCandelario

Created on ‎07-02-2024 05:48 PM Edited on ‎07-02-2024 07:31 PM

one.png

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

  • Can FortiNAC identify where I connect... 380 Views
  • Fortiweb blank admin mgt page 745 Views
  • FortiAP fragmentation issues 1660 Views
  • Cut through the noise to manage... 1254 Views
  • Issues High Availability Fortigate 5818 Views
  • Alphabetical
  • FortiGate 7,252
  • FortiClient 1,431
  • FortiManager 628
  • FortiAnalyzer 465
  • FortiAP 378
  • FortiSwitch 376
  • FortiClient EMS 294
  • FortiMail 283
  • FortiAuthenticator v5.5 234
  • FortiWeb 178
  • FortiNAC 130
  • FortiGuard 117
  • SSL-VPN 112
  • FortiGateCloud 97
  • FortiSIEM 95
  • FortiCloud Products 90
  • FortiToken 77
  • Customer Service 71
  • Wireless Controller 66
  • FortiProxy 50
  • FortiEDR 46
  • FortiADC 45
  • Fortivoice 44
  • FortiDNS 40
  • FortiGate v5.4 36
  • FortiSandbox 36
  • Firewall policy 36
  • FortiExtender 35
  • FortiAuthenticator 35
  • FortiSwitch v6.4 32
  • High Availability 32
  • FortiWAN 24
  • FortiConnect 24
  • FortiConverter 23
  • Certificate 21
  • Interface 21
  • FortiGate v5.2 20
  • Authentication 19
  • FortiPortal 18
  • FortiSwitch v6.2 17
  • FortiLink 16
  • FortiMonitor 15
  • FortiGate v5.0 14
  • Fortigate Cloud 14
  • FortiDDoS 14
  • SSL SSH inspection 13
  • Virtual IP 12
  • Application control 12
  • FortiCASB 12
  • Web profile 11
  • Traffic shaping 11
  • FortiRecorder 10
  • FortiSOAR 9
  • FortiWeb v5.0 9
  • IP address management - IPAM 9
  • FortiManager v5.0 9
  • WAN optimization 9
  • RMA Information and Announcements 8
  • Proxy policy 8
  • FortiAnalyzer v5.0 8
  • FortiBridge 8
  • FortiGate v4.0 MR3 8
  • Web application firewall profile 7
  • Static route 7
  • Security profile 7
  • FortiAP profile 7
  • Automation 7
  • Traffic shaping policy 6
  • IPS signature 5
  • Packet capture 5
  • Port policy 5
  • Antivirus profile 5
  • System settings 5
  • DNS Filter 5
  • FortiCache 5
  • FortiTester 5
  • FortiManager v4.0 5
  • FortiDeceptor 4
  • FortiDirector 4
  • Web rating 4
  • Intrusion prevention 4
  • Traffic shaping profile 4
  • Fortinet Engage Partner Program 4
  • FortiCarrier 4
  • FortiScan 4
  • DLP sensor 4
  • DoS policy 4
  • Email filter profile 3
  • Fabric connector 3
  • NAC policy 3
  • Multicast routing 3
  • FortiToken Cloud 3
  • Application signature 3
  • DLP Dictionary 3
  • DLP profile 3
  • FortiInsight 2
  • Protocol option 2
  • FortiHypervisor 2
  • Authentication rule and scheme 2
  • Explicit proxy 2
  • Internet Service Database 2
  • VoIP profile 2
  • File filter 1
  • Multicast policy 1
  • Subscription Renewal Policy 1
  • Replacement messages 1
  • FortiManager-VM 1
  • SDN connector 1
User Count
1103
895
538
441
157

fortinet

The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.

  • Threat Research
  • FortiGuard Labs
  • Threat Briefs
  • Security Fabric
  • Certifications
  • Industry Awards
  • Social Responsibility
  • News Releases
  • News Articles

Copyright 2024 Fortinet, Inc. All Rights Reserved.

  • Terms of Service
  • Privacy Policy
  • Cookie Settings

COMMENTS

  1. Introduction to MAC-based VLAN

    To do that, you can create a MAC address-to-VLAN map containing multiple MAC address-to-VLAN entries, and enable the MAC-based VLAN feature and dynamic MAC-based VLAN assignment on the port. Dynamic MAC-based VLAN assignment uses the following workflows. When the port receives a frame, the port first determines whether the frame is tagged.

  2. What is a MAC-based VLAN and how does it work with my ...

    Yes No. The MAC-based VLAN feature allows incoming untagged packets to be assigned to a VLAN and thus classify traffic based on the source MAC address of the packet. You define a MAC to VLAN mapping by configuring an entry in the MAC to VLAN table. An entry is specified using a source MAC address and the appropriate VLAN ID.

  3. How to use 802.1x/mac-auth and dynamic VLAN assignment

    The 802.1x protocol is used for network access control. For devices like printers, cameras, etc. we will use mac-authentication as a fallback. We will also use dynamic VLAN assignment for the connected ports. Our radius server will be Microsoft NPS. You can activate this role on the Windows server:

  4. Configuring MAC Address-based VLAN Assignment

    It is recommended that MAC address-based VLAN assignment should be configured on the hybrid interface. Run port hybrid untagged vlan { { vlan-id1 [ to vlan-id2] } &<1-10> | all} On access and trunk interfaces, MAC address-based VLAN assignment can be used only when the MAC address-based VLAN is the same as the PVID.

  5. Example for Configuring MAC Address-based VLAN Assignment

    Example for Configuring MAC Address-based VLAN Assignment

  6. configuring_mac_vlan

    configure. Enter global configuration mode. Step 2. mac-vlan mac-address mac-addr vlan vlan-id [description descript] Bind the MAC address to the VLAN. mac-addr: Specify the MAC address of the device in the format of xx:xx:xx:xx:xx:xx. vlan-id: Enter the ID number of the 802.1Q VLAN that will be bound to the MAC VLAN.

  7. Configuring Dynamic VLAN Membership

    The number of minutes the switch waits before reconfirming the VLAN-to-MAC-address assignments. Server Retry Count . The number of times VQP resends a query to the VMPS. If no response is received after this many tries, the switch starts to query the secondary VMPS. VMPS domain server . The IP address of the configured VLAN membership policy ...

  8. Configuring MAC Address-based VLAN Assignment

    In MAC address-based VLAN assignment mode, you do not need to reconfigure VLANs for users when their physical locations change. This improves network access security and flexibility. In MAC address-based VLAN assignment mode, only untagged packets are processed. For tagged packets, only interface-based VLAN assignment mode is used.

  9. Configuring MAC-based VLAN

    In dynamic MAC-based VLAN assignment, the port that receives a packet with an unknown source MAC address can be successfully assigned to the matched VLAN only when the matched VLAN is a static VLAN. With MSTP enabled, if a port is blocked in the MST instance (MSTI) of the target MAC-based VLAN, the port drops the received packets, instead of ...

  10. Configuring dynamic MAC-based VLAN assignment

    By default, dynamic MAC-based VLAN assignment is disabled. The VLAN assignment for a port is triggered only when the source MAC address of its receiving packet exactly matches the MAC address in a MAC-to-VLAN entry. 7. (Optional.) Configure the system to assign VLANs based on the MAC address preferentially. vlan precedence mac-vlan

  11. MAC-based VLANs

    MAC-based VLANs. MAC-Based VLANs (MBVs) allow multiple clients on a single switch port to receive different untagged VLAN assignments. VLAN assignment of untagged traffic is based on the source MAC address rather than the port. Clients receive their untagged VLAN assignment from the RADIUS server. This feature adheres to the requirement that if ...

  12. Understanding VLAN Assignments

    The assignment of VLANs are (from lowest to highest precedence): 1. The default VLAN is the VLAN configured for the WLAN (see Virtual AP Profiles ). 2. Before client authentication, the VLAN can be derived from rules based on client attributes (SSID, BSSID, client MAC, location, and encryption type).

  13. Assign wireless devices to VLAN by MAC address

    Now when I connect these two laptops to the network, one lands on the 400 VLAN and gets a 4.x address, and the other lands on the 500 VLAN and gets a 5.x address. These assignments can be changed as easily as group membership. I believe this will be a pretty robust solution for us moving forward.

  14. VLAN assignment based on mac-address or RADIUS attribute

    What I'd like to end up with is a solution where a client computer tries to connect to the network, gets authenticated via 802.1x, RADIUS, or plain MAC and is then assigned to a VLAN of my choice. So that it can be either separated from, or provided with access to our intranet. Sound doable? Specific product recommendations are going to be off ...

  15. MAC/IP/protocol-based VLANs

    The MAC/IP/protocol-based VLAN feature enables the assignment of VLANs based on specific fields in an ingress packet (MAC address, IP address, or layer-2 protocol). Overview. When a MAC/IP/protocol-based VLAN is assigned to a port, the default behavior is for egress packets with that VLAN value to include the VLAN tag.

  16. Dynamic MAC-based VLAN assignment for OpenWrt network

    Known Mac addresses gets defined vlan (private tunnel group id) and everything without a match a default vlan. Void phones, printer and other dump stuff without proper 802.1x support get their vlan this way in enterprise lan networks. ... Atm I only have Mac addresses based vlan assignment on wifi with traditional PSK/wpa2 without wpa2 ...

  17. Example for Configuring MAC Address-based VLAN Assignment

    Policy-based VLAN assignment (MAC addresses, IP addresses, and interfaces) VLANs are assigned based on policies such as combinations of interfaces, MAC addresses, and IP addresses. A network administrator preconfigures policies. When receiving an untagged frame that matches a configured policy, the switch adds a specified VLAN tag to the frame.

  18. Simple vlan assignment using mac address

    Apparently the mac address is sent to radius in several TLV's, for instance "Calling-Station-Id" and "User-Name". It's also in the "User-Password" TLV. I made a very simple entry in the radius server where username = password = mac address (without delimiter), assign vlan tag id and works!

  19. MAC address assignment for interfaces, trunks, and VLANs (11.x and later)

    If you create more VLANs than there are available MAC addresses, multiple VLANs are assigned the same MAC address. global - All VLANs are assigned the same MAC address. vmw-compat - Specific to VE systems, only one interface is allowed per VLAN, and the VLAN will use the MAC address of its corresponding interface. No trunks may be attached to ...

  20. Automatic configuration of Port/VLAN and client by MAC address

    I would like to achieve the following: If a known host (identified by MAC address) is connected to any switch within the company network, the corresponding port should be configured automatically (assigned to a specific VLAN). At the same time, the host should automatically be assigned a defined IP address. If the host is unknown, it should end ...

  21. VLANs: Effective Network Segmentation for Security

    MAC-based VLAN: This type of VLAN is ideal when network administrators require granular control over device placement. A MAC-based VLAN uses the MAC address of a device to identify it as a member ...

  22. Vlan assignment by MAC address? : r/openwrt

    The other way would be using APVLANs. Your AP radio needs to support this function and a FreeRADIUS server setup to use MAC based authentication, then attach WiFi users to a given VLAN based on login (more work). I'd prefer to do the former, that way you know for sure which devices are theirs without fluffing MAC addresses.

  23. Virtual Network (VLAN) Troubleshooting

    1. The Network Override feature is used to assign a device to a VLAN that is already used as the Primary (Native) Network of the switch port it is connected to. The UniFi device will be unreachable because VLAN 20 is also configured as the Primary (Native) VLAN on the switch port to which the device is directly connected. 2.

  24. Can FortiNAC identify where I connect a FortiAP and dynamically assign

    This second rule will match all other devices , and assigned a policy that is mac based , so you can authenticate 20 different pc, ip phones, printers etc and based on user/mac or user name, the radius will send the configured vlan on its rules or policy. I did this for everything all ports on the switch are configured equally.

  25. Creating Virtual Networks (VLANs)

    Although a UniFi Gateway or UniFi Cloud Gateway is recommended for the most integrated experience, it is possible to bridge networks/VLANs from a third-party gateway so that they can be assigned to UniFi Access Points (APs) and switch ports.. Configure your network's subnet, VLAN ID, DNS, and DHCP server on your third-party gateway.; In UniFi, navigate to Settings > Networks to create a new ...