Skip to content

Commit e9e26f9

Browse files
committed
Update lab slides
1 parent 2e69521 commit e9e26f9

14 files changed

+142
-34
lines changed

images/adding-subscribers-1.png

112 KB
Loading

images/adding-subscribers-2.png

97.1 KB
Loading

images/deployment.png

31.5 KB
Loading

images/open5gs-common.png

49.4 KB
Loading

images/sample-subscribers.png

145 KB
Loading

images/vscode-1.png

67.6 KB
Loading

images/wait-amf.png

54.2 KB
Loading

labs/lab1/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ In this lab, you will learn how the 5G Core network is deployed in a Kubernetes
1212
---
1313

1414
# 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.
1616
- 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.
1717

1818
**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`?
1919

2020
---
2121

2222
# 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.
2424
- Notice the exposed ports, such as `38412` for `SCTP` communication, which is critical for 5G signaling.
2525
- Observe the Multus configuration for secondary interfaces, which allows the AMF to interact with other 5G components through its `N2` interface.
2626

@@ -32,7 +32,7 @@ In this lab, you will learn how the 5G Core network is deployed in a Kubernetes
3232
---
3333

3434
# 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.
3636

3737
**Question**: Which NF depends on this service being available?
3838
**Hint**: Check the `initContainers` in the `deployment.yaml` files, which control the order of function startup by making some network functions wait for others.

labs/lab1/README.pdf

515 Bytes
Binary file not shown.

labs/lab1/solution.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
marp: true
3+
theme: default
4+
paginate: true
5+
# size: 4:3
6+
---
7+
# AMF Configmap
8+
9+
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.

labs/lab1/solution.pdf

70 KB
Binary file not shown.

open5gs/common/amf/amf-deployment.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ spec:
2121
{ "name": "n3network", "interface": "n3", "ips": [ "10.10.3.200/24" ] }
2222
]'
2323
spec:
24-
# nodeSelector:
25-
# kubernetes.io/hostname: cn231
2624
initContainers:
2725
- name: wait-scp
2826
image: busybox:1.32.0

slides.md

+94-29
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ git clone https://github.com/niloysh/open5gs-k8s.git
3636
cd open5gs-k8s
3737
```
3838
**3. Set Up Your Testbed**
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.
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`.
4040

4141

4242
---
@@ -53,16 +53,74 @@ The diagram below highlights key interfaces, including the `N2`, `N3`, and `N4`
5353
![w:700 center](images/core-network.png)
5454

5555
---
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`.
5858

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+
![bg right 80%](images/open5gs-common.png)
6360

6461
---
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+
![bg right 80%](images/vscode-1.png)
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.
72+
```yaml
73+
kind: Deployment
74+
metadata:
75+
name: open5gs-amf <==== name of the deployment
76+
labels:
77+
app: open5gs
78+
nf: amf
79+
spec:
80+
...
81+
containers:
82+
- image: ghcr.io/niloysh/open5gs:v2.6.4-aio <==== container image
83+
```
84+
---
85+
# Core Deployment Configuration (4/6)
86+
87+
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
113+
...
114+
plmn_support:
115+
- plmn_id:
116+
mcc: 001
117+
mnc: 01
118+
...
119+
```
120+
121+
122+
---
123+
# Core Deployment Configuration (6/6)
66124
<style> img[alt~="center"] { display: block; margin: 0 auto; } </style>
67125

68126
![w:800 center](images/slice-setup.png)
@@ -100,38 +158,45 @@ Once all the pods are in the `RUNNING` stage, we can take a look at the logs.
100158
For example, we can look at the AMF logs as follows:
101159

102160
```bash
103-
kubectl logs open5gs-amf-<replace_id> -n open5gs
161+
kubectl logs deployments/open5gs-amf -n open5gs
104162
```
105163
![](images/amf-initialize.png)
106164

107-
You should see logs similar to those seen above.
165+
You should see logs similar to those seen above, e.g., stating `AMF initialize done`.
108166

109167
---
110168
# Phase 2 - Subscriber Management
111169
---
112-
# Adding Subscribers using the Open5GS GUI (1/2)
170+
# Adding Subscribers using the Open5GS GUI (1/4)
171+
<style> img[alt~="center"] { display: block; margin: 0 auto; } </style>
113172
Now that our core has been deployed, let's add some subscribers using the Open5GS GUI.
114173

115174
Navigate to http://localhost:30300/ and login with credentials: **username:** `admin` and **password:** `1423`. We can now add subscribers as shown.
116175

117-
![w:800](images/open5gs-webui-1.png)
176+
![w:800 center](images/open5gs-webui-1.png)
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+
![](images/sample-subscribers.png)
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+
![w:1000](images/adding-subscribers-1.png)
118191

119192
---
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`.
121196

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+
![w:1000](images/adding-subscribers-2.png)
123198

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.
135200

136201
---
137202
# Phase 3 - RAN Deployment
@@ -150,11 +215,11 @@ This script will automatically perform the following tasks:
150215
# Verifying the RAN Deployment (1/3)
151216
In your terminal where the `kubectl get pods -n open5gs` command is running, you should observe a new pods for UERANSIM as shown below:
152217

153-
![](images/ueransim-running-1.png)
218+
![w:1000 center](images/ueransim-running-1.png)
154219

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.
156221

157-
![](images/amf-connect-1.png)
222+
![w:1000 center](images/amf-connect-1.png)
158223

159224
---
160225
# Verifying the RAN Deployment (2/3)
@@ -193,7 +258,7 @@ kubectl exec -it deployments/ueransim-ue1 -n open5gs -- /bin/bash
193258

194259
**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.
195260

196-
![](images/uesimtun0.png)
261+
![w:1000 center](images/uesimtun0.png)
197262

198263
---
199264
# Sending Traffic through the Slices (2/3)

slides.pdf

328 KB
Binary file not shown.

0 commit comments

Comments
 (0)