V
V
Vi2016-04-03 01:17:05
linux
Vi, 2016-04-03 01:17:05

How does bridge work at the kernel level?

I'm not sure if I'm asking the right question yet, but suddenly someone knows who and how takes care of this virtual interface, and where you can get this information.
Given:
eth0 <-> br0 <-> eth1
Who can continue the chain: the real device eth0 initiates an interrupt -> the processor looks in the interrupt table where to get the driver code and what to do next

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2016-04-03
@jcmvbkbc

Who can continue the chain: the real device eth0 initiates an interrupt -> the processor looks in the interrupt table where to get the driver code and what to do next

I dug too deep: if you are interested in bridging, then why figure out how the network card driver interacts with the kernel, if the bridging code in Linux does not depend on how the network packet got into the system.
Very roughly: if a network packet is received from one of the slave interfaces of the bridge, see if there is an entry in the forwarding database for its destination address, if so, forward the packet to the interface from this entry, if not, forward it to all interfaces of this entry bridge, moreover, through which the packet was received.
If you want details, you can read here: it-ebooks.info/book/2195
Or here: https://git.kernel.org/cgit/linux/kernel/git/torva... , there are only a couple of interesting files, according to 500 lines each.

M
Mystray, 2016-04-03
@Mystray

If you really want to understand GENERALLY network architecture, including interrupt handling, kernel structures, and so on, then there is a translation of a good book.
"Linux: Network Architecture. Structure and Implementation of Network Protocols in the Kernel", KUDITS-OBRAZ, ISBN 5-9579-0094-X
It is, of course, a little outdated, but it will give a general understanding.
In general, what is the goal? Maybe you're approaching the problem from the wrong side?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question