138
# Enable MAC authentication on GigabitEthernet 1/0/1, and specify VLAN 2 as the Auth-Fail VLAN
[Switch] interface gigabitethernet 1/0/1
[Switch–GigabitEthernet1/0/1] mac-authentication
[Switch–GigabitEthernet1/0/1] mac-authentication guest-vlan 2
[Switch–GigabitEthernet1/0/1] quit
5.
Configure a RADIUS scheme.
# Create a RADIUS scheme named
rs1
.
[Switch] radius scheme rs1
# Specify the server type for the RADIUS scheme, which must be
extended
when the iMC server is used.
[Switch-radius-rs1] server-type extended
# Specify the primary authentication and accounting servers and keys.
[Switch-radius-rs1] primary authentication 1.1.1.2
[Switch-radius-rs1] primary accounting 1.1.1.2
[Switch-radius-rs1] key authentication radius
[Switch-radius-rs1] key accounting radius
# Specify usernames sent to the RADIUS server to carry no domain names.
[Switch-radius-rs1] user-name-format without-domain
[Switch-radius-rs1] quit
6.
Configure an ISP domain.
# Create an ISP domain named triple.
[Switch] domain triple
# Configure the default AAA methods for all types of users in the domain.
[Switch-isp-triple] authentication default radius-scheme rs1
[Switch-isp-triple] authorization default radius-scheme rs1
[Switch-isp-triple] accounting default radius-scheme rs1
[Switch-isp-triple] quit
# Configure domain
triple
as the default domain. If a username input by a user includes no ISP domain
name, the authentication scheme of the default domain is used.
[Switch] domain default enable triple
Verification
User
userdot
uses the 802.1X client to initiate authentication. After inputting the correct username and
password, the user can pass 802.1X authentication. Web user
userpt
uses a web browser to access an
external
network.
The
web
request
is
redirected
to
the
authentication
page
http://4.4.4.4/portal/logon.htm. After inputting the correct username and password, the web user can
pass portal authentication. The printer can pass MAC authentication after being connected to the
network.
Use the
display connection
command to view connection information about online users.
[Switch] display connection
Slot: 1
Index=30 , Username=userpt@triple
IP=192.168.1.2
IPv6=N/A
MAC=0015-e9a6-7cfe
Index=31 , Username=userdot@triple