Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Usage #4

Closed
nickvsnetworking opened this issue Nov 25, 2019 · 14 comments
Closed

Example Usage #4

nickvsnetworking opened this issue Nov 25, 2019 · 14 comments

Comments

@nickvsnetworking
Copy link

Hi S1AP team,
Keen to start using this,
I've compiled from source, and I see both libraries compiled (TestCntlrApp/lib and Trfgen/lib)

Next question is how do I use it? I had a read through the source code and found the example/sample in Trafgen and made that executable, but I just get back an error

example/sample: error while loading shared libraries: libtrfgen.so: cannot open shared object file: No such file or directory

Regardless of where I put libtrfgen.so

Is anyone able to give me a shove in the right direction?

@ssanadhya
Copy link
Contributor

We have been using S1ap-tester for integration tests with Magma EPC (https://github.com/facebookincubator/magma). Detailed instructions on running example scenarios are here: https://github.com/facebookincubator/magma/blob/master/docs/readmes/lte/s1ap_tests.md

@infinitydon
Copy link

@ssanadhya - The detailed example is tied to using Magma vagrant VMs, is it possible to get an example of how to use S1APTester with a generic EPC stack (MME,SGW,PGW)?

The current README only shows how to compile the modules.

@cgiraldo
Copy link
Contributor

I am trying s1APTester with open5gs epc.

I edit file nbAppCfg.txt to set ENB_IP_ADDR, SCTP_IP_ADDR (to the IP of S1APTester machine) and MME_ADDR and PLMN_ID.
I have also changed the UE_ETH_INTF.

Still no luck. Wireshark shows SCTP INIT messages from S1APTester to MME and SCTP INIT ACK from MME to S1APTester repeating.

@vimal2828
Copy link
Contributor

@cgiraldo , no exchange of SCTP complete signalling ? so far I have not faced SCTP related issue with simulator with my EPC. I have not tried with open5gs EPC.

@infinitydon
Copy link

@vimal2828 Please can you share how you were able to get this to work. If possible a step by step procedure on how to configure s1APTester to work EPC (apart from Magma)..

@vimal2828
Copy link
Contributor

@infinitydon , please find the steps that I used to bring up the S1AP simulator and integration with my EPC.

  1. Compile TestCntlrApp and copy the generated shared library libtfw.so in directory /usr/lib
  2. Compile Trfgen and copy the generated shared library libtrfgen.so in in the directory /usr/lib
  3. Compile TestCntlrStub and get the binary testCntrlr

Note: In step 3, if compilation fails then need to do some changes in code either at TestCntlrStub or TestCntlrApp.
There is a mismatch in structure definition along with another where one variable is used but not defined.
For the differences please refer the pull request https://github.com/facebookexperimental/S1APTester/pull/22/files

  1. Go to bin directory of TestCntlrStub and modify the nbAppCfg.txt
    ENB_IP_ADDR 172.168.10.134
    MME_ADDR 172.168.10.135 // MME IP address on which MME is listening for SCTP connection from eNB
    SCTP_IP_ADDR 172.168.10.134
    UE_ETH_INTF enp0s9 //Interface should exist in the system
    VS_IP_ADDR 172.168.1.200 //Not explored much on data path
  2. sudo ./testCntrlr -f testCaseList_1.txt // Assumed EPC is already up and running

Expected Result

[Stub] Initialising stack manager
tag: AUTH_TYPE tagVal: MILENAGE
[Stub] Entering trf_test_init()
[Stub] Creating message queue..
[Stub] Sending UE App config
[Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering
[Stub] TC_msg_recv(): msgid=2
[Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=2), expected (msgid=2)

[Stub] Received a message of type = 2

[Stub] UE APP Config Completed
[Stub] Entering tsReadImsiAndSendUeConfig()
[Stub] Reading imsi file for ueId: 1
[Stub] ueId :1 temp 5 0 5 0 1 9 8 7 6 5 4 0 0 0 2 temp len :14::
[Stub] ueId :1 IMSI imsi len :15::

[STUB]: Sending Ue Config.
[Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering
[Stub] TC_msg_recv(): msgid=4

[Stub] Received (msgptr.msgType=4), expected (msgid=4)

[Stub] Received a message of type = 4

[Stub] UE 1 Config Completed

[Stub]: Sending eNodeB Config
[Stub] ../src/ts_utls.c:TC_API():460: Message Sent
[Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering
[Stub] TC_msg_recv(): msgid=34

**************TPT open server 0

Server Socket FD =[11][Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=34), expected (msgid=34)

[Stub] Received a message of type = 34

[Stub] Received Enodeb Config Confirm from TFW

[Stub] eNodeB configured successfully

[Stub]: eNb Config Completed

[Stub]: Sending S1 SETUP Request
[Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering
[Stub] TC_msg_recv(): msgid=38

************* Testing *Time elapsed(in usec): for timer expiry :6571 usec
[Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=38), expected (msgid=38)

[Stub] Received a message of type = 38

[Stub] Received S1-SETUP Response from TFW

[Stub] S1-SETUP successful received from TFWAPP

[Stub]: RECEIVED S1-SETUP RESPONSE FROM TFWAPP

Hope it will help you out to proceed.

@northmirko
Copy link

Hi @vimal2828 ,
can you share OS you are using, lksctp lib version ?
I am still getting situation described by @cgiraldo ?
INIT, INIT-ACK, and ABORT. Everything is terminating on SCTP level.

@northmirko
Copy link

northmirko commented Sep 29, 2020

Hi @vimal2828 ,
can you share you logs from /tmp/fw/

Mine are stuck here.


[2020_9_29_8_50_50.099][NB]../src/enbApp/nb_traffic_handler.c:259       INFO:  nbAppSendArpRspPkt: Sending the ARP Response Packet to 192.168.1.9

[2020_9_29_8_50_50.100][NB]../src/enbApp/nb_traffic_handler.c:298       INFO:  nbAppHndlARPResponse: Received ARP Response
[2020_9_29_8_50_50.100][NB]../src/enbApp/nb_traffic_handler.c:323       INFO:  nbAppHndlARPResponse: Received ARP Response From Invalid Ip Address 192.168.1.104

[2020_9_29_8_51_25.173][NB]../src/enbApp/nb_traffic_handler.c:259       INFO:  nbAppSendArpRspPkt: Sending the ARP Response Packet to 192.168.1.9

[2020_9_29_8_51_25.174][NB]../src/enbApp/nb_traffic_handler.c:298       INFO:  nbAppHndlARPResponse: Received ARP Response
[2020_9_29_8_51_25.174][NB]../src/enbApp/nb_traffic_handler.c:323       INFO:  nbAppHndlARPResponse: Received ARP Response From Invalid Ip Address 192.168.1.104

[2020_9_29_8_51_25.174][NB]../src/enbApp/nb_traffic_handler.c:259       INFO:  nbAppSendArpRspPkt: Sending the ARP Response Packet to 192.168.1.104

[2020_9_29_8_51_25.174][NB]../src/enbApp/nb_traffic_handler.c:298       INFO:  nbAppHndlARPResponse: Received ARP Response
[2020_9_29_8_51_25.174][NB]../src/enbApp/nb_traffic_handler.c:323       INFO:  nbAppHndlARPResponse: Received ARP Response From Invalid Ip Address 192.168.1.9

@northmirko
Copy link

I finally made it, using of network namespaces (netns) was bad idea. Choice of two virtual machines made things finally work.

@nickvsnetworking
Copy link
Author

@syauqisabili
Copy link

I finally made it, using of network namespaces (netns) was bad idea. Choice of two virtual machines made things finally work.

hello what epc did you use?

@Aniket621
Copy link

Hello all i am getting below error while integrate the S1AP with Magma AGW. Our Network Conf is S1AP tester installed on Host machine and our AGW also installed on same host machine but with in Vagrant VM.

ubuntu@ubuntu-OptiPlex-7070:~/S1APTester/TestCntlrStub/bin$ sudo ./testCntrlr -f testCaseList_1.txt
[sudo] password for ubuntu:
[Stub] Initialising stack manager
tag: AUTH_TYPE tagVal: MILENAGE
[Stub] Entering trf_test_init()
[Stub] Creating message queue..
[Stub] Sending UE App config
[Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering
[Stub] TC_msg_recv(): msgid=2
[Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=2), expected (msgid=2)

[Stub] Received a message of type = 2

[Stub] UE APP Config Completed
[Stub] Entering tsReadImsiAndSendUeConfig()
[Stub] Reading imsi file for ueId: 1
[Stub] ueId :1 temp 2 0 8 1 1 1 2 3 4 5 6 7 8 9 0 temp len :14::
[Stub] ueId :1 IMSI imsi len :15::

[STUB]: Sending Ue Config.
[Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering
[Stub] TC_msg_recv(): msgid=4
[Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=4), expected (msgid=4)

[Stub] Received a message of type = 4

[Stub] UE 1 Config Completed

[Stub]: Sending eNodeB Config
[Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering
[Stub] TC_msg_recv(): msgid=34
[Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=34), expected (msgid=34)

[Stub] Received a message of type = 34

[Stub] Received Enodeb Config Confirm from TFW

[Stub] eNodeB configuration failed with cause[7]

[Stub]: eNb Config Completed

[Stub]: Sending S1 SETUP Request
[Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering
[Stub] TC_msg_recv(): msgid=38
@northmirko @vimal2828 please can u guide me

@jcjanask
Copy link

Hello all i am getting below error while integrate the S1AP with Magma AGW. Our Network Conf is S1AP tester installed on Host machine and our AGW also installed on same host machine but with in Vagrant VM.

ubuntu@ubuntu-OptiPlex-7070:~/S1APTester/TestCntlrStub/bin$ sudo ./testCntrlr -f testCaseList_1.txt [sudo] password for ubuntu: [Stub] Initialising stack manager tag: AUTH_TYPE tagVal: MILENAGE [Stub] Entering trf_test_init() [Stub] Creating message queue.. [Stub] Sending UE App config [Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering [Stub] TC_msg_recv(): msgid=2 [Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=2), expected (msgid=2)

[Stub] Received a message of type = 2

[Stub] UE APP Config Completed [Stub] Entering tsReadImsiAndSendUeConfig() [Stub] Reading imsi file for ueId: 1 [Stub] ueId :1 temp 2 0 8 1 1 1 2 3 4 5 6 7 8 9 0 temp len :14:: [Stub] ueId :1 IMSI imsi len :15::

[STUB]: Sending Ue Config. [Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering [Stub] TC_msg_recv(): msgid=4 [Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=4), expected (msgid=4)

[Stub] Received a message of type = 4

[Stub] UE 1 Config Completed

[Stub]: Sending eNodeB Config [Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering [Stub] TC_msg_recv(): msgid=34 [Stub] ../src/ts_utls.c:TC_API():460: Message Sent

[Stub] Received (msgptr.msgType=34), expected (msgid=34)

[Stub] Received a message of type = 34

[Stub] Received Enodeb Config Confirm from TFW

[Stub] eNodeB configuration failed with cause[7]

[Stub]: eNb Config Completed

[Stub]: Sending S1 SETUP Request [Stub] ../src/ts_utls.c:TC_msg_recv():234: Entering [Stub] TC_msg_recv(): msgid=38 @northmirko @vimal2828 please can u guide me

if you figure this out please share. I will do the same. Thanks.

@northmirko
Copy link

@jcjanask I switched to SRSRAN, much easier to extend code for custom purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants