---
title: 'Project documentation template'
disqus: hackmd
---
N3IWF and N3IWUE installation
===



## Overview
[TOC]
## Beginners Guide
If you are a total beginner to this, start here!
1. Visit [free5gc.org](https://free5gc.org/)
2. install [free5gc](https://free5gc.org/guide/3-install-free5gc/)
3. Follow [N3IWUE User Guide](https://free5gc.org/guide/n3iwue-installation/)
4. Mesurement environment by [Iperf](https://lindevs.com/install-iperf-on-ubuntu)
5. Mesurement environment by Wireshark
Installing Step
---
First step we will need 2 VM for run this scenario, there are:
1. VM for free5gc and N3IWF (e.g: Static IP 192.168.1.222)
2. VM for N3IWUE (e.g: Static IP 192.168.1.212)
### Installing free5gc and N3IWF (non3GPP Access)
you can test [free5gc](https://free5gc.org/guide/4-test-free5gc/) for non3GPP access with this comment:
```
./test.sh TestNon3GPP
```

Install free5gc and N3IWF in VM 1 do **NOT** to be config for AMF, SMF and UPF. If you ever install and config it before you need to change it to the defult configuration. We just need to use the defult configuration, here the configuration:
**AMF**
```
cd ~free5gc
sudo nano ~/free5gc/config/amfcfg.yaml
```
Scroll and take a look for the amf configuration, and make sure for this configuration, don't change anythings:
```haskell=
configuration:
amfName: AMF # the name of this AMF
ngapIpList: # the IP list of N2 interfaces on this AMF
- 127.0.0.18
ngapPort: 38412 # the SCTP port listened by NGAP
sbi: # Service-based interface information
```
**SMF**
```type!
sudo nano ~/free5gc/config/smfcfg.yaml
```
Scroll and take a look for the smf configuration, and make sure for this configuration, don't change anythings:
```haskell=
interfaces: # Interface list for this UPF
- interfaceType: N3 # the type of the interface (N3 or N9)
endpoints: # the IP address of this N3/N9 interface on this UPF
- 127.0.0.8
networkInstances: # Data Network Name (DNN)
- internet
```
**UPF**
```type!
sudo nano ~/free5gc/config/upfcfg.yaml
```
Scroll and take a look for the smf configuration, and make sure for this configuration, don't change anythings:
```haskell=
gtpu:
forwarder: gtp5g
# The IP list of the N3/N9 interfaces on this UPF
# If there are multiple connection, set addr to 0.0.0.0 or list all the addresses
ifList:
- addr: 127.0.0.8
type: N3
# name: upf.5gc.nctu.me
# ifname: gtpif
# mtu: 1400
```
**N3IWF**
In free5gc VM, we need to edit N3IWF config file `~/free5gc/config/n3iwfcfg.yaml`
Replace IKEBindAddress from 172.16.2.100 to 192.168.1.212, namely from:
```h
IKEBindAddress: 172.16.2.100 # Nwu interface IP address (IKE) on this N3IWF
```
into:
```antlr4
IKEBindAddress: 192.168.1.212 # Nwu interface IP address (IKE) on this N3IWF
```
> Read more about N3IWF (non3gpp) here: https://www.wipro.com/network-edge-providers/untrusted-non-3gpp-access-network-interworking-with-5g-core/
### Installing N3IWUE (non3GPP Access)
Install N3IWUE in VM 2, here the step:
Download N3IWUE
```type!
cd ~
git clone https://github.com/free5gc/n3iwue.git
cd n3iwue
```

update and upgrade the VM of N3IWUE
```!
sudo apt update
sudo apt upgrade
```

install required tool (make, libsctp-dev, lksctp-tools, iproute2)
```!
sudo apt install make
sudo apt install libsctp-dev lksctp-tools
sudo apt install iproute2
```

Install Golang (use 1.21.6 version in this demonstrate):
```!
wget https://dl.google.com/go/go1.21.6.linux-amd64.tar.gz
sudo tar -C /usr/local -zxvf go1.21.6.linux-amd64.tar.gz
mkdir -p ~/go/{bin,pkg,src}
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOPATH/bin:$GOROOT/bin' >> ~/.bashrc
echo 'export GO111MODULE=auto' >> ~/.bashrc
source ~/.bashrc
# check your go installation
go version
```


Build N3IWU
```!
cd ~/n3iwue
make
```

To let N3IWUE knows where is the N3IWF is, we need to edit the UE config file by`sudo nano ~/n3iwue/config/n3ue.yaml` in N3IWUE VM
Replace these parameters:
```haskell=
N3IWFInformation:
IPSecIfaceAddr: 10.0.1.1 # IP address of Nwu interface (IKE) on N3IWF
N3UEInformation:
IPSecIfaceName: ens38 # Name of Nwu interface (IKE) on this N3UE
IPSecIfaceAddr: 10.0.1.4 # IP address of Nwu interface (IKE) on this N3UE
```
into:
```haskell=
N3IWFInformation:
IPSecIfaceAddr: 192.168.56.101 # IP address of Nwu interface (IKE) on N3IWF
N3UEInformation:
IPSecIfaceName: enp0s8 # Name of Nwu interface (IKE) on this N3UE (your interface name)
IPSecIfaceAddr: 192.168.56.103 # IP address of Nwu interface (IKE) on this N3UE
```
### Use WebConsole to Add UE
Open your web browser from your host machine, and enter the URL http://192.168.1.222:5000
* On the login page, enter username admin and password free5gc.
* Once logged in, widen the page until you see “Subscribers” on the left-hand side column.
* Click on the Subscribers tab and then on the New Subscriber button
* Scroll down to Operator Code Type and change it from "OPc" to "OP".
* Make sure the following config between `n3iwue/config/n3ue.yaml` and Subscriber you create are the same:
* IMSI
* MCC+MNC+MSIN (ex. 208930000001234)
* K
* SQN
* OP value (choose OP instead of OPC)
* Scroll all the way down and click on *Submit*.

### Testing N3IWUE with free5GC
SSH into free5gc. If you have rebooted free5gc, remember to run:
```
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o <dn_interface> -j MASQUERADE
# e.g. sudo iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE
sudo systemctl stop ufw
sudo systemctl disable ufw
```
> Tip: Set net.ipv4.ip_forward=1 in /etc/sysctl.conf to enable packet forwarding permanently
In free5gc VM:
```
cd ~/free5gc
./run.sh -n3iwf
```
```toml!
ubuntu@ubuntu:~/free5gc$ ./run.sh -n3iwf
log path: ./log/20240228_044058/
2024-02-28T04:40:58.141835502Z [INFO][UPF][Main] UPF version:
free5GC version: v3.3.0
build time: 2024-02-28T02:18:32Z
commit hash: 4474dc86
commit time: 2023-06-08T03:37:39Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:58.142112298Z [INFO][UPF][CFG] Read config from [./config/upfcfg.yaml]
2024-02-28T04:40:58.142914314Z [INFO][UPF][CFG] ==================================================
2024-02-28T04:40:58.142996623Z [INFO][UPF][CFG] (*factory.Config)(0xc000011180)({
Version: (string) (len=5) "1.0.3",
Description: (string) (len=31) "UPF initial local configuration",
Pfcp: (*factory.Pfcp)(0xc0004610b0)({
Addr: (string) (len=9) "127.0.0.8",
NodeID: (string) (len=9) "127.0.0.8",
RetransTimeout: (time.Duration) 1s,
MaxRetrans: (uint8) 3
}),
Gtpu: (*factory.Gtpu)(0xc000461380)({
Forwarder: (string) (len=5) "gtp5g",
IfList: ([]factory.IfInfo) (len=1 cap=1) {
(factory.IfInfo) {
Addr: (string) (len=9) "127.0.0.8",
Type: (string) (len=2) "N3",
Name: (string) "",
IfName: (string) "",
MTU: (uint32) 0
}
}
}),
DnnList: ([]factory.DnnList) (len=1 cap=1) {
(factory.DnnList) {
Dnn: (string) (len=8) "internet",
Cidr: (string) (len=12) "10.60.0.0/24",
NatIfName: (string) ""
}
},
Logger: (*factory.Logger)(0xc0000a1b00)({
Enable: (bool) true,
Level: (string) (len=4) "info",
ReportCaller: (bool) false
})
})
2024-02-28T04:40:58.143221587Z [INFO][UPF][CFG] ==================================================
2024-02-28T04:40:58.143277501Z [INFO][UPF][Main] Log level is set to [info]
2024-02-28T04:40:58.143327611Z [INFO][UPF][Main] Report Caller is set to [false]
2024-02-28T04:40:58.143437495Z [INFO][UPF][Main] starting Gtpu Forwarder [gtp5g]
2024-02-28T04:40:58.143492126Z [INFO][UPF][Main] GTP Address: "127.0.0.8:2152"
2024-02-28T04:40:58.183506221Z [INFO][UPF][BUFF] buff netlink server started
2024-02-28T04:40:58.183801516Z [INFO][UPF][Perio] perio server started
2024-02-28T04:40:58.183887195Z [INFO][UPF][Gtp5g] Forwarder started
2024-02-28T04:40:58.184587149Z [INFO][UPF][PFCP][LAddr:127.0.0.8:8805] starting pfcp server
2024-02-28T04:40:58.184734011Z [INFO][UPF][PFCP][LAddr:127.0.0.8:8805] pfcp server started
2024-02-28T04:40:58.184817278Z [INFO][UPF][Main] UPF started
MongoDB shell version v3.6.8
connecting to: mongodb://127.0.0.1:27017/free5gc
Implicit session: session { "id" : UUID("fd375886-fdc1-4361-bfa1-763f3c27f829") }
MongoDB server version: 3.6.8
false
./run.sh: line 112: mongosh: command not found
2024-02-28T04:40:58.478227131Z [INFO][NRF][Main] NRF version:
free5GC version: v3.3.0
build time: 2024-02-28T02:17:47Z
commit hash: db4c0f90
commit time: 2023-05-11T08:14:48Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:58.478619600Z [INFO][NRF][CFG] Read config from [./config/nrfcfg.yaml]
2024-02-28T04:40:58.479880695Z [INFO][NRF][Main] Log enable is set to [true]
2024-02-28T04:40:58.479935583Z [INFO][NRF][Main] Log level is set to [info]
2024-02-28T04:40:58.479967299Z [INFO][NRF][Main] Report Caller is set to [false]
2024-02-28T04:40:58.479998971Z [INFO][NRF][Init] nrfconfig Info: Version[1.0.2] Description[NRF initial local configuration]
2024-02-28T04:40:58.480207405Z [INFO][NRF][Init] Server starting
2024-02-28T04:40:58.480912370Z [INFO][NRF][Init] Binding addr: [127.0.0.10:8000]
2024-02-28T04:40:58.572584363Z [INFO][AMF][Main] AMF version:
free5GC version: v3.3.0
build time: 2024-02-28T02:17:17Z
commit hash: 7907d3c0
commit time: 2023-05-20T15:04:00Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:58.572874102Z [INFO][AMF][CFG] Read config from [./config/amfcfg.yaml]
2024-02-28T04:40:58.575955487Z [INFO][AMF][Main] Log enable is set to [true]
2024-02-28T04:40:58.576067585Z [INFO][AMF][Main] Log level is set to [info]
2024-02-28T04:40:58.576118406Z [INFO][AMF][Main] Report Caller is set to [false]
2024-02-28T04:40:58.576188341Z [INFO][AMF][Util] amfconfig Info: Version[1.0.9]
2024-02-28T04:40:58.576353321Z [INFO][AMF][Init] Server started
2024-02-28T04:40:58.576691795Z [INFO][AMF][Util] amfconfig Info: Version[1.0.9]
2024-02-28T04:40:58.577649143Z [INFO][AMF][Ngap] Listen on 127.0.0.18:38412
2024-02-28T04:40:58.582837090Z [INFO][NRF][NFM] Handle NFRegisterRequest
2024-02-28T04:40:58.587854405Z [INFO][NRF][NFM] urilist update
2024-02-28T04:40:58.685423201Z [INFO][SMF][Main] SMF version:
free5GC version: v3.3.0
build time: 2024-02-28T02:18:08Z
commit hash: 8eb6843b
commit time: 2023-05-31T04:43:19Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:58.685684504Z [INFO][SMF][CFG] Read config from [./config/smfcfg.yaml]
2024-02-28T04:40:58.688966593Z [INFO][SMF][CFG] Read config from [./config/uerouting.yaml]
2024-02-28T04:40:58.690056986Z [INFO][SMF][Main] Log enable is set to [true]
2024-02-28T04:40:58.690135299Z [INFO][SMF][Main] Log level is set to [info]
2024-02-28T04:40:58.690183445Z [INFO][SMF][Main] Report Caller is set to [false]
2024-02-28T04:40:58.690258636Z [INFO][SMF][CTX] smfconfig Info: Version[1.0.7] Description[SMF initial local configuration]
2024-02-28T04:40:58.690422170Z [INFO][SMF][CTX] Endpoints: [127.0.0.8]
2024-02-28T04:40:58.690538581Z [INFO][SMF][Init] Server started
2024-02-28T04:40:58.694868581Z [INFO][NRF][NFM] Handle NFRegisterRequest
2024-02-28T04:40:58.792096385Z [INFO][UDR][Main] UDR version:
free5GC version: v3.3.0
build time: 2024-02-28T02:18:21Z
commit hash: a8ef9d9f
commit time: 2023-05-11T08:26:37Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:58.792420394Z [INFO][UDR][CFG] Read config from [./config/udrcfg.yaml]
2024-02-28T04:40:58.793446780Z [INFO][UDR][Main] Log enable is set to [true]
2024-02-28T04:40:58.793516152Z [INFO][UDR][Main] Log level is set to [info]
2024-02-28T04:40:58.793575507Z [INFO][UDR][Main] Report Caller is set to [false]
2024-02-28T04:40:58.793659074Z [INFO][UDR][Init] UDR Config Info: Version[1.0.2] Description[UDR initial local configuration]
2024-02-28T04:40:58.793920071Z [INFO][UDR][Init] Server started
2024-02-28T04:40:58.794512880Z [INFO][UDR][Util] udrconfig Info: Version[1.0.2] Description[UDR initial local configuration]
2024-02-28T04:40:58.802538593Z [INFO][NRF][NFM] Handle NFRegisterRequest
2024-02-28T04:40:58.807820908Z [INFO][NRF][NFM] Create NF Profile
2024-02-28T04:40:58.809738246Z [INFO][NRF][NFM] urilist update
2024-02-28T04:40:58.813109263Z [INFO][NRF][NFM] urilist update
2024-02-28T04:40:58.813915165Z [INFO][NRF][NFM] Location header: http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances/af18c03d-a61e-4c0b-ba82-dd444f05df0b
2024-02-28T04:40:58.814789036Z [INFO][NRF][NFM] Create NF Profile
2024-02-28T04:40:58.815642546Z [INFO][NRF][GIN] | 201 | 127.0.0.1 | PUT | /nnrf-nfm/v1/nf-instances/af18c03d-a61e-4c0b-ba82-dd444f05df0b |
2024-02-28T04:40:58.816142893Z [INFO][NRF][NFM] Create NF Profile
2024-02-28T04:40:58.817963823Z [INFO][NRF][NFM] Location header: http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances/6269219c-1626-42a9-a128-78b1e959351b
2024-02-28T04:40:58.818339142Z [INFO][NRF][GIN] | 201 | 127.0.0.1 | PUT | /nnrf-nfm/v1/nf-instances/6269219c-1626-42a9-a128-78b1e959351b |
2024-02-28T04:40:58.818668177Z [INFO][NRF][NFM] Location header: http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances/163fe8f3-eb2e-4795-9f8f-37149892e506
2024-02-28T04:40:58.819143365Z [INFO][NRF][GIN] | 201 | 127.0.0.1 | PUT | /nnrf-nfm/v1/nf-instances/163fe8f3-eb2e-4795-9f8f-37149892e506 |
2024-02-28T04:40:58.823779851Z [INFO][SMF][Init] SMF Registration to NRF {163fe8f3-eb2e-4795-9f8f-37149892e506 SMF REGISTERED 0 0xc00000ce58 0xc00000ce88 [] [] [127.0.0.2] [] <nil> [] [] <nil> 0 0 0 area1 <nil> <nil> <nil> <nil> 0xc0000b9f80 <nil> <nil> <nil> <nil> <nil> map[] <nil> false 0xc00000cd50 false false []}
2024-02-28T04:40:58.824781841Z [INFO][SMF][PFCP] Listen on 127.0.0.1:8805
2024-02-28T04:40:58.825319681Z [INFO][SMF][Main] Sending PFCP Association Request to UPF[127.0.0.8]
2024-02-28T04:40:58.826253299Z [INFO][UPF][PFCP][LAddr:127.0.0.8:8805] handleAssociationSetupRequest
2024-02-28T04:40:58.826999371Z [INFO][UPF][PFCP][LAddr:127.0.0.8:8805][CPNodeID:127.0.0.1] New node
2024-02-28T04:40:58.828942697Z [INFO][SMF][Main] Received PFCP Association Setup Accepted Response from UPF[127.0.0.8]
2024-02-28T04:40:58.891613060Z [INFO][PCF][Main] pcf
2024-02-28T04:40:58.891739007Z [INFO][PCF][Main] PCF version:
free5GC version: v3.3.0
build time: 2024-02-28T02:18:03Z
commit hash: 17f2a8fc
commit time: 2023-05-11T08:21:46Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:58.891814911Z [INFO][PCF][CFG] Read config from [./config/pcfcfg.yaml]
2024-02-28T04:40:58.894804156Z [INFO][PCF][Main] Log enable is set to [true]
2024-02-28T04:40:58.894862765Z [INFO][PCF][Main] Log level is set to [info]
2024-02-28T04:40:58.894885546Z [INFO][PCF][Main] Report Caller is set to [false]
2024-02-28T04:40:58.894929580Z [INFO][PCF][Util] pcfconfig Info: Version[1.0.2] Description[PCF initial local configuration]
2024-02-28T04:40:58.895337064Z [INFO][PCF][Init] Server started
2024-02-28T04:40:58.900150984Z [INFO][PCF][Util] pcfconfig Info: Version[1.0.2] Description[PCF initial local configuration]
2024-02-28T04:40:58.905702210Z [INFO][NRF][NFM] Handle NFRegisterRequest
2024-02-28T04:40:58.909149847Z [INFO][NRF][NFM] urilist update
2024-02-28T04:40:58.910963979Z [INFO][NRF][NFM] Create NF Profile
2024-02-28T04:40:58.913070389Z [INFO][NRF][NFM] Location header: http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances/980e2cbb-7e5f-4f0a-9b80-5184eeba0fd2
2024-02-28T04:40:58.913672061Z [INFO][NRF][GIN] | 201 | 127.0.0.1 | PUT | /nnrf-nfm/v1/nf-instances/980e2cbb-7e5f-4f0a-9b80-5184eeba0fd2 |
2024-02-28T04:40:58.917483768Z [INFO][NRF][DISC] Handle NFDiscoveryRequest
2024-02-28T04:40:58.929996609Z [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=PCF&service-names=nudr-dr&target-nf-type=UDR |
2024-02-28T04:40:59.000742651Z [INFO][UDM][Main] UDM version:
free5GC version: v3.3.0
build time: 2024-02-28T02:18:17Z
commit hash: f9aad0ef
commit time: 2023-05-11T08:24:25Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:59.001106047Z [INFO][UDM][CFG] Read config from [./config/udmcfg.yaml]
2024-02-28T04:40:59.003035166Z [INFO][UDM][Main] Log enable is set to [true]
2024-02-28T04:40:59.003090729Z [INFO][UDM][Main] Log level is set to [info]
2024-02-28T04:40:59.003113498Z [INFO][UDM][Main] Report Caller is set to [false]
2024-02-28T04:40:59.003137918Z [INFO][UDM][Init] UDM Config Info: Version[1.0.3] Description[UDM initial local configuration]
2024-02-28T04:40:59.003185541Z [INFO][UDM][Init] Server started
2024-02-28T04:40:59.003380621Z [INFO][UDM][Util] udmconfig Info: Version[1.0.3] Description[UDM initial local configuration]
2024-02-28T04:40:59.006456086Z [INFO][NRF][NFM] Handle NFRegisterRequest
2024-02-28T04:40:59.009474957Z [INFO][NRF][NFM] urilist update
2024-02-28T04:40:59.011633097Z [INFO][NRF][NFM] Create NF Profile
2024-02-28T04:40:59.014137206Z [INFO][NRF][NFM] Location header: http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances/63377ee0-fcbe-4937-baba-77582c9cf223
2024-02-28T04:40:59.014446779Z [INFO][NRF][GIN] | 201 | 127.0.0.1 | PUT | /nnrf-nfm/v1/nf-instances/63377ee0-fcbe-4937-baba-77582c9cf223 |
2024-02-28T04:40:59.107117461Z [INFO][NSSF][Main] NSSF version:
free5GC version: v3.3.0
build time: 2024-02-28T02:17:59Z
commit hash: 28cd7936
commit time: 2023-05-11T08:20:43Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:59.107446755Z [INFO][NSSF][CFG] Read config from [./config/nssfcfg.yaml]
2024-02-28T04:40:59.110843756Z [INFO][NSSF][Main] Log enable is set to [true]
2024-02-28T04:40:59.110926094Z [INFO][NSSF][Main] Log level is set to [info]
2024-02-28T04:40:59.110969425Z [INFO][NSSF][Main] Report Caller is set to [false]
2024-02-28T04:40:59.111066502Z [INFO][NSSF][Init] Server started
2024-02-28T04:40:59.114793370Z [INFO][NRF][NFM] Handle NFRegisterRequest
2024-02-28T04:40:59.117870373Z [INFO][NRF][NFM] urilist update
2024-02-28T04:40:59.119136061Z [INFO][NRF][NFM] Create NF Profile
2024-02-28T04:40:59.120404725Z [INFO][NRF][NFM] Location header: http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances/f779f508-f329-4802-818a-f056cf92184d
2024-02-28T04:40:59.120601207Z [INFO][NRF][GIN] | 201 | 127.0.0.1 | PUT | /nnrf-nfm/v1/nf-instances/f779f508-f329-4802-818a-f056cf92184d |
2024-02-28T04:40:59.222595701Z [INFO][AUSF][Main] AUSF version:
free5GC version: v3.3.0
build time: 2024-02-28T02:17:40Z
commit hash: 64f47ebe
commit time: 2023-05-11T08:11:05Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:59.222817912Z [INFO][AUSF][CFG] Read config from [./config/ausfcfg.yaml]
2024-02-28T04:40:59.233631289Z [INFO][AUSF][Main] Log enable is set to [true]
2024-02-28T04:40:59.233731528Z [INFO][AUSF][Main] Log level is set to [info]
2024-02-28T04:40:59.233756321Z [INFO][AUSF][Main] Report Caller is set to [false]
2024-02-28T04:40:59.233818992Z [INFO][AUSF][Init] ausfconfig Info: Version[1.0.3] Description[AUSF initial local configuration]
ausf context = &{{{0 0} {<nil>} map[] 0} {{0 0} {<nil>} map[] 0} 0d0ac84f-aa76-4266-b9ba-b4dc5c6ba08e ausfGroup001 8000 127.0.0.9 127.0.0.9 http://127.0.0.9:8000 http http://127.0.0.10:8000 map[nausf-auth:{0d0ac84f-aa76-4266-b9ba-b4dc5c6ba08e nausf-auth 0xc00000c930 http REGISTERED 0xc00000c918 [] <nil> [] [] <nil> 0 0 0 <nil> <nil> }] [{208 93} {123 45}] 0xc0000f85a0 false}
2024-02-28T04:40:59.234028985Z [INFO][AUSF][Init] Server started
2024-02-28T04:40:59.237362762Z [INFO][NRF][NFM] Handle NFRegisterRequest
2024-02-28T04:40:59.240990456Z [INFO][NRF][NFM] urilist update
2024-02-28T04:40:59.242949045Z [INFO][NRF][NFM] Create NF Profile
2024-02-28T04:40:59.245097001Z [INFO][NRF][NFM] Location header: http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances/0d0ac84f-aa76-4266-b9ba-b4dc5c6ba08e
2024-02-28T04:40:59.245331142Z [INFO][NRF][GIN] | 201 | 127.0.0.1 | PUT | /nnrf-nfm/v1/nf-instances/0d0ac84f-aa76-4266-b9ba-b4dc5c6ba08e |
2024-02-28T04:40:59.337082263Z [INFO][N3IWF][Main] N3IWF version:
free5GC version: v3.3.0
build time: 2024-02-28T02:18:25Z
commit hash: 22988ee2
commit time: 2023-06-07T05:56:10Z
go version: go1.18.10 linux/amd64
2024-02-28T04:40:59.337418167Z [INFO][N3IWF][CFG] Read config from [./config/n3iwfcfg.yaml]
2024-02-28T04:40:59.339210061Z [INFO][N3IWF][Main] Log enable is set to [true]
2024-02-28T04:40:59.339290904Z [INFO][N3IWF][Main] Log level is set to [info]
2024-02-28T04:40:59.339331914Z [INFO][N3IWF][Main] Report Caller is set to [false]
2024-02-28T04:40:59.339390621Z [INFO][N3IWF][Init] Server started
2024-02-28T04:40:59.339700611Z [WARN][N3IWF][CTX] Parse PKCS8 private key failed: x509: failed to parse private key (use ParsePKCS1PrivateKey instead for this key format)
2024-02-28T04:40:59.339752388Z [INFO][N3IWF][CTX] Parse using PKCS1...
2024-02-28T04:40:59.342293023Z [WARN][N3IWF][Init] netlink.RouteAdd: file exists
2024-02-28T04:40:59.342365555Z [INFO][N3IWF][Init] Setup XFRM interface xfrmi-default
2024-02-28T04:40:59.346680109Z [INFO][N3IWF][NGAP] [N3IWF] Send NG Setup Request
2024-02-28T04:40:59.347035714Z [INFO][AMF][Ngap] [AMF] SCTP Accept from: 127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183
2024-02-28T04:40:59.348649628Z [INFO][AMF][Ngap] Create a new NG connection for: 127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183
2024-02-28T04:40:59.350001559Z [INFO][AMF][Ngap][ran_addr:127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183] Handle NGSetupRequest
2024-02-28T04:40:59.350080191Z [WARN][AMF][Ngap][ran_addr:127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183] Missing IE PagingDRX
2024-02-28T04:40:59.350232210Z [INFO][AMF][Ngap][ran_addr:127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183] Send NG-Setup response
2024-02-28T04:40:59.351914755Z [INFO][N3IWF][Init] NGAP service running.
2024-02-28T04:40:59.353090299Z [INFO][N3IWF][Init] NAS TCP server successfully started.
2024-02-28T04:40:59.355209191Z [INFO][N3IWF][NGAP] [N3IWF] Handle NG Setup Response
2024-02-28T04:40:59.383958065Z [INFO][N3IWF][Init] Listening NWu user plane traffic
2024-02-28T04:40:59.389145410Z [INFO][N3IWF][Init] IKE service running.
2024-02-28T04:40:59.389324859Z [INFO][N3IWF][Init] N3IWF running...
2024-02-28T04:41:22.797847465Z [INFO][N3IWF][IKE] Decoding IKE message
2024-02-28T04:41:22.798370729Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22.798813086Z [INFO][N3IWF][IKE] [SecurityAssociation] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.798984613Z [INFO][N3IWF][IKE] [KeyExchange] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.799163435Z [INFO][N3IWF][IKE] [Nonce] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.799252966Z [INFO][N3IWF][IKE] Handle IKE_SA_INIT
2024-02-28T04:41:22.824979924Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22.825087397Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.825112104Z [INFO][N3IWF][IKE] [SecurityAssociation] marshal(): Start marshalling
2024-02-28T04:41:22.825137831Z [INFO][N3IWF][IKE] [KeyExchange] marshal(): Start marshalling
2024-02-28T04:41:22.825161104Z [INFO][N3IWF][IKE] [Nonce] marshal(): Start marshalling
2024-02-28T04:41:22.825194876Z [INFO][N3IWF][IKE] [Notification] marshal(): Start marshalling
2024-02-28T04:41:22.825216002Z [INFO][N3IWF][IKE] [Notification] marshal(): Start marshalling
2024-02-28T04:41:22.825279822Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.825309226Z [INFO][N3IWF][IKE] [Identification] marshal(): Start marshalling
2024-02-28T04:41:22.825385681Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22.825416259Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.825443171Z [INFO][N3IWF][IKE] [SecurityAssociation] marshal(): Start marshalling
2024-02-28T04:41:22.825466535Z [INFO][N3IWF][IKE] [KeyExchange] marshal(): Start marshalling
2024-02-28T04:41:22.825499054Z [INFO][N3IWF][IKE] [Nonce] marshal(): Start marshalling
2024-02-28T04:41:22.825521057Z [INFO][N3IWF][IKE] [Notification] marshal(): Start marshalling
2024-02-28T04:41:22.825541316Z [INFO][N3IWF][IKE] [Notification] marshal(): Start marshalling
2024-02-28T04:41:22.844394524Z [INFO][N3IWF][IKE] Decoding IKE message
2024-02-28T04:41:22.844505299Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22.844543860Z [INFO][N3IWF][IKE] [Encrypted] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.844573091Z [INFO][N3IWF][IKE] Handle IKE_AUTH
2024-02-28T04:41:22.844626398Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22.844844062Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.844912345Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22.845214513Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22.845301008Z [INFO][N3IWF][IKE] [Identification] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.845432842Z [INFO][N3IWF][IKE] [SecurityAssociation] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.845567212Z [INFO][N3IWF][IKE] [TrafficSelector] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.845694058Z [INFO][N3IWF][IKE] [TrafficSelector] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.845833862Z [INFO][N3IWF][IKE] Ecoding initiator for later IKE authentication
2024-02-28T04:41:22.845919254Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.846022258Z [INFO][N3IWF][IKE] [Identification] marshal(): Start marshalling
2024-02-28T04:41:22.846110739Z [INFO][N3IWF][IKE] Parsing security association
2024-02-28T04:41:22.846268450Z [INFO][N3IWF][IKE] Received traffic selector initiator from UE
2024-02-28T04:41:22.846367962Z [INFO][N3IWF][IKE] Received traffic selector initiator from UE
2024-02-28T04:41:22.855118181Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.855197437Z [INFO][N3IWF][IKE] [Identification] marshal(): Start marshalling
2024-02-28T04:41:22.855241687Z [INFO][N3IWF][IKE] [Certificate] marshal(): Start marshalling
2024-02-28T04:41:22.855332705Z [INFO][N3IWF][IKE] [Authentication] marshal(): Start marshalling
2024-02-28T04:41:22.855381677Z [INFO][N3IWF][IKE] [EAP] marshal(): Start marshalling
2024-02-28T04:41:22.855420548Z [INFO][N3IWF][IKE] [EAP][Expanded] marshal(): Start marshalling
2024-02-28T04:41:22.855571703Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22.855625038Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.855656786Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22.855774480Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22.855813696Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.855847460Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22.857643843Z [INFO][N3IWF][IKE] Decoding IKE message
2024-02-28T04:41:22.857824922Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22.857907244Z [INFO][N3IWF][IKE] [Encrypted] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.857983485Z [INFO][N3IWF][IKE] Handle IKE_AUTH
2024-02-28T04:41:22.858199187Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22.858268530Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.858336585Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22.858544081Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22.858648789Z [INFO][N3IWF][IKE] [EAP] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.858726580Z [INFO][N3IWF][IKE] [EAP][Expanded] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22.858812051Z [INFO][N3IWF][IKE] EAP5G MessageID : 2
2024-02-28T04:41:22.858952079Z [INFO][N3IWF][NGAP] NGAP event handle
2024-02-28T04:41:22.859957299Z [INFO][N3IWF][IKE] Handle IKE event
2024-02-28T04:41:22.860062655Z [INFO][N3IWF][IKE] Handle UnmarshalEAP5GDataResponse event
2024-02-28T04:41:22.860201582Z [INFO][N3IWF][NGAP] NGAP event handle
2024-02-28T04:41:22.860289260Z [INFO][N3IWF][NGAP] [N3IWF] Send Initial UE Message
2024-02-28T04:41:22.865010679Z [INFO][AMF][Ngap][ran_addr:127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183] Handle InitialUEMessage
2024-02-28T04:41:22.865264707Z [INFO][AMF][Ngap][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][ran_addr:127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183] New RanUe [RanUeNgapID:0][AmfUeNgapID:1]
2024-02-28T04:41:22.865505583Z [INFO][AMF][Ngap][ran_addr:127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183] 5GSMobileIdentity ["SUCI":"suci-0-208-93-0-0-0-0000001234", err: <nil>]
2024-02-28T04:41:22.866731581Z [INFO][AMF][CTX] New AmfUe [supi:][guti:20893cafe0000000001]
2024-02-28T04:41:22.866897884Z [INFO][AMF][Gmm] Handle event[Gmm Message], transition from [Deregistered] to [Deregistered]
2024-02-28T04:41:22.866997535Z [INFO][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] Handle Registration Request
2024-02-28T04:41:22.867074941Z [INFO][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] RegistrationType: Initial Registration
2024-02-28T04:41:22.867173289Z [INFO][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] MobileIdentity5GS: SUCI[suci-0-208-93-0-0-0-0000001234]
2024-02-28T04:41:22.867260776Z [INFO][AMF][Gmm] Handle event[Start Authentication], transition from [Deregistered] to [Authentication]
2024-02-28T04:41:22.867339233Z [INFO][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] Authentication procedure
2024-02-28T04:41:22.869701693Z [INFO][NRF][DISC] Handle NFDiscoveryRequest
2024-02-28T04:41:22.872553579Z [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=AMF&target-nf-type=AUSF |
2024-02-28T04:41:22.877763690Z [INFO][AUSF][UeAuth] HandleUeAuthPostRequest
2024-02-28T04:41:22.877928733Z [INFO][AUSF][UeAuth] Serving network authorized
2024-02-28T04:41:22.881240728Z [INFO][NRF][DISC] Handle NFDiscoveryRequest
2024-02-28T04:41:22.886168943Z [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=AUSF&service-names=nudm-ueau&target-nf-type=UDM |
2024-02-28T04:41:22.891462531Z [INFO][UDM][UEAU] Handle GenerateAuthDataRequest
2024-02-28T04:41:22.891773241Z [INFO][UDM][Suci] suciPart: [suci 0 208 93 0 0 0 0000001234]
2024-02-28T04:41:22.891904217Z [INFO][UDM][Suci] scheme 0
2024-02-28T04:41:22.892014171Z [INFO][UDM][Suci] SUPI type is IMSI
http://127.0.0.10:8000
2024-02-28T04:41:22.893906384Z [INFO][NRF][DISC] Handle NFDiscoveryRequest
2024-02-28T04:41:22.896374384Z [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=UDM&target-nf-type=UDR |
2024-02-28T04:41:22.900273790Z [INFO][UDR][DataRepo] Handle QueryAuthSubsData
2024-02-28T04:41:22.904487428Z [WARN][UDR][DataRepo] QueryAuthSubsDataProcedure err: Data not found
2024-02-28T04:41:22.905333776Z [INFO][UDR][GIN] | 404 | 127.0.0.1 | GET | /nudr-dr/v1/subscription-data/imsi-208930000001234/authentication-data/authentication-subscription |
2024-02-28T04:41:22.906271583Z [WARN][UDM][UEAU] Return from UDR QueryAuthSubsData error
2024-02-28T04:41:22.906597667Z [INFO][UDM][GIN] | 403 | 127.0.0.1 | POST | /nudm-ueau/v1/suci-0-208-93-0-0-0-0000001234/security-information/generate-auth-data |
2024-02-28T04:41:22.907878599Z [INFO][AUSF][UeAuth] 403 Forbidden
2024-02-28T04:41:22.908277813Z [INFO][AUSF][GIN] | 403 | 127.0.0.1 | POST | /nausf-auth/v1/ue-authentications |
2024-02-28T04:41:22.909427312Z [WARN][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] Nausf_UEAU Authenticate Request Failed: &{Type: Title: Status:403 Detail: Instance: Cause:AV_GENERATION_PROBLEM InvalidParams:[]}
2024-02-28T04:41:22.909577956Z [INFO][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] Send Registration Reject
2024-02-28T04:41:22.909687697Z [INFO][AMF][Ngap][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][ran_addr:127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183] Send Downlink Nas Transport
2024-02-28T04:41:22.910651518Z [WARN][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] Authentication procedure failed
2024-02-28T04:41:22.911839659Z [INFO][N3IWF][NGAP] [N3IWF] Handle Downlink NAS Transport
2024-02-28T04:41:22.912039351Z [INFO][N3IWF][IKE] Handle IKE event
2024-02-28T04:41:22.912135668Z [INFO][N3IWF][IKE] Handle SendEAPNASMsg event
2024-02-28T04:41:22.912214872Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.912278080Z [INFO][N3IWF][IKE] [EAP] marshal(): Start marshalling
2024-02-28T04:41:22.912366637Z [INFO][N3IWF][IKE] [EAP][Expanded] marshal(): Start marshalling
2024-02-28T04:41:22.910728780Z [INFO][AMF][Gmm] Handle event[Authentication Error], transition from [Authentication] to [Deregistered]
2024-02-28T04:41:22.912489539Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22.912540642Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.912575887Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22.912525832Z [INFO][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] Handle Authentication Error
2024-02-28T04:41:22.912667859Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22.912682613Z [INFO][AMF][Gmm][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][supi:SUPI:] Send Registration Reject
2024-02-28T04:41:22.912727314Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22.912778697Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22.912783147Z [INFO][AMF][Ngap][amf_ue_ngap_id:RU:0,AU:1(Non3GPP)][ran_addr:127.0.0.1/192.168.1.212/10.60.0.1/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1:42183] Send Downlink Nas Transport
2024-02-28T04:41:23.014364070Z [INFO][N3IWF][NGAP] [N3IWF] Handle Downlink NAS Transport
2024-02-28T04:41:23.014623038Z [INFO][N3IWF][IKE] Handle IKE event
2024-02-28T04:41:23.014733270Z [INFO][N3IWF][IKE] Handle SendEAPNASMsg event
2024-02-28T04:41:23.014875377Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:23.015050620Z [INFO][N3IWF][IKE] [EAP] marshal(): Start marshalling
2024-02-28T04:41:23.015224490Z [INFO][N3IWF][IKE] [EAP][Expanded] marshal(): Start marshalling
2024-02-28T04:41:23.015354018Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:23.015424280Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:23.015545794Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:23.015745940Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:23.015867273Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:23.015936914Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
```
In N3IWUE VM:
```
cd ~/n3iwue
./run.sh
```

```toml!
ubuntu@ubuntu:~/n3iwue$ ./run.sh
tcpdump: listening on any, link-type LINUX_SLL (Linux cooked v1), capture size 262144 bytes
2024-02-28T04:41:22Z [INFO][N3UE][CFG] config version [1.0.1]
2024-02-28T04:41:22Z [INFO][N3UE][CFG] N3UE Log level is set to [trace] level
2024-02-28T04:41:22Z [INFO][N3UE][APP] N3UE Start
2024-02-28T04:41:22Z [INFO][N3UE][Context] SUPI: imsi-208930000001234
2024-02-28T04:41:22Z [INFO][N3UE][Init] IKE service running.
2024-02-28T04:41:22Z [INFO][N3UE][Init] N3UE running...
2024-02-28T04:41:22Z [TRAC][N3UE][APP] Start Registration
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] start IKE_SA_INIT message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [SecurityAssociation] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [KeyExchange] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Nonce] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [SecurityAssociation] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [KeyExchange] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Nonce] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Decoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [SecurityAssociation] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [KeyExchange] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Nonce] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Notification] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Notification] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Handle IKESA INIT
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Get SA payload
pgrep: option requires an argument -- 'P'
Usage:
pgrep [options] <pattern>
Options:
-d, --delimiter <string> specify output delimiter
-l, --list-name list PID and process name
-a, --list-full list PID and full command line
-v, --inverse negates the matching
-w, --lightweight list all TID
-c, --count count of matching processes
-f, --full use full process name to match
-g, --pgroup <PGID,...> match listed process group IDs
-G, --group <GID,...> match real group IDs
-i, --ignore-case match case insensitively
-n, --newest select most recently started
-o, --oldest select least recently started
-P, --parent <PPID,...> match only child processes of the given parent
-s, --session <SID,...> match session IDs
-t, --terminal <tty,...> match by controlling terminal
-u, --euid <ID,...> match by effective IDs
-U, --uid <ID,...> match by real IDs
-x, --exact match exactly with the command name
-F, --pidfile <file> read PIDs from file
-L, --logpidfile fail if PID file is not locked
-r, --runstates <state> match runstates [D,S,Z,...]
--ns <PID> match the processes that belong to the same
namespace as <pid>
--nslist <ns,...> list which namespaces will be considered for
the --ns option.
Available namespaces: ipc, mnt, net, pid, user, uts
-h, --help display this help and exit
-V, --version output version information and exit
For more details see pgrep(1).
2024-02-28T04:41:22Z [INFO][N3UE][IKE] ====== IKE Security Association Info =====
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Remote SPI: 8e4fb1496452b5b0
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Local SPI: 000000000006f708
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Encryption Algorithm: 12
2024-02-28T04:41:22Z [INFO][N3UE][IKE] SK_ei: fa3f28d778d68aee30c037788b72c3c94601e0f1b8f5889d1bd250fb9ce2a871
2024-02-28T04:41:22Z [INFO][N3UE][IKE] SK_er: 5b264004d5e2cfb36f955412ecddb1fbd034569ffbd73db670292ae4f9e28815
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Integrity Algorithm: 2
2024-02-28T04:41:22Z [INFO][N3UE][IKE] SK_ai: 4ea21a1b78f94e6fb8c635ff7dda0290f4414032
2024-02-28T04:41:22Z [INFO][N3UE][IKE] SK_ar: 7671c8795f7e4c24b70de62491dd2e3bdad40fb7
2024-02-28T04:41:22Z [INFO][N3UE][IKE] SK_pi: 1bcc23487f11d526a98405a3b3bc21d2a158fef4
2024-02-28T04:41:22Z [INFO][N3UE][IKE] SK_pr: f57abe4ef682635fe39e41f5c34d32e20c2e0f3c
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] IKE_AUTH message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Identification] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [SecurityAssociation] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [TrafficSelector] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [TrafficSelector] marshal(): Start marshalling
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] notificationPayloadData : 00000000 21 00 00 0a 0b 00 00 00 55 45 2c 00 00 2c 00 00 |!.......UE,..,..|
00000010 00 28 01 03 04 03 00 00 00 02 03 00 00 0c 01 00 |.(..............|
00000020 00 0c 80 0e 01 00 03 00 00 08 03 00 00 02 00 00 |................|
00000030 00 08 05 00 00 00 2d 00 00 18 01 00 00 00 07 00 |......-.........|
00000040 00 10 00 00 ff ff 00 00 00 00 ff ff ff ff 00 00 |................|
00000050 00 18 01 00 00 00 07 00 00 10 00 00 ff ff 00 00 |................|
00000060 00 00 ff ff ff ff |......|
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] Send IKE message to N3IWF
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] Encoding...
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] Sending...
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Decoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Encrypted] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Handle IKE AUTH
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Identification] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Certificate] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Authentication] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [EAP] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [EAP][Expanded] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Get IDr
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Get CERT
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Get AUTH
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Get EAP
2024-02-28T04:41:22Z [DEBU][N3UE][IKE] S-NSSAI: [1 1 2 3]
2024-02-28T04:41:22Z [DEBU][N3UE][IKE] S-NSSAI: [1 17 34 51]
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [EAP] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [EAP][Expanded] marshal(): Start marshalling
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] notificationPayloadData : 00000000 00 00 00 49 02 1a 00 45 fe 00 28 af 00 00 00 03 |...I...E..(.....|
00000010 02 00 00 1c 01 06 02 f8 39 ca fe 00 04 01 03 02 |........9.......|
00000020 03 02 f8 39 03 0a 04 01 01 02 03 04 01 11 22 33 |...9.........."3|
00000030 00 17 7e 00 41 79 00 0d 01 02 f8 39 f0 ff 00 00 |..~.Ay.....9....|
00000040 00 00 00 21 43 2e 02 80 20 |...!C... |
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] Send IKE message to N3IWF
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] Encoding...
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22Z [TRAC][N3UE][IKE] Sending...
2024-02-28T04:41:22Z [INFO][N3UE][CFG] Write SQN=16f3b3f71006 into config file
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Decoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Encrypted] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Handle IKE AUTH
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE message
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Encoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] Decoding IKE payloads
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [EAP] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3IWF][IKE] [EAP][Expanded] unmarshal(): Start unmarshalling received bytes
2024-02-28T04:41:22Z [INFO][N3UE][IKE] Get EAP
```
User flows
---
```sequence
note over N3IWUE:NAS & RRC layer started
N3IWUE->N3IWF:SCTP Accept from: 10.10.10.160:58233
AMF->N3IWF:SCTP connection established (10.10.10.193:38412)
N3IWF->AMF:NG Setup Request
AMF-->N3IWUE:Initial Context Setup Reque/127.0.0.10:8000
```
> Read more about sequence-diagrams here: http://bramp.github.io/js-sequence-diagrams/
Final Result and Problem
---
### Final N3IWF - N3WUE Result:

> Read more about mermaid here: http://mermaid-js.github.io/mermaid/
### Problem
#### 1. Missing Configuration

* #### solving
check the configuration

#### 2. Missing Configuration


* #### solving
rechange VM 1 and 2, if the previous one use VM 1 is installed with N3IWF remove it and install N3IWUE in VM1. VM 2 for the N3IWF
Disable Unnacessary the Network Interface, make sure it's **NOT** the main IP:
```
sudo ip link set dev [nama_antarmuka] down
```
#### 3. Missing Configuratin

* #### solving
the webconsole still in editing mode, you need to submit the data in webconsole
#### 4. Address already in use

* #### solving
you need to kill the PID
```
sudo lsof -i -P -n
```

```
sudo kill -9 <pid>
```

## Iperf result
#### Server side

#### Client Side

## Reference
:::info
* [User Guide Installing N3IWUE](https://free5gc.org/guide/n3iwue-installation/)
* [Iperf installation for ubuntu 20.04](https://lindevs.com/install-iperf-on-ubuntu)
:::
###### tags: `Tesis`