travelping / vpp

5G User Plane Function (UPF) based on VPP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test why the UPF did not follow the GTPU process

w910820618 opened this issue · comments

self.associate()
self.heartbeat()
self.establish_session()
self.verify_forwarding()

We have conducted the above test content, and we want to confirm whether the access to the SGI has taken the GTPU tunnel.
vpp-unittest-TestUPF-e6c2dqtt.zip

unit test are broken at the moment. The CI test are failing because of that: https://gitlab.com/travelping/vpp/pipelines
There is a not yet merged PR to fix that.

@ivan4th can you have look at the log output?

I see the gtpu plugin is disabled in vpp logs. One might be reason.

No, you can't use the gtpu plugin together with the upf plugin. They will both fight for the same UDP port.

Can you test unpacking with your gtpu plugin?Do you need other configuration?After I changed the gtup plugin to enable, it showed an error connecting to vpp.

No, you can't use the gtpu plugin together with the upf plugin. They will both fight for the same UDP port.

Oh okay. I am facing the same problem when I enable both plugins and I supposed to create issue. @RoadRunnr Can you tell me the packet coming from UE or on N3 interface are supposed to have gtpu enacp.
So we need both plugin enabled right ?

Sorry to disturb you in this thread.

No, you can't use the gtpu plugin together with the upf plugin. They will both fight for the same UDP port.

Oh okay. I am facing the same problem when I enable both plugins and I supposed to create issue. @RoadRunnr Can you tell me the packet coming from UE or on N3 interface are supposed to have gtpu enacp.
So we need both plugin enabled right ?

No, you only need one and you only use one at the same time.

The gtpu plugin is for static GTP-U tunnels configured through VPP API or CLI.

The upf plugins implements a full 3GPP UPF node. It handles GTP-U and PFCP.

Since both plugins want to handle GTP-U, only one of them can be loaded at any time.

We now have two ways to verification whether the data passes through the GTPU tunnel.

  1. The udp data can be directly passed through the GTPU tunnel without decapsulation.
  2. The GTPU package needs to be encapsulated to pass the GTPU tunnel.

In test_upf.py I dont see gtpu encapsulation, also there is no PDR matching rule and forwarding rule for gtpu in session.
So tests done like verify forwarding, drop etc. has no gtpu encapsulated packets in uplink. Is that correct @RoadRunnr ?

Check this test. Gtpu tunnel/encap is from access to upf then from upf to sgi may not have tunnel.

Send gtpu encapsulated packet to upf. Upf handles gtpu decap. You can use show trace command to see encap/decap. Packets can be captured end to end.

UPLINK : Access ----(gtpu pkt)---> UPF ---- (pkt) ---> DN
DOWNLINK: DN ---- (pkt)---> UPF ---- (gtpu pkt) ---> Access

# just refer this scapy example only for encap/decap information -
# uplink (see pkt encap in gtpu, no extra tunnel required here)
sendp(Ether(dst="00:0c:29:46:1f:53")/
        IP(src="172.20.16.3",dst="172.20.16.2")/
        UDP(dport=2152)/GTP_U_Header(teid=1234)/
        IP(src="10.10.10.10",dst="172.22.16.3" ,version=4)/
        UDP()/data, iface="n3")

# downlink
sendp(Ether(dst="00:50:56:86:ed:f9")/
        IP(src="172.22.16.2",dst="10.10.10.10")/UDP(),iface="n6")

You will need PDR to set TEIDs and you can refer test_upf.py for sample PDR sessions.
Informative - Tunnel vs Encap

@rohankharade
UPLINK : Access ----(gtpu pkt)---> UPF ---- (pkt) ---> DN
How do you create a tunnel before transmitting GTPU data? Is it via the command line or via vapi?

@rohankharade
If you use the command line, what is the command?

@rohankharade concerning the tests, test_upf.py presently only verifies TDF mode of operation, without using GTP-U encapsulation, but we're going to cover that, too