简介
本文档介绍使用身份验证imsi-auth或身份验证msisdn-auth配置公司L2TP APN的预期结果。
问题:msisdn-auth和imsi-auth APN配置选项具有基于L2TP的APN的特定(非明显)结果
官方文件(第19版)规定:
imsi-auth -配置APN以基于其国际移动用户标识(IMSI)号尝试对用户进行身份验证。
msisdn-auth — 按照此命令的“使用”部分所述,配置APN以基于其移动站国际集成服务数字网络(MSISDN)号码尝试对用户进行身份验证。
配置示例:
apn ecs-apn
ims-auth-service IMSA
dns primary 192.168.1.128
dns secondary 192.168.1.129
ip access-group CSS_ACL in
ip access-group CSS_ACL out
authentication imsi-auth username-strip-apn prefer-chap-pco <<<<<<<<<<<<<<<<<<<<<<<<<<<
ip context-name Gi
tunnel l2tp peer-address 2.2.2.2 encrypted secret +A3oxne9nnyqmuz16dddqucwcqz92p2hi4t8z21nx3hmmpcgvh4ida preference 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<
tunnel l2tp peer-address 3.3.3.3 encrypted secret +A2dbz9joxajmv80jxmr5aycl1ka2s6nzmu7s2bte3nnz4o2hgkqxn preference 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<
loadbalance-tunnel-peers prioritized <<<<<<<<<<<<<<<<<<<<<<<<<<<
exit
lac-service LAC-SVC <<<<<<<<<<<<<<<<<<<<<<<<<<<
max-retransmission 1
retransmission-timeout-max 1
load-balancing prioritized
allow aaa-assigned-hostname
keepalive-interval 30
peer-lns 2.2.2.2 encrypted secret +A2q4fv7h5tum1a06vc2wblk9l7k3ma98myremkew1552c2vosy2h1
peer-lns 3.3.3.3 encrypted secret +A16gnydsddbqqx3okh7ln6jrwxz3s3u3lzvzo5bz0ccc0ztr0cvsh
bind address 1.1.1.1
#exit
预期行为是,如果为基于L2TP的APN配置了上述选项之一,则网关GPRS支持节点/
数据包数据网络(PDN)网关(GGSN/PGW)使用IMSI或MSISDN与L2TP网络服务器(LNS)进行PPP身份验证。
如果用户设备(UE)未提供用户名,选项将按预期运行。
ii
Friday April 07 2017
INBOUND>>>>> 09:57:08:270 Eventid:141004(3)
[PGW-S5/S2a/S2b]GTPv2C Rx PDU, from 213.151.233.172:35664 to 213.151.233.230:2123 (271)
TEID: 0x00000000, Message type: EGTP_CREATE_SESSION_REQUEST (0x20)
Sequence Number: 0x317962 (3242338)
GTP HEADER
Version number: 2
TEID flag: Present
Piggybacking flag: Not present
Message Length: 0x010B (267)
INFORMATION ELEMENTS
IMSI:
Type: 1 Length: 8 Inst: 0
Value: 231014450903030
Hex: 0100 0800 3201 4154 9030 30F0
MSISDN:
Type: 76 Length: 6 Inst: 0
Value: 421917667546
Hex: 4C00 0600 2491 7166 5764
MOBILE EQUIPMENT IDENTITY:
Type: 75 Length: 8 Inst: 0
Value: 3594050557927001
Hex: 4B00 0800 5349 5050 7529 0710
[…]
ACCESS POINT NAME:
Type: 71 Length: 38 Inst: 0
Value: ltpipsec.corp.test.mnc001.mcc231.gprs
Hex: 4700 2600 086C 7470 6970 7365 6304 636F
7270 0474 6573 7406 6D6E 6330 3031 066D
6363 3233 3104 6770 7273
SELECTION MODE:
Type: 128 Length: 1 Inst: 0
Value: MS provided APN,subscr not verified (0x01)
Hex: 8000 0100 01
PDN TYPE:
Type: 99 Length: 1 Inst: 0
Value: IPV4
Hex: 6300 0100 01
[…]
PCO:
Type: 78 Length: 32 Inst: 0
Container id: 0xC023 (PAP)
Container length: 0x06 (6)
Container content:
Auth-Req(0), Name=, Passwd=
Container id: 0x8021 (IPCP)
Container length: 0x10 (16)
Container content:
Conf-Req(0), Pri-DNS=0.0.0.0, Sec-DNS=0.0.0.0
Container id: 0x000D (IPv4-DNS-Server)
Container length: 0x00 (0)
Container content:
DNS Address: Request for IPv4 DNS Address allocation
Hex: 4E00 2000 80C0 2306 0100 0006 0000 8021
1001 0000 1081 0600 0000 0083 0600 0000
0000 0D00
[…]
Friday April 07 2017
<<<<OUTBOUND 09:57:08:295 Eventid:25001(0)
PPP Tx PDU (20)
PAP 20: Auth-Req(1), Name=421917667546, Passwd= <-- username is replaced with MSISDN as the APN is configured with “msisdn-auth”
如果UE提供了用户名,该选项将不起作用。在这种情况下,GGSN/PGW发送在APN内配置的用户名和密码。
如果没有配置
Friday April 07 2017
INBOUND>>>>> 09:47:51:254 Eventid:141004(3)
[PGW-S5/S2a/S2b]GTPv2C Rx PDU, from 213.151.233.172:35824 to 213.151.233.230:2123 (279)
TEID: 0x00000000, Message type: EGTP_CREATE_SESSION_REQUEST (0x20)
Sequence Number: 0x5C4D6C (6049132)
GTP HEADER
Version number: 2
TEID flag: Present
Piggybacking flag: Not present
Message Length: 0x0113 (275)
INFORMATION ELEMENTS
IMSI:
Type: 1 Length: 8 Inst: 0
Value: 231014450903030
Hex: 0100 0800 3201 4154 9030 30F0
MSISDN:
Type: 76 Length: 6 Inst: 0
Value: 421917667546
Hex: 4C00 0600 2491 7166 5764
MOBILE EQUIPMENT IDENTITY:
Type: 75 Length: 8 Inst: 0
Value: 3594050557927001
Hex: 4B00 0800 5349 5050 7529 0710
[..]
PCO:
Type: 78 Length: 40 Inst: 0
Container id: 0xC023 (PAP)
Container length: 0x0E (14)
Container content:
Auth-Req(0), Name=null, Passwd=null
Container id: 0x8021 (IPCP)
Container length: 0x10 (16)
Container content:
Conf-Req(0), Pri-DNS=0.0.0.0, Sec-DNS=0.0.0.0
Container id: 0x000D (IPv4-DNS-Server)
Container length: 0x00 (0)
Container content:
DNS Address: Request for IPv4 DNS Address allocation
Hex: 4E00 2800 80C0 230E 0100 000E 046E 756C
6C04 6E75 6C6C 8021 1001 0000 1081 0600
0000 0083 0600 0000 0000 0D00
[…]
Friday April 07 2017
<<<<OUTBOUND 09:47:51:334 Eventid:25001(0)
PPP Tx PDU (16)
PAP 16: Auth-Req(1), Name=null, Passwd=null <-- username is the same as in the APN
解决方案
观察到的行为应符合设计要求。
当没有传入协议配置选项(PCO)用户名时,将使用身份验证imsi-auth username-strip-apn prefer-chap-pco(或authentication msisdn-auth username-strip-apn prefer-chap-pco)配置。
以下是网络访问标识符(NAI)构造配置的优先顺序:
- 如果在APN内配置了出站用户名<1-128 char string>,则此配置会覆盖所有其他配置/IE,并以PAP/CHAP请求发送。
- 如果UE发送PCO用户名/口令,则从UE发送该用户名/口令,在口令验证协议/质询握手验证协议(PAP/CHAP)请求中发送到LNS。
- 如果没有从UE发送用户名,则默认将msisdn/imsi@APN作为用户名在PAP/CHAP请求中发送。
- 此外,此CLI - authentication msisdn/imsi-auth username-strip-apn 可用于删除APN,并仅在PAP/CHAP请求中发送msisdn/imsi。
请注意,如果身份验证由Radius(本地)完成,IMSI(或MSISDN)将按照预期在访问请求消息中发送。
此外,在L2TP场景中,如果身份验证由RADIUS(在LAC端)完成,则预期用户名(IMSI或MSISDN)在Access-Request消息中可见,但在LNS的Auth-Req中不可见。