I would like to test 10Gig Ethernet serial interface by installing two NICs(Network Interface Cards) on a pc and pinging. I have the following questions:

1- Can two separate NICs be installed in one PC and have separate IP addresses (for pinging)?

2- Does this seem like a sensible approach to generate/check the data transferred over this interface?

[NIC card[1]

  • Yes. ... Maybe? Depends on what you're testing. Jan 15, 2016 at 21:20
  • For now, I only want to see the result of the test. The final goal is to eventually replace one of the NICs with a board that we design and see if we get the same results. Basically I want to test the test environment at this point if that makes sense. edit: for instance I'd like to let the test run overnight and check the bits transmitted versus the ones received to find Bit Error Rate or similar measures.
    – Arash Rowshan
    Jan 15, 2016 at 21:22
  • Two boards in one pc will bring have seperate mac and ip stacks. The phys on the chip will bring up a 10g link if it can. This doesn't mean that you can send and receive 10gbit stream as you have bus and cpu bandwidth limitations, but you can query the MAC for the link type and status to confirm 10gbit link
    – crasic
    Jan 15, 2016 at 21:30
  • @crasic unless you go out of your way to make things otherwise all nics in the same machine will work with the same IP stack.
    – plugwash
    Jan 15, 2016 at 23:44
  • When you install the cards do make sure you use the slots that are connected to the CPU directly (not the south bridge) and make sure all offload options are turned on.
    – billc.cn
    Jan 16, 2016 at 0:08

3 Answers 3

  1. Yes

  2. Maybe. Depends on whether you get outsmarted by the OS. I have had issues in the past when trying to test FPGA designs that are connected via 10G ethernet to multiple NICs in one computer, and having all of my test packets get routed by the OS instead of going out on the wire (why is netperf going at 40G on a 10G NIC?!?).

  • Certainly the standard ping command won't bind to a specific interface, and even if you craft one that does that doesn't necessarily mean that the OS will care. Jan 15, 2016 at 21:32
  • The Linux ping command can be bound, but it doesn't seem to help. And if you bind the transmit, the reply could get routed locally. Jan 15, 2016 at 21:35
  • 1
    I hate to say it as there really should be a way to make this work, but using two computers is guaranteed to work. Jan 15, 2016 at 21:36
  • You can specify an interface with -I, but that only fudges the packet contents to make it look like it came from there rather than binding it. Jan 15, 2016 at 21:37
  • Although it looks like stripping the routing tables and adding -r might work... Jan 15, 2016 at 21:39

1- Can two separate NICs be installed in one PC and have separate IPs

Yes. There is nothing special about multiple NICs in one system. I suspect it is even standard on allmost all servers, and both desktops setting next to me also have dual NICs (and soon a third, a pair of 10GBit NICs have been ordered).

The term for a computer with multiple NICs/IPs is "Multihomed"

2- Does this seem like a sensible approach to generate/check the data transferred over this interface?

No, dor several reasons.

  1. ICMP echo request (aka ping) is not a good test. Try to use something like iperf.
  2. Routing can get tricky. As can CPU usage. Best to split that cleanly into two systems.
  3. And, as Alex already mentioned. Sometimes the OS tries to be very smart. It is easier and more foolproof to test with two different computers.

The problem is that the IP stacks in operating systems aren't designed to do this.

They are designed to support multiple adaptors to allow them to route between networks and/or to have a presense on multiple networks. Binding happens to addresses NOT to adaptors. If you bind to one local IP and try to ping another then the packets will never go out on the wire.

It may be possible to work around this with virtual machines or network namespaces or something but I expect it will be far easier to just use two seperate machines.

  • Aye. Two VMs in PCI-e passthough should work. But two systems is indeed far easier.
    – Hennes
    Jan 16, 2016 at 0:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .