I have a simple router for home users (D-Link DIR-300) with embedded Linux (kernel 2.6.21) and a bunch of networking tools. Inspecting the internals of of this system through telnet, I've got this output (slightly modified and stripped; lo and ifbN skipped) for the ifconfig -a command:
br0 Link encap:Ethernet HWaddr CB:B2:32:9C:4D:2E
inet addr:192.168.5.1 Bcast:192.168.5.255 Mask:255.255.255.0
RX bytes:94887799 (90.4 MiB) TX bytes:1042490563 (994.1 MiB)
br8 Link encap:Ethernet HWaddr CB:B2:32:9C:4D:2E
RX bytes:974053699 (928.9 MiB) TX bytes:0 (0.0 B)
eth2 Link encap:Ethernet HWaddr CB:B2:32:9C:4D:2E
collisions:0 txqueuelen:1000
RX bytes:2150801235 (2.0 GiB) TX bytes:2142220936 (1.9 GiB)
Interrupt:3
eth2.1 Link encap:Ethernet HWaddr CB:B2:32:9C:4D:2E
RX bytes:17544 (17.1 KiB) TX bytes:994732248 (948.6 MiB)
eth2.2 Link encap:Ethernet HWaddr CB:B2:32:9C:4D:2E
RX bytes:0 (0.0 B) TX bytes:72669 (70.9 KiB)
eth2.3 Link encap:Ethernet HWaddr CB:B2:55:9C:4D:2E
RX bytes:96947373 (92.4 MiB) TX bytes:1045811045 (997.3 MiB)
eth2.4 Link encap:Ethernet HWaddr CB:B2:32:9C:4D:2E
RX bytes:0 (0.0 B) TX bytes:72669 (70.9 KiB)
eth2.5 Link encap:Ethernet HWaddr CB:B2:32:9C:4D:2F
inet addr:ex.te.rn.al Bcast:ex.te.rn.255 Mask:255.255.255.0
RX bytes:2024079220 (1.8 GiB) TX bytes:99321148 (94.7 MiB)
eth2.5.35 Link encap:Ethernet HWaddr CB:B2:32:9C:4D:2E
... PROMISC ...
RX bytes:984221760 (938.6 MiB) TX bytes:22318 (21.7 KiB)
Physically there are 5 ethernet sockets, but as it could be seen from the above info there are 2 hardware NICs (CB:B2:32:9C:4D:2E and CB:B2:32:9C:4D:2F) and this appears logically: LAN and WAN. Maybe I'm wrong even with this, but eth2.5 seems to be the only normal case (its own IP/MAC). Other 8 generates difficulties understanding what's going on there: all 8 records have the same MAC (CB:B2:32:9C:4D:2E), only br0 has an assigned IP, eth2 seems to be special with txqueuelen:1000 and an interrupt (others don't have interrupts, even eth2.5), eth2.2 and eth2.4 are identical with the same amount of TX bytes and they don't recieve bytes, br8 is just receiving bytes.
So, how does this networking magic work? many different device names, same MAC, different properties
What are the relations between NICs, MAC addresses, device names?
br0andeth2.5have IPs, other records display none. And how is several IPs to one physical interface related to this (it seems out of context this statement)? – ArtM Feb 26 at 12:39grep VID /proc/net/vlan/*to see if that's the case, and what VLAN IDs are in use. – Alexios Mar 31 at 10:41