I picked up a RPi4+2Gb memory on sale at Microcenter. Since my 14 year old Linksys is finally dying on me I thought it would be nice to swap it out with the RPi4. I've been tinkering around with it all day and I've actually found it really fast. I'm very impressed with it performance wise. I've got two questions.
I put a 16Gb SD card in it, but the default dd of the daily image is only a tiny fraction of this. I couldn't find anything on the recommended way of expanding the file system. Is it manually with fdisk or is there an auto-expand script I'm missing?
I get why it is set up default with bridged between the wlan0 and eth0, but jeez is it a PITA trying to get it to split. I've tried many things and I'm just screwing something up every time I guess because it never works. I'm basically looking for the default starting place that the Linksys starts you at. The wireless has the 192.168.1.1 DHCP I connect to and the eth0 is the firewall'd wan. Since that ISN'T how it is configured, I have to connect to it directly via eith0, then I set it up with an IP for my network, reboot it on my network, connect to it again, install luci, configure wifi, connect to it over wifi then split the bridge taking out the eth0. But from there luci is no longer useful. Not only do I not have any vlan configurations (the option is missing on the interface entirely) but when I click on the "add new interface"->"create new interface" it just spins and spins and spins and the longest I let it sit was almost 30 minutes. But when I try to split it just on the command line editing /etc/config/network I guess I goof it up every time because once I reset the network, the device never comes back on line and I end up just reflashing it and starting over.
Any thoughts/suggestions on what I might be doing wrong?
- I followed the instructions here.
- I am using it without WLAN, so I cannot say that I faced your issues. But removing the bridge is quite easy.
uci delete network.lan.type='bridge' ; uci commit; ifup lan
It is a problem that there is no luci, but this is due to the fact that there is still no stable version and we have to run snapshots. Which could be the reason for the endless spinning when you create new interface.
Finally this device doesn't have switch, so you can define directly the subinterfaces like this:
uci show network | grep ifname
Thanks for confirming. I used fdisk to adjust the size. Easy enough. For those reading in the future, do make sure that the start partition is the same when you recreate it. Almost missed that the first time when I let it just auto pick the start position.
As for the network, I still can not get that working. I can split it as you pointed out, but I can't seem to get the wlan0 to set up a network that I can connect to. When I try and reset the network it all just goes away.
So I'm just going to give up on this for now. I will leave it in bridged mode with both interfaces on the lan that way I can test other aspects. For the most part leaving it as an AP on the lan works, I just don't get the same firewall configurations I was hoping for. The other thing that is super annoying about this bridge is that the networking metrics are all wrong. Let's say I start a 20 second iperf network benchmark test (laptop <-> wireless RPi4 <-> wired RPi4 <-> switch <-> computer). I get great throughput and the benchmark results are many MB transfered but what is the peak network throughput on the bridge? 20K..most of the time it just fluctuates 10-14K regardless if it is in use or idle. sigh Nothing I do seems to show the actual network usage on that bridge. I'm not sure if I've discovered a bug or if I'm doing something wrong. Oh well.
Thanks for your help!
How do you measure that?
It kinda makes sense, as one would expect only ingress and egress traffic to hit the counters, not transit.
Status -> Real time graphs -> Traffic -> br-lan
And I also use the Zabbix package to send data to my Zabbix server which reports the same numbers for br-lan.
The funny thing is that my Linksys shows the individual interfaces in the Traffic graph, but I don't get those on the RPi for some reason. I'm guessing it's probably just a weird issue from the daily builds or something.
However, I've got some experience with Zabbix so I hacked the package scripts to scrape eth0 and wlan0. Now I get proper metrics. For anyone else who wants the changes I did, it's rough in that I hard-coded it but this works for me for now.
# sed -e '/^#/d;/^$/d' /etc/zabbix_agentd.conf.d/network
Yes, it is not only in OpenWrt. If you measure the bridge device you'll get only the traffic that comes or goes to the device itself, not the transit, which is what you want.
Just to follow up. After doing luci updates on the RPi4, I now have Status -> Real time graphs -> Traffic graphs for br-lan, eth0, and wlan0.
But the Zabbix workaround is working great for me.