S1 handover with emulated UE and eNBs
Introduction
This tutorial shows how to use S1 handover with emulated UE and eNBs in PhantomNet. To get started, first instantiate an experiment with the Basic-OpenEPC profile via PhantomNet portal. When creating the experiment, increase the "Number of eNodeB nodes" to 2 or 3 (currently, 3 eNodeBs are maximum number of eNodeBs). In this tutorial, we assume your client is initially connected to enb1, and moves from enb1 to enb2. If you don't know how to perform the initial UE attachment with OpenEPC, please first go through the OpenEPC Tutorial. If your client is not connected to enb1 (e.g., enb2, enb3), you just need to change parameters in each command. S1 handover with emulated UE and eNBs needs some manual steps since emulated UE and eNBs in OpenEPC does not have radio procedures which needs S1 handover. However, the procedures among source, target eNB, MME, and SGW are the same as S1 handover standard.
Required information for S1 handover
For S1 handover, you need to know client imsi, enodeb's tac and cell id and ip address. Generally, your experiment has these values for them.
i) client imsi : 998980000001001
* Subsequent clients will increment from here. E.g., client2 would be 998980000001002
ii) eNBs information (you can check enodeb's tac and cell id information in /opt/OpenEPC/etc/enodeb.xml).
cell id | ip address | TAC | |
enb1 | 4567 | 192.168.3.29 | 01 |
enb2 | 4568 | 192.168.3.30 | 01 |
enb3 | 4569 | 192.168.3.31 | 01 |
iii) You can check which eNB is connected to UE for an initial connection for UE in enb's console.
# attach to enb's console
enb:~$ /opt/OpenEPC/bin/enodeb.attach.sh
# type "enodeb.print". With "help" command, you can see all possible commands.
eNodeB> enodeb.print
WARN:enodeb_console_print_sessions():82> IP address: [192.168.4.91]
WARN:execute_external():225> Sessions
Index: [7] IMSI: [998980000001001]
MME:[192.168.4.80|3550667] ENB S1AP:[|7]
PDN Connection> APN:[default] Type:[1]
IPv4:[192.168.3.33/32] IPv6:[]
ENB S1U:[192.168.4.91|7]
SGW S1U:[192.168.4.20|1717025697]
RAB> EBI:[5]
ENB S1U:[192.168.4.91|7] SGW S1U:[192.168.4.20|1717025697]
Step 1: Trigger "Handover Request" in source eNB
i) ssh into the source enb (In this example, enb1)
ssh enb1.[your experiment name].[your project name].emulab.net
ii) attach to source enb's console
enb1:~$ /opt/OpenEPC/bin/enodeb.attach.sh
iii) type "handover request" in enb's console
# command format enodeb.intra_lte_handover <imsi> <tac> <target enb's cell id>
eNodeB> enodeb.intra_lte_handover 998980000001001 01 4568
With this command, OpenEPC proceeds "Handover Command" procedure in S1 handover.
Step 2: Handover Notify in target eNB
i) ssh into the target enb (In this example, enb2)
ssh enb2.[your experiment name].[your project name].emulab.net
ii) attach to target enb's console
enb2:~$ /opt/OpenEPC/bin/enodeb.attach.sh
iii) type "handover request" in target enb's console
# command format enodeb.handover_notify <imsi>
eNodeB> enodeb.handover_notify 998980000001001
With this command, OpenEPC executes the rest of S1 handover procedures.
Step 3: Set up routing table in UE
i) ssh into the ue
ii) change routing table
# command format
# sudo route add -net <target enb's ip> netmask 255.255.255.255 dev <client network interface which has "192.168.3.33">
# sudo route add default gw <target enb's ip> <client network interface which has "192.168.3.33">
client1:~$ sudo route add -net 192.168.3.30 netmask 255.255.255.255 dev eth5
client1:~$ sudo route add default gw 192.168.3.30 dev eth5
client1:~$ route -n
iii) send traffic from UE to Internet, which goes through target enb.
client1:~$ ping 8.8.8.8
Questions
For any other questions, contact phantomnet-users@emulab.net