Re: 2 nics in the same machine...

From: Helge Hafting (helgehaf_at_aitel.hist.no)
Date: 03/20/04

  • Next message: Andrew Clayton: "ACPI error with 2.4.26-pre5"
    Date:	Sat, 20 Mar 2004 19:42:52 +0100
    To: Willy Tarreau <willy@w.ods.org>
    
    

    On Fri, Mar 19, 2004 at 11:36:56PM +0100, Willy Tarreau wrote:
    > 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.
    >
    I didn't think of that. Of course, capturing an ARP broadcast is probably
    good enough for testing cables. One might want better than that
    for testing the NIC driver though.

    > 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...).

    ifconfig lo mtu 1500 :-)

    Helge Hafting
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Andrew Clayton: "ACPI error with 2.4.26-pre5"

    Relevant Pages

    • Re: ICMP REQUEST
      ... >> kernel doesn't even see it. ... > IP address of all the IPs it's going to ARP. ... But these NICs had ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: minor e1000 bug
      ... commitment/support has influenced and will influence our future ... And NICs are a crucial part of our diskless setups.. ... which easily outperforms current local harddisk setups. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: problems with NetBT
      ... Both NICs have their own MAC address, ... your IM's virtual adapter present to NDIS and thus to ARP? ... What is the result of the "ARP -a" command? ... are the two NICs connected to the same physical network? ...
      (microsoft.public.development.device.drivers)
    • Re: ACPI/HT or Packet Scheduler BUG?
      ... of lkml network related questions. ... The real cause seems to be an ARP issue from what i saw in the oops ... there's a chance that the reading task can get to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • ARP MESSAGES FILLING CONSOLE
      ... I have several BSD based servers which are multi-hone (Two Nics) one Nic faces the internet, the other faces a PRIVATE IP subnet and wireless DMZ. ... However since the internet router is also the end point for the wireless DMZ I get a barrage of ARP messages indicating the the private nic is receiving ARP for the public network and vice versa. ... PRIVATE 192.168.100.24 (NAT IP for PC etc) ...
      (freebsd-isp)