- 北境漫步
-
bearer id是的啊
但是sequence number不等同于nas count
Sequence number
This IE includes the NAS message sequencenumber (SN) which consists of the eight least significant bits of the NAS COUNTfor a security protected NAS message The usage of SN is specified insubclause 4.4.3.
4.4.3 Handling of NAS COUNT and NAS sequencenumber
4.4.3.1 General
Each EPSNAS security context shall be associated with two separate counters NAS COUNT:one related to uplink NAS messages and one related to downlink NAS messages.The NAS COUNT counters use 24 bit internal representation and are independentlymaintained by UE and MME. The NAS COUNT shall be constructed as a NAS sequencenumber (8 least significant bits) concatenated with a NAS overflow counter (16 mostsignificant bits).
When NASCOUNT is input to NAS ciphering or NAS integrity algorithms it shall be consideredto be a 32-bit entity which shall be constructed by padding the 24-bit internalrepresentation with 8 zeros in the most significant bits.
The valueof the uplink NAS COUNT that is stored or read out of the USIM or non-volatilememory as described in annex C, is the value that shall be used in thenext NAS message.
The value ofthe downlink NAS COUNT that is stored or read out of the USIM or non-volatilememory as described in annex C, is the largest downlink NAS COUNT used ina successfully integrity checked NAS message.
The NASsequence number part of the NAS COUNT shall be exchanged between the UE and theMME as part of the NAS signalling. After each new or retransmitted outboundsecurity protected NAS message, the sender shall increase the NAS COUNT numberby one, except for the initial NAS messages if thelower layers indicated the failure to establish the RRC connection (see3GPP TS 36.331 [22]). Specifically, on the sender side, the NAS sequence number shall be increasedby one, and if the result is zero (due to wrap around), the NAS overflowcounter shall also be incremented by one (see subclause 4.4.3.5). Thereceiving side shall estimate the NAS COUNT used by the sending side.Specifically, if the estimated NAS sequence number wraps around, the NASoverflow counter shall be incremented by one.
After thederivation of a NAS token due to an inter-system change from S1mode to A/Gbmode or Iu mode in idle mode as specified in 3GPP TS 24.008 [13], the UE shall increase theuplink NAS COUNT by one.
When theMME receives a NAS token via SGSN during an idle mode inter-system change from S1 mode to A/Gb mode or Iu mode, the MME shall check theNAS token as specified in 3GPP TS 33.401 [19], subclause 9.1.1, and update its uplink NAS COUNTwith the uplink NAS COUNT value used for the successful check of the NAS token.
NOTE 1: The MME does not check the NAS tokenif it is received via SGSN during a connected mode inter-system change from S1 mode to A/Gb modeor Iu mode.
Duringthe handover from UTRAN/GERAN to E-UTRAN, when a mapped EPS security context isderived and taken into use, the MME shall set both the uplink and downlink NAS COUNT countersof this EPS securitycontext to zero. The UE shall set both the uplink and downlink NAS COUNTcounters to zero.
During the handover from E-UTRAN toUTRAN/GERAN the MME signals the current downlink NAS COUNT value in a NASsecurity transparent container (see subclause 9.9.2.6).
During handover to or from E-UTRAN, the MMEshall incrementdownlink NAS COUNT by one after it has created a NASsecurity transparent container (see subclause 9.9.2.6 and 9.9.2.7).
NOTE 2: Duringthe handover from UTRAN/GERAN to E-UTRAN, the NAS security transparentcontainer (see subclause 9.9.2.7)is treated as an implicit SECURITY MODE COMMAND messagefor the UE and the MME, and therefore the MME regards the sending of the NASsecurity transparent container as the sending of an initial SECURITY MODECOMMAND message in order to derive and take into use a mapped EPS securitycontext for the purpose of the NAS COUNT handling.
In some NASmessages only 5 of the 8 NAS sequence number bits are transmitted. When this isthe case, the receiver shall estimate the remaining 3 most significant bits ofthe sequence number.