21. gNB发送AS层加密和完整性保护算法给UE。
SecurityModeCommand ::= SEQUENCE {
rrc-TransactionIdentifier RRC-TransactionIdentifier,
criticalExtensions CHOICE {
securityModeCommand SecurityModeCommand-IEs,
criticalExtensionsFuture SEQUENCE {}
}
}
SecurityModeCommand-IEs ::= SEQUENCE {
securityConfigSMC SecurityConfigSMC,
lateNonCriticalExtension OCTET STRING OPTIONAL,
nonCriticalExtension SEQUENCE{} OPTIONAL
}
SecurityConfigSMC ::= SEQUENCE {
securityAlgorithmConfig SecurityAlgorithmConfig,
...
}
22. UE确认对应的算法可用后发送确认给gNB,注意,此消息是有完整性保护但是没有经过加密的,但是从此时开始后续的消息都是加密的。
SecurityModeComplete ::= SEQUENCE {
rrc-TransactionIdentifier RRC-TransactionIdentifier,
criticalExtensions CHOICE {
securityModeComplete SecurityModeComplete-IEs,
criticalExtensionsFuture SEQUENCE {}
}
}
SecurityModeComplete-IEs ::= SEQUENCE {
lateNonCriticalExtension OCTET STRING OPTIONAL,
nonCriticalExtension SEQUENCE{} OPTIONAL
}
23. gNB发送RRC Reconfiguration消息给UE,此消息典型携带信息包括Initial Context Setup Request(可能带有Registration Accept), 无线承载建立的相关参数,UE测量参数,如果有CA的话还会携带辅小区的相关信息。UE在收到此消息后会开始配置主小区组、无线辅小区组(如果有的话)、配置无线承载、基于收到的测量配置开始做测量、根据收到的NAS消息进行上下文和PDU Session(如果有的话)的相应操作。
RRCReconfiguration ::= SEQUENCE {
rrc-TransactionIdentifier RRC-TransactionIdentifier,
criticalExtensions CHOICE {
rrcReconfiguration RRCReconfiguration-IEs,
criticalExtensionsFuture SEQUENCE {}
}
}
RRCReconfiguration-IEs ::= SEQUENCE {
radioBearerConfig RadioBearerConfig OPTIONAL, -- Need M
secondaryCellGroup OCTET STRING (CONTAINING CellGroupConfig) OPTIONAL, -- Need M
measConfig MeasConfig OPTIONAL, -- Need M
lateNonCriticalExtension OCTET STRING OPTIONAL,
nonCriticalExtension RRCReconfiguration-v1530-IEs OPTIONAL
}
RRCReconfiguration-v1530-IEs ::= SEQUENCE {
masterCellGroup OCTET STRING (CONTAINING CellGroupConfig) OPTIONAL, -- Need M
fullConfig ENUMERATED {true} OPTIONAL, -- Cond FullConfig
dedicatedNAS-MessageList SEQUENCE (SIZE(1..maxDRB)) OF DedicatedNAS-Message OPTIONAL, -- Cond nonHO
masterKeyUpdate MasterKeyUpdate OPTIONAL, -- Cond MasterKeyChange
dedicatedSIB1-Delivery OCTET STRING (CONTAINING SIB1) OPTIONAL, -- Need N
dedicatedSystemInformationDelivery OCTET STRING (CONTAINING SystemInformation) OPTIONAL, -- Need N
otherConfig OtherConfig OPTIONAL, -- Need M
nonCriticalExtension RRCReconfiguration-v1540-IEs OPTIONAL
}
RRCReconfiguration-v1540-IEs ::= SEQUENCE {
otherConfig-v1540 OtherConfig-v1540 OPTIONAL, -- Need M
nonCriticalExtension SEQUENCE {} OPTIONAL
}
MasterKeyUpdate ::= SEQUENCE {
keySetChangeIndicator BOOLEAN,
nextHopChainingCount NextHopChainingCount,
nas-Container OCTET STRING OPTIONAL, -- Cond securityNASC
...
}
关于Initial Context Setup Request所带IE主要如下
或者
Registration Accept所带主要IE如下
24. UE回复RRC Reconfiguration Complete来确认。
RRCReconfigurationComplete ::= SEQUENCE {
rrc-TransactionIdentifier RRC-TransactionIdentifier,
criticalExtensions CHOICE {
rrcReconfigurationComplete RRCReconfigurationComplete-IEs,
criticalExtensionsFuture SEQUENCE {}
}
}
RRCReconfigurationComplete-IEs ::= SEQUENCE {
lateNonCriticalExtension OCTET STRING OPTIONAL,
nonCriticalExtension RRCReconfigurationComplete-v1530-IEs OPTIONAL
}
RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE {
uplinkTxDirectCurrentList UplinkTxDirectCurrentList OPTIONAL,
nonCriticalExtension SEQUENCE {} OPTIONAL
}
27. 通过上行直传消息发送Registration Complete消息到AMF,至此注册过程完成。
28&29. 可以使用对应的TEID来发送UL/DL data。