d2d_emulator_setup.txt 3.72 KB
Newer Older
1 2 3
Scenario 1 : Off-network UE2UE link
SynchREF UE (UE1)

4
UE1(eth0 - 10.10.10.1)--------UE2(eno1 - 10.10.10.2)
5

6 7 8 9 10 11 12
Here's an example of /etc/network/interfaces configuration for UE1
auto eth0
   iface eth0 inet static
   address 10.10.10.1
   netmask 255.255.255.0
   gateway 10.10.10.1

13
Prepare the environment:
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
14
 - git clone https://gitlab.eurecom.fr/matzakos/LTE-D2D.git  #branch: master
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
This branch contains all the current development for DDPS
 - UE MAC<-> UE MAC for Scenario 1
 - eNB MAC<->UE MAC (NFAPI Transport)
 - RRC Extensions for “on-network” cases
 
NFAPI configuration (required even for Scenario 1 target)
 - git clone https://github.com/cisco/open-nFAPI.git
 - cd open-nfapi
 - patch -p1 --dry-run < $OPENAIR_HOME/open-nfapi.oai.patch
Validate that there are no errors
 - patch -p1 < $OPENAIR_HOME/open-nfapi.oai.patch
 
OAI build/execute
 - export NFAPI_DIR=XXX (place where NFAPI was installed)
 - cd cmake_targets
 - ./build_oai --UE
31
 (if necessary, use ./build_oai -I --UE to install required packages)
32 33 34 35
 - cd lte_build_oai/build/
 - cp ../../../targets/bin/.ue* .
 - cp ../../../targets/bin/.usim* .
 - sudo insmod ../../../targets/bin/ue_ip.ko
36 37

UE1: 
38
 - sudo ifconfig oip0 10.0.0.1
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
39
 - sudo iptables -A POSTROUTING  -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 3
40 41
 - (if necessary) sudo route add default gw 10.10.10.1 eth0
UE2:
42
 - sudo ifconfig oip0 10.0.0.2
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
43
 - sudo iptables -A POSTROUTING  -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 3
44
 - (if necessary) sudo route add default gw 10.10.10.1 eno1
45

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
46 47
UE1 and UE2: Get and build vencore_app from d2d-l3-stub (branch: l3_stub)
 - gcc -I . vencore_app.c -o vencore_app -lpthread
48
 
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
49
--------------------------------
50 51
TEST ONE-TO-MANY
Run UE1 then UE2, for example:
52 53
UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
54 55

Test with Ping
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
56
- Sender - UE1: ping -I oip0 224.0.0.3
57 58 59
- Receiver - UE2: using wireshark

Test with Iperf
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
60 61
- Sender - UE1: iperf -c 224.0.0.3 -u -b 0.1M --bind 10.0.0.1 -t 100
- Receiver - UE2: sudo ./mcreceive 224.0.0.3 5001 
62

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
63 64
Filter the incomming packets according to GroupL2Id: receiver (one-to-many) can discard the packets if it doesn't belong to this group. 
For the moment, both sender and receiver use the same set of Ids (hardcoded)  
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
65

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
66
UE1 (sender)
67
 - sudo ./lte-softmodem-stub -U --emul-iface eth0
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
68
 - ./vencore_app  #send the sourceL2Id, groupL2Id to OAI
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
69
 - ping -I oip0 224.0.0.3
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
70
 UE2(receiver)
71
  - sudo ./lte-softmodem-stub -U --emul-iface eno1 
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
72
  #we can see the incomming packets from OAI log, however, cannot see from Wireshark -> they are discarded at MAC layer
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
73
  - ./vencore_app  #we can see the packets appearing in Wireshark
74
 
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
75
 --------------------------------------
76 77 78 79 80 81 82 83 84 85 86
TEST PC5-S (UE1 -sender, UE2 - receiver) and PC5-U for ONE-TO-ONE scenario
Configure UE1/UE2
UE1: 
 - sudo ifconfig oip0 10.0.0.1
 - sudo iptables -A POSTROUTING  -t mangle -o oip0 -d 10.0.0.2 -j MARK --set-mark 3
 - sudo route add default gw 10.10.10.1 eth0
UE2:
 - sudo ifconfig oip0 10.0.0.2
 - sudo iptables -A POSTROUTING  -t mangle -o oip0 -d 10.0.0.1 -j MARK --set-mark 3
 - sudo route add default gw 10.10.10.1 eno1
 
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
87
step 1:
88
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
89
step 2:
90
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
91
- UE2: ./vencore_app -r #listen to incomming message from PC5-S 
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
92
step 3: 
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
93
- UE1: ./vencore_app -s #send a message via PC5-S (e.g., DirectCommunicationRequest)
94 95 96

Generate unicast traffic
UE1: ping -I oip0 10.0.0.2
97
 
98 99 100 101
 
  --------------------------------------
TEST PC5-D
step 1:
102
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
103 104
- UE1: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
step 2:
105
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
106
- UE2: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
107