本文档介绍由于GTP_CREATE_PDP_RESPONSE中未知数据包数据协议(PDP)类型或PDP类型错误而发生的IP地址分配故障。此问题在用作网关GPRS支持节点(GGSN)的思科聚合服务路由器(ASR)5x00系列上报告。
用户设备(UE)请求静态IP地址<x.x.x.x>。
用户从归属位置寄存器(HLR)/归属用户服务器(HSS)为特定接入点名称(APN)分配静态IP地址,因此不应向最终用户动态分配来自GGSN的IP地址。
从监控用户观察到此错误,导致建立会话失败:
#Monitor subscriber Imsi <> (enable options x, a, y, verbosity 4)
----------------------------------------------------------------------
Incoming Call:
----------------------------------------------------------------------
MSID/IMSI : <> Callid : <>
IMEI : <> MSISDN : <>
Username : <> SessionType : ggsn-pdp-type-ipv4
Status : Active Service Name: GGSN_SVC
Src Context : <>
----------------------------------------------------------------------
INBOUND>>>>> 21:50:38:497 Eventid:47000(3)
GTPC Rx PDU, from <IP>:34273 to <IP>:2123 (213)
TEID: 0x00000000, Message type: GTP_CREATE_PDP_CONTEXT_REQ_MSG
(0x10) >>>1st Create PDP Request
Sequence Number:: 0x7B16 (31510)
<<<<OUTBOUND 21:50:38:501 Eventid:47001(3)
GTPC Tx PDU, from <IP>:2123 to <IP>:34273 (103)
TEID:0x179E3645, Message type: GTP_CREATE_PDP_CONTEXT_RES_MSG
(0x11) >>>1st Create PDP Response
Sequence Number:: 0x7B16 (31510)
----------------------------------------------------------------------
(Switching Trace) - New Incoming Call:
----------------------------------------------------------------------
MSID/IMSI : <> Callid : <>
IMEI : <> MSISDN : <>
Username : <> SessionType : ggsn-pdp-type-ipv4
Status : Active Service Name: GGSN_SVC
Src Context : <>
----------------------------------------------------------------------
INBOUND>>>>> 21:50:41:346 Eventid:47000(3)
GTPC Rx PDU, from <IP>:34273 to <IP>:2123 (213)
TEID: 0x00000000, Message type: GTP_CREATE_PDP_CONTEXT_REQ_MSG
(0x10) >>>2nd PDP Request
Sequence Number:: 0x7B20 (31520)
***CONTROL*** 21:50:41:360 Eventid:10083
Sessmgr-80 Failed to allocate static IPv4 address <IP> mask 0xffffffff poolname
<Pool_name> for call (errcode=VPN_MSG_STATUS_DUPLICATE_INSTANCE)
<<<<OUTBOUND 21:50:41:363 Eventid:47001(3)
GTPC Tx PDU, from <IP>:2123 to <IP>:34273 (103)
TEID: 0x179E36C5, Message type: GTP_CREATE_PDP_CONTEXT_RES_MSG
(0x11) >>>2nd PDP Response
Sequence Number:: 0x7B20 (31520)
INBOUND>>>>> 21:58:04:155 Eventid:47000(3)
GTPC Rx PDU, from <IP>:34273 to <IP>:2123 (16)
TEID: 0x9D052050, Message type: GTP_DELETE_PDP_CONTEXT_REQ_MSG (0x14)
Sequence Number:: 0x801F (32799)
<<<<OUTBOUND 21:58:04:156 Eventid:47001(3)
GTPC Tx PDU, from <IP>:2123 to <IP>:34273 (14)
TEID: 0x179E36C5, Message type: GTP_DELETE_PDP_CONTEXT_RES_MSG (0x15)
Sequence Number:: 0x801F (32799)
***CONTROL*** 21:58:04:170 Eventid:10285
CALL STATS: msisdn <>, apn <apn_name>, imsi <>, Call-Duration(sec): 443
input pkts: 7 output pkts: 19
input bytes: 301 output bytes: 928
input bytes dropped: 0 output bytes dropped: 0
input pkts dropped: 0 output pkts dropped: 0
pk rate from user(bps): 0 pk rate to user(bps): 53
ave rate from user(bps): 0 ave rate to user(bps): 26
sust rate from user(bps): 0 sust rate to user(bps): 27
pk rate from user(pps): 0 pk rate to user(pps): 0
ave rate from user(pps): 0 ave rate to user(pps): 0
sust rate from user(pps): 0 sust rate to user(pps): 0
link online/active percent: 100
ipv4 bad hdr: 0 ipv4 ttl exceeded: 0
ipv4 fragments sent: 0 ipv4 could not fragment: 0
ipv4 input acl drop: 0 ipv4 output acl drop: 0
ipv4 bad length trim: 0
ipv4 input non-mip drop: 0 ipv4 output non-mip drop: 0
ipv4 input css drop: 0 ipv4 output css drop: 0
output gre xoff pkts drop: 0 output gre xoff bytes drop: 0
ipv4 output no-flow drop: 0
ipv4 source violations: 0 ipv4 early pdu drop: 0
ipv4 proxy-dns redirect: 0 ipv4 proxy-dns pass-thru: 0
ipv4 proxy-dns drop: 0 ipv4 proxy-dns redirect tcp connection: 0
ipv6 bad hdr: 0 ipv6 bad length trim: 0
ip source violation no acct: 0 ip source violation ignored: 0
dlnk pkts exceeded bw: 0 dlnk pkts violated bw: 0
uplnk pkts exceeded bw: 0 uplnk pkts violated bw: 0
Disconnect Reason: Remote-disconnect
Last Progress State: PDP-Type-IPv4-Connected
当出现错误“Failed to allocate static IPv4 address <x.x.x.x> mask 0xffffff poolname <pool_name > for call(errcode=VPN_MSG_STATUS_DUPLICATE_INSTANCE)”时,没有使用相同的移动站(MS)/UEIP地址。这是通过show subscribers ip-address <x.x.x.x>命令验证的。
[local]ASR5x00#show subscribers ip-address
No subscribers match the specified criteria
对于为同一用户成功创建的每个PDP,show subscriber ip-address <x.x.x.x>命令的输出显示,IP x.x.x.x已映射为相同的国际移动用户身份(IMSI)。
[local]ASR5x00# show subscribers ip-address
Sunday October 12 21:51:36 PDT 2014
+-----Access (S) - pdsn-simple-ip (M) - pdsn-mobile-ip (H) - ha-mobile-ip
| Type: (P) - ggsn-pdp-type-ppp (h) - ha-ipsec (N) - lns-l2tp
| (I) - ggsn-pdp-type-ipv4 (A) - asngw-simple-ip (G) - IPSG
| (V) - ggsn-pdp-type-ipv6 (B) - asngw-mobile-ip (C) - cscf-sip
| (z) - ggsn-pdp-type-ipv4v6
| (R) - sgw-gtp-ipv4 (O) - sgw-gtp-ipv6 (Q) - sgw-gtp-ipv4-ipv6
| (W) - pgw-gtp-ipv4 (Y) - pgw-gtp-ipv6 (Z) - pgw-gtp-ipv4-ipv6
| (@) - saegw-gtp-ipv4 (#) - saegw-gtp-ipv6 ($) - saegw-gtp-ipv4-ipv6
| (p) - sgsn-pdp-type-ppp (s) - sgsn (4) - sgsn-pdp-type-ip
| (6) - sgsn-pdp-type-ipv6 (2) - sgsn-pdp-type-ipv4-ipv6
| (L) - pdif-simple-ip (K) - pdif-mobile-ip (o) - femto-ip
| (F) - standalone-fa (J) - asngw-non-anchor
| (e) - ggsn-mbms-ue (i) - asnpc (U) - pdg-ipsec-ipv4
| (E) - ha-mobile-ipv6 (T) - pdg-ssl (v) - pdg-ipsec-ipv6
| (f) - hnbgw-hnb (g) - hnbgw-iu (x) - s1-mme
| (a) - phsgw-simple-ip (b) - phsgw-mobile-ip (y) - asngw-auth-only
| (j) - phsgw-non-anchor (c) - phspc (k) - PCC
| (X) - HSGW (n) - ePDG (t) - henbgw-ue
| (m) - henbgw-sg
| (D) - bng-simple-ip (l) - pgw-pmip (u) - Unknown
|
|+----Access (X) - CDMA 1xRTT (E) - GPRS GERAN (I) - IP
|| Tech: (D) - CDMA EV-DO (U) - WCDMA UTRAN (W) - Wireless LAN
|| (A) - CDMA EV-DO REVA (G) - GPRS Other (M) - WiMax
|| (C) - CDMA Other (N) - GAN (O) - Femto IPSec
|| (P) - PDIF (S) - HSPA (L) - eHRPD
|| (T) - eUTRAN (B) - PPPoE (F) - FEMTO UTRAN
|| (H) - PHS (.) - Other/Unknown
||
||+---Call (C) - Connected (c) - Connecting
||| State: (d) - Disconnecting (u) - Unknown
||| (r) - CSCF-Registering (R) - CSCF-Registered
||| (U) - CSCF-Unregistered
|||
|||+--Access (A) - Attached (N) - Not Attached
|||| CSCF (.) - Not Applicable
|||| Status:
||||
||||+-Link (A) - Online/Active (D) - Dormant/Idle
||||| Status:
|||||
|||||+Network (I) - IP (M) - Mobile-IP (L) - L2TP
||||||Type: (P) - Proxy-Mobile-IP (i) - IP-in-IP (G) - GRE
|||||| (V) - IPv6-in-IPv4 (S) - IPSEC (C) - GTP
|||||| (A) - R4 (IP-GRE) (T) - IPv6 (u) - Unknown
|||||| (W) - PMIPv6(IPv4) (Y) - PMIPv6(IPv4+IPv6) (R) - IPv4+IPv6
|||||| (v) - PMIPv6(IPv6)
||||||
||||||
vvvvvv CALLID MSID USERNAME IP TIME-IDLE
------ -------- --------------- ---------------------- -------------------- ---------
IECNAI <> <> name@apn_name x.x.x.x 00h00m57s
从跟踪中观察到,PDP的删除和创建之间有很短的时间(~20ms)。这就是网关拒绝PDP的原因,错误代码为VPN_MSG_STATUS_DUPLICATE_INSTANCE。
初始APN配置
apn apn_name
bearer-control-mode mixed
selection-mode subscribed sent-by-ms chosen-by-sgsn
accounting-mode none
gtpp group CGF1 accounting-context <context_name>
gtpp group CGF2 accounting-context <context_name>
gtpp group CGF3 accounting-context <context_name>
gtpp group CGF4 accounting-context <context_name>
idle-timeout-activity ignore-downlink
apn-ambr rate-limit direction downlink burst-size auto-readjust
duration 1 violate-action drop
apn-ambr rate-limit direction uplink burst-size auto-readjust
duration 1 violate-action drop
ims-auth-service <service name>
timeout idle 14400
ip access-group onegas.com in
ip access-group onegas.com out
ip source-violation check drop-limit 0
ip context-name <context name>
ip address pool name <pool name>
active-charging rulebase <Rulebase>
exit
一种想法是减少地址保持计时器,但“地址保持计时器”的概念仅适用于动态IP地址分配,而不适用于静态分配。
本实验还检查了以下内容:
[Gi](config-ctx)#
ip pool SIMPLE-POOL a.b.c.d 255.255.0.0 static address-hold-timer 100
Failure: Hold timer can not be configured for this pool
当删除PDP请求(DPR)和创建PDP请求(CPR)之间对于同一IMSI存在小的时间间隔时,Radius服务器返回相同的静态地址。
当ASR 5x00收到DPR时,它会处理DPR并接受新的CPR,但同时它仍保留静态IP地址,并且需要一些时间(250ms)vpnmgr释放/刷新地址。由于新的CPR在此冲洗完成之前到来,ASR 5x00拒绝新的CPR。
在这种情况下,PDP的删除和PDP的创建之间的时间间隔非常小。
在数据包捕获图中,您可以看到删除PDP和创建PDP之间的时间间隔(以红色块显示)非常小。
对于同一地址的IP地址分配,从删除到创建之间,应该会延迟250毫秒。
这是分布式架构的设计要求。请参阅“解决方案”部分中的解决方法,以避免对静态地址分配产生任何影响。
请参阅网关上应用的此配置解决方法。
config
context <>
ggsn-service <>
newcall duplicate-subscriber-requested-address accept
exit
当UE在尝试通过其他访问方法重新连接之前无法正常断开与企业数据包数据网络(PDN)的连接时,此命令会启用或禁用新的呼叫连接。启用后,此命令会断开旧会话,以便接受具有相同IP地址分配的新连接。
此命令还允许GGSN接受对静态用户地址的请求,即使该地址已被另一会话使用。如果此功能未启用,将拒绝另一个会话的IP地址相同的新请求。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
14-Jul-2015 |
初始版本 |