LABORA-INF-UFG / paper-MACAK-2022

Untrusted non-3GPP access Wi-Fi use case is a proof-of-concept (PoC) of 5G core access network in which Wi-Fi technology is employed.
Apache License 2.0
10 stars 1 forks source link

Issue :: Y2 Interface - Conection between Wi-Fi AP and N3IWF #2

Closed shobhsr closed 1 year ago

shobhsr commented 1 year ago

Hello, While Setting up the 5G core, getting below error.. Y1 interface successfully created.

~/my5G-core/src/ue$ sudo ./sample/my5g_wifi_config/utils/fix_core.sh net.ipv4.ip_forward = 1 Stopping ufw (via systemctl): ufw.service. ./sample/my5g_wifi_config/utils/fix_core.sh: line 10: cd: /root/gtp5g: No such file or directory make: *** No targets specified and no makefile found. Stop.

Kindly help !!

mariotlemes commented 1 year ago

Hello @shobhsr,

The untrusted non-3GPP access Wi-Fi use case uses gtp5g module to handle packet by PFCP IEs such as PDR and FAR. Then, it is necessary install gtp5g module present in https://github.com/PrinzOwO/gtp5g. According to line 10, the gtp5g is not installed in your environment.

Regards, Mario

shobhsr commented 1 year ago

Hi Mario, Tried to install gtp5g module - following this link (https://github.com/PrinzOwO/gtp5g)

~$ git clone https://github.com/free5gc/gtp5g.git && cd gtp5g Cloning into 'gtp5g'... remote: Enumerating objects: 548, done. remote: Counting objects: 100% (39/39), done. remote: Compressing objects: 100% (36/36), done. remote: Total 548 (delta 15), reused 13 (delta 3), pack-reused 509 Receiving objects: 100% (548/548), 275.73 KiB | 3.10 MiB/s, done. Resolving deltas: 100% (283/283), done.

~/gtp5g$ make clean && make make -C /lib/modules/5.15.0-051500rc7-generic/build M=/home/ubuntu/gtp5g clean make[1]: /lib/modules/5.15.0-051500rc7-generic/build: No such file or directory. Stop. make: [Makefile:81: clean] Error 2

but getting error again.

Kernel and ubuntu version

~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy

~$ uname -r 5.15.0-051500rc7-generic

shobhsr commented 1 year ago

Hi Mario, I have downgraded the system to ubuntu 18 and kernel version 5.4 and now installed gtp5g successfully as well. While trying to execute below command I am getting this error.

:~/my5G-core/src/ue$ sudo ./sample/my5g_wifi_config/utils/fix_core.sh net.ipv4.ip_forward = 1 [ ok ] Stopping ufw (via systemctl): ufw.service. make -C /lib/modules/5.4.0-050400-lowlatency/build M=/home/ubuntu/gtp5g modules make[1]: Entering directory '/usr/src/linux-headers-5.4.0-050400-lowlatency' CC [M] /home/ubuntu/gtp5g/src/gtp5g.o /home/ubuntu/gtp5g/src/gtp5g.c:3:10: fatal error: genl.h: No such file or directory

include

      ^~~~~~~~

compilation terminated. scripts/Makefile.build:265: recipe for target '/home/ubuntu/gtp5g/src/gtp5g.o' failed make[2]: [/home/ubuntu/gtp5g/src/gtp5g.o] Error 1 Makefile:1652: recipe for target '/home/ubuntu/gtp5g' failed make[1]: [/home/ubuntu/gtp5g] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-050400-lowlatency' Makefile:79: recipe for target 'module' failed make: *** [module] Error 2

mariotlemes commented 1 year ago

Hello,

I have downgraded the system to ubuntu 18 and kernel version 5.4 and now installed gtp5g successfully as well.

Were you able to install and build gtp5g on your system? The recommendation is used version 0.2.0 of gtp5g, the same used in the tutorial.

# Clone gtp5g v0.2.0
cd ~
sudo git clone -b v0.2.0 https://github.com/PrinzOwO/gtp5g.git
# Install gtp5g module
cd ~/gtp5g
sudo make && sudo make install

Regards, Mario

shobhsr commented 1 year ago

Hi Mario, Getting some “rt” error now…

:~$ sudo git clone -b v0.2.0 https://github.com/PrinzOwO/gtp5g.git

Cloning into 'gtp5g'...

remote: Enumerating objects: 175, done.

remote: Counting objects: 100% (59/59), done.

remote: Compressing objects: 100% (26/26), done.

remote: Total 175 (delta 36), reused 33 (delta 33), pack-reused 116

Receiving objects: 100% (175/175), 82.02 KiB | 3.15 MiB/s, done.

Resolving deltas: 100% (91/91), done.

Note: checking out '099a0e0164a960bf5d1d8e51c92c71106ad7f0b4'.

You are in 'detached HEAD' state. You can look around, make experimental

changes and commit them, and you can discard any commits you make in this

state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may

do so (now or later) by using -b with the checkout command again. Example:

git checkout -b

:~$ cd gtp5g

:~/gtp5g$ ls -ltr

total 112

-rw-r--r-- 1 root root 1186 Jan 12 09:12 README.md

-rw-r--r-- 1 root root 574 Jan 12 09:12 Makefile

-rw-r--r-- 1 root root 18092 Jan 12 09:12 LICENSE

-rw-r--r-- 1 root root 4685 Jan 12 09:12 gtp5g.h

-rw-r--r-- 1 root root 75605 Jan 12 09:12 gtp5g.c

:~/gtp5g$ sudo make && sudo make install

make -C /usr/src/linux-headers-5.4.0-050400-lowlatency/ M=/home/ubuntu/gtp5g modules

make[1]: Entering directory '/usr/src/linux-headers-5.4.0-050400-lowlatency'

CC [M] /home/ubuntu/gtp5g/gtp5g.o

/home/ubuntu/gtp5g/gtp5g.c: In function ‘ip4_find_route’:

/home/ubuntu/gtp5g/gtp5g.c:884:2: error: too many arguments to function ‘rt->dst.ops->update_pmtu’

rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu, false);

^~

scripts/Makefile.build:265: recipe for target '/home/ubuntu/gtp5g/gtp5g.o' failed

make[2]: *** [/home/ubuntu/gtp5g/gtp5g.o] Error 1

Makefile:1652: recipe for target '/home/ubuntu/gtp5g' failed

make[1]: *** [/home/ubuntu/gtp5g] Error 2

make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-050400-lowlatency'

Makefile:10: recipe for target 'all' failed

make: *** [all] Error 2

:~/gtp5g$

Regards Shobhit Srivastava +91 9839315828

From: Mario Teixeira Lemes @.> Reply to: LABORA-INF-UFG/paper-MACAK-2022 @.> Date: Thursday, 12 January 2023 at 2:23 PM To: LABORA-INF-UFG/paper-MACAK-2022 @.> Cc: "Srivastava, Shobhit" @.>, Mention @.***> Subject: Re: [LABORA-INF-UFG/paper-MACAK-2022] Issue :: Y2 Interface - Conection between Wi-Fi AP and N3IWF (Issue #2)

Hello,

I have downgraded the system to ubuntu 18 and kernel version 5.4 and now installed gtp5g successfully as well.

Were you able to install and build gtp5g on your system? The recommendation is used version 0.2.0 of gtp5g, the same used in the tutorial.

Clone gtp5g v0.2.0

cd ~

sudo git clone -b v0.2.0 https://github.com/PrinzOwO/gtp5g.git

Install gtp5g module

cd ~/gtp5g

sudo make && sudo make install

Regards, Mario

— Reply to this email directly, view it on GitHubhttps://github.com/LABORA-INF-UFG/paper-MACAK-2022/issues/2#issuecomment-1379995781, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5FOJ3DT3NPRFVYBUD5FIA3WR7A4NANCNFSM6AAAAAATWMDGGU. You are receiving this because you were mentioned.Message ID: @.***>

shobhsr commented 1 year ago

Hi Mario, getting below error now...

home/ubuntu/gtp5g/gtp5g.c: In function ‘ip4_find_route’:

/home/ubuntu/gtp5g/gtp5g.c:884:2: error: too many arguments to function ‘rt->dst.ops->update_pmtu’

rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu, false);

^~

scripts/Makefile.build:265: recipe for target '/home/ubuntu/gtp5g/gtp5g.o' failed

make[2]: *** [/home/ubuntu/gtp5g/gtp5g.o] Error 1

Makefile:1652: recipe for target '/home/ubuntu/gtp5g' failed

make[1]: *** [/home/ubuntu/gtp5g] Error 2

make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-050400-lowlatency'

Makefile:10: recipe for target 'all' failed

make: *** [all] Error 2

mariotlemes commented 1 year ago

As can be seen in the attachment, I can not reproduce the error using the kernel indicated by the tutorial (5.0.0.23-generic). Unfortunately I am unable to investigate the issue for higher kernels at the moment. So, please use the same environment defined in general information section.

Captura de Tela 2023-01-12 às 07 14 26

Regards, Mario

shobhsr commented 1 year ago

but when i downgrade this further to 5.0.0-23-generic then I am getting modprobe error.

~$ sudo modprobe mac80211_hwsim radios=2 modprobe: FATAL: Module mac80211_hwsim not found in directory /lib/modules/5.0.0-23-generic

I am using the same environment as mentioned in the general section.

"Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 5.0.0-23-generic x86_64)"

Regards

mariotlemes commented 1 year ago

@shobhsr,

The mac802_hwsim works correctly in the 5.0.0.23-generic kernel. The issue should be with your OS system.

Anyway, in this link has an virtualbox image (.ova) with my5gcore and non-3GPP installed. The default password is my5gcore.

I hope it helps you!

Regards, Mario

shobhsr commented 1 year ago

Hi Mario, I am using Ubuntu 18.04.6 LTS and mac80211_hwsim was working fine till i have not downgraded the kernel version from 5.4 to 5.0. It has stopped just after i have downgraded the kernel version. Any suggestion where I need to check for troubleshooting ?

Regards

mariotlemes commented 1 year ago

Any suggestion where I need to check for troubleshooting ?

I believe you should reinstall your operating system.

Anyway, use the image that i provided. The image is properly configured and will run the use case correctly.

Regards, Mario

shobhsr commented 1 year ago

Any suggestion where I need to check for troubleshooting ?

I believe you should reinstall your operating system.

Anyway, use the image that i provided. The image is properly configured and will run the use case correctly.

Regards, Mario

Okay... Thank you ! Will proceed as per your suggestion.

shobhsr commented 1 year ago

sudo make && sudo make install

Hi Mario, when I am trying to onboard this image (OVA) on AWS then it is giving error. Unsupported kernel version 5.0.0-23-generic

aws ec2 describe-import-image-tasks --import-task-ids import-ami-045aedaaa6e6dc2e0 { "ImportImageTasks": [ { "ImportTaskId": "import-ami-045aedaaa6e6dc2e0", "SnapshotDetails": [ { "DeviceName": "/dev/sde", "DiskImageSize": 12331634176.0, "Format": "VMDK", "Status": "completed", "UserBucket": { "S3Bucket": "n3iwf", "S3Key": "my5G-core.ova" } } ], "Status": "deleted", "StatusMessage": "ClientError: Unsupported kernel version 5.0.0-23-generic", "Tags": [] } ] }

Also in my other environment (with linux 5.4) everything seems to be fine but only there is some route error in function ip4_find_route’

In function ‘ip4_find_route’: /home/ubuntu/gtp5g/gtp5g.c:884:2: error: too many arguments to function ‘rt->dst.ops->update_pmtu’ rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu, false); ^~

Is there a way forward.

Thanks !

Regards

mariotlemes commented 1 year ago

The use case has been tested and works locally using the virtual machine that i provided. For other uses, such as bare metal or in a cloud environment is on your own.

To try out the use case, I suggest first run it the way the tutorial was designed.

Regards, Mario