Subject: Re: Sending network traffic to "self" externally - is it possible?
To: None <tech-net@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-net
Date: 04/17/2007 12:01:03
On Tue, Apr 17, 2007 at 09:10:11AM -0700, Bill Stouder-Studenmund wrote:
> On Sun, Apr 15, 2007 at 01:24:49AM -0700, Bryan Phillippe wrote:
> > Hello,
> > 
> > I would like to conduct some ethernet network testing using a NetBSD  
> > client & server configuration.  The unusual part about this is that I  
> > want my configuration to be a single NetBSD system functioning as  
> > both a client and a server, physically sending network traffic out on  
> > interface and back into another, using a cross-cable.
> 
> That won't really work. The problem is that NetBSD has one routing system. 
> You really need a system with two, one for one NIC and one for the other 
> NIC. The thing is that what is a local address for one routine system is a 
> remote address for the other, and our stack doesn't handle that.
> 
> I think something like Xen or Parallels or VMware would be the best way to 
> go. You'd then have two separate kernels & installations, each talking to 
> one of the NICs.

I agree with Bill that virtualization is the way to go, however, you
*might* be able to add each of the host routes you require using a trick
such as this one, which I have used successfully to add a host route
with link-layer info:

# route add -host 192.168.1.1 -link tlp0:00.0a.0b.0c.0d.0e -iface

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933