You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: labs/lab1/README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,15 @@ In this lab, you will learn how the 5G Core network is deployed in a Kubernetes
12
12
---
13
13
14
14
# Review the AMF ConfigMap
15
-
- Open the `configmap` file in the amf directory. This file contains the main configuration for the AMF.
15
+
- Open the `~/open5gs-k8s/open5gs/common/amf/amf-configmap.yaml` file. This file contains the main configuration for the AMF.
16
16
- Look for settings related to Public Land Mobile Network (`PLMN`) and Single Network Slice Selection Assistance Information (`SNSSAI`). Note these settings as they specify which networks and slices the AMF supports.
17
17
18
18
**Question**: Which `PLMN` and `SNSSAI` values are set in this file? What do you think will happen if we connect a UE with `SNSSAI=3-000003`?
19
19
20
20
---
21
21
22
22
# Analyze the AMF Deployment
23
-
- Open the `deployment` file in the amf directory. This file is responsible for deploying the AMF as a pod within the Kubernetes cluster.
23
+
- Open the `deployment.yaml` file in the amf directory. This file is responsible for deploying the AMF as a pod within the Kubernetes cluster.
24
24
- Notice the exposed ports, such as `38412` for `SCTP` communication, which is critical for 5G signaling.
25
25
- Observe the Multus configuration for secondary interfaces, which allows the AMF to interact with other 5G components through its `N2` interface.
26
26
@@ -32,7 +32,7 @@ In this lab, you will learn how the 5G Core network is deployed in a Kubernetes
32
32
---
33
33
34
34
# Examine the AMF Service
35
-
- Open the `service` file for the AMF. This file exposes port `80` to other pods, using the `amf-namf` service allowing the AMF to communicate with other 5G core components through the service-based interface.
35
+
- Open the `service.yaml` file for the AMF. This file exposes port `80` to other pods, using the `amf-namf` service allowing the AMF to communicate with other 5G core components through the service-based interface.
36
36
37
37
**Question**: Which NF depends on this service being available?
38
38
**Hint**: Check the `initContainers` in the `deployment.yaml` files, which control the order of function startup by making some network functions wait for others.
If a UE attempts to connect with `SNSSAI=3-000003` - an unsupported SNSSAI, in the AMF, you might see messages like:
10
+
```bash
11
+
[WARN] Requested SNSSAI (SST=3, SD=000003) is not supported by the AMF
12
+
[ERROR] No suitable slice found for UE with SNSSAI: SST=3, SD=000003
13
+
```
14
+
15
+
---
16
+
# AMF Deployment
17
+
18
+
-**Service-based Interface (SBI):** Port 80 allows the AMF to interact with the Network Repository Function (NRF), enabling service discovery and registration.
19
+
20
+
-**N2 Interface:** Port 38412 is used to establish connectivity with the gNodeB, managing signaling and control information over SCTP.
21
+
22
+
-**Metrics Collection:** Port 9000 provides a dedicated endpoint for monitoring and gathering metrics, aiding in network performance management.
23
+
24
+
The IP address assigned to the `N2` interface on the AMF is `10.10.3.200`.
25
+
26
+
---
27
+
# AMF Service
28
+
29
+
```yaml
30
+
template:
31
+
metadata:
32
+
labels:
33
+
app: open5gs
34
+
nf: ausf <===== the AUSF function
35
+
spec:
36
+
initContainers:
37
+
- name: wait-amf <===== waits for AMF to be running
38
+
image: busybox:1.32.0
39
+
env:
40
+
- name: DEPENDENCIES
41
+
value: amf-namf:80 <==== the amf service
42
+
```
43
+
44
+
- When a UE tries to connect, it sends a registration request to the AMF. The AMF is the primary point of contact for the UE in the 5G core network.
45
+
- Upon receiving the registration request, the AMF sends an authentication request to the AUSF.
Make sure you’ve set up your testbed using the [Testbed Automator](https://github.com/niloysh/testbed-automator). Verify that all pods are in the `RUNNING` state.
39
+
Make sure you’ve set up your testbed using the [Testbed Automator](https://github.com/niloysh/testbed-automator). Verify that all pods are in the `RUNNING` state. You can quickly check the status of all pods with `kubectl get pods -A`.
40
40
41
41
42
42
---
@@ -53,16 +53,74 @@ The diagram below highlights key interfaces, including the `N2`, `N3`, and `N4`
53
53

54
54
55
55
---
56
-
# Core Deployment Configuration (1/2)
57
-
Navigate to the `open5gs` directory, which contains two subdirectories: `common` and `slice`.
56
+
# Core Deployment Configuration (1/6)
57
+
Navigate to the `~/open5gs-k8s/open5gs` directory, which contains two subdirectories: `common` and `slices`.
58
58
59
-
The `common` directory holds subdirectories for each network function (e.g., amf, smf). Each network function subdirectory contains:
60
-
-`deployment.yaml`: Defines the deployment for the network function, running the appropriate open5gs image.
61
-
-`service.yaml`: Configures the Kubernetes service for the network function, exposing the necessary ports, for example **port 80** for the NRF for communication with other NFs.
62
-
-`configmap.yaml`: Contains configuration settings specific to the network function. For example, the AMF configmap contains the supported **PLMN**.
59
+

63
60
64
61
---
65
-
# Core Deployment Configuration (2/2)
62
+
# Core Deployment Configuration (2/6)
63
+
64
+
The `common` directory holds subdirectories for each network function (e.g., amf, smf). Each network function subdirectory (e.g., `amf`) contains a `deployment.yaml`, `service.yaml`, and `configmap.yaml`.
65
+
66
+

67
+
68
+
---
69
+
# Core Deployment Configuration (3/6)
70
+
71
+
The `deployment.yaml` file defines the deployment for the network function, running the appropriate open5gs image.
The `service.yaml` file configures the Kubernetes service for the network function, exposing the necessary ports, for example **port 80** for communication with other NFs over the service based interface (SBI).
88
+
89
+
```yaml
90
+
apiVersion: v1
91
+
kind: Service
92
+
metadata:
93
+
name: amf-namf <==== name of the service
94
+
...
95
+
spec:
96
+
ports:
97
+
- name: sbi
98
+
port: 80 <==== exposed port
99
+
...
100
+
```
101
+
102
+
103
+
---
104
+
# Core Deployment Configuration (5/6)
105
+
The `configmap.yaml` file contains configuration settings specific to the network function. For example, the AMF configmap contains the supported **PLMN**.
106
+
107
+
```yaml
108
+
kind: ConfigMap
109
+
metadata:
110
+
name: amf-configmap
111
+
...
112
+
data: <==== network function specific configuration
Now that our core has been deployed, let's add some subscribers using the Open5GS GUI.
114
173
115
174
Navigate to http://localhost:30300/ and login with credentials: **username:** `admin` and **password:** `1423`. We can now add subscribers as shown.
116
175
117
-

176
+

177
+
178
+
---
179
+
# Adding Subscribers using the Open5GS GUI (2/4)
180
+
181
+
**Navigate to `data/sample-subscribers.md`** in VSCode. You should see two subscribers, `Subscriber 1` and `Subscriber 2`, one for each slice.
182
+
183
+

184
+
185
+
---
186
+
# Adding Subscribers using the Open5GS GUI (3/4)
187
+
188
+
Use the GUI to **fill out the fields** given in `data/sample-subscribers.md` for each subscriber, leaving other fields at their default values.
189
+
190
+

118
191
119
192
---
120
-
# Adding Subscribers using the Open5GS GUI (2/2)
193
+
# Adding Subscribers using the Open5GS GUI (4/4)
194
+
195
+
You can scroll down to get to `SST`, `SD` etc. Don't forget to set `Type` to `ipv4`.
121
196
122
-
1.**Navigate to `data/sample-subscribers.md`**. You should see two subscribers, one for each slice. An example subscriber (Subscriber 1) is shown below:
197
+

123
198
124
-
```
125
-
IMSI: 001010000000001
126
-
Key: 465B5CE8B199B49FAA5F0A2EE238A6BC
127
-
OPC: E8ED289DEBA952E4283B54E88E6183CA
128
-
SST: 1
129
-
SD: 000001
130
-
DNN/APN: internet
131
-
Type: ipv4
132
-
```
133
-
2. **Fill out the fields** using the GUI, leaving other fields at their default values.
134
-
**Note**: You can scroll down to get to `SST`, `SD` etc. Don't forget to set `Type` to `ipv4`.
199
+
**Note**: Do the same for Subscriber 2.
135
200
136
201
---
137
202
# Phase 3 - RAN Deployment
@@ -150,11 +215,11 @@ This script will automatically perform the following tasks:
150
215
# Verifying the RAN Deployment (1/3)
151
216
In your terminal where the `kubectl get pods -n open5gs` command is running, you should observe a new pods for UERANSIM as shown below:
152
217
153
-

218
+

154
219
155
-
We can also check the AMF logs again. You should see something like this.
220
+
We can also check the AMF logs again. You should see `Number of AMF-Sessions is now 2` indicating 2 UEs connected.
**2. Verify Interface:** Inside the pod, run `ip a` to check the interfaces. Look for the `uesimtun0` interface, which indicates the active PDU session and connection to the 5G network.
0 commit comments