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

Containerize PacketRusher #19

Open
linouxis9 opened this issue Nov 29, 2023 · 2 comments
Open

Containerize PacketRusher #19

linouxis9 opened this issue Nov 29, 2023 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@linouxis9
Copy link
Member

No description provided.

@linouxis9 linouxis9 added this to the v0.1.0 milestone Nov 29, 2023
@linouxis9 linouxis9 added the enhancement New feature or request label Dec 15, 2023
@yoursunny
Copy link
Contributor

I tried PacketRusher with a Dockerfile like this:

FROM golang:1.21-alpine3.18 AS build
RUN cd / \
 && wget -O PacketRusher.zip https://github.com/HewlettPackard/PacketRusher/archive/c10560874c0bbd8241f75c5aaa44536b528e1d74.zip \
 && unzip -n PacketRusher.zip \
 && mv PacketRusher-* PacketRusher \
 && cd /PacketRusher \
 && env CGO_ENABLED=0 go build cmd/packetrusher.go

FROM scratch
COPY --from=build /PacketRusher/packetrusher /
ENTRYPOINT ["/packetrusher"]

It works with a mounted configuration file, but there are several complications:

  • Due to PacketRusher's use of vrf interface, the container must run in privileged mode.
    I'd recommend introducing a flag to disable vrf, so that the container can run with --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun.
    Applications who want to interact with the PDU session would need to explicitly bind to the netif that represents the PDU session.
  • The multi-ue mode with --dedicatedGnbs flag expects the container to have several contiguous IPv4 addresses range.
    This may not be supported by Docker.
    I don't know of a clean solution to this.

@linouxis9
Copy link
Member Author

Hi @yoursunny;

Thank you for your suggestion!

For 1., point taken, thanks for the suggestion. In that case, automatic routes creation should probably also be disabled when VRF are disabled. Else, funny things may happen on the host :-)

For 2., the use case we were thinking was k8s with Multus attaching multiple host interfaces (or creating multiple MacVLAN interfaces) and attaching it to the PacketRusher's pod. But I agree that having to use several contiguous IPv4 addresses is not the best in any cases. The switch to eUPF's eBPF from gtp5g as the WIP PR available here #47 should alleviate some of these issues but it's still WIP, and work only with a single UE for now. For PacketRusher on plain old Docker, I would recommend the usage of --net host, the usage of Docker's virtual interfaces may impact negatively the user plane performance of PacketRusher.

Thanks,
Valentin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants