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 have a Linux box with two fiber interfaces connected to each other. Is there any way to set up routing in a way that would actually send the packets over the link? So far it looks like when two interfaces are on the same machine, there is no way to connect between them except via loopback.

share|improve this question
    
What sort of interface: FC, IB, ATM, 10GBE-SR, etc.? –  Barry May 10 '11 at 9:50

2 Answers 2

up vote 0 down vote accepted

With just the native TCP/IP stack and properly configured interfaces, the host will choose the best route to the final destination, which in this case does not involve sending the packets over the fiber for unicast traffic. It is possible to send broadcast traffic over the link or setup routes to generate traffic which can be seen by sniffers such as tcpdump or wireshark if you just need to verify interface functionality.

It is possible to have another process (vm/test suite/etc) with it's own IP stack setup to bypass the host's stack. In my experience, this requires an interface to be set to promiscuous and the process will need to be running as root. This allows that process to see all traffic arriving on the interface, in addition to being able to directly send out packets on the wire.

It is important that the Linux host itself does not have the same network configuration on any interface as this process is using so that it appears as a 2nd host on the network. Otherwise it will short circuit traffic between the two interfaces. Assuming that is not the case, the other interface which is talking to the process will not know it is really talking to the same machine and will send packets across the link to reach the "2nd host".

share|improve this answer

To the best of my knowledge TCP/IP stack will short-circuit any communication between any local interfaces. Therefore no package will ever be sent or received over the link.

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.