I'm doing my first dabble into splitting radios and management on my R8000, and finding that I'm limited by lack of certainty about the router's networking design. I need better understanding of the ethernet/wlan ports detected, and especially, what the 3 "eth" and 3 "wlan" ports actually represent in physical hardware.
(Note: The R8000 is behind a primary router so it doesn't have a "WAN". I've deleted the WAN definitions and will reuse that port as a 5th "ordinary" port, which has affected the ifconfig data)
A quick look at ifconfig suggests that my R8000 has the following "real" network devices. But what does each represent?
br-lan HWaddr E8:FC:AF:FD:2B:BE inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 UP RUNNING - this is obviously the default LAN if that OpenWRT creates, with the IP/subnet changed for my LAN. But it's presumably a bridge of some kind from the name - can I safely delete this if I don't need multiple RJ45 ports/VLAN interfaces to be bridged?
eth0 HWaddr 0E:D4:62:3D:58:DC UP RUNNING - is this an ASIC switch covering all 4 or 5 of the RJ45's? +CPU? Or what else?
eth0.1 HWaddr E8:FC:AF:FD:2B:BE UP RUNNING - Some VLAN created by the default setup, but representing what physical item? Is it safe to modify/delete?
eth1 HWaddr 26:14:8D:FD:DC:C1 No idea what this represents
eth2 HWaddr E8:FC:AF:FD:2B:BE No idea what this represents
wlan0 HWaddr E8:FC:AF:FD:2B:BE Presumably the HW IF for one of the 3 radios?
wlan1 HWaddr E8:FC:AF:FD:2B:BD Presumably the HW IF for one of the 3 radios?
wlan2 HWaddr E8:FC:AF:FD:2B:BC Presumably the HW IF for one of the 3 radios?
What exactly do these devices really signify, in terms of their actual hardware connections? That would be enough to figure out which I need, which I bridge, and which I need to connect via VLAN vs. via directly using the port?
Also, to what extent I will need to use VLANs to connect and manage the individual 3 radios and 5 RJ45 ports?
"sw.0 ports 0,1,2,3,4" correspond to the 5 RJ45 ports at the rear
"sw.0 ports 5,8" always up (even with "wifi down"). Port 5 has substantial traffic (CPU??), port 8 shows almost none (64 octets, sounds like it's accessed once, maybe a port for switch management or something??)
"sw.0 ports 6,7" always down.
But this doesn't yet help, because I only know how sw.0 port IDs are mapped to physical RJ45s, but my question is about the logical interfaces eth* and what they cover.
In other words, while I now know that sw0 port 0-4 are the five rear RJ45s and maybe sw.0 port 5 is the CPU, I don't yet know which of eth0, eth1 and eth2 are which RJ45 ports, whether I can safely delete br-lan and directly connect to eth0/1/2/0.1 or some other ethXX instead (if I only need one RJ45 link), and whether it's safe to delete VLAN eth0.1 or what it represents.
By R8000, I assume you are referring to the Netgear R8000?
You may want to take a look at the /etc/config/network file. It might provide you with some clarity as to what OpenWrt is calling various things. Also, refer to OpenWrt's Basic Networking and VLANs page, they provide a lot of useful descriptions of how OpenWrt treats these concepts.
br-lanis your LAN. It is a virtual interface that bridges a couple of things. The first thing contained in the bridge is VLAN 1, which by default is the VLAN that contains the four physical LAN ports on the back of the router. In the /etc/config/network file, it is specified in the stanza:
As you can see, VLAN 1 by default contains physical LAN ports 0, 1, 2, and 3. Ignore 5t for the moment, I'll get to that later.
Incidentally, if you go into the LuCI interface, and go to the Network > Interfaces tab, you can see this shown graphically. Look at the entry for LAN. You can see what the logical interface name is (LAN). You can see what the physical interface name is (br-lan). And you can see what the bridge contains. I believe the first icon means that this entry is a virtual interface. Then there are parentheses, which signify that it is a bridge. And what is it bridging? There is an icon for VLAN 1, and then there are three radio icons, representing wlan0, wlan1, and wlan2.
eth0 is the physical interface name given to the CPU. Please read through the VLAN doc, I believe this question is answered there.
eth0.1 represents VLAN 1. As stated above, by default it contains the four LAN ports on the back of the router.
By the way, if you are referring to a Netgear R8000, then you are missing an interface. By default, an interface called eth0.2 should have gotten created, which represents VLAN 2, and it should have gotten tied to the physical WAN port on the back, which is port number 4. In /etc/config/network, if should show up as:
When you deleted the WAN and turned it into a 5th "ordinary" port, it will have removed this eth0.2 physical interface.
Refer to the VLAN doc, especially where it talks about using ls -l /sys/class/net.
Yes. Take a look at the /etc/config/wireless file and the Network > Wireless tab in LuCI.
As I stated above, VLAN 1 and 2 are created automatically by default to manage the 5 RJ45 ports. The 3 radios aren't managed by any of the VLANs by default, which is why the br-lan bridge is created, so that there is a way to manage the radios and 4 LAN ports as one grouping. If you look in the /etc/config/firewall config file, you will see references to the logical interface lan, which is the name that has been given to br-lan.
You can certainly break apart and/or rejigger these default associations as you see fit. For example, if you want to take one of the three radios and use that exclusively for a guest wi-fi network, you would remove it from lan, create a new logical interface called guest, and add the radio to this new logical interface.
One note about OpenWrt's notion of a VLAN. You don't need a VLAN to be tied to any of the physical hardware ports. If you look at the Network > Switch tab in LuCI, you will see the VLANs on the router. Notice that one of the columns is labeled CPU (eth0). See how both VLAN 1 and VLAN 2 have the CPU as being tagged? This is the 5t from the /etc/config/network stanzas that I showed earlier. You can create a very simple VLAN that isn't tied to any hardware port by only having the CPU be tagged, and all other ports being set to Off.