alejandro_blanco created page: Instructions authored by Alejandro Blanco's avatar Alejandro Blanco
Before continuing with the instructions, please check the [Installation page](./Installation) to clarify that you have installed everything.
# **EPC/Mininet PC**
**Run mininet**
```
sudo python ~/mininet/custom/datacenterTest.py
```
If everything is fine, it will appear on this terminal a list of switches (s0-s1), hosts (h0-h63) and a Nat.
**Run the EPC within Mininet**
In the terminal of Mininet:
```
mininet> xterm h0 h0 h0
```
Now, there are three Minitet terminal of the host0. We totally recommend to launch the EPC in the host0 because the EPC configuration is linked to this host.
**In one mininet terminal run the hss:**
```
sudo ~/openair-cn/scripts/./run_hss
```
**In another mininet terminal run the mme:**
```
sudo ~/openair-cn/scripts/./run_mme
```
**Important to check that this appears on the hss terminal:**
'STATE_CLOSED' -> 'STATE_OPEN' 'imdeaEPC.my.realm'
![hss_crop](/uploads/f012351bd6955f247cf2454fed008925/hss_crop.png)
**Finally, run the spgw:**
```
sudo ~/openair-cn/scripts/./run_spgw
```
# **eNodeB PC**
**Pre srsLTE eNodeB configuration**
Go to the srsLTE folder
```
cd ~/path_to_srsLTE/
```
```
sudo gedit build/srsenb/src/enb.conf
```
And change these lines to those ones:
```
tac = 0x0001
mcc = 208
mnc = 95
mme_addr = 10.0.0.1 #mininet host0 IP
gtp_bind_addr = X.X.X.X
```
X.X.X.X is the IP of the physical host (enb) interface connected to Mininet
**Change the route to connect to Mininet and to the EPC gateway:**
```
sudo ip route add 10.0.0.0/12 via Y.Y.Y.Y
sudo ip route add 10.16.0.0/12 via Y.Y.Y.Y
```
Y.Y.Y.Y is the IP of the virtual machine (the Mininet/EPC virtual machine)
**Execute the eNodeB code**
```
sudo build/srsenb/src/./srsenb enb.conf
```
If it is well connected, **it will appear one enb connected/attached on the MME terminal**.
![mme_enb_crop](/uploads/ed1dac3c483360a33102ca972d01fa8d/mme_enb_crop.png)
# **UE PC**
**Go to the srsLTE folder**
```
cd ~/path_to_srsLTE/
```
**Pre srsLTE configuration**
```
sudo gedit build/srsue/src/ue.conf
```
Change these lines to those ones:
```
algo = milenage
op = 840337C3D45397CE8EA8609FFDC47224
#amf = 8000
k = 352857A8F4EB1C1EF485F4356CC925D0
imsi = 901700000012948
```
**Execute the UE code**
```
sudo build/srsue/src/./srsue ue.conf
```
It the UE is well connected to the eNodeB and to the EPC, you will see on the eNodeB terminal:
![enb_crop](/uploads/47e996f306daa71b5f2f38033fbc4a8c/enb_crop.png)
In addition, in the MME terminal you should see on the statistics one connected and attached UE .
Finally, the the EPC gives an IP to the UE. This IP appears on the UE terminal. Note that this IP has to be within the range of 10.16.0.0/12:
![UE_crop](/uploads/39044e8335e47b429bce951ed8572092/UE_crop.png)
**Add the route to connect the UE to the gateway**
```
sudo route add default gw 10.16.0.1
```
At this moment, the UE can do ping to the EPC. **If you want to connect to internet, it is needed to change the DNS server**
```
sudo gedit /etc/resolv.conf
```
Add this line at the end:
```
nameserver 8.8.8.8
```
At this moment, the UE has total connectivity to internet. Have fun!
\ No newline at end of file