While browsing youtube, free5gc shows "sendmsg: message too long"

Hi,

The free5gc of v3.0.2 has been successfully installed and runs with N3IWF enabled. With a proper addressing, routing and dns configuration, the UE is able to connect to Internet via the free5gc and surfs on Internet. For example, UE can access to the wikipedia website.

However, access to some web sites such as youtube fails with messages in red shown in the free5gc. Specifically, the messages shows an error occurs in N3IWF with info โ€œsendmsg: message too longโ€.

To clarify the root problem, we conducted a ping from UE to 60.60.0.101 (an IP address configured at loopback interface in the UPF namespace of the free5gc). The same error message was shown in the free5gc.

As of now, we are still trying to address the problem. It would be great if the free5gc team can figure out the problem and provide us a possible fix. Thank you so much.

Can you provide the pcap file and log file?

How about if you shorten the message about 1000 mtu? Will the error message still exist?

Hi, free5gc team

The message in the log is as follows, where 10.11.0.1 is the IP address assigned to the ipsec0 interface. We guess there may have something wrong with routing in the direction from Internet to 5gUE.

To be specific, the steps in the following reproduce the result.

  1. The free5gc VM is configured an interface ens160 to Internet with IP address 192.168.201.157
  2. The 5gUE VM is with IP address 60.60.1.1 assigned by the free5gc.
  3. A Host on Internet is of IP address 192.168.201.110.
  4. The Host conducts a pure ping to 60.60.1.1 successfully as shown below.
  5. The Host conducts a ping to 60.60.1.1 with packet size set to 1400 successfully as shown below.
  6. The Host conducts a ping to 60.60.1.1 with packet size set to 1405 and fails as the result shown below. Meanwhile, the second figure shows that the free5gc VM in the right window presents the log message with the words โ€œsendmsg: message too longโ€ while the Host in the left window conducts the pings.

With the aforementioned test, the phenomena indicating โ€œmessage too longโ€ can be reproduced. However, solutions are still under investigation. Plz help us. Thank you so much.

Hi,

This issue may cause by mtu problem. Because when the packet send from UE (phone), it will be encapsulate by GRE and IPSec tunnel. After go through N3IWF, the header will be decapsulated then encapsulate the GTP tunnel header. But if you not set the MTU on interface, it will be 1500 as default for all the interface the packet pass.
As the result, if the original packet is as the size of 1500, after encapsulated the tunnel header, packet will be larger for the interface to receive it.

Maybe you can try to set the MTU on N3IWF much larger than 1500 or try to smaller the MTU on UE and internet.

Hi,

so, is there any recommended value for the mtu at N3IWF interface?

Maybe you can try to set a large value of MTU on N3IWFโ€™s interface and check if itโ€™s cause by this reason.

Thank you for the guidance. We managed to enlarge the mtu of the N3IWF interface (i.e., ens192, in our case) and it works.

1 Like

The corresponding network environment set up is shown in the following figure.