10-Security Configuration Guide

HomeSupportSwitchesS7500E SeriesConfigure & DeployConfiguration GuidesH3C S7500E Switch Series Configuration Guides-R757X-GL-6W10010-Security Configuration Guide
03-MAC authentication configuration
Title Size Download
03-MAC authentication configuration 325.22 KB

Contents

Configuring MAC authentication· 1

Overview·· 1

User account policies· 1

Authentication methods· 1

VLAN assignment 2

Authorization VLAN·· 2

Authorization VLAN manipulation for a MAC authentication-enabled port 2

Guest VLAN·· 3

Critical VLAN·· 3

VSI manipulation· 4

MAC authentication support for VXLANs· 4

Authorization VSI 5

Guest VSI 5

Critical VSI 6

ACL assignment 6

Redirect URL assignment 7

Blackhole MAC attribute assignment 7

Configuration prerequisites· 8

General guidelines and restrictions· 8

Configuration task list 9

Enabling MAC authentication· 9

Specifying a MAC authentication method· 10

About MAC authentication methods· 10

Configuration restrictions and guidelines· 10

Configuration procedure· 10

Specifying a MAC authentication domain· 10

Configuring the user account format 11

Configuring MAC authentication timers· 11

Setting the maximum number of concurrent MAC authentication users on a port 12

Enabling MAC authentication multi-VLAN mode on a port 12

Configuring MAC authentication delay· 13

Enabling parallel processing of MAC authentication and 802.1X authentication· 13

Configuration restrictions and guidelines· 13

Configuration procedure· 14

Configuring a MAC authentication guest VLAN·· 14

Configuration prerequisites· 14

Configuration restrictions and guidelines· 14

Configuration procedure· 15

Configuring a MAC authentication critical VLAN·· 15

Enabling the MAC authentication critical voice VLAN·· 16

Configuration prerequisites· 16

Configuration procedure· 16

Configuring a MAC authentication guest VSI 17

Configuration restrictions and guidelines· 17

Configuration prerequisites· 17

Configuration procedure· 17

Configuring a MAC authentication critical VSI 18

Configuration restrictions and guidelines· 18

Configuration prerequisites· 18

Configuration procedure· 18

Configuring periodic MAC reauthentication· 18

Overview·· 18

Configuration restrictions and guidelines· 19

Configuration procedure· 19

Including user IP addresses in MAC authentication requests· 20

Overview·· 20

Configuration restrictions and guidelines· 20

Configuration procedure· 21

Configuring user aging for unauthenticated MAC authentication users· 21

Overview·· 21

Configuration restrictions and guidelines· 21

Configuration procedure· 22

Configuring MAC authentication offline detection· 22

Overview·· 22

Configuration restrictions and guidelines· 23

Configuration procedure· 23

Enabling logging for MAC authentication users· 23

Overview·· 23

Configuration restrictions and guidelines· 23

Configuration procedure· 23

Displaying and maintaining MAC authentication· 24

MAC authentication configuration examples· 24

Local MAC authentication configuration example· 24

RADIUS-based MAC authentication configuration example· 27

ACL assignment configuration example· 29

MAC authentication authorization VSI assignment configuration example· 32

 


Configuring MAC authentication

Overview

MAC authentication controls network access by authenticating source MAC addresses on a port. The feature does not require client software, and users do not have to enter a username and password for network access. The device initiates a MAC authentication process when it detects an unknown source MAC address on a MAC authentication-enabled port. If the MAC address passes authentication, the user can access authorized network resources. If the authentication fails, the device marks the MAC address as a silent MAC address, drops the packet, and starts a quiet timer. The device drops all subsequent packets from the MAC address within the quiet time. The quiet mechanism avoids repeated authentication during a short time.

 

 

NOTE:

If the MAC address that has failed authentication is a static MAC address or a MAC address that has passed any security authentication, the device does not mark the MAC address as a silent address.

 

User account policies

MAC authentication supports the following user account policies:

·     One MAC-based user account for each user. The access device uses the source MAC addresses in packets as the usernames and passwords of users for MAC authentication. This policy is suitable for an insecure environment.

·     One shared user account for all users. You specify one username and password, which are not necessarily a MAC address, for all MAC authentication users on the access device. This policy is suitable for a secure environment.

Authentication methods

You can perform MAC authentication on the access device (local authentication) or through a RADIUS server.

Local authentication:

·     MAC-based accounts—The access device uses the source MAC address of the packet as the username and password to search the local account database for a match.

·     A shared account—The access device uses the shared account username and password to search the local account database for a match.

RADIUS authentication:

·     MAC-based accounts—The access device sends the source MAC address of the packet as the username and password to the RADIUS server for authentication.

·     A shared account—The access device sends the shared account username and password to the RADIUS server for authentication.

The access device and the RADIUS server use Password Authentication Protocol (PAP) or Challenge Handshake Authentication Protocol (CHAP) for communication.

For more information about configuring local authentication and RADIUS authentication, see "Configuring AAA."

VLAN assignment

Authorization VLAN

The authorization VLAN controls the access of a MAC authentication user to authorized network resources. The device supports authorization VLANs assigned locally or by a remote server.

·     Remote VLAN authorization—You must configure the authorization VLAN for a user on the remote server. After the user authenticates to the server, the server assigns authorization VLAN information to the device. Then, the device assigns the user access port to the authorization VLAN as a tagged or untagged member.

 

IMPORTANT

IMPORTANT:

Only remote servers can assign tagged authorization VLANs.

 

·     Local VLAN authorizationTo perform local VLAN authorization for a user, specify the VLAN ID in the authorization attribute list of the local user account for that user. For each local user, you can specify only one authorization VLAN ID. The port through which the user accesses the device is assigned to the VLAN as an untagged member.

 

IMPORTANT

IMPORTANT:

Local VLAN authorization does not support assignment of tagged VLANs.

 

For more information about local user configuration, see "Configuring AAA."

Authorization VLAN manipulation for a MAC authentication-enabled port

Table 1 describes the way the network access device handles authorization VLANs for MAC authenticated users on a port.

Table 1 VLAN manipulation

Port type

VLAN manipulation

·     Access port

·     Trunk port

·     Hybrid port with MAC-based-VLAN disabled

·     The device assigns the port to the first authenticated user's authorization VLAN and sets the VLAN as the PVID if that authorization VLAN has the untagged attribute.

·     If the authorization VLAN has the tagged attribute, the device assigns the port to the authorization VLAN without changing its PVID.

Hybrid port with MAC-based VLAN enabled

The device maps the MAC address of each user to its own authorization VLAN regardless of whether the port is a tagged member. The PVID of the port does not change.

 

IMPORTANT

IMPORTANT:

·     For users attached to an access port, make sure the authorization VLAN assigned by the server has the untagged attribute. VLAN assignment will fail if the server issues a VLAN that has the tagged attribute.

·     When you assign VLANs to users attached to a trunk or MAC-based VLAN disabled hybrid port, make sure there is only one untagged VLAN. If a different untagged VLAN is assigned to a subsequent user, the user cannot pass authentication.

·     As a best practice to enhance network security, do not use the port hybrid vlan command to assign a hybrid port to an authorization VLAN as a tagged member.

 

Whether the authorization VLAN of an authenticated user takes effect on the MAC authentication-enabled port depends on the port link type and VLAN tagging mode.

·     If the port is an access or trunk port, the authorization VLAN always takes effect.

·     If the port is a hybrid port, the device compares the VLAN tagging mode assigned by the server with the VLAN tagging mode configured on the port for the authorization VLAN.

¡     If the VLAN tagging modes are the same one (tagged or untagged), the authorization VLAN takes effect.

¡     If the VLAN tagging modes are different, the configuration on the port takes effect instead of the assigned information.

Authorization VLAN assignment does not affect the VLAN configuration on the MAC authentication-enabled port. After the user is logged off, the original VLAN configuration on the port is restored.

For a MAC authenticated user to access the network on a hybrid port when no authorization VLANs are assigned to the user, perform either of the following tasks:

·     If the port receives tagged authentication packets from the user in a VLAN, use the port hybrid vlan command to configure the port as a tagged member in the VLAN.

·     If the port receives untagged authentication packets from the user in a VLAN, use the port hybrid vlan command to configure the port as an untagged member in the VLAN.

Guest VLAN

The MAC authentication guest VLAN on a port accommodates users that have failed MAC authentication for any reason other than server unreachable. For example, the VLAN accommodates users with invalid password entered.

You can deploy a limited set of network resources in the MAC authentication guest VLAN. For example, a software server for downloading software and system patches.

A hybrid port is always assigned to a MAC authentication guest VLAN as an untagged member. After the assignment, do not reconfigure the port as a tagged member in the VLAN.

Table 2 shows the way that the network access device handles guest VLANs for MAC authentication users.

Table 2 VLAN manipulation

Authentication status

VLAN manipulation

A user in the MAC authentication guest VLAN fails MAC authentication.

The user is still in the MAC authentication guest VLAN.

A user in the MAC authentication guest VLAN passes MAC authentication.

The device remaps the MAC address of the user to the authorization VLAN assigned by the authentication server.

If no authorization VLAN is configured for the user on the authentication server, the device remaps the MAC address of the user to the PVID of the port.

 

Critical VLAN

The MAC authentication critical VLAN on a port accommodates users that have failed MAC authentication because no RADIUS authentication servers are reachable. Users in a MAC authentication critical VLAN can access only network resources in the critical VLAN.

The critical VLAN feature takes effect when MAC authentication is performed only through RADIUS servers. If a MAC authentication user fails local authentication after RADIUS authentication, the user is not assigned to the critical VLAN. For more information about the authentication methods, see "Configuring AAA."

Table 3 shows the way that the network access device handles critical VLANs for MAC authentication users.

Table 3 VLAN manipulation

Authentication status

VLAN manipulation

A user fails MAC authentication because all the RADIUS servers are unreachable.

The device maps the MAC address of the user to the MAC authentication critical VLAN.

The user is still in the MAC authentication critical VLAN if the user fails MAC reauthentication because all the RADIUS servers are unreachable.

If no MAC authentication critical VLAN is configured, the device maps the MAC address of the user to the PVID of the port.

A user in the MAC authentication guest VLAN fails authentication because all the RADIUS servers are unreachable.

The user remains in the MAC authentication guest VLAN.

A user in the MAC authentication critical VLAN fails MAC authentication for any reason other than server unreachable.

If a guest VLAN has been configured, the device maps the MAC address of the user to the guest VLAN.

If no guest VLAN is configured, the device maps the MAC address of the user to the PVID of the port.

A user in the MAC authentication critical VLAN passes MAC authentication.

The device remaps the MAC address of the user to the authorization VLAN assigned by the authentication server.

If no authorization VLAN is configured for the user on the authentication server, the device remaps the MAC address of the user to the PVID of the access port.

 

VSI manipulation

MAC authentication support for VXLANs

The device can act as a VTEP in a VXLAN network. As shown in Figure 1, when VTEPs in a VXLAN network act as NASs, users' VLANs cannot identify their service information. To resolve this issue, you must configure the RADIUS server to assign VSIs to MAC authenticated users. The VTEPs will map the users' traffic to the VXLANs that are associated with the users' respective authorization VSI. The mapping criteria include the user's access VLAN, access port, and MAC address.

For information about VSIs and VXLANs, see VXLAN Configuration Guide.

Figure 1 VXLAN network diagram for MAC authentication

 

Authorization VSI

An authorization VSI is associated with a VXLAN that has network resources inaccessible to unauthenticated users.

MAC authentication supports remote VSI authorization. If the VTEP does not receive authorization VSI information for a MAC authentication user from the remote server, the user cannot access resources in any VXLAN after passing authentication. If the VTEP receives authorization VSI information for the user from the remote server, it performs the following operations:

1.     Dynamically creates an attachment circuit (AC) based on the user's access port, VLAN, and MAC address.

2.     Maps the AC to the authorization VSI.

The user then can access resources in the VXLAN associated with the authorization VSI.

For information about dynamic creation of ACs, see VXLAN configuration Guide.

Guest VSI

The MAC authentication guest VSI on a port accommodates users that have failed MAC authentication for any reason other than server unreachable. For example, the VSI accommodates users with invalid passwords entered.

You can deploy a limited set of network resources in the VXLAN that is associated with the MAC authentication guest VSI. For example, a software server for downloading software and system patches.

Table 4 shows the way that the VTEP handles guest VSIs for MAC authentication users.

Table 4 VSI manipulation

Authentication status

VSI manipulation

A user fails MAC authentication for any reason other than server unreachable.

The VTEP maps the user's MAC address and access VLAN to the MAC authentication guest VSI.

A user in the MAC authentication guest VSI fails MAC authentication.

The user is still in the MAC authentication guest VSI.

A user in the MAC authentication guest VSI passes MAC authentication.

The VTEP remaps the user's MAC address and access VLAN to the authorization VSI assigned by the authentication server.

 

Critical VSI

The MAC authentication critical VSI on a port accommodates users that have failed MAC authentication because no RADIUS authentication servers are reachable. Users in a MAC authentication critical VSI can access only network resources in the VXLAN associated with this VSI.

The critical VSI feature takes effect when MAC authentication is performed only through RADIUS servers. If a MAC authentication user fails local authentication after RADIUS authentication, the user is not assigned to the critical VSI. For more information about the authentication methods, see "Configuring AAA."

Table 5 shows the way that the VTEP handles critical VSIs for MAC authentication users.

Table 5 VSI manipulation

Authentication status

VSI manipulation

A user fails MAC authentication because all the RADIUS servers are unreachable.

The VTEP maps the user's MAC address and access VLAN to the MAC authentication critical VSI.

The user is still in the MAC authentication critical VSI if the user fails MAC reauthentication because all the RADIUS servers are unreachable.

If no MAC authentication critical VSI is configured, the VTEP logs off the user.

A user in the MAC authentication critical VSI fails MAC authentication for any reason other than server unreachable.

If a guest VSI has been configured, the VTEP maps the user's MAC address and access VLAN to the guest VSI.

If no guest VSI is configured, the VTEP logs off the user.

A user in the MAC authentication guest VSI fails authentication because all the RADIUS servers are unreachable.

The user remains in the MAC authentication guest VSI.

A user in the MAC authentication critical VSI passes MAC authentication.

The VTEP remaps the user's MAC address and access VLAN to the authorization VSI assigned by the authentication server.

 

ACL assignment

You can specify an authorization ACL in the user account for a MAC authentication user on the authentication server to control the user's access to network resources. After the user passes MAC authentication, the authentication server (local or remote) assigns the authorization ACL to the access port of the user. The ACL will filter traffic for this user by permitting or rejecting matching traffic. You must configure ACL rules for the authorization ACL on the access device for the ACL assignment feature.

After receiving an ACl from the server, the device will check the following parameters defined in the ACL rules:

·     Source IP address.

·     Destination IP address.

·     Protocol type.

·     Ethernet type.

·     Source port.

·     Destination port.

·     DSCP priority.

For more information about these parameters, see ACL and QoS Command Reference.

To change the access control criteria for the user, you can use one of the following methods:

·     Modify ACL rules on the access device.

·     Specify another authorization ACL on the authentication server.

The supported authorization ACLs include the following types:

·     Basic ACLs, which are numbered in the range of 2000 to 2999.

·     Advanced ACLs, which are numbered in the range of 3000 to 3999.

·     Layer 2 ACLs, which are numbered in the range of 4000 to 4999.

For an authorization ACL to take effect, make sure the ACL exists with rules and none of the rules contains the counting, established, fragment, source-mac, or logging keyword.

For more information about ACLs, see ACL and QoS Configuration Guide.

Redirect URL assignment

The device supports the URL attribute assigned by a RADIUS server. During MAC authentication, the HTTP or HTTP requests of a user is redirected to the Web interface specified by the server-assigned URL attribute. After the user passes the Web authentication, the RADIUS server records the MAC address of the user and uses a DM (Disconnect Message) to log off the user. When the user initiates MAC authentication again, it will pass the authentication and come online successfully.

To redirect the HTTPS requests of MAC authentication users, specify the HTTPS redirect listening port on the device. For more information, see HTTP redirect in Layer 3—IP Services Configuration Guide.

Blackhole MAC attribute assignment

The device supports the blackhole MAC attribute assigned by the RADIUS authentication server through CoA messages for users that have passed MAC authentication. Upon receiving a CoA message that contains the blackhole MAC attribute for a user that has passed MAC authentication, the device performs the following operations:

1.     Logs off the user.

2.     Marks the MAC address of the user as a silent MAC address and starts a quiet timer for the MAC address.

The quiet timer is 10 minutes and is not user configurable. The device drops all packets from the MAC address after the quiet timer starts, and it will not authenticate the MAC address until the quiet timer expires.

To display silent MAC addresses, use the display mac-authentication command.

Configuration prerequisites

Before you configure MAC authentication, complete the following tasks:

1.     Configure an ISP domain and specify an AAA method. For more information, see "Configuring AAA."

¡     For local authentication, you must also create local user accounts (including usernames and passwords) and specify the lan-access service for local users.

¡     For RADIUS authentication, make sure the device and the RADIUS server can reach each other and create user accounts on the RADIUS server. If you are using MAC-based accounts, make sure the username and password for each account are the same as the MAC address of each MAC authentication user.

2.     Make sure the port security feature is disabled. For more information about port security, see "Configuring port security."

General guidelines and restrictions

When you configure MAC authentication, follow these guidelines and restrictions:

·     To support the authorization VSI, MAC authentication guest VSI, MAC authentication critical VSI features on a MAC authentication-enabled port, you must enable MAC-based traffic match mode for dynamic ACs. To enable MAC-based traffic match mode for dynamic ACs, use the mac-based ac command. For information about this command, see VXLAN Command Reference.

·     In a VXLAN network that is configured with MAC authentication, a MAC address cannot move between local and remote sites. If a MAC address of a user is authenticated on a site, the user cannot access the network correctly in another site.

·     If the authentication server assigns both an authorization VSI and authorization VLAN to a user, the device uses only the authorization VLAN.

·     On a port, the guest VLAN and critical VLAN settings are mutually exclusive with the guest VSI and critical VSI settings.

·     For successful assignment of authorization VLANs or authorization VSIs, follow these guidelines:

¡     If a port is configured with the guest VLAN or critical VLAN, configure the authentication server to assign authorization VLANs to MAC authentication users on the port.

¡     If a port is configured with the guest VSI or critical VSI, configure the authentication server to assign authorization VSIs to MAC authentication users on the port.

·     Do not change the link type of a port when the MAC authentication guest VLAN or critical VLAN on the port has users.

·     MAC authentication configuration is supported on Layer 2 Ethernet interfaces and Layer 2 aggregate interfaces. In this chapter, the term "port" refers to a Layer 2 Ethernet interface or a Layer 2 aggregate interface.

·     After a Layer 2 Ethernet interface is assigned to an aggregation group, the MAC authentication settings on the interface does not take effect.

·     To ensure successful MAC authentication, do not configure both the VSI assignment feature and the feature of including user IP addresses in MAC authentication requests on a port.

·     Do not delete a Layer 2 aggregate interface if the interface has online MAC authentication users.

·     Do not configure both MAC authentication and VLAN mapping on the same port. For information about VLAN mapping, see Layer 2—LAN Switching Configuration Guide.

Configuration task list

Tasks at a glance

(Required.) Enabling MAC authentication

(Optional.) Specifying a MAC authentication method

(Optional.) Specifying a MAC authentication domain

(Optional.) Configuring the user account format

(Optional.) Configuring MAC authentication timers

(Optional.) Setting the maximum number of concurrent MAC authentication users on a port

(Optional.) Enabling MAC authentication multi-VLAN mode on a port

(Optional.) Configuring MAC authentication delay

(Optional.) Enabling parallel processing of MAC authentication and 802.1X authentication

(Optional.) Configuring a MAC authentication guest VLAN

(Optional.) Configuring a MAC authentication critical VLAN

(Optional.) Enabling the MAC authentication critical voice VLAN

(Optional.) Configuring a MAC authentication guest VSI

(Optional.) Configuring a MAC authentication critical VSI

(Optional.) Configuring periodic MAC reauthentication

(Optional.) Including user IP addresses in MAC authentication requests

(Optional.) Configuring user aging for unauthenticated MAC authentication users

(Optional.) Configuring MAC authentication offline detection

(Optional.) Enabling logging for MAC authentication users

 

Enabling MAC authentication

For MAC authentication to take effect on a port, you must enable this feature globally and on the port.

Do not enable MAC authentication on a port that is in a service loopback group.

MAC authentication does not take effect on a Layer 2 extended-link aggregate interface that does not have member ports. For information about PEXs, see IRF 3.1 system configuration in Virtual Technologies Configuration Guide.

If the device has run out of ACL resources, MAC authentication does not take effect on a Layer 2 Ethernet interface or Layer 2 aggregate interface in the following situations:

·     Change the enabling status of MAC authentication on the interface from Disabled to Enabled when MAC authentication is enabled globally.

·     Change the enabling status of global MAC authentication from Disabled to Enabled when MAC authentication on the interface is enabled.

To enable MAC authentication:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable MAC authentication globally.

mac-authentication

By default, MAC authentication is disabled globally.

3.     Enter interface view.

interface interface-type interface-number

N/A

4.     Enable MAC authentication on the port.

mac-authentication

By default, MAC authentication is disabled on a port.

 

Specifying a MAC authentication method

About MAC authentication methods

RADIUS-based MAC authentication supports the following authentication methods:

·     PAP—Transports usernames and passwords in plain text. The authentication method applies to scenarios that do not require high security.

·     CHAP—Transports usernames in plain text and passwords in encrypted form over the network. CHAP is more secure than PAP.

Configuration restrictions and guidelines

The device must use the same authentication method as the RADIUS server.

Configuration procedure

To specify an authentication method for MAC authentication:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Specify an authentication method for MAC authentication.

mac-authentication authentication-method { chap | pap }

By default, the device uses PAP for MAC authentication.

 

Specifying a MAC authentication domain

By default, MAC authentication users are in the system default authentication domain. To implement different access policies for users, you can use one of the following methods to specify authentication domains for MAC authentication users:

·     Specify a global authentication domain in system view. This domain setting applies to all ports enabled with MAC authentication.

·     Specify an authentication domain for an individual port in interface view.

MAC authentication chooses an authentication domain for users on a port in this order: the port-specific domain, the global domain, and the default domain. For more information about authentication domains, see "Configuring AAA."

To specify an authentication domain for MAC authentication users:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Specify an authentication domain for MAC authentication users.

·     In system view:
mac-authentication domain domain-name

·     In interface view:

a.     interface interface-type interface-number

b.     mac-authentication domain domain-name

By default, the system default authentication domain is used for MAC authentication users.

 

Configuring the user account format

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure the MAC authentication user account format.

·     Use one MAC-based user account for each user:
mac-authentication user-name-format mac-address [ { with-hyphen | without-hyphen } [ lowercase | uppercase ] ]

·     Use one shared user account for all users:
mac-authentication user-name-format fixed [ account name ] [ password { cipher | simple } string ]

By default, the device uses the MAC address of a user as the username and password for MAC authentication. The MAC address is in the hexadecimal notation without hyphens, and letters are in lower case.

 

Configuring MAC authentication timers

MAC authentication uses the following timers:

·     Offline detect timer—Sets the interval that the device waits for traffic from a user before the device determines that the user is idle. If the device has not received traffic from a user before the timer expires, the device logs off that user and requests the accounting server to stop accounting for the user. This timer takes effect only when the MAC authentication offline detection feature is enabled.

As a best practice, set the MAC address aging timer to the same value as the offline detect timer. This operation prevents a MAC authenticated user from being logged off within the offline detect interval because of MAC address entry expiration.

·     Quiet timer—Sets the interval that the device must wait before the device can perform MAC authentication for a user that has failed MAC authentication. All packets from the MAC address are dropped during the quiet time. This quiet mechanism prevents repeated authentication from affecting system performance.

·     Server timeout timer—Sets the interval that the device waits for a response from a RADIUS server before the device determines that the RADIUS server is unavailable. If the timer expires during MAC authentication, the user fails MAC authentication.

To configure MAC authentication timers:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure MAC authentication timers.

mac-authentication timer { offline-detect offline-detect-value | quiet quiet-value | server-timeout server-timeout-value }

By default, the offline detect timer is 300 seconds, the quiet timer is 60 seconds, and the server timeout timer is 100 seconds.

 

Setting the maximum number of concurrent MAC authentication users on a port

Perform this task to prevent the system resources from being overused.

To set the maximum number of concurrent MAC authentication users on a port:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Set the maximum number of concurrent MAC authentication users on the port

mac-authentication max-user max-number

The default setting is 4294967295.

 

Enabling MAC authentication multi-VLAN mode on a port

The MAC authentication multi-VLAN mode prevents an authenticated online user from service interruption caused by VLAN changes on a port. When the port receives a packet sourced from the user in a VLAN not matching the existing MAC-VLAN mapping, the device neither logs off the user nor reauthenticates the user. The device creates a new MAC-VLAN mapping for the user, and traffic transmission is not interrupted. The original MAC-VLAN mapping for the user remains on the device until it dynamically ages out. As a best practice, configure this feature on hybrid or trunk ports.

This feature improves transmission of data that is vulnerable to delay and interference. It is typically applicable to IP phone users.

To enable MAC authentication multi-VLAN mode on a port:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Enable MAC authentication multi-VLAN mode.

mac-authentication host-mode multi-vlan

By default, this feature is disabled on a port. When the port receives a packet sourced from an authenticated user in a VLAN not matching the existing MAC-VLAN mapping, the device logs off and reauthenticates the user.

 

Configuring MAC authentication delay

When both 802.1X authentication and MAC authentication are enabled on a port, you can delay MAC authentication so that 802.1X authentication is preferentially triggered.

If no 802.1X authentication is triggered or 802.1X authentication fails within the delay period, the port continues to process MAC authentication.

Do not set the port security mode to mac-else-userlogin-secure or mac-else-userlogin-secure-ext when you use MAC authentication delay. The delay does not take effect on a port in either of the two modes. For more information about port security modes, see "Configuring port security."

To configure MAC authentication delay:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Enable MAC authentication delay and set the delay timer.

mac-authentication timer auth-delay time

By default, MAC authentication delay is disabled.

 

Enabling parallel processing of MAC authentication and 802.1X authentication

This feature enables a port that processes MAC authentication after 802.1X authentication is finished to process MAC authentication in parallel with 802.1X authentication.

When the port receives a packet from an unknown MAC address, it sends a unicast EAP-Request/Identity packet to the MAC address. After that, the port immediately processes MAC authentication without waiting for the 802.1X authentication result.

After MAC authentication succeeds, the port is assigned to the MAC authentication authorization VLAN or VSI.

·     If 802.1X authentication fails, the MAC authentication result takes effect.

·     If 802.1X authentication succeeds, the device handles the port and the MAC address based on the 802.1X authentication result.

Configuration restrictions and guidelines

When you enable parallel processing of MAC authentication and 802.1X authentication on a port, follow these restrictions and guidelines:

·     Make sure the port meets the following requirements:

¡     The port is configured with both 802.1X authentication and MAC authentication and performs MAC-based access control for 802.1X authentication.

¡     The port is enabled with the 802.1X unicast trigger.

·     For the port to perform MAC authentication before it is assigned to the 802.1X guest VLAN, enable new MAC-triggered 802.1X guest VLAN assignment delay.

For information about new MAC-triggered 802.1X guest VLAN assignment delay, see "Configuring 802.1X."

·     For the port to perform MAC authentication before it is assigned to the 802.1X guest VSI, enable new MAC-triggered 802.1X guest VSI assignment delay.

For information about new MAC-triggered 802.1X guest VSI assignment delay, see "Configuring 802.1X."

·     For the parallel processing feature to work correctly, do not enable MAC authentication delay on the port. This operation will delay MAC authentication after 802.1X authentication is triggered.

·     To configure both 802.1X authentication and MAC authentication on the port, use one of the following methods:

¡     Enable the 802.1X and MAC authentication features separately on the port.

¡     Enable port security on the port. The port security mode must be userlogin-secure-or-mac or userlogin-secure-or-mac-ext.

For information about port security mode configuration, see "Configuring port security."

Configuration procedure

To enable parallel processing of MAC authentication and 802.1X authentication on a port:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Enable parallel processing of MAC authentication and 802.1X authentication on the port.

mac-authentication parallel-with-dot1x

By default, this feature is disabled.

 

Configuring a MAC authentication guest VLAN

Configuration prerequisites

You must configure the MAC authentication guest VLAN on a hybrid port. Before you configure the MAC authentication guest VLAN on a hybrid port, complete the following tasks:

·     Enable MAC authentication globally and on the port.

·     Enable MAC-based VLAN on the port.

·     Create the VLAN to be specified as the MAC authentication guest VLAN.

·     Configure the VLAN as an untagged member on the port.

Configuration restrictions and guidelines

The following table shows the relationships of the MAC authentication guest VLAN with other security features:

.

Feature

Relationship description

Reference

Quiet feature of MAC authentication

The MAC authentication guest VLAN feature has higher priority.

When a user fails MAC authentication, the user can access the resources in the guest VLAN. The user's MAC address is not marked as a silent MAC address.

See "Configuring MAC authentication timers."

Super VLAN

You cannot specify a VLAN as both a super VLAN and a MAC authentication guest VLAN.

See Layer 2—LAN Switching Configuration Guide.

Port intrusion protection

The guest VLAN feature has higher priority than the block MAC action but lower priority than the shutdown port action of the port intrusion protection feature.

See "Configuring port security."

 

Configuration procedure

To configure the MAC authentication guest VLAN on a port:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Specify the MAC authentication guest VLAN on the port.

mac-authentication guest-vlan guest-vlan-id

By default, no MAC authentication guest VLAN exists.

You can configure only one MAC authentication guest VLAN on a port.

4.     (Optional.) Set the authentication interval for users in the MAC authentication guest VLAN.

mac-authentication guest-vlan auth-period period-value

The default setting is 30 seconds.

 

Configuring a MAC authentication critical VLAN

You must configure the MAC authentication critical VLAN on a hybrid port. Before you configure the MAC authentication critical VLAN on a hybrid port, complete the following tasks:

·     Enable MAC authentication globally and on the port.

·     Enable MAC-based VLAN on the port.

·     Create the VLAN to be specified as the MAC authentication critical VLAN.

·     Configure the VLAN as an untagged member on the port.

When you configure the MAC authentication critical VLAN on a port, follow the guidelines in Table 6.

Table 6 Relationships of the MAC authentication critical VLAN with other security features

Feature

Relationship description

Reference

Quiet feature of MAC authentication

The MAC authentication critical VLAN feature has higher priority.

When a user fails MAC authentication because no RADIUS authentication server is reachable, the user can access the resources in the critical VLAN. The user's MAC address is not marked as a silent MAC address.

See "Configuring MAC authentication timers."

Super VLAN

You cannot specify a VLAN as both a super VLAN and a MAC authentication critical VLAN.

See Layer 2—LAN Switching Configuration Guide.

Port intrusion protection

The critical VLAN feature has higher priority than the block MAC action but lower priority than the shutdown port action of the port intrusion protection feature.

See "Configuring port security."

 

To configure the MAC authentication critical VLAN on a port:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Specify the MAC authentication critical VLAN on the port.

mac-authentication critical vlan critical-vlan-id

By default, no MAC authentication critical VLAN exists.

You can configure only one MAC authentication critical VLAN on a port.

 

Enabling the MAC authentication critical voice VLAN

The MAC authentication critical voice VLAN on a port accommodates MAC authentication voice users that have failed authentication because none of the RADIUS servers in their ISP domain are reachable.

Configuration prerequisites

Before you enable the MAC authentication critical voice VLAN on a port, complete the following tasks:

·     Enable LLDP both globally and on the port.

The device uses LLDP to identify voice users. For information about LLDP, see Layer 2—LAN Switching Configuration Guide.

·     Enable voice VLAN on the port.

For information about voice VLANs, see Layer 2—LAN Switching Configuration Guide.

Configuration procedure

To enable the MAC authentication critical voice VLAN feature on a port:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Enable the MAC authentication critical voice VLAN feature on a port.

mac-authentication critical-voice-vlan

By default, the MAC authentication critical voice VLAN feature is disabled on a port.

 

Configuring a MAC authentication guest VSI

Configuration restrictions and guidelines

When you configure the MAC authentication guest VSI on a port, follow these restrictions and guidelines:

·     The MAC authentication guest VSI feature has higher priority than the quiet feature of MAC authentication. When a user fails MAC authentication, the user can access the resources in the guest VSI. The user's MAC address is not marked as a silent MAC address.

·     You can configure only one MAC authentication guest VSI on a port. The MAC authentication guest VSIs on different ports can be different.

Configuration prerequisites

Before you configure the MAC authentication guest VSI on a port, complete the following tasks:

·     Enable L2VPN.

·     Create the VSI to be specified as the MAC authentication guest VSI, and create a VXLAN for the VSI.

·     Enable MAC-based traffic match mode for dynamic ACs on the port.

For more information, see VXLAN Configuration Guide.

Configuration procedure

To configure the MAC authentication guest VSI on a port:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Specify the MAC authentication guest VSI on the port.

mac-authentication guest-vsi guest-vsi-name

By default, no MAC authentication guest VSI exists.

4.     (Optional.) Set the authentication interval for users in the MAC authentication guest VSI.

mac-authentication guest-vsi auth-period period-value

The default setting is 30 seconds.

 

Configuring a MAC authentication critical VSI

Configuration restrictions and guidelines

When you configure the MAC authentication critical VSI on a port, follow these restrictions and guidelines:

·     The MAC authentication critical VSI feature has higher priority than the quiet feature of MAC authentication. When a user fails MAC authentication, the user can access the resources in the critical VSI. The user's MAC address is not marked as a silent MAC address.

·     You can configure only one MAC authentication critical VSI on a port. The MAC authentication critical VSIs on different ports can be different.

Configuration prerequisites

Before you configure the MAC authentication critical VSI on a port, complete the following tasks:

·     Enable L2VPN.

·     Create the VSI to be specified as the MAC authentication critical VSI, and create a VXLAN for the VSI.

·     Enable MAC-based traffic match mode for dynamic ACs on the port.

For more information, see VXLAN Configuration Guide.

Configuration procedure

To configure the MAC authentication critical VSI on a port:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Specify the MAC authentication critical VSI on the port.

mac-authentication critical vsi critical-vsi-name [ url-user-logoff ]

By default, no MAC authentication critical VSI exists.

The url-user-logoff keyword enables the device to log off MAC authentication users that have been assigned authorization URLs on the port when the first user is assigned to the critical VSI.

 

Configuring periodic MAC reauthentication

Overview

Periodic MAC reauthentication reauthenticates online MAC authentication users at a user-configurable reauthentication interval. The reauthentication feature tracks the connection status of online users and updates the authorization attributes assigned by the server. The attributes include the ACL and VLAN.

By default, the device logs off online MAC authentication users if no server is reachable for MAC reauthentication. The keep-online feature keeps authenticated MAC authentication users online when no server is reachable for MAC reauthentication.

Configuration restrictions and guidelines

When you configure periodic MAC reauthentication, follow these restrictions and guidelines:

·     Any modification to the MAC authentication domain, MAC authentication method, or user account format setting does not affect the reauthentication of online MAC authentication users. The modified setting takes effect only on MAC authentication users that come online after the modification.

·     The server-assigned RADIUS Session-Timeout (attribute 27) and Termination-Action (attribute 29) attributes together can affect the periodic MAC reauthentication feature. To display the server-assigned Session-Timeout and Termination-Action attributes, use the display mac-authentication connection command (see Security Command Reference).

¡     If the termination action is logging off users, periodic MAC reauthentication takes effect only when the periodic reauthentication timer is shorter than the session timeout timer. If the session timeout timer is shorter, the device logs off online authenticated users when the session timeout timer expires.

¡     If the termination action is reauthenticating users, the periodic MAC reauthentication configuration on the device cannot take effect. The device reauthenticates online MAC authentication users after the server-assigned session timeout timer expires.

Support for the server configuration and assignment of session timeout timer and termination action depends on the server model.

·     You can set the periodic reauthentication timer either in system view or in interface view by using the mac-authentication timer reauth-period command. A change to the periodic reauthentication timer applies to online users only after the old timer expires.

The device selects a periodic reauthentication timer for MAC reauthentication in the following order:

a.     Server-assigned reauthentication timer.

b.     Port-specific reauthentication timer.

c.     Global reauthentication timer.

d.     Default reauthentication timer.

·     In a fast-recovery network, you can use the keep-online feature to prevent MAC authentication users from coming online and going offline frequently.

·     The VLANs assigned to an online user before and after reauthentication can be the same or different.

Configuration procedure

To configure periodic MAC reauthentication:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     (Optional.) Set the global periodic MAC reauthentication timer.

mac-authentication timer reauth-period reauth-period-value

The default setting is 3600 seconds.

3.     Enter interface view.

interface interface-type interface-number

N/A

4.     Enable periodic MAC reauthentication.

mac-authentication re-authenticate

By default, periodic MAC reauthentication is disabled on a port.

5.     (Optional.) Set the periodic reauthentication timer on the port.

mac-authentication timer reauth-period reauth-period-value

By default, no periodic reauthentication timer is set on a port. The port uses the global periodic MAC reauthentication timer.

6.     (Optional.) Enable the keep-online feature for authenticated MAC authentication users on the port.

mac-authentication re-authenticate server-unreachable keep-online

By default, the keep-online feature is disabled.

 

Including user IP addresses in MAC authentication requests

Overview

IMPORTANT

IMPORTANT:

This feature can only operate in conjunction with an IMC server.

 

To avoid IP conflicts that result from changes to static IP addresses, use this feature on a port that has MAC authentication users that use static IP addresses.

This feature adds user IP addresses to the MAC authentication requests sent to the authentication server. When MAC authentication is triggered for a user, the device checks the user's IP address for invalidity.

·     If the IP address is valid, the device sends a MAC authentication request with the IP address included.

·     If the IP address is not a valid host IP address or the triggering packet does not contain an IP address, the device does not initiate MAC authentication.

·     If the packet is a DHCP packet with a source IP address of 0.0.0.0, the device sends a MAC authentication request without including the IP address. In this case, the IMC server does not examine the user IP address when it performs authentication.

Upon receipt of the authentication request that includes a user's IP address, the IMC server compares the user's IP and MAC addresses with its IP-MAC mappings.

·     If an exact match is found or if no match is found, the user passes MAC authentication. In the latter case, the server creates an IP-MAC mapping for the user.

·     If a mapping is found for the MAC address but the IP addresses do not match, the user fails the MAC authentication.

Configuration restrictions and guidelines

When you configure this feature, follow these guidelines and restrictions:

·     Do not use this feature in conjunction with the following features:

¡     Free VLANs for port security. For information about free VLANs, see "Configuring port security."

¡     MAC authentication guest VLAN or guest VSI. The device cannot perform MAC authentication for a user once that user is added to the MAC authentication guest VLAN or guest VSI.

·     If the user host is configured with IPv6, the device might receive packets that contain an IPv6 link-local address, which starts with fe80. MAC authentication failure will occur if this address is used in MAC authentication. To avoid MAC authentication failure, configure a basic ACL to exclude the IPv6 IP addresses that start with fe80.

·     When you configure the ACL, follow these guidelines:

¡     Use permit rules to identify source IP addresses that are valid for MAC authentication. Use deny rules to identify source IP addresses that cannot trigger MAC authentication.

¡     In the rules, only the action keyword (permit or deny) and the source IP match criterion can take effect.

¡     As a best practice, configure a deny rule to exclude the IPv6 IP addresses that start with fe80 from triggering MAC authentication.

¡     If you configure permit rules, add a deny all rule at the bottom of the ACL.

Configuration procedure

To include user IP addresses in MAC authentication requests:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Include user IP addresses in MAC authentication requests.

mac-authentication carry user-ip [ exclude-ip acl acl-number ]

By default, a MAC authentication request does not include the user IP address.

 

Configuring user aging for unauthenticated MAC authentication users

Overview

User aging for unauthenticated MAC authentication users applies to users added to a MAC authentication guest or critical VLAN or VSI because they have not been authenticated or have failed authentication.

When a user in one of those VLANs or VSIs ages out, the device removes the user from the VLAN or VSI and deletes the MAC address entry for the user from the access port.

For users in one of those VLANs or VSIs on one port to be authenticated successfully and come online on another port, enable this feature. In any other scenarios, disable this feature as a best practice.

Configuration restrictions and guidelines

As a best practice, disable user aging for unauthenticated MAC authentication users on one port unless you want to have the unauthenticated users on that port to be authenticated and come online on another port.

Configuration procedure

To configure user aging for unauthenticated MAC authentication users:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Set the user aging timer for a type of MAC authentication VLAN or VSI.

mac-authentication timer user-aging { critical-vlan | critical-vsi | guest-vlan | guest-vsi } aging-time-value

By default, the user aging timer is 1000 seconds for all applicable types of MAC authentication VLANs and VSIs.

3.     Enter interface view.

interface interface-type interface-number

N/A

4.     Enable user aging for unauthenticated MAC authentication users.

mac-authentication unauthenticated-user aging enable

By default, user aging is enabled for unauthenticated MAC authentication users.

 

Configuring MAC authentication offline detection

Overview

After you enable MAC authentication offline detection on a port, the device will log off users from which no traffic is received on the port within an offline detect interval. In addition to the logoff action, the device requests the RADIUS server to stop accounting for the users. For information about setting the offline detect timer in system view, see "Configuring MAC authentication timers."

Disabling this feature disables the device from inspecting the online user status.

In addition to port-based MAC authentication offline detection, you can configure offline detection parameters on a per-user basis, as follows:

·     Set an offline detect timer specific to a user and control whether to use the ARP snooping or ND snooping table to determine the offline state of the user.

¡     If the ARP snooping or ND snooping table is used, the device searches the ARP snooping or ND snooping table before it checks for traffic from the user within the detection interval. If a matching ARP snooping or ND snooping entry is found, the device resets the offline detect timer and the user stays online. If the offline detect timer expires because the device has not found a matching snooping entry for the user or received traffic from the user, the device disconnects the user.

¡     If the ARP or ND snooping table is not used, the device disconnects the user if it has not received traffic from that user before the offline detect timer expires.

When disconnecting the user, the device also notifies the RADIUS server (if any) to stop user accounting.

·     Skip offline detection for the user. You can choose this option if the user is a dumb terminal. A dumb terminal might fail to come online again after it is logged off by the offline detection feature.

The device uses the offline detection settings for a user in the following sequence:

1.     User-specific offline detection settings.

2.     Offline detection settings assigned to the user by the RADIUS server. The settings include the offline detect timer, use of the ARP or ND snooping table in offline detection, and whether to ignore offline detection.

3.     Port-based offline detection settings.

Configuration restrictions and guidelines

For the user-specific offline detection feature to take effect on a user, make sure the MAC authentication offline detection feature is enabled on the user's access port.

The user-specific offline detection settings take effect on the online users immediately after they are configured.

Configuration procedure

To configure MAC authentication offline detection:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     (Optional.) Configure MAC authentication offline detection for a user.

mac-authentication offline-detect mac-address mac-address { ignore | timer offline-detect-value [ check-arp-or-nd-snooping ] }

By default, offline detection settings configured on access ports take effect and the offline detect timer set in system view is used.

3.     Enter interface view.

interface interface-type interface-number

N/A

4.     Enable MAC authentication offline detection.

mac-authentication offline-detect enable

By default, MAC authentication offline detection is enabled.

 

Enabling logging for MAC authentication users

Overview

This feature enables the device to generate logs for MAC authentication users and send the logs to the information center. For the logs to be output correctly, you must also configure the information center on the device. For more information about information center configuration, see Network Management and Monitoring Configuration Guide.

Configuration restrictions and guidelines

As a best practice, disable this feature to prevent excessive output of logs for MAC authentication users.

Configuration procedure

To enable logging for MAC authentication users:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable logging for MAC authentication users.

mac-authentication access-user log enable [ failed-login | logoff | successful-login ] *

By default, all types of logging are disabled for MAC authentication users.

If you do not specify any parameters, this command enables all types of logging for MAC authentication users.

 

Displaying and maintaining MAC authentication

Execute display commands in any view and reset commands in user view.

 

Task

Command

Display MAC authentication information.

display mac-authentication [ interface interface-type interface-number ]

(In standalone mode.) Display MAC authentication connections.

display mac-authentication connection [ open ] [ interface interface-type interface-number | slot slot-number | user-mac mac-address | user-name user-name ]

(In IRF mode.) Display MAC authentication connections.

display mac-authentication connection [ open ] [ chassis chassis-number slot slot-number | interface interface-type interface-number | user-mac mac-address | user-name user-name ]

Display MAC address information of MAC authentication users in specific MAC authentication VLANs or VSIs.

display mac-authentication mac-address { critical-vlan | critical-vsi | guest-vlan | guest-vsi } [ interface interface-type interface-number ]

Clear MAC authentication statistics.

reset mac-authentication statistics [ interface interface-type interface-number ]

Remove users from the MAC authentication critical VLAN on a port.

reset mac-authentication critical-vlan interface interface-type interface-number [ mac-address mac-address ]

Remove users from the MAC authentication critical voice VLAN on a port.

reset mac-authentication critical-voice-vlan interface interface-type interface-number [ mac-address mac-address ]

Remove users from the MAC authentication guest VLAN on a port.

reset mac-authentication guest-vlan interface interface-type interface-number [ mac-address mac-address ]

Remove users from the MAC authentication critical VSI on a port.

reset mac-authentication critical vsi interface interface-type interface-number [ mac-address mac-address ]

Remove users from the MAC authentication guest VSI on a port.

reset mac-authentication guest-vsi interface interface-type interface-number [ mac-address mac-address ]

 

MAC authentication configuration examples

Local MAC authentication configuration example

Network requirements

As shown in Figure 2, the device performs local MAC authentication on GigabitEthernet 1/0/1 to control Internet access of users.

Configure the device to meet the following requirements:

·     Detect whether a user has gone offline every 180 seconds.

·     Deny a user for 180 seconds if the user fails MAC authentication.

·     Authenticate all users in ISP domain bbb.

·     Use the MAC address of each user as the username and password for authentication. A MAC address is in the hexadecimal notation with hyphens, and letters are in lower case.

Figure 2 Network diagram

 

Configuration procedure

# Add a network access local user. In this example, configure both the username and password as Host A's MAC address 00-e0-fc-12-34-56.

<Device> system-view

[Device] local-user 00-e0-fc-12-34-56 class network

[Device-luser-network-00-e0-fc-12-34-56] password simple 00-e0-fc-12-34-56

# Specify the LAN access service for the user.

[Device-luser-network-00-e0-fc-12-34-56] service-type lan-access

[Device-luser-network-00-e0-fc-12-34-56] quit

# Configure ISP domain bbb to perform local authentication for LAN users.

[Device] domain bbb

[Device-isp-bbb] authentication lan-access local

[Device-isp-bbb] quit

# Enable MAC authentication on GigabitEthernet 1/0/1.

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] mac-authentication

[Device-GigabitEthernet1/0/1] quit

# Specify ISP domain bbb as the MAC authentication domain.

[Device] mac-authentication domain bbb

# Configure MAC authentication timers.

[Device] mac-authentication timer offline-detect 180

[Device] mac-authentication timer quiet 180

# Configure MAC authentication to use MAC-based accounts. Each MAC address is in the hexadecimal notation with hyphens, and letters are in lower case.

[Device] mac-authentication user-name-format mac-address with-hyphen lowercase

# Enable MAC authentication globally.

[Device] mac-authentication

Verifying the configuration

# Display MAC authentication settings and statistics to verify your configuration.

[Device] display mac-authentication

Global MAC authentication parameters:

   MAC authentication                  : Enabled

   Authentication method               : PAP

   User name format                    : MAC address in lowercase(xx-xx-xx-xx-xx-xx)

           Username                    : mac

           Password                    : Not configured

   Offline detect period               : 180 s

   Quiet period                        : 180 s

   Server timeout                      : 100 s

   Reauth period                       : 3600 s

   User aging period for critical VLAN : 1000 s

   User aging period for critical VSI  : 1000 s

   User aging period for guest VLAN    : 1000 s

   User aging period for guest VSI     : 1000 s

   Authentication domain               : bbb

 Online MAC-auth users                 : 1

 

 Silent MAC users:

          MAC address       VLAN ID  From port               Port index

          00e0-fc11-1111    8        GE1/0/1                 1

 

 GigabitEthernet1/0/1 is link-up

   MAC authentication         : Enabled

   Carry User-IP              : Disabled

   Authentication domain      : Not configured

   Auth-delay timer           : Disabled

   Periodic reauth            : Disabled

   Re-auth server-unreachable : Logoff

   Guest VLAN                 : Not configured

   Guest VLAN auth-period     : 30 s

   Critical VLAN              : Not configured

   Critical voice VLAN        : Disabled

   Host mode                  : Single VLAN

   Offline detection          : Enabled

   Authentication order       : Default

   User aging                 : Enabled

   Guest VSI                  : Not configured

   Guest VSI auth-period      : 30 s

   Critical VSI               : Not configured

 

   Max online users           : 4294967295

   Authentication attempts    : successful 1, failed 0

   Current online users       : 1

          MAC address       Auth state

          00e0-fc12-3456    Authenticated

The output shows that Host A has passed MAC authentication and has come online. Host B failed MAC authentication and its MAC address is marked as a silent MAC address.

RADIUS-based MAC authentication configuration example

Network requirements

As shown in Figure 3, the device uses RADIUS servers to perform authentication, authorization, and accounting for users.

To control user access to the Internet by MAC authentication, perform the following tasks:

·     Enable MAC authentication globally and on GigabitEthernet 1/0/1.

·     Configure the device to use CHAP for MAC authentication. The RADIUS server supports only CHAP.

·     Configure the device to detect whether a user has gone offline every 180 seconds.

·     Configure the device to deny a user for 180 seconds if the user fails MAC authentication.

·     Configure all users to belong to ISP domain bbb.

·     Use a shared user account for all users, with username aaa and password 123456.

Figure 3 Network diagram

 

Configuration procedure

1.     Make sure the RADIUS server and the access device can reach each other. (Details not shown.)

2.     Configure the RADIUS servers:

# Configure the RADIUS servers to provide authentication, authorization, and accounting services. (Details not shown.)

# Add a shared account with username aaa and password 123456 on each RADIUS server. (Details not shown.)

3.     Configure RADIUS-based MAC authentication on the device:

# Configure a RADIUS scheme.

<Device> system-view

[Device] radius scheme 2000

[Device-radius-2000] primary authentication 10.1.1.1 1812

[Device-radius-2000] primary accounting 10.1.1.2 1813

[Device-radius-2000] key authentication simple abc

[Device-radius-2000] key accounting simple abc

[Device-radius-2000] user-name-format without-domain

[Device-radius-2000] quit

# Specify CHAP as the authentication method for MAC authentication.

[Device] mac-authentication authentication-method chap

# Apply the RADIUS scheme to ISP domain bbb for authentication, authorization, and accounting.

[Device] domain bbb

[Device-isp-bbb] authentication default radius-scheme 2000

[Device-isp-bbb] authorization default radius-scheme 2000

[Device-isp-bbb] accounting default radius-scheme 2000

[Device-isp-bbb] quit

# Enable MAC authentication on GigabitEthernet 1/0/1.

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] mac-authentication

[Device-GigabitEthernet1/0/1] quit

# Specify the MAC authentication domain as ISP domain bbb.

[Device] mac-authentication domain bbb

# Set MAC authentication timers.

[Device] mac-authentication timer offline-detect 180

[Device] mac-authentication timer quiet 180

# Specify username aaa and password 123456 in plain text for the account shared by MAC authentication users.

[Device] mac-authentication user-name-format fixed account aaa password simple 123456

# Enable MAC authentication globally.

[Device] mac-authentication

Verifying the configuration

# Verify the MAC authentication configuration.

[Device] display mac-authentication

Global MAC authentication parameters:

   MAC authentication                  : Enabled

   Authentication method               : CHAP

   Username format                     : Fixed account

           Username                    : aaa

           Password                    : ******

   Offline detect period               : 180 s

   Quiet period                        : 180 s

   Server timeout                      : 100 s

   Reauth period                       : 3600 s

   User aging period for critical VLAN : 1000 s

   User aging period for critical VSI  : 1000 s

   User aging period for guest VLAN    : 1000 s

   User aging period for guest VSI     : 1000 s

   Authentication domain               : bbb

 Online MAC-auth users                 : 1

 

 Silent MAC users:

          MAC address       VLAN ID  From port               Port index

 

 GigabitEthernet1/0/1  is link-up

   MAC authentication         : Enabled

   Carry User-IP              : Disabled

   Authentication domain      : Not configured

   Auth-delay timer           : Disabled

   Periodic reauth            : Disabled

   Re-auth server-unreachable : Logoff

   Guest VLAN                 : Not configured

   Guest VLAN auth-period     : 30 s

   Critical VLAN              : Not configured

   Critical voice VLAN        : Disabled

   Host mode                  : Single VLAN

   Offline detection          : Enabled

   Authentication order       : Default

   User aging                 : Enabled

   Guest VSI                  : Not configured

   Guest VSI auth-period      : 30 s

   Critical VSI               : Not configured

 

   Max online users           : 4294967295

   Authentication attempts    : successful 1, failed 0

   Current online users       : 1

          MAC address       Auth state

          00e0-fc12-3456    Authenticated

ACL assignment configuration example

Network requirements

As shown in Figure 4, configure the device to meet the following requirements:

·     Use RADIUS servers to perform authentication, authorization, and accounting for users.

·     Perform MAC authentication on GigabitEthernet 1/0/1 to control Internet access.

·     Use MAC-based user accounts for MAC authentication users. Each MAC address is in the hexadecimal notation with hyphens, and letters are in lower case.

·     Use an ACL to deny authenticated users to access the FTP server at 10.0.0.1.

Figure 4 Network diagram

 

Configuration procedure

Make sure the RADIUS servers and the access device can reach each other.

1.     Configure the RADIUS servers:

# Configure the RADIUS servers to provide authentication, authorization, and accounting services. (Details not shown.)

# Add a user account with 00-e0-fc-12-34-56 as both the username and password on each RADIUS server. (Details not shown.)

# Specify ACL 3000 as the authorization ACL for the user account. (Details not shown.)

2.     Configure ACL 3000 to deny packets destined for 10.0.0.1.

<Device> system-view

[Device] acl advanced 3000

[Device-acl-ipv4-adv-3000] rule 0 deny ip destination 10.0.0.1 0

[Device-acl-ipv4-adv-3000] quit

3.     Configure RADIUS-based MAC authentication on the device:

# Configure a RADIUS scheme.

[Device] radius scheme 2000

[Device-radius-2000] primary authentication 10.1.1.1 1812

[Device-radius-2000] primary accounting 10.1.1.2 1813

[Device-radius-2000] key authentication simple abc

[Device-radius-2000] key accounting simple abc

[Device-radius-2000] user-name-format without-domain

[Device-radius-2000] quit

# Apply the RADIUS scheme to an ISP domain for authentication, authorization, and accounting.

[Device] domain bbb

[Device-isp-bbb] authentication default radius-scheme 2000

[Device-isp-bbb] authorization default radius-scheme 2000

[Device-isp-bbb] accounting default radius-scheme 2000

[Device-isp-bbb] quit

# Specify the ISP domain for MAC authentication.

[Device] mac-authentication domain bbb

# Configure the device to use MAC-based user accounts. Each MAC address is in the hexadecimal notation with hyphens, and letters are in lower case.

[Device] mac-authentication user-name-format mac-address with-hyphen lowercase

# Enable MAC authentication on GigabitEthernet 1/0/1.

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] mac-authentication

[Device-GigabitEthernet1/0/1] quit

# Enable MAC authentication globally.

[Device] mac-authentication

Verifying the configuration

# Verify the MAC authentication configuration.

[Device] display mac-authentication

Global MAC authentication parameters:

   MAC authentication                  : Enable

   Authentication method               : PAP

   Username format                     : MAC address in lowercase(xx-xx-xx-xx-xx-xx)

           Username                    : mac

           Password                    : Not configured

   Offline detect period               : 300 s

   Quiet period                        : 60 s

   Server timeout                      : 100 s

   Reauth period                       : 3600 s

   User aging period for critical VLAN : 1000 s

   User aging period for critical VSI  : 1000 s

   User aging period for guest VLAN    : 1000 s

   User aging period for guest VSI     : 1000 s

   Authentication domain               : bbb

 Online MAC-auth users                 : 1

 

 Silent MAC users:

          MAC address       VLAN ID  From port               Port index

 

 GigabitEthernet1/0/1  is link-up

   MAC authentication         : Enabled

   Carry User-IP              : Disabled

   Authentication domain      : Not configured

   Auth-delay timer           : Disabled

   Periodic reauth            : Disabled

   Re-auth server-unreachable : Logoff

   Guest VLAN                 : Not configured

   Guest VLAN auth-period     : 30 s

   Critical VLAN              : Not configured

   Critical voice VLAN        : Disabled

   Host mode                  : Single VLAN

   Offline detection          : Enabled

   Authentication order       : Default

   User aging                 : Enabled

   Guest VSI                  : Not configured

   Guest VSI auth-period      : 30 s

   Critical VSI               : Not configured

 

   Max online users           : 4294967295

   Authentication attempts    : successful 1, failed 0

   Current online users       : 1

          MAC address       Auth state

          00e0-fc12-3456    Authenticated

# Verify that you cannot ping the FTP server from the host.

C:\>ping 10.0.0.1

 

Pinging 10.0.0.1 with 32 bytes of data:

 

Request timed out.

Request timed out.

Request timed out.

Request timed out.

 

Ping statistics for 10.0.0.1:

   Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

The output shows that ACL 3000 has been assigned to GigabitEthernet 1/0/1 to deny access to the FTP server.

MAC authentication authorization VSI assignment configuration example

Network requirements

As shown in Figure 5, configure the device to meet the following requirements:

·     Use RADIUS servers to perform authentication, authorization, and accounting for users.

·     Perform MAC authentication on GigabitEthernet 1/0/1 to control Internet access.

·     Configure the RADIUS server to assign VSI bbb to the host when the host passes MAC authentication.

·     Authenticate all users in ISP domain 2000.

·     Use MAC-based user accounts for MAC authentication users. Each MAC address is in the hexadecimal notation with hyphens, and letters are in lower case.

Figure 5 Network diagram

 

Configuration procedure

Make sure the RADIUS servers and the device can reach each other.

1.     Configure the RADIUS servers:

# Configure the RADIUS servers to provide authentication, authorization, and accounting services. (Details not shown.)

# Add a user account with d4-85-64-be-c6-3e as both the username and password on each RADIUS server. (Details not shown.)

# Specify VSI bbb as the authorization VSI for the user account. (Details not shown.)

2.     Configure RADIUS-based MAC authentication on the device:

# Configure a RADIUS scheme.

<Device> system-view

[Device] radius scheme bbb

[Device-radius-bbb] primary authentication 10.1.1.1

[Device-radius-bbb] primary accounting 10.1.1.2

[Device-radius-bbb] key authentication simple bbb

[Device-radius-bbb] key accounting simple bbb

[Device-radius-bbb] user-name-format without-domain

[Device-radius-bbb] quit

# Apply the RADIUS scheme to ISP domain 2000 for authentication, authorization, and accounting of LAN users.

[Device] domain 2000

[Device-isp-2000] authentication lan-access radius-scheme bbb

[Device-isp-2000] authorization lan-access radius-scheme bbb

[Device-isp-2000] accounting lan-access radius-scheme bbb

[Device-isp-2000] quit

# Enable MAC authentication on GigabitEthernet 1/0/1.

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] mac-authentication

# Enable MAC-based traffic match mode for dynamic Ethernet service instances on GigabitEthernet 1/0/1.

[Device-GigabitEthernet1/0/1] mac-based ac

[Device-GigabitEthernet1/0/1] quit

# Enable L2VPN.

[Device] l2vpn enable

# Create a VSI named bbb and the associated VXLAN.

[Device] vsi bbb

[Device-vsi-bbb] vxlan 5

[Device-vsi-bbb-vxlan-5] quit

# Specify the ISP domain for MAC authentication.

[Device] mac-authentication domain 2000

# Configure the device to use MAC-based user accounts. Each MAC address is in the hexadecimal notation with hyphens, and letters are in lower case.

[Device] mac-authentication user-name-format mac-address with-hyphen lowercase

# Enable MAC authentication globally.

[Device] mac-authentication

Verifying the configuration

# Verify that VSI bbb is assigned to the MAC authentication user after the user passes authentication.

[Device] display mac-authentication connection

Total connections: 1

Slot ID: 1

User MAC address: d485-64be-c63e

Access interface: GigabitEthernet1/0/1

Username: d4-85-64-be-c6-3e

User access state: Successful

Authentication domain: 2000

IPv4 address: 192.168.1.1

IPv6 address: 2000:0:0:0:1:2345:6789:abcd

Initial VLAN: 1

Authorization untagged VLAN: N/A

Authorization tagged VLAN: N/A

Authorization VSI: bbb

Authorization ACL ID: N/A

Authorization CAR: N/A

Termination action: Radius-request

Session timeout period: N/A

Offline detection: 300 sec (server-assigned)

Online from: 2016/06/13 09:06:37

Online duration: 0h 0m 35s

# Verify that a dynamic AC is created for MAC address d485-64be-c63e.

[Device] display l2vpn forwarding ac verbose

VSI Name: bbb

  Interface: GE1/0/1  Service Instance: 1

    Link ID      : 0

    Access Mode  : VLAN

    Encapsulation: untagged

    Type         : Dynamic (MAC-based)

    MAC address  : d485-64be-c63e

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网