Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running a server on one interface and a client on another. For certain reasons, I need to make sure all the traffic egresses from the box and isn't locally switched inside the Linux networking stack. Is there a way to force the Linux networking stack to always send packets out the wire even when the destination MAC matches another interface on the same machine?

share|improve this question
    
are both interfaces on the same lan segment? Standard IP routing rules are going to apply in most cases. But just clarifying you have interfaces on the box, 192.168.10.2 and 192.168.10.3, and you want .2 to talk to .3 via the ethernet and not locally? If so curious as to why? –  Doon Sep 13 '11 at 20:19
    
I'm actually running a DHCPv6 server/client with a relay agent between them. The packets need to egress in order to go through the relay agent. So the client doesn't actually have an IPv6 address during the first part of this transaction. That's why I assumed it was locally switching at the MAC layer. –  gnathan Sep 13 '11 at 21:19

1 Answer 1

Is IP forwarding enabled? If so then try disabling it and it will stop the kernel routing between the internal interfaces.

for IPV4 this would be

sysctl -w net.ipv4.ip_forward=0

It's not something I've ever tried but I guess the ipv6 equivalent would be

sysctl -w net.ipv6.ip_forward=0
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.