netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "Loopback" route through two cards?
@ 2002-09-03  5:04 Rusty Russell
  2002-09-03 11:30 ` jamal
  2002-09-03 12:54 ` kuznet
  0 siblings, 2 replies; 6+ messages in thread
From: Rusty Russell @ 2002-09-03  5:04 UTC (permalink / raw)
  To: netdev; +Cc: kuznet, anton

Hi all,

	I know this is an FAQ, but I never saw an answer I liked.  We
want to stress-test a couple of gigabit NICs by connecting them to
each other and routing packets out one and into the other.  Is this
still impossible without nat?

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "Loopback" route through two cards?
  2002-09-03  5:04 "Loopback" route through two cards? Rusty Russell
@ 2002-09-03 11:30 ` jamal
  2002-09-04  9:26   ` Eric Lemoine
  2002-09-03 12:54 ` kuznet
  1 sibling, 1 reply; 6+ messages in thread
From: jamal @ 2002-09-03 11:30 UTC (permalink / raw)
  To: Rusty Russell; +Cc: netdev, kuznet, anton



Unless you are trying to stress test NAT, i wouldnt go the NAT path.
Have you looked at the packet generator in 2.4.19? With it you can
bypass IP totaly.

cheers,
jamal

On Tue, 3 Sep 2002, Rusty Russell wrote:

> Hi all,
>
> 	I know this is an FAQ, but I never saw an answer I liked.  We
> want to stress-test a couple of gigabit NICs by connecting them to
> each other and routing packets out one and into the other.  Is this
> still impossible without nat?
>
> Rusty.
> --
>   Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "Loopback" route through two cards?
  2002-09-03  5:04 "Loopback" route through two cards? Rusty Russell
  2002-09-03 11:30 ` jamal
@ 2002-09-03 12:54 ` kuznet
  2002-09-13  4:59   ` Ben Greear
  1 sibling, 1 reply; 6+ messages in thread
From: kuznet @ 2002-09-03 12:54 UTC (permalink / raw)
  To: Rusty Russell; +Cc: netdev, anton

Hello!

> 	I know this is an FAQ, but I never saw an answer I liked.

And what kind of answers do you like? :-)

> still impossible

It depends on sense which you put to "impossible".

There are two problems with this:

1. You cannot send to local address via any device but loopback.

   The only way to override this is to use explicit SO_BINDTODEVICE
   on sending socket. Hence, it is "impossible" not changing application. 

2. You cannot receive packets with local address from any device
   but loopback.

   This is impossible, but wthis time without not editing kernel,
   removing the check for local addresses in fib_validate_source().

Alexey

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "Loopback" route through two cards?
  2002-09-03 11:30 ` jamal
@ 2002-09-04  9:26   ` Eric Lemoine
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Lemoine @ 2002-09-04  9:26 UTC (permalink / raw)
  To: netdev

> Unless you are trying to stress test NAT, i wouldnt go the NAT path.
> Have you looked at the packet generator in 2.4.19? With it you can
> bypass IP totaly.

pktgen is really cool stuff!

I dont see what multiskb could be used for. Does anybody know?

Thx.

Cheers,
-- 
Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "Loopback" route through two cards?
  2002-09-03 12:54 ` kuznet
@ 2002-09-13  4:59   ` Ben Greear
  2002-09-13  5:44     ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2002-09-13  4:59 UTC (permalink / raw)
  To: kuznet; +Cc: Rusty Russell, netdev, anton

kuznet@ms2.inr.ac.ru wrote:
> Hello!
> 
> 
>>	I know this is an FAQ, but I never saw an answer I liked.
> 
> 
> And what kind of answers do you like? :-)
> 
> 
>>still impossible
> 
> 
> It depends on sense which you put to "impossible".
> 
> There are two problems with this:
> 
> 1. You cannot send to local address via any device but loopback.
> 
>    The only way to override this is to use explicit SO_BINDTODEVICE
>    on sending socket. Hence, it is "impossible" not changing application. 

Ooooh, this looks like what I'm looking for...

> 
> 2. You cannot receive packets with local address from any device
>    but loopback.
> 
>    This is impossible, but wthis time without not editing kernel,
>    removing the check for local addresses in fib_validate_source().

Any clues to which part of this method needs to be changed?  I see nothing
obviously about checking for local IPs, but I'm sure it's in there somewhere!

Thanks,
Ben

> 
> Alexey
> 


-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "Loopback" route through two cards?
  2002-09-13  4:59   ` Ben Greear
@ 2002-09-13  5:44     ` Ben Greear
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Greear @ 2002-09-13  5:44 UTC (permalink / raw)
  To: Ben Greear; +Cc: netdev

Ben Greear wrote:
> kuznet@ms2.inr.ac.ru wrote:

>> 2. You cannot receive packets with local address from any device
>>    but loopback.
>>
>>    This is impossible, but wthis time without not editing kernel,
>>    removing the check for local addresses in fib_validate_source().
> 
> 
> Any clues to which part of this method needs to be changed?  I see nothing
> obviously about checking for local IPs, but I'm sure it's in there 
> somewhere!

So, after adding printk's everywhere, I see that this seems to be the
check that fails:

	if (res.type != RTN_UNICAST) {
            printk("fib_frontend:  was not UNICAST: %x\n", res.type);
            //goto e_inval_res;
         }


After commenting that out, I can send pkts in one direction, but in the other
direction, the ARP is not ever answered (I see it sent with ethereal).
It appears that the only reason it
goes in one direction is that I got lucky and the arp table had the entry for
some reason.

So, I have to figure out how to make ARP work in this case, and I think it
will all start working!


Ben

-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-09-13  5:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-03  5:04 "Loopback" route through two cards? Rusty Russell
2002-09-03 11:30 ` jamal
2002-09-04  9:26   ` Eric Lemoine
2002-09-03 12:54 ` kuznet
2002-09-13  4:59   ` Ben Greear
2002-09-13  5:44     ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).