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

On Using the UERANSIM TUN Interface #186

Open
aligungr opened this issue Nov 17, 2020 · 8 comments
Open

On Using the UERANSIM TUN Interface #186

aligungr opened this issue Nov 17, 2020 · 8 comments

Comments

@aligungr
Copy link
Owner

I want to inform the community that User Plane functionalities are ready to use.

We are introducing the TUN interface in order to use UE's internet connectivity. This feature can be considered as beta and usage method is subject to change, but I think the feature seems more or less stable. And as always we are open to feedbacks, bug reports, pull requests etc.

In our tests, we have successfully browsed the internet using 3 different core networks. (Open5GS and 2 other commercial CNs)

You may want to try this feature for yourself. Related documentation can be found at: Using Data Plane Features

For your information, currently we only support IPv4 protocol. Other PDU types are in road map and not implemented yet.

- Ali

@mimo123-code
Copy link

thats great @aligungr . I have one query regarding the UE ip . where can i find it . is it the interafce for ex in my case in open5gs its ogustun i have created.

@aligungr
Copy link
Owner Author

@mimo123-code You can find the IP address in air.log file or UE's own log file located at ./logs/

@s5uishida
Copy link

s5uishida commented Nov 18, 2020

Hi @aligungr

Thank you very much for supporting the TUN interface!
I was able to confirm the operation here as well.

However, there is one point to worry about.

When 4) pdu-session-establishment was executed, the ICMP packet passed through the uesimtun interface, but after that,

./ue-binder.sh 10.45.0.2 ping google.com

when I executed the above, ICMP packets did not flow to the ogstun interface on the Open5GS side (the uesimtun interface has not been used), and it pinged google.com directly from the UERANSIM machine. In addition, Open5GS and UERANSIM are running on different machines.

However, it can be used as follows here, so there is no particular problem.

ping google.com -I uesimtun

I'm sorry if I make a mis-setting or misunderstand.

Anyway, thank you very much again for supporting the TUN interface!
It's wonderful!!

@s5uishida
Copy link

Hi @aligungr

I was able to confirm the ping of the following configuration using PC(VM) x 3.

                                        -------------
                        ---------------| UERANSIM #1 | [PC-B]   $ ping google.com -I uesimtun
                        |               -------------
                        |               10.45.0.2
                        | 
                        | 10.45.0.1/16 (APN=internet)
 ------------       ---------
| google.com |-----| Open5GS | [PC-A]
 ------------       ---------
                        | 10.46.0.1/16 (APN=internet2)
                        |
                        |               10.46.0.2
                        |               -------------
                        ---------------| UERANSIM #2 | [PC-C]   $ ping google.com -I uesimtun
                                        -------------

This is just quick reporting.

P.S.

I would be very glad if one UERANSIM could handle multiple TUN interfaces. It is an image of one Tenant, one RAN, and multiple PDNs.

Sorry for the many requests.

@aligungr
Copy link
Owner Author

aligungr commented Nov 18, 2020

@s5uishida Thanks for the quick reporting.

Unfortunately ue-binder.sh may be ineffective for some applications. Especially for built-in ping tool in Linux system. When I checked the source code of ping tool, I saw that it uses SO_BINDTODEVICE settings manually. And that's why ue-binder.sh does not work for ping tool. Perhaps we should write our own ping tool for this purpose. However ue-binder should work with almost any other application.


Thanks for the suggestion, it can be useful if UERANSIM support multiple TUN interfaces. However uesimtun interface can have multiple IP addresses. You can utilize multiple PDU sessions or even multiple UEs at the same time using single uesimtun interface. You just need to pass different IP addresses while invoking ue-binder.sh. I'm sorry if I misunderstand.

Thanks.

@s5uishida
Copy link

Hi @aligungr

Thank you very much for your reply.

I understand the former reply. The application curl worked fine.
Also, I will try various things about the latter here.

I will report if there is anything.

Thank you very much again.

@s5uishida
Copy link

s5uishida commented Nov 19, 2020

Hi @aligungr

For example, I thought it would be good if an organization could set up one RAN, and prepare multiple terminals (smartphones and mobile GWs) with APNs set for each of the internet and intranet, and simulate the cases of using them properly. It feels like assigning a different PDN to each APN. Perhaps if the UE and RAN are separated, I think that it would be a natural configuration. Personally, I only need to send data traffic to the TUN interfaces formed end-to-end, so the current simulator that integrates UE and RAN is sufficient.

For your reference, the Open5GS configuration topics for the above operation verification #186 (comment) are shown below.
Case of UPF x 1 and PDN x 2 (APN=internet, internet2)

open5gs/install/etc/open5gs/smf.yaml

--- smf.yaml.orig       2020-11-13 04:07:03.614900521 +0000
+++ smf.yaml    2020-11-16 00:05:22.623121711 +0000
@@ -179,7 +179,17 @@
       - addr: ::1
     pdn:
       - addr: 10.45.0.1/16
+        apn: internet
+        dev: ogstun
       - addr: cafe::1/64
+        apn: internet
+        dev: ogstun
+      - addr: 10.46.0.1/16
+        apn: internet2
+        dev: ogstun2
+      - addr: cafe::2/64
+        apn: internet2
+        dev: ogstun2
     dns:
       - 8.8.8.8
       - 8.8.4.4

open5gs/install/etc/open5gs/upf.yaml

--- upf.yaml.orig       2020-11-13 04:07:03.666833313 +0000
+++ upf.yaml    2020-11-18 01:20:07.996410796 +0000
@@ -165,10 +165,20 @@
     pfcp:
       - addr: 127.0.0.7
     gtpu:
-      - addr: 127.0.0.7
+      - addr: 192.168.100.30
     pdn:
       - addr: 10.45.0.1/16
+        apn: internet
+        dev: ogstun
       - addr: cafe::1/64
+        apn: internet
+        dev: ogstun
+      - addr: 10.46.0.1/16
+        apn: internet2
+        dev: ogstun2
+      - addr: cafe::2/64
+        apn: internet2
+        dev: ogstun2
 
 #
 # smf:

In addition, in Open5GS, when using multiple UPFs properly, the explanation of the selection logic is below.

open5gs/open5gs#560 (comment)
open5gs/open5gs#625

For your reference.

@aligungr
Copy link
Owner Author

@s5uishida Thanks for the suggestions and references. If I understand you correctly, being able to run multiple UEs on different machines will provide this functionality. Most probably (but not certainly), complete separation of UE and RAN will be performed after implementation of NR radio interface.

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

3 participants