p4lang / behavioral-model

The reference P4 software switch
Apache License 2.0
538 stars 328 forks source link

How to bind a bmv2 port to a container using docker? #1160

Closed songhaoran666 closed 1 year ago

songhaoran666 commented 1 year ago

I want to send packets to a Server with bmv2 switch and docker container, so the container can join in the network Is MACVLAN a possible way?

Dscano commented 1 year ago

Hi,

you can run the container with the flag --network host, in this way the container share the same network namespace of the host machine. In other word the container can manage and see all the interfaces on the host machine.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days