routing - In linux how do two NICs on the same machine communicate with other -


all, have question on networking between 2 nics on same machine under linux. suppose both nics different ip addresses , can communicate outsides. when sending data ip address of nic 1 of nic 2, data sent outside network , forwarded nic2, or sent receiver directly inside kernel, without going outsides. opinion if 2 ip addresses belong different subnets, data sent router first. if 2 ips off same subnet? bother send data first to, example, switch, , looped nic2, or kernel recognize destination on same node , transfers receiver without going through physical wire? thank much!

i don't think it's case 2 nics on same subnet can "see" each other @ all, unless routing table set can.

i have 2 network adapters in test box, addresses in same subnet. if try use "ping -i {interface}" ip number, no response if 1 interface other. is, fails if specify 1 interface, , ip number other interface. way can packets 1 interface other use ips take traffic through common gateway.

this behaviour depends on whether packet forwarding enabled @ kernel level, , iptables rules in force, , other things well. point perhaps shouldn't assume 2 nics on same subnet can see 1 without specific configuration effect.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -