Topic: Ethernet ports and Network interfaces (on a TP-Link TL-WR941ND)
Like many consumer devices, the TL-WR941ND is a router, a wireless access point and an Ethernet switch at the same time. It is a device sporting five Ethernet ports. One is labeled WAN, the rest are labeled (LAN) 1 through 4 on the casing. Thus far the hardware situation apparent to the user. Now, with OpenWrt, there's also a view from the inside of the device:
root@TIBERIUS: ~ > ifconfig | grep Link br-lan Link encap:Ethernet HWaddr 00:23:CD:20:C3:B0 eth0 Link encap:Ethernet HWaddr 00:23:CD:20:C3:B0 lan1 Link encap:Ethernet HWaddr 00:23:CD:20:C3:B0 lan2 Link encap:Ethernet HWaddr 00:23:CD:20:C3:B0 lan3 Link encap:Ethernet HWaddr 00:23:CD:20:C3:B0 lan4 Link encap:Ethernet HWaddr 00:23:CD:20:C3:B0 lo Link encap:Local Loopback pppoe-wan Link encap:Point-to-Point Protocol wan Link encap:Ethernet HWaddr 00:23:CD:20:C3:B0
I've used Linux on a lot of computers with network interface cards/controllers (NICs), all of them Ethernet cards. Usually, an Ethernet NIC has one Ethernet port. In my experience (as gathered on computers), there's also a correspondance between Ethernet ports and MAC addresses: one port, one address. But this does not hold true in the case of the router/switch device. There's five ports, and according to ifconfig all share one MAC address. This somewhat confuses me. Now I found this:
A switch has Ethernet ports, and sometimes some IC capable of tagging (hardware tagging) but a switch does not contain/incorporate a NIC. So Linux will show no physical or virtual software interfaces! Do not confuse a simple Ethernet port with a full-blown NIC!
Okay, this makes sense. Further down on the same page, in a section marked as containing outdated information, there's also this:
An OpenWrt box is actually three devices in one. It consists of a VLAN-configurable switch, a wireless port, and a Linux host. The switch and host are connected by one internal "wire" (Gigabit Media Independent Interface), over which VLAN tagged packets are exchanged. All of the physical ethernet ports on the box are just ports on a single internal switch. VLANs are then used to separate the ports into groups.
Does this still apply or is it actually outdated?
Do I conclude correctly that (a) my router/switch device has one NIC with five ports, as reflected by ifconfig showing just one MAC address, and that (b) this is only because it is not only a switch, but also a router, hence some kind of computer?