blob: a168e9c130c53d46c651fc70c8d9c87e66b057cf [file] [log] [blame]
Larry Petersondef1b672023-08-07 14:06:24 -07001Physical RAN
2---------------
llpb3534642023-08-02 09:23:52 -07003
4We are now ready to replace the emulated RAN with physical gNBs and
5real UEs. You will need to edit ``hosts.ini`` to reflect the Aether
6cluster you want to support, where just a single server is sufficient
7and there is no reason to include nodes in the ``[gnbsim_nodes]`` set.
8We also assume you start with a variant of ``vars/main.yml``
9customized for running physical 5G radios, which is easy to do:
10
11.. code-block::
12
13 $ cd vars
14 $ cp main-gNB.yml main.yml
15
16The following focuses on a single gNB, which we assume is connected to
17the same L2 network as the Aether cluster. In our running example,
18this implies both are on subnet ``10.76.28.0/24``.
19
Larry Peterson8b1ed832023-08-29 12:06:06 -070020.. admonition:: Troubleshooting Hint
21
22 Physical gNBs connect to SD-Core (both the AMF in the control plane
23 and the UPF in the user plane) in exactly the same way as external
24 instances of gNBsim. Going through the process of bringing up gNBsim
25 in a second server, as described in the previous section, is a good
26 way to validate that your Core is "gNB-ready".
27
28
llpb3534642023-08-02 09:23:52 -070029Modify Configuration
30~~~~~~~~~~~~~~~~~~~~~~~~
31
32Modify the ``core`` section of ``vars/main.yml`` to match the
33following, substituting your local details for ``ens18`` and
34``10.76.28.113``. Of particular note, setting ``ran_subnet`` to the
35empty string indicates that the gNB is connected to the same physical
36L2 network as your Aether cluster, and the new ``values_file`` is
37tailored for a physical RAN rather than the emulated RAN we've been
38using.
39
40.. code-block::
41
42 core:
43 standalone: "true"
44 data_iface: ens18
45 values_file: "deps/5gc/roles/core/templates/radio-5g-values.yaml"
46 ran_subnet: ""
47 helm:
48 chart_ref: aether/sd-core
49 chart_version: 0.12.6
50 upf:
51 ip_prefix: "192.168.252.0/24"
52 amf:
53 ip: "10.76.28.113"
54
55
56Prepare UEs
57~~~~~~~~~~~~
58
Larry Petersond3294df2023-09-13 10:35:38 -040059When selecting UEs to connect to Aether, be aware that not all phones
60support the CBRS frequency bands that Aether uses. For band n78,
61Aether is known to work with recent iPhones (11 and greater), Google
62Pixel phones (4 and greater), OnePlus phones, and Moto G 5G
63phones. For band n48, Aether is known to work with Moto G 5G and
64OnePlus phones; Pixel 7 phones are purported to work as well. Another
65option is to use a 5G dongle connected to a Raspberry Pi as a
66demonstration UE. This makes it easier to run diagnostic tests from
67the UE. For example, we have used `APAL's 5G dongle
68<https://www.apaltec.com/dongle/>`__ with Aether.
69
llpb3534642023-08-02 09:23:52 -0700705G-connected devices must have a SIM card, which you are responsible
71for creating and inserting. You will need a SIM card writer (these
72are readily available for purchase on Amazon) and a PLMN identifier
73constructed from a valid MCC/MNC pair. For our purposes, we use two
74different PLMN ids: ``315010`` constructed from MCC=315 (US) and
75MNC=010 (CBRS), and ``00101`` constructed from MCC=001 (TEST) and
76MNC=01 (TEST). You should use whatever values are appropriate for your
77local environment. You then assign an IMSI and two secret keys to
78each SIM card. Throughout this section, we use the following values as
79exemplars:
80
81* IMSI: each one is unique, matching pattern ``315010*********`` (up to 15 digits)
82* OPc: ``69d5c2eb2e2e624750541d3bbc692ba5``
83* Key: ``000102030405060708090a0b0c0d0e0f``
84
Larry Peterson505d4b32023-08-21 14:39:45 -070085Note that the actual config files distributed with OnRamp have IMSIs
86constructed using PLMN id ``00101``. Both sets of examples are taken
Larry Peterson5d6b3b32023-09-05 15:11:55 -070087from working deployments (``315010`` for a 4G/eNB and ``00101`` for a
885G/gNB), so in principle either should work as a model you can emulate
89in your deployment. As a practical matter, however, it is certainly
90easiest (and safest) to start with the existing code.
Larry Peterson505d4b32023-08-21 14:39:45 -070091
Larry Petersond3294df2023-09-13 10:35:38 -040092After inserting the SIM card into the device and powering it up, log
93into the phone, select ``Network Settings > SIMs`` and configure the
94*Access Point Name (APN)* to be ``internet``. This value corresponds
95to variable ``dnn`` (*Data Network Name*), as defined in
96``deps/5gc/roles/core/templates/radio-5g-values.yaml``.
llpb3534642023-08-02 09:23:52 -070097
98Finally, modify the ``subscribers`` block of the
99``omec-sub-provision`` section in file
100``deps/5gc/roles/core/templates/radio-5g-values.yaml`` to record the IMSI,
101OPc, and Key values configured onto your SIM cards. The block also
102defines a sequence number that is intended to thwart replay
103attacks. For example, the following code block adds IMSIs between
104``315010999912301`` and ``315010999912310``:
105
106.. code-block::
107
108 subscribers:
109 - ueId-start: "315010999912301"
110 ueId-end: "315010999912310"
111 plmnId: "315010"
112 opc: "69d5c2eb2e2e624750541d3bbc692ba5"
113 key: "000102030405060708090a0b0c0d0e0f"
114 sequenceNumber: 135
115
116Further down in the same ``omec-sub-provision`` section you will find
117two other blocks that also need to be edited. The first,
118``device-groups``, assigns IMSIs to *Device Groups*. You will need to
119reenter the individual IMSIs from the ``subscribers`` block that will
120be part of the device-group:
121
122.. code-block::
123
124 device-groups:
125 - name: "5g-user-group1"
126 imsis:
127 - "315010999912301"
128 - "315010999912302"
129 - "315010999912303"
130
131The second block, ``network-slices``, sets various parameters
132associated with the *Slices* that connect device groups to
133applications. Here, you will need to reenter the PLMN information,
134with the other slice parameters remaining unchanged (for now):
135
136.. code-block::
137
138 plmn:
139 mcc: "315"
140 mnc: "010"
141
142Aether supports multiple *Device Groups* and *Slices*, but the data
143entered here is purposely minimal; it's just enough to bring up and
144debug the installation. Over the lifetime of a running system,
145information about *Device Groups* and *Slices* (and the other
146abstractions they build upon) should be entered via the ROC, as
147described the section on Runtime Control. When you get to that point,
148Ansible variable ``standalone`` in ``vars/main.yml`` (which
149corresponds to the override value assigned to
150``provision-network-slice`` in ``radio-5g-values.yaml``) should be set
151to ``false``. Doing so causes the ``device-groups`` and
152``network-slices`` blocks of ``radio-5g-values.yaml`` to be
153ignored. The ``subscribers`` block is always required to configure
154SD-Core.
155
156
157Bring Up Aether
158~~~~~~~~~~~~~~~~~~~~~
159
160You are now ready to bring Aether on-line. We assume a fresh install
Larry Petersondef1b672023-08-07 14:06:24 -0700161by typing the following:
llpb3534642023-08-02 09:23:52 -0700162
163.. code-block::
164
165 $ make aether-k8s-install
166 $ make aether-5gc-install
167
168You can verify the installation by running ``kubectl`` just as you did
169in earlier stages. Note that we postpone bringing up the AMP until
170later so as to have fewer moving parts to debug.
171
172
173gNodeB Setup
174~~~~~~~~~~~~~~~~~~~~
175
176Once the SD-Core is up and running, we are ready to bring up the
177physical gNB. The details of how to do this depend on the specific
178device you are using, but we identify the main issues you need to
Larry Peterson5d6b3b32023-09-05 15:11:55 -0700179address using SERCOMM's 5G femto cell (as distributed by MosoLabs) as
180an example. That particular device uses either the n48 or n78 band and
Larry Petersond3294df2023-09-13 10:35:38 -0400181is on the ONF MarketPlace, where you can also find a User's Guide that
182gives detailed instructions about configuring the gNB.
llpb3534642023-08-02 09:23:52 -0700183
184.. _reading_sercomm:
185.. admonition:: Further Reading
186
Larry Peterson5d6b3b32023-09-05 15:11:55 -0700187 `MOSO CANOPY 5G INDOOR SMALL CELL
188 <https://opennetworking.org/products/moso-canopy-5g-indoor-small-cell/>`__.
189
190.. admonition:: Troubleshooting Hint
191
192 The product data sheet shows support for frequency bands
193 n78/n48/n77, but individual devices do not necessarily support all
194 three. For example, we have experience with an n78 device and an n48
195 device, with the latter (n48) now becoming the default. For that
196 band, PLMN id ``00101`` is currently recommended.
llpb3534642023-08-02 09:23:52 -0700197
198For the purposes of the following description, we assume the gNB is
199assigned IP address ``10.76.28.187``, which per our running example,
200is on the same L2 network as our Aether server (``10.76.28.113``).
Larry Petersondef1b672023-08-07 14:06:24 -0700201:numref:`Figure %s <fig-sercomm>` shows a screenshot of the SERCOMM
llpb3534642023-08-02 09:23:52 -0700202gNB management dashboard, which we reference in the instructions that
203follow:
204
205.. _fig-sercomm:
206.. figure:: figures/Sercomm.png
207 :width: 500px
208 :align: center
209
210 Management dashboard on the Sercomm gNB, showing the dropdown
211 ``Settings`` menu overlayed on the ``NR Cell Configuration`` page
212 (which shows default radio settings).
213
214
2151. **Connect to Management Interface.** Start by connecting a laptop
216 directly to the LAN port on the small cell, pointing your laptop's
217 web browser at the device's management page
218 (``https://10.10.10.189``). You will need to assign your laptop an
219 IP address on the same subnet (e.g., ``10.10.10.100``). Once
220 connected, log in with the credentials provided by the vendor.
221
2222. **Configure WAN.** Visit the ``Settings > WAN`` page to configure
223 how the small cell connects to the Internet via its WAN port,
224 either dynamically using DHCP or statically by setting the device's
225 IP address (``10.76.28.187``) and default gateway (``10.76.28.1``).
226
2273. **Access Remote Management.** Once on the Internet, it should be
228 possible to reach the management dashboard without being directly
229 connected to the LAN port (``https://10.76.28.187``).
230
2314. **Connect GPS.** Connect the small cell's GPS antenna to the GPS
232 port, and place the antenna so it has line-of-site to the sky
233 (i.e., place it in a window). The ``Status`` page of the management
234 dashboard should report its latitude, longitude, and fix time.
235
2365. **Spectrum Access System.** One reason the radio needs GPS is so it
237 can report its location to a Spectrum Access System (SAS), a
238 requirement in the US to coordinate access to the CBRS Spectrum in
239 the 3.5 GHz band. For example, the production deployment of Aether
240 uses the `Google SAS portal
241 <https://cloud.google.com/spectrum-access-system/docs/overview>`__,
242 which the small cell can be configured to query periodically. To do
243 so, visit the ``Settings > SAS`` page. Acquiring the credentials
244 needed to access the SAS requires you go through a certification
245 process, but as a practical matter, it may be possible to test an
246 isolated/low-power femto cell indoors before completing that
247 process. Consult with your local network administrator.
248
2496. **Configure Radio Parameters.** Visit the ``Settings > NR Cell
250 Configuration`` page (shown in the figure) to set parameters that
251 control the radio. It should be sufficient to use the default
252 settings when getting started.
253
2547. **Configure the PLMN.** Visit the ``Settings > 5GC`` page to set
255 the PLMN identifier on the small cell (``00101``) to match the
256 MCC/MNC values (``001`` / ``01`` ) specified in the Core.
257
2588. **Connect to Aether Control Plane.** Also on the ``Settings > 5GC``
259 page, define the AMF Address to be the IP address of your Aether
260 server (e.g., ``10.76.28.113``). Aether's SD-Core is configured to
261 expose the corresponding AMF via a well-known port, so the server's
262 IP address is sufficient to establish connectivity. The ``Status``
263 page of the management dashboard should confirm that control
264 interface is established.
265
2669. **Connect to Aether User Plane.** As described in an earlier
267 section, the Aether User Plane (UPF) is running at IP address
268 ``192.168.252.3``. Connecting to that address requires installing a
269 route to subnet ``192.168.252.0/24``. How you install this route is
270 device and site-dependent. If the small cell provides a means to
271 install static routes, then a route to destination
272 ``192.168.252.0/24`` via gateway ``10.76.28.113`` (the server
273 hosting Aether) will work. If the small cell does not allow static
274 routes (as is the case for the SERCOMM gNB), then ``10.76.28.113``
275 can be installed as the default gateway, but doing so requires that
276 your server also be configured to forward IP packets on to the
277 Internet.
278
Larry Petersond3294df2023-09-13 10:35:38 -0400279.. admonition:: Troubleshooting Hint
280
281 For the SERCOMM gNB, if you elect to enable GPS, then ``Setting >
282 Sync_Settings > Sync_Mode`` should be set to ``TIME``. With GPS and
283 PTP disabled, ``Setting > Sync_Settings > Sync_Mode`` should be set
284 to ``FREE_RUNNING``.
285
286.. admonition:: Troubleshooting Hint
287
288 For the SERCOMM gNB, we recommend the following when the gNB's
289 addresses is acquired via DHCP, assuming that address is unlikely to
290 change. When configuring the WAN (via the LAN), start with DHCP
291 enabled. Note the IP address the gNB has been assigned, and then
292 after disconnecting from the LAN, connect to the GUI via this
293 address. You will be on the same L2 subnet as the Aether server,
294 which you should be able to ping using the gNBs diagnostic tool.
295 The default gateway DHCP returns does not know how to route data
296 packets to the UPF. To fix this, modify the WAN settings to use a
297 static IP, with the DHCP-provided IP used as the gNB's static
298 address. Then set the default gateway to the IP address of your
299 Aether server.
300
llpb3534642023-08-02 09:23:52 -0700301Run Diagnostics
302~~~~~~~~~~~~~~~~~
303
304Successfully connecting a UE to the Internet is not a straightforward
305exercise. It involves configuring the UE, gNB, and SD-Core software in
306a consistent way; establishing SCTP-based control plane (N2) and
307GTP-based user plane (N3) connections between the base station and
308Mobile Core; and traversing multiple IP subnets along the end-to-end
309path.
310
311The UE and gNB provide limited diagnostic tools. For example, it's
312possible to run ``ping`` and ``traceroute`` from both. You can also
313run the ``ksniff`` tool described in the Networking section, but the
314most helpful packet traces you can capture are shown in the following
315commands. You can run these on the Aether server, where we use our
316example ``ens18`` interface for illustrative purposes:
317
318.. code-block::
319
320 $ sudo tcpdump -i any sctp -w sctp-test.pcap
321 $ sudo tcpdump -i ens18 port 2152 -w gtp-outside.pcap
322 $ sudo tcpdump -i access port 2152 -w gtp-inside.pcap
323 $ sudo tcpdump -i core net 172.250.0.0/16 -w n6-inside.pcap
324 $ sudo tcpdump -i ens18 net 172.250.0.0/16 -w n6-outside.pcap
325
326The first trace, saved in file ``sctp.pcap``, captures SCTP packets
327sent to establish the control path between the base station and the
328Mobile Core (i.e., N2 messages). Toggling "Mobile Data" on the UE,
329for example by turning Airplane Mode off and on, will generate the
330relevant control plane traffic.
331
332The second and third traces, saved in files ``gtp-outside.pcap`` and
333``gtp-inside.pcap``, respectively, capture GTP packets (tunneled
334through port ``2152`` ) on the RAN side of the UPF. Setting the
335interface to ``ens18`` corresponds to "outside" the UPF and setting
336the interface to ``access`` corresponds to "inside" the UPF. Running
337``ping`` from the UE will generate the relevant user plane (N3) traffic.
338
339Similarly, the fourth and fifth traces, saved in files
340``n6-inside.pcap`` and ``n6-outside.pcap``, respectively, capture IP
341packets on the Internet side of the UPF (which is known as the **N6**
342interface in 3GPP). In these two tests, ``net 172.250.0.0/16``
343corresponds to the IP addresses assigned to UEs by the SMF. Running
344``ping`` from the UE will generate the relevant user plane traffic.
345
346If the ``gtp-outside.pcap`` has packets and the ``gtp-inside.pcap``
347is empty (no packets captured), you may run the following commands
348to make sure packets are forwarded from the ``ens18`` interface
349to the ``access`` interface and vice versa:
350
351.. code-block::
352
353 $ sudo iptables -A FORWARD -i ens18 -o access -j ACCEPT
354 $ sudo iptables -A FORWARD -i access -o ens18 -j ACCEPT
Larry Petersondef1b672023-08-07 14:06:24 -0700355
356Support for eNBs
357~~~~~~~~~~~~~~~~~~
358
359Aether OnRamp is geared towards 5G, but it does support physical eNBs,
360including 4G-based versions of both SD-Core and AMP. It does not
361support an emulated 4G RAN. The 4G scenario uses all the same Ansible
362machinery outlined in earlier sections, but uses a variant of
363``vars/main.yml`` customized for running physical 4G radios:
364
365.. code-block::
366
367 $ cd vars
368 $ cp main-eNB.yml main.yml
369
370Assuming that starting point, the following outlines the key
371differences from the 5G case:
372
3731. There is a 4G-specific repo, which you can find in ``deps/4gc``.
374
3752. The ``core`` section of ``vars/main.yml`` specifies a 4G-specific values file:
376
377 ``values_file: "deps/4gc/roles/core/templates/radio-4g-values.yaml"``
378
3793. The ``amp`` section of ``vars/main.yml`` specifies that 4G-specific
380 models and dashboards get loaded into the ROC and Monitoring
381 services, respectively:
382
383 ``roc_models: "deps/amp/roles/roc-load/templates/roc-4g-models.json"``
384
385 ``monitor_dashboard: "deps/amp/roles/monitor-load/templates/4g-monitor"``
386
3874. You need to edit two files with details for the 4G SIM cards you
388 use. One is the 4G-specific values file used to configure SD-Core:
389
390 ``deps/4gc/roles/core/templates/radio-4g-values.yaml``
391
392 The other is the 4G-specific Models file used to bootstrap ROC:
393
394 ``deps/amp/roles/roc-load/templates/radio-4g-models.json``
395
3965. There are 4G-specific Make targets for SD-Core (e.g., ``make
397 aether-4gc-install`` and ``make aether-4gc-uninstall``), but the
398 Make targets for AMP (e.g., ``make aether-amp-install`` and ``make
399 aether-amp-uninstall``) work unchanged in both 4G and 5G.
400
401The Quick Start and Emulated RAN (gNBsim) deployments are for 5G only,
402but revisiting the other sectionssubstituting the above for their 5G
403counterpartsserves as a guide for deploying a 4G version of Aether.
404Note that the network is configured in exactly the same way for both
4054G and 5G. This is because SD-Core's implementation of the UPF is used
406in both cases.