mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy Tarreau <willy@w.ods.org>
To: Helge Hafting <helgehaf@aitel.hist.no>
Cc: RANDAZZO@ddc-web.com, linux-kernel@vger.kernel.org
Subject: Re: 2 nics in the same machine...
Date: Fri, 19 Mar 2004 23:36:56 +0100	[thread overview]
Message-ID: <20040319223656.GF14537@alpha.home.local> (raw)
In-Reply-To: <405ABA74.5030409@aitel.hist.no>

Hi,

On Fri, Mar 19, 2004 at 10:16:36AM +0100, Helge Hafting wrote:
 
> If you want to test NICs (or cables & hubs) do this:
> 
> 1. Run a packet sniffer on the "listening" NIC.  Run it in
>   promiscuous mode so it'll even sniff packets not meant for it.
> 
> 2. Set a default route to the "sending" NIC.  Or at least a route
>   to some network that isn't on your machine.
> 
> 3. Ping the remote network.  You will not get an answer, but:
>   The packet will be sent through the "sending" NIC, 
>   and sniffed by the "listening" NIC.  So you'll verify that
>   NICs and cable works.  Optionally make a script that reverses
>   the roles of the two NICs if you want to test both ways.

Nearly right. He will need to enter static ARP entries for this to
work because his host will try to resolve the gateway's address first,
so nothing except ARP will go out.

DNAT out + SNAT in may be OK. I've used this setup in the past, but didn't
not go on because of performance problems. Now, Julian Anastasov has written
a wonderful patch named "send-to-self" which does the trick automagically.
You can get it on his site ( http://www.ssi.bg/~ja/ IIRC ).

> If, on the other hand, you're testing apps/protocols, don't worry that 
> the traffic don't hit the wire.  A test utilizing internal loopback
> is just as good.

Right. Except that in some very weird cases, the higher MTU on loopback may
affect the app's behaviour (less packets, or bigger reads at once, etc...).

Cheers,
Willy


  reply	other threads:[~2004-03-19 22:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18 20:20 RANDAZZO
2004-03-18 21:54 ` Robin Rosenberg
2004-03-19  9:16 ` Helge Hafting
2004-03-19 22:36   ` Willy Tarreau [this message]
2004-03-20 18:42     ` Helge Hafting

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040319223656.GF14537@alpha.home.local \
    --to=willy@w.ods.org \
    --cc=RANDAZZO@ddc-web.com \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome