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
@@ -17,7 +17,7 @@ You can find more detailed documentation and diagrams of the Open5GS software ar
17
17
18
18
## Operating System Support
19
19
20
-
In SCN we will typically perform these installation steps using a fresh install of Ubuntu 22.04 on an x86-64-based computer; however, any operating system that `open5gs` supports should work.
20
+
In SCN we will typically perform these installation steps using a fresh install of Ubuntu 24.04 on an x86-64-based computer; however, any operating system that `open5gs` supports should work.
21
21
22
22
Note: When you're installing Ubuntu, we suggest choosing the "minimal install" option that doesn’t install extra unnecessary software. In prior installs this has led to version conflicts.
23
23
@@ -35,54 +35,68 @@ As of November 2024, in the [Open5GS software package](https://github.com/open5g
35
35
36
36
We would also recommend running the optional WebUI (Web User Interface) service: `open5gs-webui.service`.
37
37
38
-
The following steps will walk you through this installation process.
38
+
The following steps will walk you through this installation process.[^1]
39
39
40
-
# Step 1: Install Open5GS (Notes and Pointers)
40
+
[^1]: A similar step-by-step tutorial to this one can be found [here](https://medium.com/networkers-fiit-stu/setting-up-open5gs-a-step-by-step-guide-or-how-we-set-up-our-lab-environment-5da1c8db0439).
41
41
42
-
Install Open5GS following the [Open5GS Quickstart documentation](https://open5gs.org/open5gs/docs/guide/01-quickstart/) based on your operating system and desired implementation (e.g. "bare metal" directly on the operating system vs. [Docker](https://github.com/wildeyedskies/docker-open5gs-basic-config)).
43
-
There are even [VoLTE](https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/) and [Dockerized VoLTE](https://open5gs.org/open5gs/docs/tutorial/03-VoLTE-dockerized/) implementations of Open5GS.
44
-
A similar step-by-step tutorial to this one can be found [here](https://medium.com/networkers-fiit-stu/setting-up-open5gs-a-step-by-step-guide-or-how-we-set-up-our-lab-environment-5da1c8db0439).
42
+
# Step 1: Install Open5GS
45
43
46
-
In SCN we have run Open5GS successfully using Ubuntu 20.04 and 22.04, on bare metal or in Virtual Machines, installed via the `apt` package manager (see Step "2. Install Open5GS with a Package Manager" of the [Quickstart](https://open5gs.org/open5gs/docs/guide/01-quickstart/)).
44
+
## Follow the [Open5GS Quickstart guide](https://open5gs.org/open5gs/docs/guide/01-quickstart/) to install Open5gs.
45
+
46
+
Complete at least Section 2 of the guide based on your operating system (OS) and desired implementation (e.g. "bare metal" directly on the OS vs. [Docker](https://github.com/wildeyedskies/docker-open5gs-basic-config)).[^2]
47
+
48
+
[^2]: There are even [VoLTE](https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/) and [Dockerized VoLTE](https://open5gs.org/open5gs/docs/tutorial/03-VoLTE-dockerized/) implementations of Open5GS.
49
+
50
+
In SCN we have run Open5GS successfully using Ubuntu 20.04, 22.04, and 24.04 (on bare metal or in Virtual Machines) and installed via the `apt` package manager (see Step "2. Install Open5GS with a Package Manager" of the [Quickstart](https://open5gs.org/open5gs/docs/guide/01-quickstart/)).
47
51
First install MongoDB as described in the Quickstart. Then follow instructions under the "Ubuntu" section to install Open5GS via apt.
48
52
49
-
Note: If installing over a `ssh` connection, we recommend using `tmux` or another program in case you get disconnected from the session in the process.
53
+
We also recommend Section 3, though it is not required.
54
+
This will later allow you to register subscribers via the GUI steps provided in the "Register Subscriber Information" section of the Quickstart.
55
+
56
+
After these two sections of the Quickstart, you can mostly return to our tutorial here.
57
+
However, later on in the Networking section we will also be completing the Quickstart steps to "enable forwarding and add the NAT rule" section called "Adding a route for the UE to have WAN connectivity," so you can complete them now if you wish.
58
+
59
+
_Note: If installing Open5GS over a_`ssh`_connection, we recommend using_`tmux`_or another program in case you get disconnected from the session in the process._
50
60
51
-
## Configure MME and SGWU
61
+
#Step 2: Configure Open5gs Components (MME and SGWU)
52
62
53
-
Note that for our LTE setup, the MME and SGWU are the only components whose config files you will really need to change from the defaults.
63
+
For our LTE setup, the MME and SGWU are the only components whose config files you will need to change from the defaults.
54
64
55
-
###MME
65
+
## MME
56
66
Edit the `/etc/open5gs/mme.yaml` file (as root or using `sudo`) as follows:
57
-
- Under `mme:` -> `s1ap:` -> `server:` -> `address:`, set the IP address you will assign to the network interface (likely an ethernet port) on your EPC computer which will be connecting to the eNB. In this tutorial (to match with the Network Configuration section that follows), we will use `192.168.150.1`.
67
+
- Under `mme:` -> `s1ap:` -> `server:` -> `address:`, set the IP address you will assign to the network interface (likely an ethernet port) on your EPC computer which will be connecting to the eNB. In this tutorial (to match with the Network Configuration section that follows), we will use `192.168.150.2`.
58
68
- Under both `mme:` -> `gummei:` and `mme:` -> `tai:`, you will need to change the `plmn_id:` (`mcc:` and `mnc:` values) to match the PLMN you are using for your network. In SCN we use `315` for the MCC and `010` for the MNC, as explained in the "Quick explanation" below.
59
69
60
70
**Quick explanation:** "PLMN" refers to the [Public Land Mobile Network](https://en.wikipedia.org/wiki/Public_land_mobile_network), in which every network has to have a unique carrier ID defined by the 3-digit "mobile country code (MCC)" and a 2 or 3-digit "mobile network code (MNC)". Alternately, for iPhone compatibility in the US, SCN uses the CBRS "private LTE" PLMN assigned by Apple as described in [this doc](https://support.apple.com/guide/deployment/support-for-private-5g-and-lte-networks-depac6747317/web).
61
71
62
72
- Note that for the purposes of eNB config later, the Tracking Area Code (or TAC) listed under `mme:` -> `tai:` -> `tac:` will need to match the TAC number configured on the eNB (using the default of 1 is fine).
63
73
- Optional: Edit `network_name:` (full and short) and `mme_name:` as desired. One of these names will show up on smartphones' lock screens as the "carrier" when the phone is attached to the network.
64
74
65
-
###SGWU
75
+
## SGWU
66
76
Edit the `/etc/open5gs/sgwu.yaml` file (as root or using `sudo`) as follows:
67
-
- Under `sgwu:` -> `gtpu:` -> `server:` -> `address:`, set the IP address you will assign to the network interface on your EPC computer which will be connecting to the eNB (this should be the same as the IP address of the MME set above, if the MME and SGWU are running on the same machine). In this tutorial we will use `192.168.150.1`.
77
+
- Under `sgwu:` -> `gtpu:` -> `server:` -> `address:`, set the IP address you will assign to the network interface on your EPC computer which will be connecting to the eNB (this should be the same as the IP address of the MME set above, if the MME and SGWU are running on the same machine). In this tutorial we will use `192.168.150.2`.
68
78
69
79
As mentioned in the Quickstart, after changing the config files, you will need to restart the corresponding Open5GS daemons:
70
80
```bash
71
81
sudo systemctl restart open5gs-mmed
72
82
sudo systemctl restart open5gs-sgwud
73
83
```
74
-
However, the MME will likely not start correctly until networking is configured, as described below.
84
+
However, the MME will not start correctly until networking is configured, as described below.
75
85
76
-
# Step 2: Configure Networking
86
+
# Step 3: Configure Networking
77
87
78
-
Remember to follow all the network configuration steps in the [Open5GS Quickstart documentation](https://open5gs.org/open5gs/docs/guide/01-quickstart/). For SCN's Ubuntu machines, this means:
88
+
Setting up networking can be the most finicky part of Open5GS configuration, and the source of most failures/bugs.
79
89
80
-
- Allowing IP forwarding on your machine, e.g. via the following command:
81
-
```bash
82
-
sudo sysctl -w net.ipv4.ip_forward=1
83
-
```
90
+
For SCN's Ubuntu machines, this means:
91
+
92
+
- Allowing IP forwarding on your machine, e.g. via the following options:
93
+
- For immediate application, run the command
94
+
```bash
95
+
sudo sysctl -w net.ipv4.ip_forward=1
96
+
```
97
+
- For persistence, in`/etc/sysctl.conf` remove the `#` comment symbol from the front of the line that says `net.ipv4.ip_forward=1`
84
98
- Using Netplan to configure network interfaces with IP addresses in the desired way.
85
-
- Setting up NAT rules using `iptables` so that traffic from the eNB can reach the Internet and vice versa
99
+
- Setting up NAT rules using `iptables` so that traffic from the eNB can reach the Internet and vice versa.
86
100
87
101
The latter two steps are explained in detail below.
88
102
@@ -99,7 +113,7 @@ line. A list of network interfaces will appear in the terminal. Find the ones
99
113
corresponding to your ethernet ports (their names usually start with “eth,”
100
114
“enp,” or “enx”).
101
115
102
-
For Ubuntu 22.04, we're currently using the Netplan program to manage our network configuration.
116
+
For Ubuntu 24.04, we're currently using the Netplan program to manage our network configuration.
103
117
Create a file in the `/etc/netplan` directory (i.e. a folder) named
104
118
`99-open5gs-config.yaml`, and add the following lines, substituting the correct
105
119
interface names and subnets for your configuration:
@@ -155,7 +169,7 @@ route local traffic between the EPC and eNB.
155
169
network:
156
170
ethernets:
157
171
enp1s0: # name of ethernet interface
158
-
dhcp4: true
172
+
dhcp4: yes
159
173
addresses:
160
174
- 192.168.150.2/24 # list all downstream networks
161
175
- 192.168.151.2/24
@@ -175,7 +189,7 @@ recommended configuration above, you may need to connect that EPC ethernet port
175
189
to something (e.g. the eNB, a switch, another machine) via an ethernet cable to
176
190
wake the interface up (so that it becomes active and takes on the assigned IP
177
191
addresses). This is because the open5gs MME needs to "bind" (or associate) its S1 interface to one of those IP
178
-
addresses (in this case `192.168.0.2`). Until those IP addresses exist on your machine,
192
+
addresses (in this case `192.168.150.2`). Until those IP addresses exist on your machine,
179
193
the MME will continually throw errors if you try to run it.
180
194
181
195
## Setting `iptables` NAT rules to connect the eNB to the Internet
@@ -186,9 +200,11 @@ There might be an easier way to do this, but we've found the cleanest and most r
186
200
187
201
```bash
188
202
sudo iptables -t nat -A POSTROUTING -s 192.168.151.0/24 -j MASQUERADE
**Quick explanation:** The `-t nat` option tells IPTables to install the rule in the correct "table" containing all the NAT rules, and the `-A` option means we're **A**dding the rule as opposed to **D**eleting it (`-D`). `POSTROUTING` is the "chain," or particular list of rules, that this type of NAT rule should go in (more on that [here](https://rlworkman.net/howtos/iptables/chunkyhtml/c962.html) and in this [diagram](https://upload.wikimedia.org/wikipedia/commons/3/37/Netfilter-packet-flow.svg) if you're interested). `-s 192.168.151.0/24` means that we're applying this rule to packets from the **S**ource IP addresses described by the subnet `192.168.151.0/24`. `-j MASQUERADE` means the action we'll be **J**umping to as a result of this rule is "masquerading" the source IP address as my EPC's WAN IP address.
207
+
The second rule allows traffic from the LTE clients on the open5gs subnet to get routed out to the Internet as well.
# Step 3: Start and monitor Open5GS software services
230
+
# Step 4: Start and monitor Open5GS software services
215
231
216
232
Ubuntu’s built-in logging and monitoring services can be used to monitor the core network services. For example, for seeing the output logs of the MME software component we described in the first section, run the following command in the Terminal:
217
233
@@ -225,7 +241,7 @@ OR
225
241
sudo systemctl status open5gs-mmed.service
226
242
```
227
243
228
-
_Tab complete may be able to fill in the service name for systemctl at least._
244
+
_Tab complete may be able to fill in the service name for_ `systemctl` _though often not for_ `journalctl`.
229
245
230
246
Learning to read output logs is really important for managing software infrastructure! Simply Googling output messages that seem important but that you don't understand can be a good first step to figuring out how a system is working. Another interesting tool to investigate is [Wireshark](https://www.wireshark.org/), which is essentially a graphical user interface (GUI) version of the [tcpdump](https://www.tcpdump.org/) command line tool that can show you the communications [packets](https://en.wikipedia.org/wiki/Network_packet) flowing through the various network cards on your computer.
231
247
@@ -244,12 +260,14 @@ The following command will start only the systemd services required for LTE. How
The WebUI is another systemd service and runs by default on your local computer at port 9999.
250
-
It requires some more dependencies to install, such as `nodejs` (see Step "3. Install the WebUI of Open5GS" in the [Quickstart](https://open5gs.org/open5gs/docs/guide/01-quickstart/)). You can reach it by navigating to `http://localhost:9999` in your web browser.
265
+
The WebUI is another (optional) systemd service you may have chosen to install while following the Open5gs Quickstart.
266
+
It is a web portal that runs by default on port 9999 on the EPC computer.
267
+
You can reach it by navigating to `http://localhost:9999`in your web browser.
268
+
It requires some more dependencies to install, such as `nodejs` (see Step "3. Install the WebUI of Open5GS"in the [Quickstart](https://open5gs.org/open5gs/docs/guide/01-quickstart/)).
251
269
252
-
If not already started, start it with the following command:
270
+
If the service has not already started, start it with the following command:
253
271
254
272
```bash
255
273
sudo systemctl start open5gs-webui.service
@@ -259,7 +277,7 @@ The default WebUI login credentials are as follows:
259
277
- Username : admin
260
278
- Password : 1423
261
279
262
-
# Step 4: Add Users to Open5GS database
280
+
# Step 5: Add Users to Open5GS database
263
281
264
282
(Note that an important pre-condition to adding users is to have SIM cards or eSIMs to give to the users for authentication, along with their respective IMSIs and secret keys to register them onto the EPC. These must be procured separately.
265
283
WIP- We will endeavor to make guides for these processes available soon.)
@@ -289,7 +307,7 @@ add_ue_with_apn {imsi key opc apn}: adds a user to the database with a specific
289
307
290
308
The help text also tells you that "default values are as follows: APN "internet", dl_bw/ul_bw 1 Gbps, PGW address is 127.0.0.3, IPv4 only".
291
309
292
-
# Step 5: Maintenance and Management
310
+
# Step 6: Maintenance and Management
293
311
294
312
## Updating Open5GS
295
313
WIP: We are working on an Ansible-based management script for updates and will post updates as they occur.
0 commit comments