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

ls-7003e

2024-01-31提问
  • 0关注
  • 0收藏,255浏览
粉丝:0人 关注:0人

问题描述:

如何设置mac地址池,如何设置mac全局认证,只有在mac地址池里面的电脑才能上网

组网及组网描述:

防火墙-核心-汇聚-接入

2 个回答
粉丝:137人 关注:8人

mac认证,参考:

1.26.1  本地MAC地址认证

1. 组网需求

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

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

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

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

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

2. 组网图

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

 

3. 配置步骤

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

<Device> system-view

[Device] local-user 08-00-27-12-34-56 class network

[Device-luser-network-08-00-27-12-34-56] password simple 08-00-27-12-34-56

[Device-luser-network-08-00-27-12-34-56] service-type lan-access

[Device-luser-network-08-00-27-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之后,可以通过如下显示信息看到Host A成功通过认证,处于上线状态,Host B没有通过认证,它的MAC地址被加入静默MAC列表。

<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 wired users           : 1

 

 Silent MAC users:

          MAC address       VLAN ID  From port               Port index

          0800-2711-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 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

 

   Guest VSI                        : Not configured

   Guest VSI reauthentication       : Enabled

   Guest VSI auth-period            : 30 s

   Critical VSI                     : Not configured

   Max online users                 : 256

   Authentication attempts          : successful 1, failed 0

   Current online users             : 1

          MAC address       Auth state

          0800-2712-3456    Authenticated

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

1. 组网需求

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

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

·     RADIUS服务器仅支持CHAP认证方法,需要配置设备的认证方法为CHAP。

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

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

2. 组网图

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

 

3. 配置步骤

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

(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,密码为明文123456TESTplat&!TESTplat&!。

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

# 开启全局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 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 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

 

   Guest VSI                        : Not configured

   Guest VSI reauthentication       : Enabled

   Guest VSI auth-period            : 30 s

   Critical VSI                     : Not configured

Max online users                 : 256

   Authentication attempts          : successful 1, failed 0

   Current online users             : 1

          MAC address       Auth state

          0800-2712-3456    Authenticated

暂无评论

粉丝:6人 关注:0人

可以参考下案例

1.26.1  本地MAC地址认证

1. 组网需求

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

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

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

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

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

2. 组网图

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

 

3. 配置步骤

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

<Device> system-view

[Device] local-user 08-00-27-12-34-56 class network

[Device-luser-network-08-00-27-12-34-56] password simple 08-00-27-12-34-56

[Device-luser-network-08-00-27-12-34-56] service-type lan-access

[Device-luser-network-08-00-27-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之后,可以通过如下显示信息看到Host A成功通过认证,处于上线状态,Host B没有通过认证,它的MAC地址被加入静默MAC列表。

<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 wired users           : 1

 

 Silent MAC users:

          MAC address       VLAN ID  From port               Port index

          0800-2711-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 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

 

   Guest VSI                        : Not configured

   Guest VSI reauthentication       : Enabled

   Guest VSI auth-period            : 30 s

   Critical VSI                     : Not configured

   Max online users                 : 256

   Authentication attempts          : successful 1, failed 0

   Current online users             : 1

          MAC address       Auth state

          0800-2712-3456    Authenticated

暂无评论

编辑答案

你正在编辑答案

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

分享扩散:

提出建议

    +

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

确定

亲~检测到您登陆的账号未在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. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

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

不规范转载

×

举报说明