Multiple NICs in Ubuntu

Karl Auer kauer at biplane.com.au
Tue Mar 10 04:43:35 UTC 2015


On Mon, 2015-03-09 at 22:00 -0600, Sandesh Shrestha wrote:
> I have two NICs in an Ubuntu VM. However, when I ping these interfaces from
> host, the ping request and reply is processed by only one interface. There
> is no packet flow in other interface as show in wireshark.

If I understand you correctly you mean that:
- a host has two physical ethernet interfaces, A and B
- when you ping A, the response comes from A
- when you ping B the response comes from A

When you use Wireshark on the host with two interfaces, do you see the
pings arriving on the correct interface?

I'm guessing that you not running a routing protocol on the host, and
that you are pinging interface A from the same subnet as the interface
is in, and that you are pinging interface B from the same subnet that
interface A is in, OR you are pinging both interfaces from a third
subnet - one that neither interface A nor interface B is in.

In the first case, you will see responses from interface A regardless,
because the host has to use interface A to communicate with you. In the
second case, you will see responses from interface A because interface A
is connected to the default gateway for the host.

For any given ping source, you will always see responses from only one
of the two interfaces.

> How can we send packet to individual interfaces in Ubuntu ?

To see responses from both, you would have to either issue the pings
from different hosts, such that a routing protocol on the target host
chose different outbound interfaces to respond to each source, OR you
would have to send your pings from a host with an interface in each
subnet (or from two hosts, one in each subnet).

Alternatively, put both interfaces on the target into the SAME physical
network (broadcast domain in v4, link in v6) - and ping them from a host
that likewise has two interfaces in the same broadcast domain (or link)
as the target interfaces.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
Old fingerprint: EC67 61E2 C2F6 EB55 884B E129 072B 0AF0 72AA 9882






More information about the ubuntu-users mailing list