各位大佬,现在组网如下,路由器作为BRAS连接RA服务器,要做绑定静态公网IP给企业用户设备,有什么配置让RAD服务器或者路由器对这些公网IP进行监管,3A呢
我的想法是做PPPOE,公网DHCP地址池,地址池绑定企业用户拨号的MAC,还有其他办法吗
方案 | 适用场景 | 优点 | 缺点 |
|---|---|---|---|
PPPoE + RADIUS | 企业专线拨号接入 | 安全性高、认证可靠、支持3A完整 | 需要客户端支持PPPoE |
IPoE + RADIUS | 企业固定IP专线 | 无需客户端拨号、配置简单 | 基于端口/MAC认证,安全性稍低 |
Portal认证 | 临时访客接入 | 用户无需客户端、Web页面认证 | 不适合企业专线场景 |
# 1. 配置公网地址池
ip pool public-pool
gateway-list 111.8.0.1
network 111.8.0.0 mask 255.255.255.0
forbidden-ip 111.8.0.1
# 可以绑定特定MAC分配固定IP
static-bind ip-address 111.8.0.10 hardware-address 0001-0203-0405
static-bind ip-address 111.8.0.11 hardware-address 0002-0304-0506
# 2. 配置RADIUS方案
radius scheme radius1
primary authentication 10.0.0.1 # RADIUS服务器IP
primary accounting 10.0.0.1
key authentication cipher h3c@123
key accounting cipher h3c@123
user-name-format with-domain # 带域名认证
accounting-on enable # 启用计费
# 3. 配置认证域
domain public-domain
authentication ppp radius-scheme radius1
authorization ppp radius-scheme radius1
accounting ppp radius-scheme radius1
ip pool public-pool # 关联地址池
# 4. 配置虚拟模板(PPPoE服务器)
interface Virtual-Template 1
ppp authentication-mode chap domain public-domain
ip address 111.8.0.1 255.255.255.0
remote address pool public-pool
ppp ipcp dns 114.114.114.114
ppp keepalive interval 30
# 5. 在企业侧接口启用PPPoE
interface GigabitEthernet0/1 # 连接企业的接口
pppoe-server bind virtual-template 1
mac-authentication # 可选,MAC认证
# 6. NAT转换(如果需要)
acl advanced 3000
rule 0 permit ip source 111.8.0.0 0.0.0.255
interface GigabitEthernet0/2 # 外网接口
nat outbound 3000# /etc/freeradius/3.0/users
# 企业用户配置
"company1@public-domain" Cleartext-Password := "password123"
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-IP-Address = 111.8.0.10, # 分配固定IP
Framed-IP-Netmask = 255.255.255.255,
Acct-Interim-Interval = 600, # 计费间隔10分钟
# 计费策略
H3C-Input-Average-Rate = 10000000, # 10Mbps
H3C-Output-Average-Rate = 10000000
# 基于MAC地址的用户
"000102030405" Cleartext-Password := "macpass"
Calling-Station-Id = "00-01-02-03-04-05",
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-IP-Address = 111.8.0.10# 1. 配置接口认证
interface GigabitEthernet0/1 # 企业接入端口
ip subscriber l2-connected enable # 启用二层接入
ip subscriber authentication-method web # 或使用mac认证
# 2. 配置MAC认证
mac-authentication
domain public-domain
interface GigabitEthernet0/1
mac-authentication
mac-authentication domain public-domain
# 3. 配置RADIUS计费
radius session-control enable
radius accounting-on enable
# 4. Portal认证(可选,需要Web认证时)
portal enable
portal server portal1
ip 10.0.0.1 key cipher h3c@123
portal free-rule 0 source ip 10.0.0.0 0.0.0.255
interface GigabitEthernet0/1
portal apply server portal1
portal domain public-domain# 静态绑定MAC到IP(免认证)
interface GigabitEthernet0/1
ip source binding ip-address 111.8.0.10 mac-address 0001-0203-0405
ip source binding ip-address 111.8.0.11 mac-address 0002-0304-0506# RADIUS返回的属性
Framed-IP-Address = 111.8.0.10 # 分配固定IP
Framed-IP-Netmask = 255.255.255.255
Filter-Id = "acl-100" # 访问控制列表
Session-Timeout = 86400 # 会话超时时间
Idle-Timeout = 1800 # 空闲超时
# 华三专有属性
H3C-Input-Average-Rate = 10000000 # 入方向平均速率 10Mbps
H3C-Output-Average-Rate = 10000000 # 出方向平均速率
H3C-Input-Peak-Rate = 20000000 # 峰值速率
H3C-Output-Peak-Rate = 20000000# BRAS发送给RADIUS的计费信息
Acct-Status-Type = Start/Interim-Update/Stop
Acct-Session-Id = "唯一会话ID"
Acct-Session-Time = 3600 # 会话时长
Acct-Input-Octets = 1048576 # 输入字节数
Acct-Output-Octets = 2097152 # 输出字节数
Acct-Input-Packets = 1000 # 输入包数
Acct-Output-Packets = 2000 # 输出包数
Framed-IP-Address = 111.8.0.10 # 使用的IP地址
Calling-Station-Id = "MAC地址" # 用户MAC
NAS-IP-Address = 10.210.0.1 # BRAS地址# 查看用户在线状态
display ip subscriber session all
# 查看PPPoE用户
display ppp access-user
# 查看MAC认证用户
display mac-authentication
# 查看RADIUS服务器状态
display radius scheme radius1
# 查看计费信息
display connection statistics
display accounting session
# 调试认证过程
debugging radius all
debugging ppp all
terminal monitor
terminal debugging# 每个企业一个VLAN
vlan 100
name company1
interface GigabitEthernet0/1.100
ip address 111.8.0.1 255.255.255.252
qos car outbound cir 10000 # 限速10M
# RADIUS只做认证,IP静态配置# 启用DHCP Option 82
dhcp enable
dhcp server relay information enable
interface GigabitEthernet0/1
dhcp select relay
dhcp relay server-address 10.0.0.2 # DHCP服务器
# RADIUS根据Option 82信息分配策略
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论