lets say a linux based computer(debian) with ethernet,wifi, usb modem connected to the, linux kernel version is 3.3
Question:
for each network device the network driver builds its own net_device struct and register itself with the network interface layer of the kernel.
so in total there are 3 network devices as seen by the kernel
now how does the kernel decide to which network interface. to use while forwarding IP packet.
can some one please specify any link or document which answers the above question ?
Last edited by Scrutinizer; 02-20-2016 at 05:45 PM..
Reason: code tags
I'm not sure that I'd understand your question correctly.
Linux will use a existing routing table and route a packet to the network interface depending from that.
You can google for 'linux route table' yourself, can't post a link, sorry.
Let's me explain you with a little example.
You can have a route table looking like this:
So if IP packet dst field will be in 192.168.1.0/24 network, it will be forwarded to eth0, and if it will be at 172.16.1.0/24 it will be forwarded to wifi0. Other way it will be sent to default gateway.
Did I answered your question?
You can find more relevant info here.
I have a RHEL 5 system with a bonded interface configure using only one network port (eth0). So I have config file for ifcfg-bond0 and ifcfg-eth. I'd like to configure eth5 to be the second SLAVE in the bond. My question is, after I modify ifcfg-eth5, can I add eth5 to the bond0 interface without... (1 Reply)
I've one Netra 240
After changing main board and system configuration card reader, Network is not accessible any more, Network interfaces are always UP and Running even when there is no cable connected to Network interfaces.
I tried to restart and plumb/unplumb with no luck.
ifconfig -a... (7 Replies)
Hello,
Please, how can i create a network interface with a routable IP address on linux (ubuntu) ?
AND
How can i desactivate an interface?
Thank you so much for help. (1 Reply)
Hi,
I'm a italian student. For my thesis I develop a gateway with protocol 6lowpan.
For that I must access to network interface to develope my personal stack based on standard 802.15.4.
Can you help me? I need an explanation for that. (0 Replies)
i need to configure a zone to use different interface (bge2) than global and have connected to completely different network switch & to use its own defaultrouter and hosts file .. is it possible ..if so ..how ?
Thanks (9 Replies)
Hi,
I wrote some network modules to 2.6.x Linux kernel.
Im useing sock_recvmsg / sock_sendmsg (linuxsrc/include/linux/net.h ) interface to
receiving and sending data in TCP mode.
Im cooperating with HTTP protocol and I have a question.
Supose that I have buffer
I have connection client -... (2 Replies)
Hi !
Does anyone know how can i get information about my network interface ... if it works in half or full duplex mode !!
Thx in adivance !
Witt (4 Replies)