Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, and, 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

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


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.