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

ICMP reply doesn't reach UE #387

Closed
Sabreu opened this issue Feb 9, 2024 · 23 comments
Closed

ICMP reply doesn't reach UE #387

Sabreu opened this issue Feb 9, 2024 · 23 comments

Comments

@Sabreu
Copy link

Sabreu commented Feb 9, 2024

Hello,

I just tried to setup upg-vpp (v.1.12.0) inside a docker to work with open5gs.
I have real UE and real gnodeb.
icmp request seems to be working fine, goes from gnb to N3 and then via N6 to pc I'm pinging (local pc).

icmp reply starts from the same local pc and goes even to gnb but not for the UE.
One odd thing I see from gnb pcap is that the icmp reply source port is 35727 (10.20.4.2/n3), why not 2152? (with another UPF it's 2152)
Then the other thing is that there is no Extension header (PDU session container) in the reply (with another UPF this is present), although I'm not sure if this is mandatory or not.

All help appreciated as I have been banging my head for long time with this :)

my upg confs:

set interface ip table n3 0
set interface mtu 9000 n3
set interface ip address n3 10.20.4.2/16
set interface state n3 up

set interface ip table n6 0
set interface mtu 9000 n6
set interface ip address n6 10.30.4.4/24
set interface state n6 up

set interface ip table n4 0
set interface mtu 9000 n4
set interface ip address n4 10.10.4.3/24
set interface state n4 up

ip route add 0.0.0.0/0 table 0 via 10.30.4.1 n6
upf pfcp endpoint ip 10.10.4.3 vrf 0
upf node-id fqdn 10.10.4.3
upf nwi name internet vrf 0
upf specification release 16
upf gtpu endpoint ip 10.20.4.2 nwi internet teid 0x000004d2/2

heapsize 2G
unix {
nodaemon
log /etc/vpp/vpp.log
full-coredump
gid vpp
interactive
cli-listen /run/vpp/cli.sock
exec /etc/vpp/init.conf
}

api-trace {
on
}

cpu {
main-core 0
corelist-workers 1-7
}

api-segment {
gid vpp
}

dpdk {
dev 0000:01:00.1 {name n3}
dev 0000:01:00.2 {name n4}
dev 0000:01:00.3 {name n6}
}

plugins {
path /usr/lib/x86_64-linux-gnu/vpp_plugins/
plugin dpdk_plugin.so { enable }
plugin upf_plugin.so { enable }
plugin oddbuf_plugin.so { enable }
}

@mgumz
Copy link

mgumz commented Feb 9, 2024

icmp-to-from-ue: state the framed-ip range. check the routes in both directions. "icmp reply starts from the same local pc and goes even to gnb but not for the UE." … so the icmp-reply is encapsulated into gtp-u. check the .pcap to analyse the traffic (gtp-u tunnel is the right one). and since the icmp-reply is already on the gnb, i would first start there.

you can use https://s3-docs.fd.io/vpp/22.02/cli-reference/clis/clicmd_src_plugins_dispatch-trace.html to get also more insight on the traversal of the packets. but, as said: if the packet is already on the gnb … and it is in the right gtp-u-tunnel, there is not much that we can help you with.

in regards to ports and extensions etc: feel free to raise a bug if you think it is against the specs.

@Sabreu
Copy link
Author

Sabreu commented Feb 9, 2024

The reference UPF has this in the reply and this one works:
Extension header (PDU Session container)
Extension Header Length: 1
PDU Session Container
0000 .... = PDU Type: DL PDU SESSION INFORMATION (0)
.... 0000 = Spare: 0x0
0... .... = Paging Policy Presence (PPP): Not Present
.0.. .... = Reflective QoS Indicator (RQI): Not Present
..00 0001 = QoS Flow Identifier (QFI): 1
Next extension header type: No more extension headers (0x00)

When using UPG I can see from gnb log that packet is discarded due to no dl pdu session information. I don't know about the spec but seems to me that this is mandatory.
Port is fine I think, just the range is too big for me but I can probably hack that.

@RoadRunnr
Copy link
Member

UPG does not support the PDU session container. Looks like you need that. AFAIK gNb will not accept GTP traffic without one.

The OAI project has a patched version of UPG that does have some kind of session container support. Try that.

@Sabreu
Copy link
Author

Sabreu commented Feb 9, 2024

Thanks for pointing that out. Any plan to support anytime soon?
In the mean time I will try the OAI version...

@RoadRunnr
Copy link
Member

Any plan to support anytime soon?

No

For reference, this is their patch: https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp/-/commit/d9909c42e7c70029c3d6b39ebf5132d99032c231

They are adding a fixed QFI. That is not 100% standards conform as the SMF should define which QFI is used in the PFCP session. But is does seem to work in most cases.

@Sabreu Sabreu closed this as completed Feb 9, 2024
@mitmitmitm
Copy link
Contributor

mitmitmitm commented Feb 12, 2024 via email

@Sabreu
Copy link
Author

Sabreu commented Feb 12, 2024

@mitmitmitm awesome! I will try that branch soon when I have time

@Sabreu Sabreu reopened this Feb 12, 2024
@Sabreu Sabreu closed this as completed Feb 12, 2024
@Sabreu
Copy link
Author

Sabreu commented Feb 12, 2024

I also have a branch with somewhat complete PDU sess. container / QFI support at https://github.com/mitmitmitm/upg-vpp/tree/qfi. Will hopefully submit it as a PR soon.

This one seem to crash when icmp request comes from gnb to upf.
master branch does not crash.

How to get some logs where this crashes? running it in docker..

@mitmitmitm
Copy link
Contributor

mitmitmitm commented Feb 12, 2024 via email

@mitmitmitm
Copy link
Contributor

mitmitmitm commented Feb 12, 2024 via email

@Sabreu
Copy link
Author

Sabreu commented Feb 12, 2024

policer [error ]: Policer parameter validation failed -- 1R.
policer [error ]: Unable to compute hw param. Error: -1
policer [error ]: Policer parameter validation failed -- 1R.
policer [error ]: Unable to compute hw param. Error: -1

First time seeing these, any idea if the new code could trigger these?

@mitmitmitm
Copy link
Contributor

mitmitmitm commented Feb 13, 2024 via email

@Sabreu
Copy link
Author

Sabreu commented Feb 13, 2024

Extension header (PDU Session container)
Extension Header Length: 1
PDU Session Container
0001 .... = PDU Type: UL PDU SESSION INFORMATION (1)
.... 0000 = Spare: 0x0
00.. .... = Spare: 0x0
..00 0001 = QoS Flow Identifier (QFI): 1
Next extension header type: No more extension headers (0x00)

Should this be DL PDU not UL? at least gnb is saying unknown extension header, discard.

In addition any idea where I could limit the source ports used in N3 as gnb won't accept such high range of ports.
I thought it would be the UPF_NAT_MIN_PORT in upf.h but seems like it's not after all.

@mitmitmitm
Copy link
Contributor

mitmitmitm commented Feb 13, 2024 via email

@Sabreu
Copy link
Author

Sabreu commented Feb 13, 2024

I did git reset for you branch and installed but still seeing UL PDU SESSION INFORMATION.
I don't see any commits in your branch that would have happened today?

@mitmitmitm
Copy link
Contributor

mitmitmitm commented Feb 13, 2024 via email

@Sabreu
Copy link
Author

Sabreu commented Feb 13, 2024

Now it works. icmp request and reply OK.
In fact it seems that gnb accepts the default source ports, seems like the range I thought it would accept is for sending packet from gnb to upf.

@Sabreu
Copy link
Author

Sabreu commented Feb 13, 2024

Seems like the upf crashes after some time has passed, does vpp dump logs somewhere so that this could be checked further?
Edit: might be because of multithread, changed to single thread and so far seems better but time will tell.

@mitmitmitm
Copy link
Contributor

mitmitmitm commented Feb 14, 2024 via email

@Sabreu
Copy link
Author

Sabreu commented Feb 14, 2024

Thanks, just not sure if any of these will apply to docker deployment as it will die on vpp crash. Also my confs are in the first post of this issue.
So far it seems that single core worker doesn't crash (still running).

@s5uishida
Copy link

Hi @mitmitmitm

Could you have a plan to make a pull request of your qfi branch to UPG-VPP?

I think that if QFI is able to use with UPG-VPP, it will work with gNodeB of srsRAN_Project.
For reference, the current status that I have confirmed to work is as follows.

https://github.com/s5uishida/simple_confirmed_info_for_mobile_network/tree/main#ping-and-iperf3

Best regards,

--Shigeru

@mitmitmitm
Copy link
Contributor

mitmitmitm commented Jun 5, 2024 via email

@abousselmi
Copy link

Can someone from the community take a look at @mitmitmitm's patch and share some feedback. Thanks !

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

6 participants