Giter VIP home page Giter VIP logo

Comments (21)

hududed avatar hududed commented on July 24, 2024 2

I think I solved it. So in contrast to the tutorial, I didnt have to change any IP addresses at all (in AMF, UPF etc) (I guess since its a single host machine). I just updated the rest (TAC PLMN etc) following srsran.

❯ sudo ip netns exec ue1 ip route add default via 10.45.1.1 dev tun_srsue
❯ sudo ip addr add 10.45.1.1/24 dev ogstun # this was important
❯ sudo ip netns exec ue1 ping 10.45.1.1 -c4
PING 10.45.1.1 (10.45.1.1) 56(84) bytes of data.
64 bytes from 10.45.1.1: icmp_seq=1 ttl=64 time=32.7 ms
64 bytes from 10.45.1.1: icmp_seq=2 ttl=64 time=25.3 ms
64 bytes from 10.45.1.1: icmp_seq=3 ttl=64 time=35.0 ms
64 bytes from 10.45.1.1: icmp_seq=4 ttl=64 time=24.6 ms

--- 10.45.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms

Thanks for the help @pgawlowicz !

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

ping should work. Could you check UE routing table?

sudo ip netns exec ue1 route -n

Do you have another instance of open5gs (installed manually) running on the PC?

from srsran_project.

hududed avatar hududed commented on July 24, 2024
❯ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    20600  0        0 wlp69s0
10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
10.7.0.0        0.0.0.0         255.255.248.0   U     0      0        0 nordtun
10.45.0.0       10.53.1.2       255.255.255.0   UG    0      0        0 nordtun
10.53.1.0       0.0.0.0         255.255.255.0   U     0      0        0 nordtun
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0
❯ sudo ip netns exec ue1 ip route add default via 10.45.1.1 dev tun_srsue
❯ sudo ip netns exec ue1 route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.45.1.1       0.0.0.0         UG    0      0        0 tun_srsue
10.45.1.0       0.0.0.0         255.255.255.0   U     0      0        0 tun_srsue

I am pretty sure I installed and am running just one instance of it. Is there a way to double check?

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

what is this route?

10.7.0.0        0.0.0.0         255.255.248.0   U     0      0        0 nordtun

from srsran_project.

hududed avatar hududed commented on July 24, 2024

Seems to be specific to my VPN. Unfortunately, I couldn't find a way to get this running without nordtun interface. Not sure how to properly set up ogstun interface

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

then your traffic goes to the VPN interface. Could you disable the VPN and test?
Did you use the dockerized Open5gs versoin? see here: https://docs.srsran.com/projects/project/en/latest/tutorials/source/srsUE/source/index.html#open5gs-core

from srsran_project.

hududed avatar hududed commented on July 24, 2024

Ok so I was able to run it without the VPN but ping still doesnt work (but with UE gnb traffic)

❯ sudo ip netns exec ue1 route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.45.1.1       0.0.0.0         UG    0      0        0 tun_srsue
10.45.1.0       0.0.0.0         255.255.255.0   U     0      0        0 tun_srsue
❯ sudo ip netns exec ue1 ping 10.45.1.1 -c4
PING 10.45.1.1 (10.45.1.1) 56(84) bytes of data.

--- 10.45.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3074ms

❯ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    600    0        0 wlp69s0
10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
10.45.0.0       10.53.1.2       255.255.255.0   UG    0      0        0 ogstun
10.45.1.1       10.0.0.1        255.255.255.255 UGH   0      0        0 wlp69s0
10.53.1.0       0.0.0.0         255.255.255.0   U     0      0        0 ogstun
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0

I did try the open5gs docker first and we did go at length not being able to reproduce it (see here) - this is why I tried to run it manually instead. I did triple-checked and updated all the default open5gs configs to srsRAN configs open5gs-5gc.yaml

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

Why do you have those two routes?

10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
...
10.45.1.1       10.0.0.1        255.255.255.255 UGH   0      0        0 wlp69s0

Can you remove it?

from srsran_project.

hududed avatar hududed commented on July 24, 2024

So I restarted so I'll show you what routes are there step by step:

  1. fresh restart
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    600    0        0 wlp69s0
10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0
  1. Run all open5gs components:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    600    0        0 wlp69s0
10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.53.1.0       0.0.0.0         255.255.255.0   U     0      0        0 wlp69s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0

Not sure why ogstun routes are there, but I assume its from smf and amf:

❯ grep "10.45." /etc/open5gs/*
grep: /etc/open5gs/backup: Is a directory
grep: /etc/open5gs/hnet: Is a directory
/etc/open5gs/smf.yaml:    - subnet: 10.45.0.1/24
/etc/open5gs/smf.yaml:      gateway: 10.45.0.1
grep: /etc/open5gs/tls: Is a directory
/etc/open5gs/upf.yaml:    - subnet: 10.45.0.1/24
/etc/open5gs/upf.yaml:      gateway: 10.45.0.1
  1. After gnb and ue ran:
❯ sudo ip ro add 10.45.0.0/24 via 10.53.1.2
❯ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    600    0        0 wlp69s0
10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
10.45.0.0       10.53.1.2       255.255.255.0   UG    0      0        0 wlp69s0
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.53.1.0       0.0.0.0         255.255.255.0   U     0      0        0 wlp69s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0
❯ sudo ip netns exec ue1 ip route add default via 10.45.1.1 dev tun_srsue
❯ sudo ip netns exec ue1 route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.45.1.1       0.0.0.0         UG    0      0        0 tun_srsue
10.45.1.0       0.0.0.0         255.255.255.0   U     0      0        0 tun_srsue
❯ sudo ip netns exec ue1 ping 10.45.1.1 -c4
PING 10.45.1.1 (10.45.1.1) 56(84) bytes of data.

--- 10.45.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3069ms
  1. Delete some routes:
❯ sudo ip route del 10.0.0.0/24 dev wlp69s0
❯ sudo ip route del 10.45.0.0/16 dev ogstun
❯ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    600    0        0 wlp69s0
10.45.0.0       10.53.1.2       255.255.255.0   UG    0      0        0 wlp69s0
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.53.1.0       0.0.0.0         255.255.255.0   U     0      0        0 wlp69s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0
❯ sudo ip netns exec ue1 ping 10.45.1.1 -c4
PING 10.45.1.1 (10.45.1.1) 56(84) bytes of data.

--- 10.45.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3076ms

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

could you try:

sudo ip ro add 10.45.0.0/24 via 10.53.1.2 dev ogstun

instead of

sudo ip ro add 10.45.0.0/24 via 10.53.1.2

from srsran_project.

hududed avatar hududed commented on July 24, 2024

Sorry, wasn't too sure if it mattered with the /16 or /24 set in open5gs and srsran, so I made them all consistent /16:

❯ sudo ip ro add 10.45.0.0/16 via 10.53.1.2 dev ogstun
Error: Nexthop has invalid gateway.
❯ sudo ip ro add 10.45.0.0/24 via 10.53.1.2 dev ogstun
Error: Nexthop has invalid gateway.

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

indeed it should be:

sudo ip ro add 10.45.0.0/16 via 10.53.1.2 dev ogstun

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

ah wait, do you run the dockerized version of the Open5gs?

from srsran_project.

hududed avatar hududed commented on July 24, 2024

No its a local instance - the docker didnt work for me

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

ok, then you do not need the sudo ip ro add 10.45.0.0/16 via 10.53.1.2 dev ogstun this route at all.

from srsran_project.

hududed avatar hududed commented on July 24, 2024
❯ sudo ip netns exec ue1 ip route add default via 10.45.1.1 dev tun_srsue
❯ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    600    0        0 wlp69s0
10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.53.0.0       0.0.0.0         255.255.0.0     U     0      0        0 wlp69s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0
❯ sudo ip netns exec ue1 route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.45.1.1       0.0.0.0         UG    0      0        0 tun_srsue
10.45.1.0       0.0.0.0         255.255.255.0   U     0      0        0 tun_srsue
❯ sudo ip netns exec ue1 ping 10.45.1.1 -c4
PING 10.45.1.1 (10.45.1.1) 56(84) bytes of data.

--- 10.45.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3059ms

Got excited there but still the same - could you check if I need to delete some of these routes?

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

why there are two same routes?

10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun

from srsran_project.

hududed avatar hududed commented on July 24, 2024

Hm, that was peculiar - so I reran the open5gs component 1 by 1 (in the order given in the open5gs tutorial), and the two ogstun are created when I ran upf:

❯ sudo systemctl start open5gs-sgwud
❯ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    600    0        0 wlp69s0
10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
10.53.0.0       0.0.0.0         255.255.0.0     U     0      0        0 wlp69s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0
❯ sudo systemctl start open5gs-upfd
❯ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    600    0        0 wlp69s0
10.0.0.0        0.0.0.0         255.255.255.0   U     600    0        0 wlp69s0
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.45.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ogstun
10.53.0.0       0.0.0.0         255.255.0.0     U     0      0        0 wlp69s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp69s0

I am not sure why its creating these. This is the config for upf

❯ sudo vi /etc/open5gs/upf.yaml
logger:
  file:
    path: /var/log/open5gs/all.log

global:
  max:
    ue: 1024 # The number of UE can be increased depending on memory size.

upf:
  pfcp:
    server:
      - address: 127.0.0.7
    client:
      smf: #  UPF PFCP Client try to associate SMF PFCP Server
        - address: 127.0.0.4
  gtpu:
    server:
      - address: 10.53.1.2 #127.0.0.7
        #advertise: 127.0.0.8
  session:
    - subnet: 10.45.0.1/16 #10.45.0.0/16
      gateway: 10.45.0.1
    - subnet: 2001:db8:cafe::/48
      gateway: 2001:db8:cafe::1

  metrics:
    server:
      - address: 127.0.0.7
        port: 9090

Should I delete those?

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

why did you set this:

  gtpu:
    server:
      - address: 10.53.1.2 #127.0.0.7

from srsran_project.

hududed avatar hududed commented on July 24, 2024

Well I followed everything in srsran config, but I suppose that was meant for docker? Not sure which to include and which not to.

#srsran_Project/docker/open5gs-5gc.yaml

mme:
  s1ap:
    server:
      - address: ${OPEN5GS_IP}
  gtpc:
    server:
      - address: ${OPEN5GS_IP}
      ...
amf:
  ngap:
    server:
      - address: ${OPEN5GS_IP}

upf:
  ...
  gtpu:
    server:
      - address: ${OPEN5GS_IP}
❯ grep "10.53.1." /etc/open5gs/*
/etc/open5gs/amf.yaml:      - address: 10.53.1.2
/etc/open5gs/mme.yaml:      - address: 10.53.1.2
/etc/open5gs/mme.yaml:      - address: 10.53.1.2
/etc/open5gs/upf.yaml:      - address: 10.53.1.2 #127.0.0.7

from srsran_project.

pgawlowicz avatar pgawlowicz commented on July 24, 2024

yes, this is meant for the docker-based setup. Please just follow this tutorial: https://open5gs.org/open5gs/docs/guide/01-quickstart/

In addition, our Amarisoft UE tutorial uses Open5gs installed manually: https://docs.srsran.com/projects/project/en/latest/tutorials/source/amariUE/source/index.html#id6

from srsran_project.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.