• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C 园区盒式交换机典型配置举例-6W100

目录

32-端口安全配置举例

本章节下载 32-端口安全配置举例  (581.83 KB)

docurl=/cn/Service/Document_Software/Document_Center/Home/Switches/00-Public/Configure/Typical_Configuration_Example/H3C_CE-B70D022-6W100/202012/1371457_30005_0.htm

32-端口安全配置举例


1  简介

本文档介绍端口安全的配置举例。

端口安全通过对已有的802.1X认证和MAC地址认证进行融合和扩充,在端口上为使用不同认证方式的用户提供基于MAC地址的网络接入控制。

端口安全的主要功能为:

·            通过检测端口收到的数据帧中的源MAC地址来控制非授权设备或主机对网络的访问。

·            通过检测从端口发出的数据帧中的目的MAC地址来控制对非授权设备的访问。

·            通过定义各种端口安全模式,控制端口上的MAC地址学习或定义端口上的组合认证方式,让设备学习到合法的源MAC地址,以达到相应的网络管理效果。

其中端口安全模式分为两大类:控制MAC学习类和认证类。

·            控制MAC学习类:无需认证,包括端口自动学习MAC地址和禁止MAC地址学习两种模式(例如举例中的autoLearn模式)。

·            认证类:利用MAC地址认证和802.1X认证机制来实现,包括单独认证和组合认证等多种模式(例如举例中的userLoginWithOUI模式、macAddressElseUserLoginSecure模式)。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文假设您已了解端口安全特性。

3  使用限制

·            如果已全局开启了802.1X或MAC地址认证功能,则无法使能端口安全功能。

·            当端口安全功能开启后,端口上的802.1X功能以及MAC地址认证功能将不能被手动开启,且802.1X端口接入控制方式和端口接入控制模式也不能被修改,只能随端口安全模式的改变由系统更改。

·            端口上有用户在线的情况下,关闭端口安全功能会导致端口上所有在线用户下线。

·            端口安全模式的配置与端口加入聚合组或业务环回组互斥。

·            当多个用户通过认证时,端口下所允许的最大用户数根据不同的端口安全模式,取端口安全所允许的最大MAC地址数与相应模式下允许认证用户数的最小值。例如,userLoginSecureExt模式下,端口下所允许的最大用户为配置的端口安全所允许的最大MAC地址数与802.1X认证所允许的最大用户数的最小值。

·            当端口安全已经使能且当前端口安全模式不是noRestrictions时,若要改变端口安全模式,必须首先执行undo port-security port-mode命令恢复端口安全模式为noRestrictions模式。

4  端口安全autoLearn模式配置举例

4.1  组网需求

图1所示,用户通过Device连接到网络。通过配置端口安全autolearn模式,实现对接入用户的控制,具体需求如下:

·            最多同时允许64个用户直接通过交换机接入Internet,无需进行认证;

·            当用户数量超过设定值后,新用户无法通过Device接入Internet。

图1 端口安全autoLearn模式组网图

 

4.2  配置思路

·            配置交换机与用户相连端口的安全模式为autolearn,允许用户自由接入。

·            为防止交换机与用户相连端口学习到的MAC地址的丢失,及安全MAC地址不老化会带来一些问题,需配置安全MAC地址并设定安全MAC地址老化时间(例如30分钟)。

·            配置最大安全MAC地址数为64,当安全MAC地址数量达到64后,停止学习;配置入侵检测特性方式为disableport-temporarily当再有新的MAC地址接入时,交换机与用户相连端口被暂时断开连接,30秒后自动恢复端口的开启状态。

4.3  适用产品及版本

表1 适用产品及版本

产品

软件版本

S5560X-EI系列

Release 63xx系列

S5560X-HI系列

Release 63xx系列

S5500V2-EI系列

Release 63xx系列

MS4520V2-30F

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列

S5000-EI系列

Release 63xx系列

MS4600系列

Release 63xx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5130S-HI系列

S5130S-EI系列

S5130S-SI系列

S5130S-LI系列

Release 63xx系列

S5120V2-SI系列

S5120V2-LI系列

Release 63xx系列

S3100V3-EI系列

S3100V3-SI系列

Release 63xx系列

S5110V2系列

Release 63xx系列

S5110V2-SI系列

Release 63xx系列

S5000V3-EI系列

Release 63xx系列

S5000E-X系列

Release 63xx系列

E128C

E152C

E500C系列

E500D系列

Release 63xx系列

MS4520V2系列(除MS4520V2-30F)

Release 63xx系列

MS4320V2系列

MS4300V2系列

MS4320系列

MS4200系列

Release 63xx系列

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

Release 63xx系列

WAS6000系列

Release 63xx系列

 

4.4  配置注意事项

当端口工作于autoLearn模式时,无法更改端口安全允许的最大MAC地址数。

4.5  配置步骤

# 使能端口安全。

<Device> system-view

[Device] port-security enable

# 设置安全MAC地址的老化时间为30分钟。

[Device] port-security timer autolearn aging 30

# 设置端口安全允许的最大安全MAC地址数为64。

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] port-security max-mac-count 64

# 设置端口安全模式为autoLearn。

[Device-GigabitEthernet1/0/1] port-security port-mode autolearn

# 设置触发入侵检测特性后的保护动作为暂时关闭端口,关闭时间为30秒。

[Device-GigabitEthernet1/0/1] port-security intrusion-mode disableport-temporarily

[Device-GigabitEthernet1/0/1] quit

[Device] port-security timer disableport 30

4.6  验证配置

# 上述配置完成后,可以使用display port-security interface命令查看端口安全的配置情况。

[Device] display port-security interface gigabitethernet 1/0/1

Global port security parameters:

   Port security          : Enabled

   AutoLearn aging time   : 30 min

   Disableport timeout    : 30 s

   Blockmac timeout       : 180 s

   MAC move               : Denied

   Authorization fail     : Online

   NAS-ID profile         : Not configured

   Dot1x-failure trap     : Disabled

   Dot1x-logon trap       : Disabled

   Dot1x-logoff trap      : Disabled

   Intrusion trap         : Disabled

   Address-learned trap   : Disabled

   Mac-auth-failure trap  : Disabled

   Mac-auth-logon trap    : Disabled

   Mac-auth-logoff trap   : Disabled

   Open authentication    : Disabled

   OUI value list         :

 

 GigabitEthernet1/0/1 is link-up

   Port mode                      : autoLearn

   NeedToKnow mode                : Disabled

   Intrusion protection mode      : DisablePortTemporarily

   Security MAC address attribute

       Learning mode              : Sticky

       Aging type                 : Periodical

   Max secure MAC addresses       : 64

   Current secure MAC addresses   : 5

   Authorization                  : Permitted

   NAS-ID profile                 : Not configured

   Free VLANs                     : Not configured

   Open authentication           : Disabled

   MAC-move VLAN check bypass     : Disabled

可以看到端口安全所允许的最大安全MAC地址数为64,端口模式为autoLearn,入侵检测保护动作为DisablePortTemporarily,入侵发生后端口被禁用时间为30秒。

配置生效后,端口允许地址学习,学习到的MAC地址数可在上述显示信息的“Current secure MAC addresses”字段查看到。

# 具体的MAC地址信息可以在二层以太网接口视图下用display this命令查看。

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] display this

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port-security intrusion-mode disableport-temporarily

 port-security max-mac-count 64

 port-security port-mode autolearn

 port-security mac-address security sticky 00e0-fc00-5920 vlan 1

 port-security mac-address security sticky 00e0-fc00-592a vlan 1

 port-security mac-address security sticky 00e0-fc00-592b vlan 1

 port-security mac-address security sticky 00e0-fc00-592c vlan 1

 port-security mac-address security sticky 00e0-fc00-592d vlan 1

#

# 当学习到的MAC地址数达到64后,用命令display port-security interface可以看到端口模式变为secure,再有新的MAC地址到达将触发入侵保护,可以通过命令display interface看到此端口关闭。30秒后,端口状态恢复。此时,如果手动删除几条安全MAC地址后,端口安全的状态重新恢复为autoLearn,可以继续学习MAC地址。

4.7  配置文件

说明

部分交换机的配置文件中会显示port link-mode bridge命令,请以实际情况为准。

 

#

 port-security enable

 port-security timer disableport 30

 port-security timer autolearn aging 30

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port-security intrusion-mode disableport-temporarily

 port-security max-mac-count 64

 port-security port-mode autolearn

#

5  端口安全userLoginWithOUI模式配置举例

5.1  组网需求

图2所示,用户Host(已安装802.1X客户端软件)和打印机Printer通过交换机Device连接到网络,交换机通过RADIUS服务器对用户进行身份认证,如果认证成功,用户被授权允许访问Internet资源。IP地址为192.168.0.38的RADIUS服务器作为认证服务器和计费服务器,认证/计费共享密钥为expert。

通过配置端口安全userLoginWithOUI模式,实现对接入用户的控制,具体需求如下:

·            所有接入用户都使用ISP域sun的认证/授权/计费方法;

·            最多允许一个802.1X用户通过端口GigabitEthernet1/0/1接入Internet;

·            允许打印机通过与交换机相连端口实现与Internet资源正常连接;

·            当有非法用户接入时,触发入侵检测,将非法报文丢弃(不对端口进行关闭)。

图2 端口安全userLoginWithOUI模式组网图

 

5.2  配置思路

·            配置交换机与用户端相连的端口安全模式为userLoginWithOUI,即:该端口最多只允许一个802.1X认证用户接入,还允许一个指定OUI的源MAC地址的报文认证通过。为userLoginWithOUI端口安全模式配置5个OUI值(对应不同厂商的打印机MAC地址的OUI)。

·            配置端口安全的入侵检测功能:当交换机与用户端相连的端口接收到非法报文后,触发入侵检测,将非法报文丢弃,同时将其源MAC地址加入阻塞MAC地址列表中。

5.3  适用产品及版本

表2 适用产品及版本

产品

软件版本

S5560X-EI系列

Release 63xx系列

S5560X-HI系列

Release 63xx系列

S5500V2-EI系列

Release 63xx系列

MS4520V2-30F

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列

S5000-EI系列

Release 63xx系列

MS4600系列

Release 63xx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5130S-HI系列

S5130S-EI系列

S5130S-SI系列

S5130S-LI系列

Release 63xx系列

S5120V2-SI系列

S5120V2-LI系列

Release 63xx系列

S3100V3-EI系列

S3100V3-SI系列

Release 63xx系列

S5110V2系列

Release 63xx系列

S5110V2-SI系列

Release 63xx系列

S5000V3-EI系列

Release 63xx系列

S5000E-X系列

Release 63xx系列

E128C

E152C

E500C系列

E500D系列

Release 63xx系列

MS4520V2系列(除MS4520V2-30F)

Release 63xx系列

MS4320V2系列

MS4300V2系列

MS4320系列

MS4200系列

Release 63xx系列

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

Release 63xx系列

WAS6000系列

Release 63xx系列

 

5.4  配置步骤

5.4.1  配置RADIUS Server(iMC PLAT 7.0)

说明

下面以iMC为例(使用iMC版本为:iMC PLAT 7.0 (E0201)、iMC EIA 7.0 (E0201)),说明RADIUS server的基本配置。

 

#增加接入设备

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/接入设备管理/接入设备配置]菜单项,进入接入设备配置页面,在该页面中单击“增加”按钮,进入增加接入设备页面。

·            设置与Device交互报文时的认证、计费共享密钥为“expert”;

·            设置认证及计费的端口号分别为“1812”和“1813”;

·            选择业务类型为“LAN接入业务”;

·            选择接入设备类型为“H3C(General)”;

·            选择或手工增加接入设备,添加IP地址为192.168.0.34的接入设备;

·            其它参数采用缺省值,并单击<确定>按钮完成操作。

说明

添加的接入设备IP地址要与Device发送RADIUS报文的源地址保持一致。缺省情况下,设备发送RADIUS报文的源地址是发送RADIUS报文的接口IP地址。

·      若设备上通过命令nas-ip或者radius nas-ip指定了发送RADIUS报文的源地址,则此处的接入设备IP地址就需要修改并与指定源地址保持一致。

·      若设备使用缺省的发送RADIUS报文的源地址,例如,本例中为设备连接服务器端的接口的IP地址192.168.0.34,则此处接入设备IP地址就选择192.168.0.34。

 

图3 增加接入设备

 

 

# 增加接入策略

选择“用户”页签,单击导航树中的[接入策略管理/接入策略管理]菜单项,在该页面中单击<增加>按钮,进入增加接入策略配置页面。

·            接入策略名为“802.1X-auth”;

·            其他配置采用页面默认配置即可;

·            单击<确定>按钮完成操作。

 

# 增加服务配置。

选择“用户”页签,单击导航树中的[接入策略管理/接入服务管理]菜单项,在该页面中单击<增加>按钮,进入增加服务配置页面。

·            输入服务名为“802.1X-auth/acct”;

·            缺省接入策略为“802.1X-auth”;

·            选择计费策略为“不计费”;

·            本配置页面中还有其它服务配置选项,请根据实际情况选择配置;

·            单击<确定>按钮完成操作。

图4 增加服务配置

 

# 增加接入用户。

选择“用户”页签,单击导航树中的[接入用户管理/接入用户]菜单项,进入接入用户列表页面,在该页面中单击<增加>按钮,进入增加接入用户页面。

·            选择或者手工增加用户姓名为“hello”;

·            输入帐号名“802.1X”和密码802.1X;

·            选择该用户所关联的接入服务为“802.1X-auth/acct”;

·            本配置页面中还有其它服务配置选项,请根据实际情况选择配置;

·            单击<确定>按钮完成操作。

图5 增加接入用户

 

5.4.2  配置Device

说明

·      下述配置步骤包含了部分AAA/RADIUS协议配置命令,具体介绍请参见“安全配置指导”中的“AAA”。

·      保证客户端和RADIUS服务器之间路由可达。

 

·            配置AAA

# 创建RADIUS方案。并配置RADIUS方案主认证/计费服务器及其通信密钥。

<Device> system-view

[Device] radius scheme radsun

New RADIUS scheme.

[Device-radius-radsun] primary authentication 192.168.0.38

[Device-radius-radsun] primary accounting 192.168.0.38

[Device-radius-radsun] key authentication simple expert

[Device-radius-radsun] key accounting simple expert

#配置系统向RADIUS服务器重发报文的时间间隔为5秒,重发次数为5次,发送实时计费报文的时间间隔为15分钟,发送的用户名不带域名。

[Device-radius-radsun] timer response-timeout 5

[Device-radius-radsun] retry 5

[Device-radius-radsun] timer realtime-accounting 15

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

[Device-radius-radsun] quit

# 配置ISP域,并设置为系统缺省的ISP域。

[Device] domain sun

[Device-isp-sun] authentication lan-access radius-scheme radsun

[Device-isp-sun] authorization lan-access radius-scheme radsun

[Device-isp-sun] accounting lan-access radius-scheme radsun

[Device-isp-sun] quit

[Device] domain default enable sun

·            配置802.1X

# 配置802.1X的认证方式为CHAP。(该配置可选,缺省情况下802.1X的认证方式为CHAP)

[Device] dot1x authentication-method chap

·            配置端口安全

# 添加5个OUI值。(最多可添加16个,此处仅为示例。最终,端口仅允许一个与某OUI值匹配的用户通过认证)

[Device] port-security oui index 1 mac-address 1234-0100-1111

[Device] port-security oui index 2 mac-address 1234-0200-1111

[Device] port-security oui index 3 mac-address 1234-0300-1111

[Device] port-security oui index 4 mac-address 1234-0400-1111

[Device] port-security oui index 5 mac-address 1234-0500-1111

# 设置端口安全模式为userLoginWithOUI。

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] port-security port-mode userlogin-withoui

# 设置触发入侵检测功能后,将非法报文丢弃,同时将其源MAC地址加入阻塞MAC地址列表中。

[Device-GigabitEthernet1/0/1] port-security intrusion-mode blockmac

[Device-GigabitEthernet1/0/1] quit

# 使能端口安全。

[Device] port-security enable

5.5  验证配置

# 查看名称为radsun的RADIUS方案的配置信息。

[Device] display radius scheme radsun

Total 1 RADIUS schemes

 

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

RADIUS scheme name: radsun

  Index: 0

  Primary authentication server:

    Host name: Not configured

    IP   : 192.168.0.38                             Port: 1812

    VPN  : Not configured

    State: Active

    Test profile: Not configured

    Weight: 0

  Primary accounting server:

    Host name: Not configured

    IP   : 192.168.0.38                             Port: 1813

    VPN  : Not configured

    State: Active

    Weight: 0

  Accounting-On function                     : Disabled

    extended function                        : Disabled

    retransmission times                     : 50

    retransmission interval(seconds)         : 3

  Timeout Interval(seconds)                  : 5

  Retransmission Times                       : 5

  Retransmission Times for Accounting Update : 5

  Server Quiet Period(minutes)               : 5

  Realtime Accounting Interval(seconds)      : 900

  Stop-accounting packets buffering          : Enabled

    Retransmission times                     : 500

  NAS IP Address                             : Not configured

  VPN                                        : Not configured

  User Name Format                           : without-domain

  Data flow unit                             : Byte

  Packet unit                                : One

  Attribute 15 check-mode                    : Strict

  Attribute 25                               : Standard

  Attribute Remanent-Volume unit             : Kilo

  server-load-sharing                        : Disabled

  Attribute 31 MAC format                    : HH-HH-HH-HH-HH-HH

  Stop-accounting-packet send-force          : Disabled

  Reauthentication server selection          : Reselect

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

# 查看端口安全的配置信息。

[Device] display port-security interface gigabitethernet 1/0/1

Global port security parameters:

   Port security          : Enabled

   AutoLearn aging time   : 0 min

   Disableport timeout    : 20 s

   Blockmac timeout       : 180 s

   MAC move               : Denied

   Authorization fail     : Online

   NAS-ID profile         : Not configured

   Dot1x-failure trap     : Disabled

   Dot1x-logon trap       : Disabled

   Dot1x-logoff trap      : Disabled

   Intrusion trap         : Disabled

   Address-learned trap   : Disabled

   Mac-auth-failure trap  : Disabled

   Mac-auth-logon trap    : Disabled

   Mac-auth-logoff trap   : Disabled

   Open authentication    : Disabled

   OUI value list         :

       Index :  1       Value : 123401

       Index :  2       Value : 123402

       Index :  3       Value : 123403

       Index :  4       Value : 123404

       Index :  5       Value : 123405

 

 GigabitEthernet1/0/1 is link-up

   Port mode                      : userLoginWithOUI

   NeedToKnow mode                : Disabled

   Intrusion protection mode      : NoAction

   Security MAC address attribute

       Learning mode              : Sticky

       Aging type                 : Periodical

   Max secure MAC addresses       : Not configured

   Current secure MAC addresses   : 0

   Authorization                  : Permitted

   NAS-ID profile                 : Not configured

   Free VLANs                     : Not configured

   Open authentication           : Disabled

   MAC-move VLAN check bypass     : Disabled

配置完成后,如果有802.1X用户上线,则可以通过上述显示信息看到当前端口保存的MAC地址数为1。还可以通过display dot1x命令查看该802.1X用户的在线情况。

# 可以通过display mac-address interface命令查看端口允许MAC地址与OUI值匹配的用户通过的信息。

[Device] display mac-address interface gigabitethernet 1/0/1

MAC Address      VLAN ID    State            Port/NickName            Aging

1234-0300-0011  1            Learned         GE1/0/1                  Y

5.6  配置文件

说明

部分交换机的配置文件中会显示port link-mode bridge命令,请以实际情况为准。

 

#

 port-security enable

 port-security oui index 1 mac-address 1234-0100-0000

 port-security oui index 2 mac-address 1234-0200-0000

 port-security oui index 3 mac-address 1234-0300-0000

 port-security oui index 4 mac-address 1234-0400-0000

 port-security oui index 5 mac-address 1234-0500-0000

#

interface GigabitEthernet1/0/1

 port link-mode bridge

port-security port-mode userlogin-withoui

port-security intrusion-mode blockmac

#

radius scheme radsun

 primary authentication 192.168.0.38

 primary accounting 192.168.0.38

 key authentication cipher $c$3$s9TAYm34R8sS5k/Cylg2sDm69ZRupMvGJg==

 key accounting cipher $c$3$UaUPGk8AfZAQLHFlbKNcEoM2HXGiuWowBQ==

 retry 5

 timer response-timeout 5

 timer realtime-accounting 15

 user-name-format without-domain

#

domain sun

 authentication lan-access radius-scheme radsun

 authorization lan-access radius-scheme radsun

 accounting lan-access radius-scheme radsun

#

domain default enable sun

#

6  端口安全macAddressElseUserLoginSecure模式配置举例

6.1  组网需求

图6所示,客户端通过端口GigabitEthernet1/0/1连接到Device上,Device通过RADIUS服务器对客户端进行身份认证。如果认证成功,客户端被授权允许访问Internet资源。通过配置端口安全macAddressElseUserLoginSecure模式,实现对接入用户的控制,具体需求如下:

·            可以有多个MAC认证用户接入;

·            802.1X用户请求认证时,先进行MAC地址认证,MAC地址认证失败,再进行802.1X认证。最多只允许一个802.1X用户接入;

·            上线的MAC地址认证用户和802.1X认证用户总和不能超过64个;

·            MAC地址认证设置用户名格式为固定用户名格式,用户名为aaa,密码为123456;

·            为防止报文发往未知目的MAC地址,启动ntkonly方式的Need To Know特性。

图6 端口安全macAddressElseUserLoginSecure模式组网图

 

 

6.2  配置思路

·            配置交换机与用户端相连的端口安全模式为macAddressElseUserLoginSecure,即:对于非802.1X报文进行MAC地址认证,对于802.1X报文先进行MAC地址认证,如果MAC地址认证失败再进行802.1X认证。

·            为实现通过端口安全的入侵检测功能限制认证端口出方向的报文转发。可配置NeedToKnow功能为ntkonly模式,即仅允许目的MAC地址为已通过认证的MAC地址的单播报文通过。

6.3  适用产品及版本

表3 适用产品及版本

产品

软件版本

S5560X-EI系列

Release 63xx系列

S5560X-HI系列

Release 63xx系列

S5500V2-EI系列

Release 63xx系列

MS4520V2-30F

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列

S5000-EI系列

Release 63xx系列

MS4600系列

Release 63xx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5130S-HI系列

S5130S-EI系列

S5130S-SI系列

S5130S-LI系列

Release 63xx系列

S5120V2-SI系列

S5120V2-LI系列

Release 63xx系列

S3100V3-EI系列

S3100V3-SI系列

Release 63xx系列

S5110V2系列

Release 63xx系列

S5110V2-SI系列

Release 63xx系列

S5000V3-EI系列

Release 63xx系列

S5000E-X系列

Release 63xx系列

E128C

E152C

E500C系列

E500D系列

Release 63xx系列

MS4520V2系列(除MS4520V2-30F)

Release 63xx系列

MS4320V2系列

MS4300V2系列

MS4320系列

MS4200系列

Release 63xx系列

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

Release 63xx系列

WAS6000系列

Release 63xx系列

 

6.4  配置步骤

6.4.1  配置RADIUS Server(iMC PLAT 7.0)

说明

下面以iMC为例(使用iMC版本为:iMC PLAT 7.0 (E0201) 、iMC EIA 7.0 (E0201)),说明RADIUS server的基本配置。

 

(1)       需要在RADIUS Server上增加“接入设备”,并创建802.1X认证相关的“接入策略”,“服务配置”及“用户”的信息。参见5.4.1  配置RADIUS Server(iMC PLAT 7.0)

(2)       需要在RADIUS Server上创建MAC地址认证相关的“接入策略”,“服务配置”及“用户”的信息。如下:

#增加接入策略

选择“用户”页签,单击导航树中的[接入策略管理/接入策略管理]菜单项,在该页面中单击<增加>按钮,进入增加接入策略配置页面。

·            接入策略名为“MAC-auth”

·            其他配置采用页面默认配置即可;

·            单击<确定>按钮完成操作。

 

# 增加服务配置。

选择“用户”页签,单击导航树中的[接入策略管理/接入服务管理]菜单项,在该页面中单击<增加>按钮,进入增加服务配置页面。

·            输入服务名为“MAC-auth/acct”;

·            缺省接入策略为“MAC-auth”;

·            选择计费策略为“不计费”;

·            本配置页面中还有其它服务配置选项,请根据实际情况选择配置;

·            单击<确定>按钮完成操作。

图7 增加服务配置

 

# 增加接入用户。

选择“用户”页签,单击导航树中的[接入用户管理/接入用户]菜单项,进入接入用户列表页面,在该页面中单击<增加>按钮,进入增加接入用户页面。

·            选择或者手工增加用户姓名为“hello2”;

·            输入帐号名“aaa”和密码123456;

·            选择该用户所关联的接入服务为“MAC-auth/acct”;

·            本配置页面中还有其它服务配置选项,请根据实际情况选择配置;

·            单击<确定>按钮完成操作。

图8 增加接入用户

 

6.4.2  配置Device

说明

保证接入用户和RADIUS服务器之间路由可达。

 

·            配置AAA

# 创建RADIUS方案。并配置RADIUS方案主认证/计费服务器及其通信密钥。

<Device> system-view

[Device] radius scheme radsun

New RADIUS scheme.

[Device-radius-radsun] primary authentication 192.168.0.38

[Device-radius-radsun] primary accounting 192.168.0.38

[Device-radius-radsun] key authentication simple expert

[Device-radius-radsun] key accounting simple expert

# 配置系统向RADIUS服务器重发报文的时间间隔为5秒,重发次数为5次,发送实时计费报文的时间间隔为15分钟,发送的用户名不带域名。

[Device-radius-radsun] timer response-timeout 5

[Device-radius-radsun] retry 5

[Device-radius-radsun] timer realtime-accounting 15

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

[Device-radius-radsun] quit

# 配置ISP域,并设置为系统缺省的ISP域。

[Device] domain sun

[Device-isp-sun] authentication lan-access radius-scheme radsun

[Device-isp-sun] authorization lan-access radius-scheme radsun

[Device-isp-sun] accounting lan-access radius-scheme radsun

[Device-isp-sun] quit

[Device] domain default enable sun

·            配置MAC地址认证

# 配置MAC地址认证的用户名为aaa,密码为123456。

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

# 配置MAC地址认证用户所使用的ISP域。

[Device] mac-authentication domain sun

·            配置802.1X认证

# 配置802.1X的认证方式为CHAP。(该配置可选,缺省情况下802.1X的认证方式为CHAP)

[Device] dot1x authentication-method chap

·            配置端口安全

# 设置端口安全允许的最大MAC地址数为64。

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] port-security max-mac-count 64

# 设置端口安全模式为macAddressElseUserLoginSecure。

[Device-GigabitEthernet1/0/1] port-security port-mode mac-else-userlogin-secure

# 设置端口Need To Know模式为ntkonly。

[Device-GigabitEthernet1/0/1] port-security ntk-mode ntkonly

[Device-GigabitEthernet1/0/1] quit

# 使能端口安全。

[Device] port-security enable

6.5  验证配置

# 查看端口安全的配置信息。

[Device] display port-security interface gigabitethernet 1/0/1

Global port security parameters:

   Port security          : Enabled

   AutoLearn aging time   : 30 min

   Disableport timeout    : 30 s

   Blockmac timeout       : 180 s

   MAC move               : Denied

   Authorization fail     : Online

   NAS-ID profile         : Not configured

   Dot1x-failure trap     : Disabled

   Dot1x-logon trap       : Disabled

   Dot1x-logoff trap      : Disabled

   Intrusion trap         : Disabled

   Address-learned trap   : Disabled

   Mac-auth-failure trap  : Disabled

   Mac-auth-logon trap    : Disabled

   Mac-auth-logoff trap   : Disabled

   Open authentication    : Disabled

   OUI value list         :

 

 GigabitEthernet1/0/1 is link-up

   Port mode                      : macAddressElseUserLoginSecure

   NeedToKnow mode                : NeedToKnowOnly

   Intrusion protection mode      : DisablePortTemporarily

   Security MAC address attribute

       Learning mode              : Sticky

       Aging type                 : Periodical

   Max secure MAC addresses       : 64

   Current secure MAC addresses   : 0

   Authorization                  : Permitted

   NAS-ID profile                 : Not configured

   Free VLANs                     : Not configured

   Open authentication            : Disabled

   MAC-move VLAN check bypass     : Disabled

# 查看MAC地址认证信息。

[Device] display mac-authentication interface gigabitethernet 1/0/1

Global MAC authentication parameters:

   MAC authentication                  : Enabled

   Authentication method               : PAP

   Username format                     : Fixed account

           Username                    : aaa

           Password                    : ******

   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               : sun

 Online MAC-auth wired user            : 3

 

 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

   Critical VLAN                    : Not configured

   Critical voice VLAN              : Disabled

   Host mode                        : Single VLAN

   Offline detection                : Enabled

   Authentication order             : Default

   User aging                       : Enabled

   Server-recovery online-user-sync : Enabled

 

   Guest VSI                        : Not configured

   Guest VSI auth-period            : 30 s

   Critical VSI                     : Not configured

   Auto-tag feature                 : Disabled

   VLAN tag configuration ignoring        : Disabled

   Max online users                 : 4294967295

   Authentication attempts          : successful 0, failed 0

   Current online users             : 3

          MAC address       Auth state

          1234-0300-0011   authenticated

          1234-0300-0012   authenticated

          1234-0300-0013   authenticated

# 查看802.1X认证信息。

[Device] display dot1x interface gigabitethernet 1/0/1

 Global 802.1X parameters:

   802.1X authentication                : Enabled

   CHAP authentication                  : Enabled

   Max-tx period                         : 30 s

   Handshake period                     : 15 s

   Offline detect period                : 300 s

   Quiet timer                           : Disabled

       Quiet period                      : 60 s

   Supp timeout                          : 30 s

   Server timeout                       : 100 s

   Reauth period                        : 3600 s

   Max auth requests                    : 2

   User aging period for Auth-Fail VLAN : 1000 s

   User aging period for Auth-Fail VSI  : 1000 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

   EAD assistant function               : Disabled

       EAD timeout                      : 30 min

   Domain delimiter                     : @

 Online 802.1X wired users              : 1

 

 GigabitEthernet1/0/1  is link-up

   802.1X authentication            : Enabled

   Handshake                        : Enabled

   Handshake reply                  : Disabled

   Handshake security               : Disabled

   Offline detection                : Disabled

   Unicast trigger                  : Disabled

   Periodic reauth                  : Disabled

   Port role                        : Authenticator

   Authorization mode               : Auto

   Port access control              : MAC-based

   Multicast trigger                : Enabled

   Mandatory auth domain            : Not configured

   Guest VLAN                       : Not configured

   Auth-Fail VLAN                   : Not configured

   Critical VLAN                    : Not configured

   Critical voice VLAN              : Disabled

   Add Guest VLAN delay             : Disabled

   Re-auth server-unreachable       : Logoff

   Max online users                 : 4294967295

   User IP freezing                 : Disabled

   Reauth period                    : 0 s

   Send Packets Without Tag         : Disabled

   Max Attempts Fail Number         : 0

   Guest VSI                        : Not configured

   Auth-Fail VSI                    : Not configured

   Critical VSI                     : Not configured

   Add Guest VSI delay              : Disabled

   User aging                       : Enabled

   Server-recovery online-user-sync : Enabled

   Auth-Fail EAPOL                  : Disabled

   Critical EAPOL                   : Disabled

 

   EAPOL packets: Tx 0, Rx 0

   Sent EAP Request/Identity packets : 0

        EAP Request/Challenge packets: 0

        EAP Success packets: 0

        EAP Failure packets: 0

   Received EAPOL Start packets : 0

            EAPOL LogOff packets: 0

            EAP Response/Identity packets : 0

            EAP Response/Challenge packets: 0

            Error packets: 0

   Online 802.1X users: 1

配置完成后,如果有用户认证上线,则可以通过上述显示信息看到当前端口上的用户认证信息。

# 此外,因为设置了Need To Know特性,目的MAC地址未知、广播和多播报文都被丢弃。

6.6  配置文件

说明

部分交换机的配置文件中会显示port link-mode bridge命令,请以实际情况为准。

 

#

 mac-authentication domain sun

 mac-authentication user-name-format fixed account aaa password cipher $c$3$HAlQ

nyXOwZXTgiOBPd7+kSPClKm7JbZ1Rw==

#

 port-security enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port-security ntk-mode ntkonly

 port-security max-mac-count 64

 port-security port-mode mac-else-userlogin-secure

#

radius scheme radsun

 primary authentication 192.168.0.38

 primary accounting 192.168.0.38

 key authentication cipher $c$3$s9TAYm34R8sS5k/Cylg2sDm69ZRupMvGJg==

 key accounting cipher $c$3$UaUPGk8AfZAQLHFlbKNcEoM2HXGiuWowBQ==

 retry 5

 timer response-timeout 5

 timer realtime-accounting 15

 user-name-format without-domain

#

domain sun

 authentication lan-access radius-scheme radsun

 authorization lan-access radius-scheme radsun

 accounting lan-access radius-scheme radsun

#

domain default enable sun

#

7  端口安全支持ClearPass服务器下发重定向URL配置举例

7.1  组网需求

图9所示,客户端通过端口GigabitEthernet1/0/1连接到Device上,Device通过RADIUS服务器(ClearPass服务器)对客户端进行身份认证。如果认证成功,客户端被授权允许访问Internet资源。通过配置端口安全macAddressElseUserLoginSecureExt模式,实现对接入用户的控制,具体需求如下:

·            可以有多个802.1X和MAC认证用户接入,但MAC地址认证优先级大于802.1X认证;

·            802.1X用户接入认证时,先进行MAC地址认证,如果MAC地址认证失败再进行802.1X认证;非802.1X用户直接进行MAC地址认证,认证成功后,服务器下发重定向URL;

·            MAC地址认证设置用户名格式为固定用户名格式。

图9 端口安支持ClearPass服务器下发重定向URL组网图

 

7.2  配置思路

·            配置交换机与用户端相连的端口安全模式为macAddressElseUserLoginSecureExt,即:端口同时处于macAddressWithRadius模式和userLoginSecure模式,但MAC地址认证优先级大于802.1X认证。允许端口下多个802.1X和MAC地址认证用户接入。非802.1X报文直接进行MAC地址认证;802.1X报文先进行MAC地址认证,如果MAC地址认证失败再进行802.1X认证。

·            为实现通过端口安全的入侵检测功能限制认证端口出方向的报文转发。可配置NeedToKnow功能为ntkonly模式,即仅允许目的MAC地址为已通过认证的MAC地址的单播报文通过。

7.3  适用产品及版本

表4 适用产品及版本

产品

软件版本

S5560X-EI系列

Release 63xx系列

S5560X-HI系列

Release 63xx系列

S5500V2-EI系列

Release 63xx系列

MS4520V2-30F

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列

S5000-EI系列

Release 63xx系列

MS4600系列

Release 63xx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5130S-HI系列

S5130S-EI系列

S5130S-SI系列

S5130S-LI系列

Release 63xx系列

S5120V2-SI系列

S5120V2-LI系列

Release 63xx系列

S3100V3-EI系列

S3100V3-SI系列

Release 63xx系列

S5110V2系列

Release 63xx系列

S5110V2-SI系列

Release 63xx系列

S5000V3-EI系列

Release 63xx系列

S5000E-X系列

Release 63xx系列

E128C

E152C

E500C系列

E500D系列

Release 63xx系列

MS4520V2系列(除MS4520V2-30F)

Release 63xx系列

MS4320V2系列

MS4300V2系列

MS4320系列

MS4200系列

Release 63xx系列

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

Release 63xx系列

WAS6000系列

Release 63xx系列

 

7.4  配置步骤

7.4.1  配置ClearPass服务器802.1X认证功能

说明

本举例使用的ClearPass服务器版本为CPPM-VM-x86_64-6.5.0.71095-ESX-CP-VA-500-ovf。在进行802.1X认证功能相关配置前,请先完成ClearPass服务器的安装和基础配置,包括部署模板、为虚拟机添加资源、配置ClearPass管理口IP地址(本例为192.168.0.38)、配置系统时区等,有关ClearPass的基础配置的详细介绍请参见服务器的相关手册。

 

(1)       登录ClearPass Policy Manager(简称为CPPM),单击导航树中的[配置/网络/设备]菜单项,选择网络设备,进入编辑设备详细信息页面。指定作为NAS的网络设备的IP地址(本例为192.168.0.34)、RADIUS共享密钥(本例为expert)、供应商名称等;开启RADIUS CoA功能,默认RADIUS CoA端口为3799。

(2)       单击导航树中的[配置/网络/设备组],添加设备组“Group1”,并进入编辑设备组页面,将设备IP地址(本例为192.168.0.34)加入到设备组中。

(3)       单击导航树中的[配置/身份/本地用户],添加用户“dot1x”,并进入编辑本地用户页面。配置本地用户密码为Abc123!,选择用户角色为缺省角色“Employee”。

(4)       单击导航树中的[配置/身份/角色映射],创建角色映射“dot1x-redirect-role-map”,默认角色为Employee。在“映射规则”页签中创建规则,将指定规则的用户加入到Employee角色中:

¡  类型:Radius:IETF

¡  名称:User-Name

¡  运算符:EQUALS

¡  值:dot1x

(5)       单击导航树中的[配置/强制执行/配置文件],创建配置文件“dot1x”,配置重定向URL(本例中重定向URL的地址为ClearPass服务器地址),以及服务器授权下发的ACL。下发ACL是为了允许访问重定向URL的报文通过,该ACL需在设备侧配置。

¡  url-redirect=https://192.168.0.38/guest/ciscowiredguest.php?mac=%{Connection:Client-Mac-Address-Colon}

¡  url-redirect-acl=3001

(6)       单击导航树中的[配置/强制执行/策略],添加强制执行策略“dot1x-redirect”,并将角色“Employee”与配置文件“dot1x”绑定。

¡  类型:Tips

¡  名称:Role

¡  运算符:EQUALS

¡  值:Employee

¡  强制执行配置文件:[RADIUS] dot1x

(7)       单击导航树中的[配置/服务],添加服务“dot1x-wired-service”,并将前面的配置项进行绑定。

¡  在“认证”页签,选择认证方法为PAP

¡  在“授权”页签,增加认证源“[Guest User Respository] [Local SQL DB]”

¡  在“角色”页签,选择角色映射策略“dot1x-redirect-role-map”

¡  在“强制执行”页签,选择强制执行策略“dot1x-redirect”

配置完成后,在“概要”页签查看绑定结果,并单击“保存”。

7.4.2  配置Device

说明

保证接入用户和Clearpass服务器之间路由可达。

 

·            配置AAA

# 创建RADIUS方案。并配置RADIUS方案主认证/计费服务器及其通信密钥。

<Device> system-view

[Device] radius scheme radsun

New RADIUS scheme.

[Device-radius-radsun] primary authentication 192.168.0.38

[Device-radius-radsun] primary accounting 192.168.0.38

[Device-radius-radsun] key authentication simple expert

[Device-radius-radsun] key accounting simple expert

# 配置系统向RADIUS服务器发送的用户名不带域名。

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

# 配置设备发送RADIUS报文使用的源IP地址。

[Device-radius-radsun] nas-ip 192.168.0.34

[Device-radius-radsun] quit

# 创建ISP域sun,配置域内lan-access类型用户的认证方法,并设置sun为系统缺省的ISP域。

[Device] domain sun

[Device-isp-sun] authentication lan-access radius-scheme radsun

[Device-isp-sun] authorization lan-access radius-scheme radsun

[Device-isp-sun] accounting lan-access radius-scheme radsun

[Device-isp-sun] quit

[Device] domain default enable sun

·            配置端口安全

# 全局开启端口安全功能,并设置端口GigabitEthernet1/0/1的端口安全模式为macAddressElseUserLoginSecureExt,并配置NTK特性。

[Device] port-security enable

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] port-security port-mode mac-else-userlogin-secure-ext

[Device-GigabitEthernet1/0/1] port-security ntk-mode ntkonly

[Device-GigabitEthernet1/0/1] quit

# 配置MAC地址认证用户名格式:用户名为dot1x,密码为明文的Abc123!。

[Device] mac-authentication user-name-format fixed account dot1x password simple Abc123!

# 配置802.1X的认证方式为PAP。

[Device] dot1x authentication-method pap

·            配置ACL,允许目的地址为重定向URL地址的报文通过,该ACL编号与ClearPass服务器下发的ACL一致。

[Device] acl advanced 3001

[Device-acl-ipv4-adv-3001] rule 0 permit ip destination 192.168.0.38 0

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

7.5  验证配置

# 查看端口安全的配置信息。

[Device] display port-security interface gigabitethernet 1/0/1

Global port security parameters:

   Port security          : Enabled

   AutoLearn aging time   : 0 min

   Disableport timeout    : 20 s

   Blockmac timeout       : 180 s

   MAC move               : Denied

   Authorization fail     : Online

   NAS-ID profile         : Not configured

   Dot1x-failure trap     : Disabled

   Dot1x-logon trap       : Disabled

   Dot1x-logoff trap      : Disabled

   Intrusion trap         : Disabled

   Address-learned trap   : Disabled

   Mac-auth-failure trap  : Disabled

   Mac-auth-logon trap    : Disabled

   Mac-auth-logoff trap   : Disabled

   Open authentication    : Disabled

   OUI value list         :

     

 GigabitEthernet1/0/1 is link-up

   Port mode                      : macAddressElseUserloginSecureExt

   NeedToKnow mode                : NeedToKnowOnly

   Intrusion protection mode      : NoAction

   Security MAC address attribute

       Learning mode              : Sticky

       Aging type                 : Periodical

   Max secure MAC addresses       : Not configured

   Current secure MAC addresses   : 0

   Authorization                  : Permitted

   NAS-ID profile                 : Not configured

   Free VLANs                     : Not configured

   Open authentication            : Disabled

   MAC-move VLAN check bypass     : Disabled

# 查看MAC地址认证信息。

[Device] display mac-authentication interface gigabitethernet 1/0/1

Global MAC authentication parameters:

   MAC authentication                  : Enabled

   Authentication method               : PAP

   Username format                     : Fixed account

           Username                    : dot1x

           Password                    : ******

   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               : sun

 Online MAC-auth wired 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            : sun

   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

   Server-recovery online-user-sync : Enabled

 

   Guest VSI                        : Not configured

   Guest VSI auth-period            : 30 s

   Critical VSI                     : Not configured

   Auto-tag feature                 : Disabled

   VLAN tag configuration ignoring        : Disabled

   Max online users                 : 4294967295

   Authentication attempts          : successful 5, failed 38

   Current online users             : 1

          MAC address       Auth state

          acf1-df6c-ff48    Authenticated

# 查看802.1X认证信息。

[Device] display dot1x interface gigabitethernet 1/0/1

Global 802.1X parameters:

   802.1X authentication                : Enabled

   PAP authentication                   : Enabled

   Max-tx period                        : 30 s

   Handshake period                     : 15 s

   Offline detect period                : 300 s

   Quiet timer                          : Disabled

       Quiet period                     : 60 s

   Supp timeout                         : 30 s

   Server timeout                       : 100 s

   Reauth period                        : 3600 s

   Max auth requests                    : 2

   User aging period for Auth-Fail VLAN : 1000 s

   User aging period for Auth-Fail VSI  : 1000 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

   EAD assistant function               : Disabled

       EAD timeout                      : 30 min

   Domain delimiter                     : @

 Online 802.1X wired users              : 0

 

 GigabitEthernet1/0/1  is link-up

   802.1X authentication            : Enabled

   Handshake                        : Enabled

   Handshake reply                  : Disabled

   Handshake security               : Disabled

   Offline detection                : Disabled

   Unicast trigger                  : Disabled

   Periodic reauth                  : Disabled

   Port role                        : Authenticator

   Authorization mode               : Auto

   Port access control              : MAC-based

   Multicast trigger                : Enabled

   Mandatory auth domain            : Not configured

   Guest VLAN                       : Not configured

   Auth-Fail VLAN                   : Not configured

   Critical VLAN                    : Not configured

   Critical voice VLAN              : Disabled

   Add Guest VLAN delay             : Disabled

   Re-auth server-unreachable       : Logoff

   Max online users                 : 4294967295

   User IP freezing                 : Disabled

   Reauth period                    : 0 s

   Send Packets Without Tag         : Disabled

   Max Attempts Fail Number         : 0

   Guest VSI                        : Not configured

   Auth-Fail VSI                    : Not configured

   Critical VSI                     : Not configured

   Add Guest VSI delay              : Disabled

   User aging                       : Enabled

   Server-recovery online-user-sync : Enabled

   Auth-Fail EAPOL                  : Disabled

   Critical EAPOL                   : Disabled

 

   EAPOL packets: Tx 165, Rx 0

   Sent EAP Request/Identity packets : 165

        EAP Request/Challenge packets: 0

        EAP Success packets: 0

        EAP Failure packets: 0

   Received EAPOL Start packets : 0

            EAPOL LogOff packets: 0

            EAP Response/Identity packets : 0

            EAP Response/Challenge packets: 0

            Error packets: 0

   Online 802.1X users: 0

# 配置完成后,如果有用户认证上线,则可以通过上述显示信息看到当前端口上的用户认证信息。

<Device>display mac-authentication connection

Total connections: 1

Slot ID: 2

User MAC address: acf1-df6c-ff48

Access interface: GigabitEthernet1/0/1

Username: dot1x

User access state: Successful

Authentication domain: sun

IPv4 address: 192.168.1.5

Initial VLAN: 4

Authorization untagged VLAN: N/A

Authorization tagged VLAN: N/A

Authorization VSI: N/A

Authorization ACL ID: 3001

Authorization user profile: N/A

Authorization CAR: N/A

Authorization URL: https://192.168.0.38/guest/ciscowiredguest.php?mac=ac:f1:df:6c:ff:48

Termination action: Default

Session timeout period: N/A

Online from: 2018/03/02 12:52:17

Online duration: 0h 11m 12s

此外,因为设置了Need To Know特性,目的MAC地址未知、广播和多播报文都被丢弃。

7.6  配置文件

说明

部分交换机的配置文件中会显示port link-mode bridge命令,请以实际情况为准。

 

#

 dot1x authentication-method pap

#

 mac-authentication user-name-format fixed account dot1x password cipher $c$3$HAlQ

nyXOwZXTgiOBPd7+kSPClKm7JbZ1Rw==

#

 port-security enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port-security ntk-mode ntkonly

 port-security port-mode mac-else-userlogin-secure-ext

#

acl advanced 3001

 rule 0 permit ip destination 192.168.0.38 0

#

radius scheme radsun

 primary authentication 192.168.0.38

 primary accounting 192.168.0.38

 key authentication cipher $c$3$s9TAYm34R8sS5k/Cylg2sDm69ZRupMvGJg==

 key accounting cipher $c$3$UaUPGk8AfZAQLHFlbKNcEoM2HXGiuWowBQ==

 retry 5

 user-name-format without-domain

 nas-ip 192.168.0.34

#

domain sun

 authentication lan-access radius-scheme radsun

 authorization lan-access radius-scheme radsun

 accounting lan-access radius-scheme radsun

#

domain default enable sun

#

 

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们