aligungr / UERANSIM

Open source 5G UE and RAN (gNodeB) implementation.
GNU General Public License v3.0
791 stars 323 forks source link

Initial registration error on free5GC #99

Closed regek closed 4 years ago

regek commented 4 years ago

Hi, I'm using the lastest version of Free5GC (in docker). I'm getting an error while performing initial-registration. I'm using the default configurations in free5GC. The user is already added via webui.

Here is the snippet of the log:

`[2020-08-19 14:15:36.303] [DEBUG] [MESSAGING] Plain NAS PDU: 7e005600020000211b5a36ad3bc5b1c1d3c5487a57eb81ef2010dc52489d70ac800044c036c727efedad [2020-08-19 14:15:36.304] [FUNC_IN] Handling: 5G AKA Authentication Request [2020-08-19 14:15:36.305] [WARNING] [CONFIG] USE_SQN_HACK: true [2020-08-19 14:15:36.305] [DEBUG] [VALUE] received rand: 1b5a36ad3bc5b1c1d3c5487a57eb81ef [2020-08-19 14:15:36.305] [DEBUG] [VALUE] received autn: dc52489d70ac800044c036c727efedad [2020-08-19 14:15:36.376] [DEBUG] [VALUE] calculated res: 77325b4c0eb3282b [2020-08-19 14:15:36.376] [DEBUG] [VALUE] calculated ck: 3d0dd4bbe79c93102901d150b020c0d0 [2020-08-19 14:15:36.377] [DEBUG] [VALUE] calculated ik: 84098fa171276feb9377dadfce4658c6 [2020-08-19 14:15:36.378] [DEBUG] [VALUE] calculated milenageAk: 3a042f157025 [2020-08-19 14:15:36.378] [DEBUG] [VALUE] calculated milenageMac: 1e89dd45bb69ecaf [2020-08-19 14:15:36.379] [DEBUG] [VALUE] used snn: 5G:mnc093.mcc208.3gppnetwork.org [2020-08-19 14:15:36.379] [DEBUG] [VALUE] used sqn: e65667880089 [2020-08-19 14:15:36.380] [ERROR] [PROC] AUTN validation MAC mismatch. expected: 1e89dd45bb69ecaf received: 44c036c727efedad [2020-08-19 14:15:36.382] [DEBUG] [VALUE] autnCheck: MAC_FAILURE [2020-08-19 14:15:36.382] [FUNC_IN] Sending NAS message: AuthenticationFailure [2020-08-19 14:15:36.390] [DEBUG] [MESSAGING] Plain NAS as JSON: { "mmCause": { "value": { "value": 20, "name": "MAC failure" } }, "securityHeaderType": { "value": 0, "name": "Plain 5GS NAS message, not security protected" }, "messageType": { "value": 89, "name": "Authentication failure" }, "extendedProtocolDiscriminator": { "value": 126, "name": "5GS mobility management messages" } } [2020-08-19 14:15:36.390] [DEBUG] [MESSAGING] Plain NAS PDU: 7e005914 [2020-08-19 14:15:36.391] [DEBUG] [MESSAGING] Secured NAS as JSON { "mmCause": { "value": { "value": 20, "name": "MAC failure" } }, "securityHeaderType": { "value": 0, "name": "Plain 5GS NAS message, not security protected" }, "messageType": { "value": 89, "name": "Authentication failure" }, "extendedProtocolDiscriminator": { "value": 126, "name": "5GS mobility management messages" } }

`

Thanks

aligungr commented 4 years ago

Hi @regek

Make sure that UE configurations such as keys, imsi etc. exactly match between UERANSIM and free5gc sides. Also UE subscription info should be created with OP option, but not OPc.

This link may be helpful: https://github.com/aligungr/UERANSIM/issues/71#issuecomment-666942646

regek commented 4 years ago

thanks