edgecomllc / eupf

5G User Plane Function (UPF) based on eBPF
Apache License 2.0
95 stars 14 forks source link

session request rejected #508

Closed kouamdo closed 6 months ago

kouamdo commented 6 months ago

Now i'm trying to run with open5gs and run it by docker-compose. I'm facing another issue that the request session was rejected and i do not know why.

that is the log eupf;

2023/12/09 17:17:19 INF Saving new association: &{ID:10.240.233.231 Addr:172.19.0.1 NextSessionID:1 NextSequenceID:1 Sessions:map[] HeartbeatRetries:0 cancelRetries:} 2023/12/09 17:21:12 INF Got Session Establishment Request from: 172.19.0.1. 2023/12/09 17:21:12 INF Session Establishment Request: CreatePDR ID: 1 FAR ID: 1 QER ID: 1 URR ID: 1 Source Interface: 1 UE IPv4 Address: 10.33.0.6 CreatePDR ID: 2 Outer Header Removal: 0 FAR ID: 2 QER ID: 1 Source Interface: 0 TEID: 5 Ipv4: 172.19.0.12 Ipv6: CreatePDR ID: 3 Outer Header Removal: 0 FAR ID: 1 Source Interface: 3 TEID: 5 Ipv4: 10.240.233.231 Ipv6: CreatePDR ID: 4 Outer Header Removal: 0 FAR ID: 3 Source Interface: 0 TEID: 5 Ipv4: 172.19.0.12 Ipv6: SDF Filter: permit out 58 from ff02::2/128 to assigned CreateFAR ID: 1 Apply Action: [12] BAR ID: 1 CreateFAR ID: 2 Apply Action: [2] Forwarding Parameters: CreateFAR ID: 3 Apply Action: [2] Forwarding Parameters: Outer Header Creation: &{OuterHeaderCreationDescription:256 TEID:5 IPv4Address:10.240.233.231 IPv6Address: PortNumber:0 CTag:0 STag:0} CreateQER ID: 1 Gate Status DL: 0 Gate Status UL: 0 Max Bitrate DL: 1073741 Max Bitrate UL: 1073741 QFI: 1 CreateURR ID: 1 Measurement Method: 2 Volume Threshold: &{Flags:1 TotalVolume:104857600 UplinkVolume:0 DownlinkVolume:0} CreateBAR ID: 1

2023/12/09 17:21:12 INF Saving FAR info to session: 1, {Action:12 OuterHeaderCreation:0 Teid:0 RemoteIP:0 LocalIP:201331372 TransportLevelMarking:0} 2023/12/09 17:21:12 INF WARN: No OuterHeaderCreation 2023/12/09 17:21:12 INF Saving FAR info to session: 2, {Action:2 OuterHeaderCreation:0 Teid:0 RemoteIP:0 LocalIP:201331372 TransportLevelMarking:0} 2023/12/09 17:21:12 INF Saving FAR info to session: 3, {Action:2 OuterHeaderCreation:1 Teid:5 RemoteIP:3890868234 LocalIP:201331372 TransportLevelMarking:0} 2023/12/09 17:21:12 INF Saving QER info to session: 1, {GateStatusUL:0 GateStatusDL:0 Qfi:1 MaxBitrateUL:1073741000 MaxBitrateDL:1073741000 StartUL:0 StartDL:0} 2023/12/09 17:21:12 Matched groups: [permit out 58 from ff02::2/128 to assigned 58 ff02::2 128 assigned ] 2023/12/09 17:21:12 INF Session Establishment Request from 172.19.0.1 accepted. 2023/12/09 17:21:29 INF Got Session Deletion Request from: 172.19.0.1.

2023/12/09 17:21:29 INF Rejecting Session Deletion Request from: 172.19.0.1 (unknown SEID) 2023/12/09 17:21:45 INF Got Session Establishment Request from: 172.19.0.1. 2023/12/09 17:21:45 INF

and there is coming from smf :

image

and there is the docker-compose file :

version: '2.4'

services:
  eupf:
    image: ghcr.io/edgecomllc/eupf:main
    privileged: true
    volumes:
      - /sys/fs/bpf:/sys/fs/bpf
    environment:
      - GIN_MODE=release
      - UPF_INTERFACE_NAME=eth0,eth2
      - UPF_XDP_ATTACH_MODE=generic
      - UPF_API_ADDRESS=:8081
      - UPF_PFCP_ADDRESS=:8805
      - UPF_METRICS_ADDRESS=:9091
      - UPF_PFCP_NODE_ID=172.19.0.12
      - UPF_N3_ADDRESS=172.18.0.12
    ulimits:
      memlock: -1
    cap_add:
      - NET_ADMIN
      - SYS_ADMIN
    ports:
      - 2152:2152/udp
      - 8805:8805/udp
      - 8080:8080
      - 9090:9090
    restart: unless-stopped
    networks:
      n3:
        ipv4_address: 172.18.0.12
      n4:
        ipv4_address: 172.19.0.12
      n6:
        ipv4_address: 172.16.0.12
    sysctls:
      - net.ipv4.conf.all.forwarding=1

  net-tools:
    image: praqma/network-multitool:alpine-extra@sha256:47b259d4463950f5c10d9c0bf63d9e71ec456618f5549a414afa0c04392e0ac1
    privileged: true
    restart: unless-stopped
    networks:
      n6:
        ipv4_address: 172.16.0.13
    command:
      - /bin/sh
      - -c
      - |
        ip ro add 10.33.0.0/16 via 172.16.0.12 dev eth0
        echo "done"
        tail -f /dev/null

networks:
  n3:
    external: true
  n4:
    external: true
  n6:
    external: true

where is the problem wetween this association ?

pirog-spb commented 6 months ago

UPF said that session is unknown for Session Deletion Request.

2023/12/09 17:21:29 INF Rejecting Session Deletion Request from: 172.19.0.1 (unknown SEID)

Please verify that session id is correct using tcpdump, for instance.

pirog-spb commented 6 months ago

Another strange point is that SMF initiates session deletion. According to smf's log it waits for Created PDRs - FTUP option. But UPF by default doesn't send FTUP flag to SMF...

Try to enable FTUP feature in UPF(FTUP flag + teid pool) via corresponding config options (since v0.6.0)

kouamdo commented 6 months ago

thank you , .... it is okay now

Another strange point is that SMF initiates session deletion. According to smf's log it waits for Created PDRs - FTUP option. But UPF by default doesn't send FTUP flag to SMF...

Try to enable FTUP feature in UPF(FTUP flag + teid pool) via corresponding config options (since v0.6.0)