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

09-安全配置举例

目录

05-H3C_S12500-S端口安全配置举例

本章节下载 05-H3C_S12500-S端口安全配置举例  (416.4 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500-S/Configure/Typical_Configuration_Example/H3C_S12500-S_Example-R7150P02-6W100/09/201505/867849_30005_0.htm

05-H3C_S12500-S端口安全配置举例

H3C S12500-S端口安全典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

H3C_彩色.emf

 



1  简介

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

2  配置前提

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

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

3  使用限制

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

·     使能了端口安全相关功能的端口上不支持EVB功能。

·     当端口安全功能开启后,端口上的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  使用版本

本举例是在S12500-S-CMW710-R7150P02版本上进行配置和验证的。

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 ten-gigabitethernet 1/0/1

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

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

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

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

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

[Device-Ten-GigabitEthernet1/0/1] quit

[Device] port-security timer disableport 30

4.6  验证配置

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

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

Port security parameters:

   Port security           : Enabled

   AutoLearn aging time   : 30 min

   Disableport timeout    : 30 s

   MAC move                 : Denied

   Authorization fail     : Online

 NAS-ID profile is not configured

   OUI value list          :

 

 Ten-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 is not configured

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

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

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

[Device] interface ten-gigabitethernet 1/0/1

[Device-Ten-GigabitEthernet1/0/1] display this

 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-security enable

 port-security timer disableport 30

 port-security timer autolearn aging 30

#

interface Ten-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用户通过端口Ten-GigabitEthernet1/0/1接入Internet;

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

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

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

 

5.2  配置思路

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

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

5.3  使用版本

本举例是在S12500-S-CMW710-R7150P02版本上进行配置和验证的。

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 ten-gigabitethernet 1/0/1

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

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

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

[Device-Ten-GigabitEthernet1/0/1] quit

# 使能端口安全。

[Device] port-security enable

5.5  验证配置

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

[Device] display radius scheme radsun

RADIUS Scheme Name  : radsun

  Index : 1

  Primary Auth Server:

    Host name: Not configured

    IP  : 192.168.0.38                              Port: 1812

    State: Active

    VPN : Not configured

  Primary Acct Server:

    Host name: Not configured

    IP  : 192.168.0.38                              Port: 1813

    State: Active

    VPN : Not configured

 

  Accounting-On 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(minutes)        : 15

  NAS IP Address                                   : Not configured

  VPN                                                : Not configured

  User Name Format                                 : without-domain

  Data flow unit                                   : Million Byte

  Packet unit                                       : one

  Attribute 15 check-mode                         : Strict

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

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

Port security parameters:

   Port security            : Enabled

   AutoLearn aging time   : 0 min

   Disableport timeout    : 20 s

   MAC move                 : Denied

   Authorization fail     : Online

 NAS-ID profile is not configured

   OUI value list         :

   Index is 1,    OUI value is 123401

   Index is 2,    OUI value is 123402

   Index is 3,    OUI value is 123403

   Index is 4,    OUI value is 123404

   Index is 5,    OUI value is 123405

 

 Ten-GigabitEthernet1/0/1 is link-up

   Port mode                         : userLoginWithOUI

   NeedToKnow mode                  : Disabled

   Intrusion protection mode      : BlockMacAddress

   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 is not configured

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

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

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

MAC Address     VLAN ID   State           Port                  Aging

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

5.6  配置文件

#

 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 Ten-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

#

radius scheme system

 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所示,客户端通过端口Ten-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  使用版本

本举例是在S12500-S-CMW710-R7150P02版本上进行配置和验证的。

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 ServeriMC 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 ten-gigabitethernet 1/0/1

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

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

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

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

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

[Device-Ten-GigabitEthernet1/0/1] quit

# 使能端口安全。

[Device] port-security enable

6.5  验证配置

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

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

Port security parameters:

   Port security           : Enabled

   AutoLearn aging time   : 0 min

   Disableport timeout    : 20 s

   MAC move                 : Denied

   Authorization fail     : Online

 NAS-ID profile is not configured

   OUI value list          :

 

 Ten-GigabitEthernet3/0/48 is link-up

   Port mode                         : macAddressElseUserLoginSecure

   NeedToKnow mode                  : NeedToKnowOnly

   Intrusion protection mode      : NoAction

   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 is not configured      

# 查看MAC地址认证信息。

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

Global MAC authentication parameters:

   MAC authentication      : Enabled

   Username format         : Fixed account

           Username          : aaa

           Password          : ******

   Offline detect period  : 300 s

   Quiet period             : 60 s

   Server timeout           : 100 s

   Authentication domain  : sun

 Max MAC-auth users        : 4294967295 per slot

 Online MAC-auth users    : 3

 

 Silent MAC users:

          MAC address       VLAN ID  From port               Port index

 

Ten-GigabitEthernet1/0/1  is link-up

   MAC authentication         : Enabled

   Authentication domain      : Not configured

   Auth-delay timer           : Enabled

       Auth-delay period      : 60 s

   Re-auth server-unreachable : Logoff

   Guest VLAN                 : Not configured

   Critical VLAN              : Not configured

   Host mode                  : Single VLAN

   Max online users           : 4294967295

   Authentication attempts    : successful 3, failed 7

   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 ten-gigabitethernet 1/0/1

Global 802.1X parameters:

   802.1X authentication  : Enabled

   CHAP authentication    : Enabled

   Max-tx period          : 30 s

   Handshake period       : 15 s

   Quiet timer            : Disabled

       Quiet period       : 60 s

   Supp timeout           : 30 s

   Server timeout         : 100 s

   Reauth period          : 3600 s

   Max auth requests      : 2

 Max 802.1X users         : 4294967295 per slot

 Online 802.1X users      : 1

Ten-GigabitEthernet3/0/48  is link-up

   802.1X authentication      : Enabled

   Handshake                     : Enabled

   Handshake security          : Disabled

   Unicast trigger              : Disabled

   Periodic reauth              : Disabled

   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

   Re-auth server-unreachable : Logoff

   Max online users             : 4294967295

   SmartOn                        : Disabled

 

   EAPOL packets: Tx 16331, Rx 102

   Sent EAP Request/Identity packets : 16316

        EAP Request/Challenge packets: 6

        EAP Success packets: 4

        EAP Failure packets: 5

   Received EAPOL Start packets : 6

            EAPOL LogOff packets: 2

            EAP Response/Identity packets : 80

            EAP Response/Challenge packets: 6

            Error packets: 0

   Online 802.1X users: 1   

          MAC address         Auth state

          0002-0000-0011      Authenticated

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

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

6.6  配置文件

#

 mac-authentication domain sun

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

nyXOwZXTgiOBPd7+kSPClKm7JbZ1Rw==

#

 port-security enable

#

interface Ten-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

#

radius scheme system

 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  相关资料

·     H3C S12500-S系列交换机  安全配置指导-Release 7150P02

·     H3C S12500-S系列交换机  安全命令参考-Release 7150P02

 

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

新华三官网
联系我们