Hi Oron!

On 3/12/07, Oron Peled <[EMAIL PROTECTED]> wrote:
On Monday, 12 בMarch 2007, Shlomi Fish wrote:
> Here at work, we would like to test our two-ports network card using a
> loopback self-test. What we want to do is to connect a cable between
> the two ports and transfer packets from one port to the other.
> However, if we say assign the first port the Interface of eth1 and the
> IP of $IP1, and the second one the interface of eth2 and the IP of
> $IP2, then when transferring packets from $IP1 to $IP2 the kernel will
> transfer them directly in memory instead of over the wire.
>
> So, is there any way to disable this kernel switching at the kernel
> level, so we can still use higher-level protocols such as TCP/IP?

First, terminology: s/switching/forwarding/

Either:
        echo 0 > /proc/sys/net/ipv4/ip_forward
Or the equivalent:
        sysctl -w net.ipv4.ip_forward=0

Now you can send/receive packets from all your network interfaces
but there's no routing for packets among them.


Thanks!

That's what I recalled, but I wasn't sure of.

Regards,

       Shlomi Fish

Bye,

--
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

"If I have been able to see farther,
it was only because I stood on the shoulders of giants."
        -- Sir Isaac Newton



--
------------------------------------------
Shlomi Fish http://www.shlomifish.org/

If his programming is anything like his philosophising, he
would find 10 imaginary bugs in the "Hello World" program.

Reply via email to