"Loopback" route through two cards?
Subsystems (2)
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.
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
Quoted 11 lines · Rusty Russell
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.
Hello!
Quoted 1 line
I know this is an FAQ, but I never saw an answer I liked.
And what kind of answers do you like? :-)
Quoted 1 line
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
Quoted 3 lines
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,
Signature · 1 line
Eric
Quoted 12 lines · [email protected] wrote:
Hello!
Quoted 1 line
I know this is an FAQ, but I never saw an answer I liked.
And what kind of answers do you like? :-)
Quoted 1 line
still impossible
Quoted 8 lines
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_BINDTODEVICEon sending socket. Hence, it is "impossible" not changing application.
Ooooh, this looks like what I'm looking for...
Quoted 6 lines
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
Quoted 3 lines
Alexey
Signature · 3 lines
Ben Greear <[email protected]> <Ben_Greear AT excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
Quoted 11 lines · Ben Greear
Quoted 5 lines · [email protected] 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
Signature · 3 lines
Ben Greear <[email protected]> <Ben_Greear AT excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear