2023-09-21 Upgrading the wifi at home: WPA3 personal, Wifi 6, guest wifi
I recently bought new wifi access points to upgrade the wifi at home. The main reason was the fact that the TP-Link TL-WDR4300 bought 9 years ago was sometimes 'hanging' which was solved by rebooting it. This was starting to get annoying, and the family wants stable wifi which doesn't need instructions which button to press for reboot. The upgrade path was going somewhat 'prosumer': support for multiple wireless SSIDs with a main and a guest network, and I wanted an extra access point in the shed for working in the back garden, as tested in april Using the network switch in the shed as remote powerswitch. The choice was to go with the Mikrotik access points. For the shed and garden I bought the wAP.ac and for the main access point in the house the hAP.ax3. The latter has support for the latest and greatest wifi standards, including wifi 6 and WPA3. It took me a while to configure them, the Mikrotik routerOS userinterface exposes all the options networking in Linux has, but it takes knowledge of bridging, routing and firewalling to get it all correct and doing what I want.
2023-04-28 Fixing settings/drivers for Digitus Gigabit Ethernet adapter USB-C
I recently bought a Digitus Gigabit Ethernet adapter USB-C, mainly because my work laptop has no wired ethernet connection which I really want sometimes. As I don't like having Windows-only hardware I did check before ordering that it can also be used with Linux. It contains a Realtek r8152 chip so I searched and found Fixing performance issues with Realtek RTL8156B 2.5GbE USB dongle in Ubuntu - CNX Software which mentions that loading the listed udev rules makes Linux select the right driver and improves performance. And indeed the 'wrong' driver was chosen initially. I fetched r8152/50-usb-realtek-net.rules at master · bb-qq/r8152 · GitHub like:root@moore:~# cd /etc/udev/rules.d/ root@moore:/etc/udev/rules.d# wget https://raw.githubusercontent.com/bb-qq/r8152/master/50-usb-realtek-net.rules root@moore:/etc/udev/rules.d# cd root@moore:~# udevadm control --reload-rules root@moore:~# udevadm triggerAnd now things are as I wish, the right driver is loaded:Device-3: Realtek USB 10/100/1G/2.5G LAN type: USB driver: r8152 IF: enx3c49deadbeef state: down mac: 3c:49:de:ad:be:ef
2023-04-21 Using the network switch in the shed as remote powerswitch
One of the wishes we have for the home network is good wifi coverage in the back garden so we can sit outside on nice days to work without running UTP cables. The access-point in the central place in the house doesn't cover the back garden. Ideally I would also like a separate 'guest' wireless network at home. These wishes was taken into consideration when upgrading the fiber to the shed network with a Netgear GS310TP switch. This switch has Power over Ethernet (PoE) support so it can power an acccess-point. The next step was to find an access-point supporting VLANs and multiple SSIDs. Recently I borrowed a Mikrotik Wap.AC to test the options. It took me a bit to get used to the RouterOS userinterface but I managed to get it all working in an ideal configuration: Management via one VLAN, a 2.4 GHz wireless network bridged to the trusted wireless network, a 2.4 GHz wireless network bridged to the guest wireless, a 5 GHz wireless network bridged to the trusted wireless network and a 5 GHz wireless network bridged to the guest wireless. The final test was with the Mikrotik Wap.AC in the shed with power over the network cable. This worked! Ideally the wireless network in the backyard is 'on demand' because we only use it when working from home or sitting in the backyard and we can save the power at other times. So the idea of a button 'wifi in backyard' and an automatic shutdown in the evening is nice. I searched and it is indeed possible to control the Power over Ethernet in the Netgear GS310TP switch with snmp. Based on GS110TP deactivate PoE over SNMP for specific Ports I soon had working snmpset commands to disable/enable power to a specific port, and the Mikrotik followed nicely. Value '1' is PoE on and value '2' is PoE off:$ # switch PoE on for port 8 $ snmpset -v2c -c ******** ******* 220.127.116.11.18.104.22.168.22.214.171.124.8 integer 1 iso.126.96.36.199.188.8.131.52.184.108.40.206 = INTEGER: 1$ # switch PoE off for port 8 $ snmpset -v2c -c ******** ******* 220.127.116.11.18.104.22.168.22.214.171.124.8 integer 2 iso.126.96.36.199.188.8.131.52.184.108.40.206 = INTEGER: 2Ideally there would be a button (zigbee?) near the backdoor to request "On" and a scheduled task every day to switch it off in the evening.
2022-10-12 Peeking a bit at Kea DHCP server
Yesterday I learned that ISC DHCP server will be end of life at the end of this year. For a package I started using around 1998 with one of the first versions I expected a bit more announcement time. At the same time I'm so used to using ISC dhcp server in my home network I never subscribed to any mailing list or other announcements about ISC dhcp server, it's just there, I can configure it to do what I want including supporting pxe booting systems for installation or diagnostics or supporting special dhcp options for APC AP7920 rackmount power distribution units. And all the virtual lans of my home network. ISC suggests using Kea DHCP server to replace it in most server implementations. Kea DHCP server should be able to get a lot of configuration data from databases and allow for dynamic updates of the configuration. That is an improvement over ISC dhcp as it is at the moment, which needs a full restart for every change. So time to peek at Kea DHCP server. I don't think ISC dhcp server will be unavailable after 31 December 2022 but I don't expect updates anymore and when a good replacement is normalized I expect ISC dhcp server to slowly fall away from linux distributions. Currently it's not even available for Debian or Devuan stable or oldstable strangely enough. I wonder what happened there. But there are distribution packages for debian buster at Cloudsmith - Repositories - ISC - Internet Systems Consortium (isc) - kea-2-3 (kea-2-3) - Packages / format:deb. Time to install the latest and let apt fix the dependencies:koos@testrouter:~$ sudo dpkg -i isc-kea-dhcp4_2.3.1-isc20220928105532_amd64.deb isc-kea-dhcp6_2.3.1-isc20220928105532_amd64.deb isc-kea-common_2.3.1-isc20220928105532_amd64.deb Selecting previously unselected package isc-kea-dhcp4. (Reading database ... 46609 files and directories currently installed.) Preparing to unpack isc-kea-dhcp4_2.3.1-isc20220928105532_amd64.deb ... Unpacking isc-kea-dhcp4 (2.3.1-isc20220928105532) ... Selecting previously unselected package isc-kea-dhcp6. Preparing to unpack isc-kea-dhcp6_2.3.1-isc20220928105532_amd64.deb ... Unpacking isc-kea-dhcp6 (2.3.1-isc20220928105532) ... Selecting previously unselected package isc-kea-common. Preparing to unpack isc-kea-common_2.3.1-isc20220928105532_amd64.deb ... Unpacking isc-kea-common (2.3.1-isc20220928105532) ... dpkg: dependency problems prevent configuration of isc-kea-dhcp4: isc-kea-dhcp4 depends on libboost-system1.67.0; however: Package libboost-system1.67.0 is not installed. [..] koos@testrouter:~$ sudo apt install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following additional packages will be installed: libboost-system1.67.0 liblog4cplus-1.1-9 libmariadb3 libpq5 mariadb-common mysql-common The following NEW packages will be installed: libboost-system1.67.0 liblog4cplus-1.1-9 libmariadb3 libpq5 mariadb-common mysql-common 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. Need to get 760 kB of archives. After this operation, 4,001 kB of additional disk space will be used. [..]Looking at the sample configuration makes me think I can do this with a text-based configuration (it's actually JSON) and get it going fast. For my home network that is probably the best solution. Kea does have options to use MariaDB or PostgreSQL backends for storage which does look really nice for my home network but at the same time adds a dependency and a layer of complexity. I can see IPAM systems totally going to Kea DHCP and give a full interface on managing the databases directly including APIs for adding/removing objects as they are added in other systems.
2022-05-12 Generations of Netgear switches and interface names
In my time at Utrecht University computer science I wrote a script to search Cisco switches for a given ethernet address and respond with the port. This could be used to trace things on the network, which helped on incidents in progress. This script was based on the typical things Cisco switches do with vlan CAM table lookups and the best implementation. CAM stands for Content Addressable Memory: memory optimized for doing lookups by certain content. In the case of a network switch a 6-byte MAC address plus 2-byte vlan id will be used to do a lookup of the 2-byte interface number where it was last seen, and this lookup is done in hardware. This CAM table is accessible via SNMP, and the funny part is the MAC address for the lookup is also encoded as SNMP identifier. I could get the whole CAM table via snmpwalk but as I only want to lookup 1 MAC address it is way faster to go directly from MAC address to interface number. After that the interface number is translated to an interface name and that name is usually something recognizable to a network engineer. When I started using managed switches at home from Netgear I adapted the script at home and enhanced it for Netgear switches. I recently added a third netgear switch when upgrading the fiber to the shed and I updated the script to learn about the new switch. I noticed the interface names are quite different over the generations of netgear switches. The oldest switch is a Netgear GSM7224. The interface name from a query is "Unit: 1 Slot: 0 Port: 15 Gigabit - Level". The second switch is a Netgear GS716Tv2. The interface name from a query is "Slot: 0 Port: 11 Gigabit - Level". The newest switch is a Netgear GS310TP. The interface name from a query is "GigabitEthernet9". The Unit: 1 in the GSM7224 suggests some option for stacking multiple switches, but I can't find any mention of that option in the on-line documentation. The other fun part I notice is interface names never showing the fact that they are actually an SFP interface with an SFP in them. The port status for a port with an SFP is not different from the status for a copper cable at gigabit.
2022-05-11 The fiber to the shed network has been upgraded
I got around to doing the upgrade of the fiber to the shed network I had on my mind today. A friendly network layer 1 engineer had some leftover Cisco SFP modules and the netgear GS310TP and netgear GS716Tv2 switches accepted these without any issue. So the layer 1 network link came up fine. The layer 2 link with vlan support took me a few hours, somehow I managed to get confused with vlan tagging, vlan tagged only frames and the primary vlan id. I haven't done this in a while and I sort of copied the configuration from another port which may be less than optimal too. I had to run through the house a number of times to get the configuration right, wireless devices can't access the managed switches. At least I got the whole configuration working in the end. I think I can add other vlans to the link too (I want the option of a wireless access-point in the shed). Putting the switch, the power supply for the switch, the raspberry Pi, the power injector for the 1-wire measurement network and all network cables and fiber in the plastic box I bought for this work was a bit of work, it just fits (so a wireless access point will have to live outside that box..). But it's all in there and the box is closed again. It's just not airtight anymore with the new holes for power, fiber, network cable, gps antenna cable and 1-wire network. I may need to stuff the holes with foam or something similar to keep insects from crawling into the box. Everything works now and the measurements from the solar inverter are coming in!
2022-02-25 Why the wifi in the shed is probably unreliable
I used the raspberry pi in the shed to do a wifi scan, to get an idea of the usage of the 2.4 GHz wifi band as seen in the shed. This finds 18 to 22 networks, with our own network not as the strongest network. As you can imagine most channels have multiple networks on them. And the overlap in wifi channels makes this worse: the networks on channel 2 see interference from those on channel 1. From the list of networks, with names and address information removed, just leaving signal strength and channel / frequency:-93 dBm, ch 1, 2412 MHz -91 dBm, ch 1, 2412 MHz -92 dBm, ch 1, 2412 MHz -72 dBm, ch 1, 2412 MHz -92 dBm, ch 1, 2412 MHz -88 dBm, ch 1, 2412 MHz -92 dBm, ch 1, 2412 MHz -91 dBm, ch 2, 2417 MHz -80 dBm, ch 2, 2417 MHz -90 dBm, ch 3, 2422 MHz -94 dBm, ch 4, 2427 MHz -93 dBm, ch 5, 2432 MHz -94 dBm, ch 5, 2432 MHz -80 dBm, ch 6, 2437 MHz -94 dBm, ch 8, 2447 MHz -95 dBm, ch 8, 2447 MHz -94 dBm, ch 9, 2452 MHz -95 dBm, ch 9, 2452 MHz -77 dBm, ch 10, 2457 MHz -84 dBm, ch 11, 2462 MHz -93 dBm, ch 11, 2462 MHzThis is a right mess. If I ever want reliable wifi in the back garden/shed I will have to have an extra access-point there. This option of having wireless vlan(s) available in the shed has influenced the choice in switch for the shed.
2022-02-22 Shed switch ordered
In the project to upgrade the connectivity to our shed I ordered a switch with sfp slots: a netgear GS310TP. The choice is to have the same brand as in other places in the network so I can select compatible SFP modules easily. With this switch I also have vlan support so I can have a wifi access point in the shed if I want.
2022-02-08 Upgrading the fiber to the shed network
The current fiber to the shed network is working fine but only gives the Raspberry Pi based NTP server network at a speed of 100 mbit. The link is working fine but the next device with network problems due to unreliable wifi is showing up: the solarpanel inverter in the shed is sometimes unreachable for my solar inverter monitoring using modbus/tcp and that means I 'miss' measurements. The propetairy monitoring that solaredge does can deal with interruptions in reachability and upload older data, but the modbus/tcp monitoring I use can only access real-time data. My first plan was to look at industrial switches because of the extended temperature and humidity ranges in the shed. But having both 'industrial' and 'sfp slot' costs a lot of money. My next thought is to put all the possibly sensitive electronics in one case and hope the temperature and humidity inside that case stay within a reasonable range. This thought is based on the fact that the Raspberry Pi based NTP server functions fine in a not very closed wooden box without being affected by temperature or humidity.
2021-09-05 Network traffic statistics in Influxdb/GrafanaItems with tag network before 2021-09-05
I continued my slow migration of statistics to Influxdb/Grafana and added the network traffic. I've been gathering this for ages in rrdtool, my earlier view was that I've been using rrdtool for network and other statistics since October 2002 so it is a bit of a change. I updated the perl scripts that fetch network traffic statistics over SNMP to also add the data to influxdb. And it was simple to create a dashboard with that data. The overview pages with data for all interfaces for one measured host also link to detail pages per interface which also show the number of errors.