• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

h3c s5560 配置MAC地址认证

2021-01-14提问
  • 0关注
  • 1收藏,2257浏览
枯叶 零段
粉丝:0人 关注:0人

问题描述:

现在有4个VLAN

想配置成

2个vlan 进行mac地址认证,mac地址当做用户名和密码

当认证成功可以访问内网vlan 201 ,并且外网流量走172.16.1.3路由器

当认证不成功禁止访问其他VLAN ,外网流量 走172.16.1.2路由器

不知道 要怎么配置?

组网及组网描述:


最佳答案

已采纳
粉丝:7人 关注:1人

需要认证的VLAN的对应物理接口使能认证即可,然后参考下述配置配置即可,同时配置guest vlan

1.25.2  使用RADIUS服务器进行MAC地址认证配置举例

1. 组网需求

图1-5所示,用户主机Host通过端口GigabitEthernet1/0/1连接到设备上,设备通过RADIUS服务器对用户进行认证、授权和计费。

·     设备的管理者希望在端口GigabitEthernet1/0/1上对用户接入进行MAC地址认证,以控制其对Internet的访问。

·     RADIUS服务器和设备上均采用CHAP认证方法。

·     要求设备每隔180秒就对用户是否下线进行检测;并且当用户认证失败时,需等待180秒后才能对用户再次发起认证。

·     所有用户都属于域2000,认证时采用固定用户名账号,用户名为aaa,密码为123456。

2. 组网图

图1-5 启动MAC地址认证对接入用户进行RADIUS认证

3. 配置步骤

(1)     配置RADIUS服务器,添加接入用户帐户:用户名为aaa,密码为123456,并保证用户的认证/授权/计费功能正常运行(略)

(2)     配置使用RADIUS服务器进行MAC地址认证

# 配置RADIUS方案。

<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

# 配置MAC地址认证的认证方法为CHAP。

[Device] mac-authentication authentication-method chap

# 配置ISP域的AAA方法。

[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

# 开启端口GigabitEthernet1/0/1的MAC地址认证。

[Device] interface gigabitethernet 1/0/1

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

[Device-GigabitEthernet1/0/1] quit

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

[Device] mac-authentication domain bbb

# 配置MAC地址认证的定时器。

[Device] mac-authentication timer offline-detect 180

[Device] mac-authentication timer quiet 180

# 配置MAC地址认证使用固定用户名账号:用户名为aaa,密码为明文123456。

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

# 开启全局MAC地址认证。

[Device] mac-authentication

4. 验证配置

# 显示MAC地址认证配置信息。

<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 guest VLAN    : 1000 s

   Authentication domain               : bbb

 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            : Not configured

   Auth-delay timer                 : Disabled

   Periodic reauth                  : Disabled

   Re-auth server-unreachable       : Logoff

   Guest VLAN                       : Not configured

   Guest VLAN reauthentication      : Enabled

     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

 

   Auto-tag feature                 : Disabled

   VLAN tag configuration ignoring  : Disabled

   Max online users                 : 4294967295

   Authentication attempts          : successful 1, failed 0

   Current online users             : 1

          MAC address       Auth state

          00e0-fc12-3456    Authenticated


3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置端口的MAC地址认证Guest VLAN。

mac-authentication guest-vlan guest-vlan-id

缺省情况下,未配置MAC地址认证的Guest VLAN。

不同的端口可以指定不同的MAC地址认证 Guest VLAN,一个端口最多只能指定一个MAC地址认证Guest VLAN。

(4)     配置设备对MAC地址认证Guest VLAN中的用户进行重新认证的时间间隔。

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

缺省情况下,设备对Guest VLAN中的用户进行重新认证的时间间隔为30秒。

s5560是不是直接可以配置RADIUS服务?

枯叶 发表时间:2021-01-14
2 个回答
粉丝:124人 关注:6人

您好,请知:

以下是MAC认证的配置举例,请参考:

1.23  MAC地址认证典型配置举例

1.23.1  本地MAC地址认证

1. 组网需求

图1-2所示,某子网的用户主机与设备的端口GigabitEthernet1/0/1相连接。

·            设备的管理者希望在端口GigabitEthernet1/0/1上对用户接入进行MAC地址认证,以控制它们对Internet的访问。

·            要求设备每隔180秒就对用户是否下线进行检测;并且当用户认证失败时,需等待180秒后才能对用户再次发起认证。

·            所有用户都属于ISP域bbb,认证时使用本地认证的方式。

·            使用用户的MAC地址作用户名和密码,其中MAC地址带连字符、字母小写。

2. 组网图

图1-2 启动MAC地址认证对接入用户进行本地认证

 

3. 配置步骤

添加网络接入类本地接入用户。本例中添加Host A的本地用户,用户名和密码均为Host A的MAC地址00-e0-fc-12-34-56,服务类型为lan-access

<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

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

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

配置ISP域,使用本地认证方法。

[Device] domain bbb

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

[Device-isp-bbb] quit

开启端口GigabitEthernet1/0/1的MAC地址认证。

[Device] interface gigabitethernet 1/0/1

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

[Device-GigabitEthernet1/0/1] quit

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

[Device] mac-authentication domain bbb

配置MAC地址认证的定时器。

[Device] mac-authentication timer offline-detect 180

[Device] mac-authentication timer quiet 180

配置MAC地址认证用户名格式:使用带连字符的MAC地址作为用户名与密码,其中字母小写。

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

开启全局MAC地址认证。

[Device] mac-authentication

4. 验证配置

#当用户接入端口GigabitEthernet1/0/1之后,可以通过执行display mac-authentication命令的显示信息看到Host A成功通过认证,处于上线状态,Host B没有通过认证,它的MAC地址被加入静默MAC列表。

1.23.2  使用RADIUS服务器进行MAC地址认证

1. 组网需求

图1-3所示,用户主机Host通过端口GigabitEthernet1/0/1连接到设备上,设备通过RADIUS服务器对用户进行认证、授权和计费。

·            设备的管理者希望在端口GigabitEthernet1/0/1上对用户接入进行MAC地址认证,以控制其对Internet的访问。

·            要求设备每隔180秒就对用户是否下线进行检测;并且当用户认证失败时,需等待180秒后才能对用户再次发起认证。

·            所有用户都属于域bbb,认证时采用固定用户名格式,用户名为aaa,密码为123456。

2. 组网图

图1-3 启动MAC地址认证对接入用户进行RADIUS认证

 

3. 配置步骤

说明

确保RADIUS服务器与设备路由可达,并成功添加了接入用户帐户:用户名为aaa,密码为123456。

 

配置RADIUS方案。

<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

配置ISP域的AAA方法。

[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

开启端口GigabitEthernet1/0/1的MAC地址认证。

[Device] interface gigabitethernet 1/0/1

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

[Device-GigabitEthernet1/0/1] quit

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

[Device] mac-authentication domain bbb

配置MAC地址认证的定时器。

[Device] mac-authentication timer offline-detect 180

[Device] mac-authentication timer quiet 180

配置MAC地址认证使用固定用户名格式:用户名为aaa,密码为明文123456。

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

开启全局MAC地址认证。

[Device] mac-authentication

4. 验证配置

可使用display mac-authentication命令来显示MAC地址配置信息。

1.23.3  下发ACL典型配置举例

1. 组网需求

图1-4所示,用户主机Host通过端口GigabitEthernet1/0/1连接到设备上,设备通过RADIUS服务器对用户进行认证、授权和计费,Internet网络中有一台FTP服务器,IP地址为10.0.0.1。现有如下组网需求:

·            在端口GigabitEthernet1/0/1上对用户接入进行MAC地址认证,以控制其对Internet的访问。认证时使用用户的源MAC地址做用户名和密码,其中MAC地址带连字符、字母小写。

·            当用户认证成功上线后,允许用户访问除FTP服务器之外的Internet资源。

2. 组网图

图1-4 下发ACL典型配置组网图

 

3. 配置步骤

说明

·         确保RADIUS服务器与设备路由可达。

·         由于该例中使用了MAC地址认证的缺省用户名和密码,即使用用户的源MAC地址做用户名与密码,因此还要保证RADIUS服务器上正确添加了接入用户帐户:用户名为00-e0-fc-12-34-56,密码为00-e0-fc-12-34-56。

·         指定RADIUS服务器上的授权ACL为设备上配置的ACL 3000。

 

(1)       配置授权ACL

配置ACL 3000,拒绝目的IP地址为10.0.0.1的报文通过。

<Sysname> system-view

[Sysname] acl number 3000

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

[Sysname-acl-adv-3000] quit

(2)       配置使用RADIUS服务器进行MAC地址认证

配置RADIUS方案。

[Sysname] radius scheme 2000

[Sysname-radius-2000] primary authentication 10.1.1.1 1812

[Sysname-radius-2000] primary accounting 10.1.1.2 1813

[Sysname-radius-2000] key authentication simple abc

[Sysname-radius-2000] key accounting simple abc

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

[Sysname-radius-2000] quit

配置ISP域的AAA方法。

[Sysname] domain 2000

[Sysname-isp-2000] authentication default radius-scheme 2000

[Sysname-isp-2000] authorization default radius-scheme 2000

[Sysname-isp-2000] accounting default radius-scheme 2000

[Sysname-isp-2000] quit

开启全局MAC地址认证特性。

[Sysname] mac-authentication

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

[Sysname] mac-authentication domain 2000

配置MAC地址认证用户名格式:使用带连字符的MAC地址做用户名与密码,其中字母小写。

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

开启指定端口的MAC地址认证特性。

[Sysname] interface gigabitethernet 1/0/1

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

[Sysname-GigabitEthernet1/0/1] quit

4. 验证配置

显示MAC地址配置信息。

<Sysname> display mac-authentication

Global MAC authentication parameters:

   MAC authentication     : Disabled

   Username 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

   Authentication domain  : 2000

 Max MAC-auth users       : 4294967295 per slot

 Online MAC-auth users    : 2

 

 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

   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

 

   Max online users           : 4294967295

   Authentication attempts    : successful 1, failed 0

   Current online users       : 1

          MAC address       Auth state

          00e0-fc12-3456    Authenticated

 

用户通过ping FTP服务器,可以验证认证服务器下发的ACL 3000是否生效。

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),

 

 


枯叶 知了小白
粉丝:0人 关注:0人

本地MAC地址认证 与  使用RADIUS服务器进行MAC地址认证有什么区别


编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明