blob: a3b07dbfca4fd1de6912ff52907d4bc59aaaa665 [file] [log] [blame]
Ajay Lotan Thakur5e1c42e2022-11-03 22:36:44 -07001..
2 SPDX-FileCopyrightText: © 2022 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
4
5.. _deployment_ueransim_guide:
6
7UERANSIM Deployment Guide
8==========================
9
10Network Setup
11'''''''''''''
12.. image:: ../_static/images/ueransim.jpg
13 :width: 700px
14
15
16SD-Core VM Preparation
17'''''''''''''''''''''''
18
19- To Expose External IP and Port of amf service, update sd-core-5g-values.yaml ::
20
21 amf:
22 # use externalIP if you need to access your AMF from remote setup and you don't
23 # want setup NodePort Service Type
24 ngapp:
25 externalIp: 10.10.1.1 #ip address of DATA_IFACE
Ajay Lotan Thakurc48e9252022-12-02 07:25:53 -080026 port: 38412
Ajay Lotan Thakur5e1c42e2022-11-03 22:36:44 -070027
28- Deploy 5g core with options DATA_IFACE=ens1f0 and ENABLE_GNBSIM=false, sample command::
29
30 $ ENABLE_GNBSIM=false DATA_IFACE=ens1f0 CHARTS=release-2.0 make 5g-core
31
32- Make sure that ``DATA_IFACE`` connected with UERANSIM VM
33
34UERANSIM VM Preparation
35'''''''''''''''''''''''
36
37- Single interface is used for user plane traffic towards UPF and also control plane
38 traffic towards AMF
39
40- Add following route in routing table for sending traffic over ``DATA_IFACE`` interface ::
41
42 $ ip route add 192.168.252.3 via 10.10.1.1
43
44- Changes done on UERANSIM to match config with above network topology::
45
46 diff --git a/config/free5gc-gnb.yaml b/config/free5gc-gnb.yaml
47 index 81bb13b..452ccad 100644
48 --- a/config/free5gc-gnb.yaml
49 +++ b/config/free5gc-gnb.yaml
50 @@ -5,13 +5,13 @@ nci: '0x000000010' # NR Cell Identity (36-bit)
51 idLength: 32 # NR gNB ID length in bits [22...32]
52 tac: 1 # Tracking Area Code
53
54 -linkIp: 127.0.0.1 # gNB's local IP address for Radio Link Simulation (Usually same with local IP)
55 -ngapIp: 127.0.0.1 # gNB's local IP address for N2 Interface (Usually same with local IP)
56 -gtpIp: 127.0.0.1 # gNB's local IP address for N3 Interface (Usually same with local IP)
57 +linkIp: 10.10.1.2 # gNB's local IP address for Radio Link Simulation (Usually same with local IP)
58 +ngapIp: 10.10.1.2 # gNB's local IP address for N2 Interface (Usually same with local IP)
59 +gtpIp: 10.10.1.2 # gNB's local IP address for N3 Interface (Usually same with local IP)
60
61 # List of AMF address information
62 amfConfigs:
63 - - address: 127.0.0.1
64 + - address: 10.10.1.1
65 port: 38412
66
67 # List of supported S-NSSAIs by this gNB
68 diff --git a/config/free5gc-ue.yaml b/config/free5gc-ue.yaml
69 index 9089ba0..aa0df2e 100644
70 --- a/config/free5gc-ue.yaml
71 +++ b/config/free5gc-ue.yaml
72 @@ -1,14 +1,14 @@
73 # IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 digits)
74 -supi: 'imsi-208930000000003'
75 +supi: 'imsi-208930100007509'
76 # Mobile Country Code value of HPLMN
77 mcc: '208'
78 # Mobile Network Code value of HPLMN (2 or 3 digits)
79 mnc: '93'
80
81 # Permanent subscription key
82 -key: '8baf473f2f8fd09487cccbd7097c6862'
83 +key: '5122250214c33e723a5dd523fc145fc0'
84 # Operator code (OP or OPC) of the UE
85 -op: '8e27b6af0e692e750f32667a3b14605d'
86 +op: '981d464c7c52eb6e5036234984ad0bcf'
87 # This value specifies the OP type and it can be either 'OP' or 'OPC'
88 opType: 'OPC'
89 # Authentication Management Field (AMF) value
90 @@ -20,7 +20,7 @@ imeiSv: '4370816125816151'
91
92 # List of gNB IP addresses for Radio Link Simulation
93 gnbSearchList:
94 - - 127.0.0.1
95 + - 10.10.1.2
96
97 # UAC Access Identities Configuration
98 uacAic:
99 @@ -57,14 +57,14 @@ default-nssai:
100 # Supported integrity algorithms by this UE
101 integrity:
102 IA1: true
103 - IA2: true
104 - IA3: true
105 + IA2: false
106 + IA3: false
107
108 # Supported encryption algorithms by this UE
109 ciphering:
110 - EA1: true
111 - EA2: true
112 - EA3: true
113 + EA1: false
114 + EA2: false
115 + EA3: false
116
117 # Integrity protection maximum data rate for user plane
118 integrityMaxRate:
119
120
121- Once UE is connected to 5G NetwChanges done on UERANSIM to match config with above network topology::
122
123 node1:~ ifconfig uesimtun0
124
125 uesimtun0: flags=369<UP,POINTOPOINT,NOTRAILERS,RUNNING,PROMISC> mtu 1400
126 inet 172.250.237.124 netmask 255.255.255.255 destination 172.250.237.124
127 inet6 fe80::2697:29c8:d043:cf35 prefixlen 64 scopeid 0x20<link>
128 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
129 RX packets 16 bytes 1344 (1.3 KB)
130 RX errors 0 dropped 0 overruns 0 frame 0
131 TX packets 558 bytes 46516 (46.5 KB)
132 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
133
Arrobo, Gabriel1ca2c962023-03-06 09:14:27 -0800134 node1:~$ ping -I uesimtun0 8.8.8.8
135 PING 8.8.8.8 (8.8.8.8) from 172.250.237.124 uesimtun0: 56(84) bytes of data.
Ajay Lotan Thakur5e1c42e2022-11-03 22:36:44 -0700136 64 bytes from 8.8.8.8: icmp_seq=1 ttl=111 time=14.4 ms
137 64 bytes from 8.8.8.8: icmp_seq=2 ttl=111 time=14.4 ms
138 ^C
139 --- 8.8.8.8 ping statistics ---
140 2 packets transmitted, 2 received, 0% packet loss, time 1002ms
141 rtt min/avg/max/mdev = 14.377/14.380/14.384/0.003 ms
142 node1:~$
143
144
145.. note::
146 In above network topology, SD-Core node has iptables NAT rule applied so that
147 UE traffic is NATed and reverse traffic is sent to UERANSIM.
148
149 iptables -t nat -A POSTROUTING -o eno34 -j MASQUERADE