Docker Container Trex Network Driver Issue

228 views
Skip to first unread message

Josh

unread,
May 7, 2019, 9:56:55 AM5/7/19
to TRex Traffic Generator
I am running Trex in a Docker container, but I am having some trouble getting the NICs to show up correctly. When I run ./dpdk_nic_bind.py -s all of my NIC's show up under the "Other network devices" instead of "Network devices using kernel driver". It seems there are no drivers being used for the NICs. If I run Trex in RHEL KVM I can use the e1000 driver and it shows up correctly. Anyone have any idea how to get the e1000 driver to work when using Docker containers? Thanks.

Josh

unread,
Jun 19, 2019, 11:51:30 AM6/19/19
to TRex Traffic Generator
Anyone  have any idea?  Thanks.

Yaroslav Brustinov

unread,
Jun 19, 2019, 12:11:42 PM6/19/19
to Josh, TRex Traffic Generator
What is the output of:
sudo ./dpdk_nic_bind.py -s ? 
What is your OS outside the docker?
cat /etc/*release*

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/69f57340-b479-463a-8ed1-ccf08199edba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Josh

unread,
Jun 19, 2019, 2:21:24 PM6/19/19
to TRex Traffic Generator
Thanks for the quick reply I appreciate it.  I hope this information below helps.

The output of sudo ./dpdk_nic_bind.py -s

Network devices using DPDK-compatible driver
====================================
<none>

Network devices using kernel driver
===========================
<none>

Other network devices
=================
0000:01:00.0 'NetXtreme II BCM5709 Gigabit Ethernet' unused=igb_uio,vfio-pci,uio_pci_generic
0000:01:00.1 'NetXtreme II BCM5709 Gigabit Ethernet' unused=igb_uio,vfio-pci,uio_pci_generic
0000:02:00.0 'NetXtreme II BCM5709 Gigabit Ethernet' unused=igb_uio,vfio-pci,uio_pci_generic
0000:02:00.1 'NetXtreme II BCM5709 Gigabit Ethernet' unused=igb_uio,vfio-pci,uio_pci_generic
0000:09:00.0 '82576GB Gigabit Network Connection' unused=igb_uio,vfio-pci,uio_pci_generic
0000:09:00.1 '82576GB Gigabit Network Connection' unused=igb_uio,vfio-pci,uio_pci_generic
0000:0a:00.0 '82576GB Gigabit Network Connection' unused=igb_uio,vfio-pci,uio_pci_generic
0000:0a:00.1 '82576GB Gigabit Network Connection' unused=igb_uio,vfio-pci,uio_pci_generic

The OS is: Red Hat Enterprise Linux Server release 7.6 (Maipo)



On Wednesday, June 19, 2019 at 12:11:42 PM UTC-4, Yaroslav Brustinov wrote:
What is the output of:
sudo ./dpdk_nic_bind.py -s ? 
What is your OS outside the docker?
cat /etc/*release*

On Wed, Jun 19, 2019 at 6:51 PM Josh <joshda...@gmail.com> wrote:
Anyone  have any idea?  Thanks.

On Tuesday, May 7, 2019 at 9:56:55 AM UTC-4, Josh wrote:
I am running Trex in a Docker container, but I am having some trouble getting the NICs to show up correctly.  When I run ./dpdk_nic_bind.py -s all of my NIC's show up under the "Other network devices" instead of "Network devices using kernel driver".  It seems there are no drivers being used for the NICs.  If I run Trex in RHEL KVM I can use the e1000 driver and it shows up correctly.  Anyone have any idea how to get the e1000 driver to work when using Docker containers?  Thanks.

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex...@googlegroups.com.

Yaroslav Brustinov

unread,
Jun 20, 2019, 2:55:40 AM6/20/19
to Josh, TRex Traffic Generator
Hi,

You need to load driver outside of docker for this NIC to be recognized as "Network devices using kernel driver".
I think, it's igb for 82576GB Gigabit Network Connecon.
try: modprobe igb
(you might need to install the drivers for the NICs)

Thanks,
Yaroslav.

To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.

Josh

unread,
Jun 20, 2019, 9:25:47 AM6/20/19
to TRex Traffic Generator
Thanks for the reply.

I downloaded the driver at the link below from Intel as it seems to be the correct one for my NICs.  I followed all the instructions in the README and installed the driver and also did the modprobe command.  The NICs however still are not recognize by the TREX container.  The NICs work fine outside of docker as I can ping the IP I set on them.  Any ideas?

Thanks again in advance.

https://downloadcenter.intel.com/download/13663/Intel-Network-Adapter-Driver-for-82575-6-82580-I350-and-I210-211-Based-Gigabit-Network-Connections-for-Linux-

Josh

unread,
Jun 20, 2019, 11:10:10 AM6/20/19
to TRex Traffic Generator
So I did these steps below to confirm if the driver was loaded and I can confirm it is I believe.

To confirm this I ran lspci -nn | grep -i net and got the PCI vendor:device id for my cards: 

05:00.0 Ethernet controller [0200]: Broadcom Limited NetXtreme II BCM5708 Gigabit Ethernet [14ef:164c] (rev 12)
07:00.0 Ethernet controller [0200]: Broadcom Limited NetXtreme II BCM5708 Gigabit Ethernet [14ef:164c] (rev 12)
09:00.0 Ethernet controller [0200]: Broadcom Limited NetXtreme II BCM5708 Gigabit Ethernet [14ef:164c] (rev 12)
0b:00.0 Ethernet controller [0200]: Broadcom Limited NetXtreme II BCM5708 Gigabit Ethernet [14ef:164c] (rev 12)
14:00.0 Ethernet controller [0200]: Intel Corporation 82575GB Gigabit Network Connection [8086:10d6] (rev 02)
14:00.1 Ethernet controller [0200]: Intel Corporation 82575GB Gigabit Network Connection [8086:10d6] (rev 02)
15:00.0 Ethernet controller [0200]: Intel Corporation 82575GB Gigabit Network Connection [8086:10d6] (rev 02)
15:00.1 Ethernet controller [0200]: Intel Corporation 82575GB Gigabit Network Connection [8086:10d6] (rev 02)

Then I took the 14ef:164c and the 8086:10d6 from my cards and ran

grep -i 14ef /lib/modules/3.10.0-957.21.3.el7.x86_64/modules.* | grep -i 164c
grep -i 8086 /lib/modules/3.10.0-957.21.3.el7.x86_64/modules.* | grep -i 10d6

and the output from that showed that there was a driver for it and what it is called:

/lib/modules/3.10.0-957.21.3.el7.x86_64/modules.alias:alias pci:v00008086d0000164Csv*sd*bc*sc*i* bnx2
/lib/modules/3.10.0-957.21.3.el7.x86_64/modules.alias:alias pci:v00008086d000010D6sv*sd*bc*sc*i* igb

So that shows the 'bnx2' and the 'igb' module supports the cards right I believe.  If so any idea why when I run the command (sudo ./dpdk_nic_bind.py -s) in the TREX container all the NICs still show under the "other network device" section instead of the "network devices with kernel driver" section?

Thanks again for your help. It is really appreciated.

Yaroslav Brustinov

unread,
Jun 20, 2019, 11:57:56 AM6/20/19
to Josh, TRex Traffic Generator
Can you see the NICs inside and outside of docker via ifconfig?
If so, you can verify the driver via:
ethtool -i <interface name>
(please check inside and outside of docker)

To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.

Yaroslav Brustinov

unread,
Jun 20, 2019, 12:03:37 PM6/20/19
to Josh, TRex Traffic Generator
I've consulted with Itay Marom (and recalled by myself) - network interfaces are not passed to docker.
You need to search in google how to pass interfaces to the docker (technically it's possible).

Josh

unread,
Jul 24, 2019, 2:16:13 PM7/24/19
to TRex Traffic Generator
I was able to get it to work finally by passing /lib/modules.  Here is the solution in case anyone else runs into this issue.

  docker run -d --rm -it --privileged --cap-add=ALL -v /lib/modules:/lib/modules --name TREX trexcisco/trex:latest

Sai Praveen

unread,
Sep 15, 2023, 12:19:09 AM9/15/23
to TRex Traffic Generator

Hi Josh 

    i have a topology in that Linux desktop inside the SSH I pulled the docker image here. and build the trex server and console I am running but the configuration I am not able to fix.by default it as loopback IPs are there. how to change to our desired ip address. kindly help me out. i stuck there.

below I attached my topology please check.
topol.png
Reply all
Reply to author
Forward
0 new messages