设备功能是否必须具体配置配置说明注意事项举例参数说明
核心(N18K)配置用户定期同步snmp-server host (radius ip) informs version 2c (key)为了防止SAM上有存在因为异常情况导致的用户无法下线情况,SAM每天凌晨2点会自动与NAS上在线用户进行核对,删除假在线的用户信息 snmp-server host 202.204.193.23 informs version 2c ruijieradius ipIP address of radius server
keySNMPv2c community string
接口索引唯一性snmp-server if-index persist每个端口的接口索引都是唯一,可以通过show interface查看(Index字段),当有多张线卡和AP口时(先插入1张,配置AP口,再插入1张),设备重启后,可能会导致设备接口索引发生变化,导致SAM上的区域划分功能失效,建议开启接口索引唯一。 snmp-server if-index persist 
配置DHCP snoopingip dhcp snooping  monitor
dhcp snooping  monitor开关,极简中场景主要作用为,无感知认证的带上IP地址。这两种认证的IP地址从dhcp snooping表中获得
 ip dhcp snooping  monitor 
认证基本信息 aaa new-model  
aaa accounting network (list name) start-stop group (group name)
aaa authentication dot1x (
list name) group (group name
aaa authentication web-auth (
list name) group (group name)
aaa authentication login default local

aaa group server radius (
group name)     
  server (
radius ip)
radius-server host (
radius ip) key 7 (radius key)

aaa accounting update periodic 30
aaa accounting update

aaa authorization ip-auth-mode mixed
no aaa log enable

ip radius source-interface (
radius interface)
ip portal source-interface (
portal interface)

radius-server attribute nas-port-id format qinq
aaaradius-server的通用命令,可参考
注意事项1:ip portal source-interface和ip radius source-interface的接口IP地址,必须和radius或者eportal一致

aaa new-model  
aaa accounting network sam start-stop group sam
aaa authentication dot1x 
sam group sam
aaa authentication web-auth 
sam group sam
aaa authentication login default local

aaa group server radius 
sam     
  server 
202.204.193.23
radius-server host 
202.204.193.23 key 7 184308704078

aaa accounting update periodic 30
aaa accounting update

aaa authorization ip-auth-mode mixed
no aaa log enable

ip portal source-interface 
TenGigabitEthernet 8/48
ip radius source-interface 
TenGigabitEthernet 8/48
or
ip portal source-interface 
vlan 60
ip radius source-interface
 vlan 60
list nameNamed aaa(accounting\authentica\authorization) list
group name
Group name
radius ip
IP address of radius server
radius key
The HIDDEN server key
portal interface
Specify interface for PORTAL device
radius interface
Specify interface for RADIUS device
web认证web认证 web-auth template eportalv2   
ip (portal ip)
url (
web url)
authentication (
list name)
accounting (
list name)

web-auth portal key (
portal key)

web认证通用模板authentication (list name)
accounting (list name)
此处的list name需要和aaa配置的list name一致
web-auth template eportalv2   
ip 202.204.193.33
url 
http://202.204.193.33/eportal/index.jsp
authentication 
sam
accounting
 sam

web-auth portal key 
university

portal ip:IP address of portal
web url:
Portal url
list name
Named aaa(accounting\authentica/authorization) list
portal key
Portal key string
相关接口命令 web-auth enable eportalv2web认证受控口配置通用模板在需要开启web认证的接口上开启web-auth enable eportalv2 
三层无感知认证(IPOE)三层无感知认证(IPOE) 
aaa authentication dot1x (list name) group (group name) 
ip dhcp snooping monitor
【无感知认证通用模板】
1、ip dhcp snooping monitor  //设备开启dhcp monitor功能,将所有的dhcp报文拷贝一份,生成dhcp snooping表项,之后由dhcp snooping提供表项通告。
2、ipoe-auth binding source interface xxx destination interface yyy//对于网关场景,DHCP-server在N18K上时,由于ipoe受控口与dhcp snooping表项学到的接口不一致,需要额外配置接口绑定,方可实现ipoe认证






1、IPOE无感知认证仅支持DHCP SERVER在N18K或者在N18K上联的场景。
2、除了AAA方法列表的相关配置之外,三层场景中,使用IPOE功能的时候,务必不要配置dot1x的相关配置。【重要】

aaa authentication dot1x default group radius
ip dhcp snooping monitor
ipoe-auth binding source interface xxx destination interface yyy
Source dhcp snooping学习到的接口,destinationipoe受控口
list name:Named aaa(accounting\authentica/authorization) list
相关接口命令 web受控口配置ipoe-auth enable无感知认证受控口配置模板在需要开启三层无感知认证的接口上,开启这个命令(web受控口)。
ipoe-auth enable 
远程认证远程认证  remote-auth server host ipv4 [port port-num]指定认证服务器IP(暂时只支持IPv4)和源端口,源端口可选,不配置的情况下允许所配置IP的任何端口连接设备,否则只接收指定IP+Port的连接,该配置作为远程认证的功能开关  remote-auth server host 192.168.1.13 
相关接口命令 remote-auth enable程认证需要默认阻断未认证用户的网关流量,下接远程认证用户的端口需要配置远程认证受控。开启受控后,阻断所有用户的网关流量,远程用户认证成功后,下发放通该用户IP的表项,远程认证支持路由口(包括AP路由口)和SVI口1、SAM添加设备时,需要沟上2009端口;
2、远程认证用户所对应的【接入控制管理】中“网关联动策略”需要配置相应的联动策略,远程认证用户在接入设备认证上后,SAM方可将用户信息同步至N18K
remote-auth enable
DHCP服务器基本信息 service dhcpdhcp服务总开关 service dhcp 
地址池 ip dhcp pool (address-pool-name)
 lease 0 2 0 
 network (
network-number(netmask)
 dns-server (
dns-server-address(more than one))
 default-router (
default-router-address
dhcp地址池通用模板这个命令可以配置多个地址池ip dhcp pool student
 lease 0 2 0 
 network 
110.65.90.0 255.255.255.0
 dns-server 
202.116.32.254 222.200.129.134
 default-router 
110.65.90.254
address-pool-name:Name of address pool
network-number:Network number in dotted-decimal notation
netmask:Network mask
dns-server-address:IP address of DNS server
default-router-address:IP address of Router
DHCP排斥地址 ip dhcp excluded-address (excluded-ip-address)排斥地址的网段不进行dhcp分配这个地址可以配置多个ip dhcp excluded-address 222.201.89.1excluded-ip-addressExcluded IP address
DHCP中继 service dhcp
ip helper-address (dhcp server ip)
  service dhcp
ip helper-address 222.201.89.3
dhcp server ipIP address of dhcp server
PORTAL逃生 web-auth portal-check interval 3 timeout 3 retransmit 10
web-auth portal-escape nokick
por web-auth portal-check interval 3 timeout 3 retransmit 10
web-auth portal-escape nokick
 
RADIUS逃生基本信息 radius-server host (radius ip) test username (user-name) idle-time 2 key (radius key)
radius-server dead-criteria time 120 tries 12
radius逃生配置指南,当radius服务器故障后,用户可以直接逃生
注意:最后一个key跟的是radius key,是设备和SAM服务器交互的密码,不是用户的账号密码
配置radius服务器并开启检测功能,配置使用用户名a去检测, idle-time为检测间隔。这里面测试用户的密码写死的是ruijie。
同时SAM上需要配置开通这个账户(用户名a,密码ruijie),否则会产生大量账号不存在的垃圾日志。
radius-server host 192.168.1.6 test username a idle-time 1 key ruijieradius ipIP address of radius server
user-name
The name of user
radius key
The HIDDEN server key
WEB认证下逃生(全局配置) web-auth radius-escapeweb认证下radius逃生必配命令WEB认证RADIUS逃生基于全局开启web-auth radius-escape 
三层无感知认证逃生(IPOE) ipoe-auth critical
ipoe-auth critical recovery action reinitialize
IPOE无感知radius逃生必配命令IPOE无感知认证radius逃生基于接口开启ipoe-auth critical
ipoe-auth critical recovery action reinitialize
 
不同IP弹不同portal服务器IP映射portal功能 web-auth mapping (mapping-name) ip-mapping (IP地址段) template(template-name)通过不同IP地址段进行ssid映射弹不同的port服务器(有些portal服务器性能低,通过该功能可以分担portal服务器性能)需要对当前所有的VLAN都进行映射web-auth mapping 1 ip-mapping 102.0.0.0 255.0.0.0 template t1mapping-nameWebauth mapping name
template-name
Name of ssid
相关接口命令 web-auth apply-mapping (mapping-name)将IP映射portal的策略,应用到接口上 web-auth apply-mapping 1
IPV6通用 address-bind ipv6-mode compatibleipv6兼容模式当ipv4认证成功后,ipv6即可联网address-bind ipv6-mode compatible 
MSC卡引流方式二层引流单卡 msc path vlan 2000 dev-input 设备下联端口 dev-output 设备上联端口 msc-input MSC卡进来端口 msc-output MSC卡出去端口用户从N18Kgi0/1口进来的流量引流到MSC卡的内联口AG1端口,转向MSC卡的内联口AG2,再由AG2口转向到N18Kgi0/2口转发出去注意:VSU场景,MSC卡分别在多个机箱,需要将VSU中默认开启的LFF(Local Forward First,本地有限转发)关掉,LFF包括ECMP和AP。
LFF的意思是,从本机箱进来的流量,如果本机箱有出口,则只从本机箱出去,避免大量流量过VSL链路
配置如下:
N18k(config)#sw virtual domain 1
N18k(config-vs-domain)#no sw virtual aggregateport-lff enable
Ruijie(config)#int ag 1
Ruijie(config)# aggregateport load-balance src-ip (msc卡上行方向使用源ip均衡)
Ruijie(config)#int ag 2
Ruijie(config)# aggregateport load-balance dst-ip (msc
卡下行方向使用目的ip均衡)
Ruijie(config)# msc path vlan 2 dev-input Ag4 dev-output Ag3 msc-input Ag1 msc-output Ag2(
设置引流方向)
 
多卡(AP均衡模式) aggregateport load-balance src-ip (msc卡上行方向使用源ip均衡)
aggregateport load-balance dst-ip (msc
卡下行方向使用目的ip均衡)
PBR引流方式PBR route-map (list1) permit 10
 match ip address msc_lan
 set ip policy load-balance src-ip
 set ip policy no-ttl-decrease
 set ip next-hop 192.168.10.2
 set ip next-hop 192.168.40.2
route-map  
(list2) permit 10
 match ip address msc_wan
 set ip policy load-balance dst-ip
 set ip policy no-ttl-decrease
 set ip next-hop 192.168.20.2
 set ip next-hop 192.168.50.2
ip access-list extended msc_lan
  10 permit ip any any
ip access-list extended msc_wan
  10 permit ip any any
配置PBR功能1、PBR acl配置要对称,经过MSC卡来回路径要一致route-map msc_lan permit 10
 match ip address msc_lan
 set ip policy load-balance src-ip
 set ip policy no-ttl-decrease
 set ip next-hop 192.168.10.2
 set ip next-hop 192.168.40.2
route-map msc_wan permit 10
 match ip address msc_wan
 set ip policy load-balance dst-ip
 set ip policy no-ttl-decrease
 set ip next-hop 192.168.20.2
 set ip next-hop 192.168.50.2
ip access-list extended msc_lan
  10 permit ip any any
ip access-list extended msc_wan
  10 permit ip any any
 
接口应用 ip policy route-map(list1/list2)接口上应用pbr ip policy route-map msc_lan 
IPFIX流量计费 web-auth acct-method ipfix
ip auth-flow export destination radius ip 4739
1web认证记账方式设置为IPFIX方式;
2将流量信息上传到SAM服务器
 web-auth acct-method ipfix
ip auth-flow export destination 192.168.1.6 4739
radius ip:IP address of radius server
免认证/免计费功能安全通道 mac access-list extended acl-list
permit host 8c70.5aee.a254 any etype-any
security global access-group (
acl-list)
基于ACL的免认证放行机制,可以基于全局或者端口安全通道ACL,permit生效,deny不生效mac access-list extended 700
permit host 8c70.5aee.a254 any etype-any
security global access-group 700
 
免认证站点 http redirect direct-arp 网关IP地址
http redirect direct-site 免认证站点的IP地址
1、放通目的IP地址,以及目的IP地址arp报文;
2、放通目的IP报文
 http redirect direct-arp 1.1.1.1
http redirect direct-site 1.1.1.1
 
免认证地址 web-auth direct-host 免认证IP地址或者网段有些业务的IP地址不需要认证即可访问 web-auth direct-host 1.1.1.1 
免计费网段 web-auth free-acct ip ip)(ip-maskIP地址段需要认证,但不计费 web-auth free-acct ip 1.1.1.1 255.255.255.0 
时间同步clock timezone dongba +8 0
ntp master 8
配置N18K时区与计费卡一致
N18K配置NTP master
 clock timezone dongba +8 0
ntp master 8
 
无MSC卡场景(普教) auth-route forward 切换为转发模式只支持1w终端用户auth-route forward  
无流量下线 offline-detect interval 15 threshold 0N18K通过IP地址表检测,配置时间内ip地址表用户表不存在;则判断为用户没有流量,将其下线建议将无流量下线的时间设置为15分钟,同时需要保证设备上的系统时间同服务器上的时间要一致offline-detect interval 15 threshold 0 
 
MSC时间同步sntp interval 60
sntp server IP
sntp enable
sntp server指向N18K设备该地址为N18K互联的管理口地址sntp interval 60
sntp server 30.1.1.2
sntp enable
 
PBR配置 route-map up permit 10
 match ip address up
 set ip next-hop 192.168.10.1
!
route-map down permit 10
 match ip address down
 set ip next-hop 192.168.20.1
!
ip access-list extended up
 10 permit ip any any 
!
ip access-list extended down
 10 permit ip any any 
三层引流时,通过PBR方式引流 route-map up permit 10
 match ip address up
 set ip next-hop 192.168.10.1
!
route-map down permit 10
 match ip address down
 set ip next-hop 192.168.20.1
!
ip access-list extended up
 10 permit ip any any 
!
ip access-list extended down
 10 permit ip any any 
interface Ten0/1
ip policy route-map up
interface Ten0/1
ip policy route-map down
 
MSC卡与N18K联动link-sam enable db-ip N18K-IP IP地址指定为N18K管理口IP地址 link-sam enable db-ip 192.168.30.1  
配置IPFIX策略ipfix enable
ipfix policy 1 acl 100 action (流量类型国际/国内/校内等)
ip access-list extended 100
    10 permit ip any any 
所有的流量都统计到国际流量目前只识别为国际/国内/校内三个ipfix enable
ipfix policy 1 acl 100 action foreign //该配置为国际流量,可修改
ip access-list extended 100
    10 permit ip any any