Posts in Networking (5 found)
Kev Quirk 2 weeks ago

Replacing my ISP router with a UniFi Cloud Gateway Max

So I recently upgraded my home internet to full fibre, after which I also decided to upgrade my router as there were some things I wanted to do with my network that my ISP-provided router wasn't capable of. I replaced my mesh system with a UniFi one a couple years ago, so it made sense to stick with the UniFi brand and go with one of their routers, so £250 later, I had a Cloud Gateway Max on its way to me. I figured this would be a straightforward process, but my god was I wrong! So I took a backup of my Cloud Key 1 config and figured I could unplug that, plug in the Cloud Gateway, restore the config and be done. I assumed there would be a couple things I needed to tweak, but for the most part, it would be a simple 10 minute job. You see, dear reader, in order to configure the Cloud Gateway you need an internet connection. No internet connection, no configuration. So by unplugging my ISP router -thus killing the internet to my entire house - I couldn't even get to the point where I could enter my ISP credentials, let alone configure the bloody thing. Without the internet connection all I could configure was the IP and MAC of the router. Absolutely pointless! There may be a way of doing this without an internet connection, but I couldn't find it and it certainly wasn't obvious. So I had to reconnect my old rig - the ISP router, the Cloud Key, and access points. Then I hung the Cloud Gateway off the ISP router so it could get an internet connection. Luckily this worked and I was finally able to configure the thing. After which I disconnected the Cloud Key, assuming the access points would all fail over to the Cloud Gateway when I restored the config backup from the Cloud Key. You see, the config back from the Cloud Key is a completely different file format ( ) to what the Cloud Gateway was expecting ( ). What the actual fuck! Soooooo back online went the Cloud Key, and I had to remove all 4 access points from there, just so I could "adopt" them with the Cloud Gateway. Then I had to manually setup my SSIDs and DHCP so it all matched the old rig. But finally, after 3 hours of fucking around, a job that I thought would take 10 minutes was done. UniFi is really good kit and has lots of features, but I don't understand why it has to be so difficult to set up. It feels like UniFi is the Apple of the networking world - they do everything they can to keep you in their ecosystem and up sell. Want our wifi? You're gonna need one of our routers, or this arbitrary piece of hardware for that. Oh you want to move an AP to a new management device? Yeah, you can't just move it - you need to do these 5 steps instead. Had I not already spent over a thousand pound on this UniFi kit, I would have chucked it all on eBay and gone with something else, but alas WiFi Apple has me in their walled garden! Anyway, it was a painful process, but it's working. And to be fair to UniFi, once it is all setup, it's rock solid and feature rich. I won't be upgrading again any time soon though, that's for sure! Now I just need to familiarise myself with all the nifty features the Cloud Gateway offers, so I can improve my network. Fun times! A Cloud Key is a stupid piece of hardware that is needed in lieu of a UniFi router. It controls the wireless access points.  ↩ Thanks for reading this post via RSS. RSS is ace, and so are you. ❤️ You can reply to this post by email , or leave a comment . A Cloud Key is a stupid piece of hardware that is needed in lieu of a UniFi router. It controls the wireless access points.  ↩

0 views
Giles's blog 1 months ago

10Gb Ethernet: what I had to (re)learn

My ISP recently started offering a 10Gb option, and my "shiny new thing!" Pavlovian response immediately kicked in. So of course, I had to upgrade the wired networking in my home -- which meant I had to learn a few things to get it all working, and relearn a bunch of stuff I'd forgotten over the years. Wired networking for home and small offices hasn't really moved forward that much in the last 20-odd years. Back in 2006, gigabit Ethernet was standard for businesses, and most home users moved to it not long after. Perhaps due to the rise of WiFi for most "last few metres" connections, it's pretty much stagnated there, perhaps with a bit of a push towards 2.5Gb/s more recently. But with faster ISP connections arriving, I think things are starting to become a bit more interesting. Even the fastest WiFi 7 connections are only able to get up to around 6Gb/s to a single device -- and that's in an ideal "super-fast machine sitting right next to the AP in a shielded lab" setup. Here's what I had to drag up from my memory, and the new stuff I had to learn, in order to get this all working. I'll write about the background in this post, and then tomorrow I'll post about what I actually put in place. Let's start with a bit of the backstory. Bear with me, it's not just self-indulgent reminiscing! When I first started using networked computers, back in the early 90s, the most popular standard was 10BASE2 . We had this in the first office that I worked in, and in the university computer labs. In the back of your computer, you'd have a T-shaped connector like this: © Raimond Spekking / CC BY-SA 4.0 (via Wikimedia Commons ) The end facing the camera in that photo was the bit that went into your computer. Computers were daisy-chained together; you might have a server connected to workstation one, workstation one to workstation two, and so on, until you reached the last workstation. You'd have to cap the unused end of the T connectors at each end of the chain with a special terminator. Essentially it was a single coaxial cable, so every computer saw every bit that was sent along the bus. In turn, that meant that everyone was sharing the same bandwidth, a meagre 10Mb/s. The cool thing about Ethernet (compared to older networking technologies) was that the computers shared it without any need for coordination -- if two of them started "speaking" at the same time, they'd notice, and stop. They would then start again after a random back-off, so one of them would randomly wait for less time than the other and start first. The other would notice that "the line was busy" and would wait again for another chance. Of course, this limited the number of computers you could have on one network, as past around 20 or so, they'd spend all of their time interrupting each other and never actually be able to send anything -- and anyway, sharing 10Mb/s across a large number of computers would be an issue. On top of that, there was a hard cap of 30 machines per network. You'd use more specialised networking equipment to link different networks together -- bridges, switches and routers. More about switches later. By the time we started setting up networking in a house that I shared with friends, in around 1996 or so 1 , the most popular option had changed: now people were using 10BASE-T. Still 10Mb/s, but using the RJ45 connectors and twisted-pair cables that we've come to know and love. All of the computers would have a single cable going to a hub, in a star topology. You might link multiple hubs together to build larger networks. However, these hubs were still little more than a convenient form factor to electrically link all of the wires together into a single bus. You still had the problem that every computer could see every bit on the bus, and the same bandwidth-sharing and limits with the number of computers that you could handle as a result. Over the years after that, things moved on. Switches had been relatively expensive things; they would be used to interlink hubs, or 10BASE2 networks. They would learn (from seeing the source MAC address on incoming packets) which machines were sending to each of their ports, and use that to know where to send packets that came in on other ports. If, say, a switch learned that addresses A, B, and C were on port 1, then if a packet for one of those machines came in on port 2, it would know it could just send it out on port 1 and not on the others. That helped to address the bandwidth-sharing and the problems with collisions. Prices for switches got lower and lower, and eventually -- I think sometime between 2005 and 2010 -- they became so cheap that there was little point in bothering with hubs -- you'd just connect every computer directly to a switch. That meant that any two computers on the same switch could talk to each other at the full network speed, as packets would just be switched from port to port 2 . The connections between switches were still a bottleneck, of course, but that was much less of a problem. At the same time, speeds increased, from 10Mb/s to 100Mb and then finally to 1Gb/s, which was standard for business machines by 2005 or so -- I remember that when we bought our first computers for Resolver Systems back then, that's what they came with by default. Home computers weren't far behind -- and that's where we've been ever since. 3 Back to that bottleneck between the switches. Even back in the days of 10Mb/s networks, if you were managing a larger network, you would want a faster network to interlink them -- so, for example, if two computers on the same switch both wanted to access some external resource, they wouldn't be competing for the same 10Mb/s uplink. Once you went past small office-sized networks, that kind of thing started becoming important. ISPs and datacenters, of course, had the same problem in spades. What you would need was an uplink on the switch that could run at a faster data rate. So even when 1Gb/s Ethernet was too expensive for the connections to the computers themselves, you might have a switch with a 1Gb/s uplink to connect it to the larger network, and a bunch of 100Mb/s ports for the local stuff. Additionally, for larger networks you would have another problem -- physical distance. All of these RJ45-based networking technologies had a maximum cable length of 100m. You could extend that by putting a repeater (or even just a switch) every 100m or so as a "signal booster" -- but if, for example, you wanted to link two buildings, that could be tricky. You'd need to run both the data cable and power, and you'd need to have some way of getting access to the repeaters if they went wrong. Ethernet over fibre optic connections had been a standard thing for years, though, and it had much better range -- for single-mode, many kilometers. So while it was too fiddly for LANs, it made great sense as a backbone technology. What that meant, though, was that in order to set up some particular network topology, you might wind up having to get a whole bunch of different switches. For short connections between two of them, you might use an RJ45 uplink connection, while for longer ones you might want fibre. More complex topologies might need some entirely different mix of ports. To make this worse, there were a bunch of different fibre optic standards -- multi-mode and single mode fibres, different connectors, and so on. Rather than manufacturing a large range of different kinds of switches with all of the combinations that people needed, manufacturers separated out the physical layer of the transport from the switching hardware. A switch, instead of having specific RJ45 or fibre connectors for its ports, would have Small Form-factor Pluggable (SFP) "cages", essentially a new kind of socket. These allow people to mix and match different kinds of transceiver modules, which would slot into the cage to provide an actual usable interface -- one for RJ45 for gigabit Ethernet, or one for the particular kind of fibre connection they were using -- whatever configuration worked best for them. A typical switch for a larger network might have one or two of those for backbone connections, and then RJ45s for local connections. Over time, gigabit backbones were no longer enough, and SFP was followed by SFP+, which could handle 10Gb/s. Since then, there have been extensions for even faster speeds, way up to hundreds of Gb/s. Back in the day, this stuff was only important to network admins for medium-sized networks and larger, of course. But now, 10Gb Ethernet means that we've now hit the point where it matters even for home users, and that's because of thermals. Here's the problem. Somewhat loosely speaking, the faster a network connection on a particular kind of wiring, the hotter it runs. Over an RJ45/twisted pair connection, 10Mb/s Ethernet basically shed no heat, 100Mb/s a little more, even gigabit Ethernet just left your switches somewhat warm. The jump up to 10Gb over RJ45, called 10GBASE-T, makes things decidedly toasty -- you'll see just how toasty in tomorrow's post. There's also the issue of cabling. Because network speeds have been stable for some time -- Gigabit Ethernet being the standard for ~20 years -- most buildings with structured cabling (the kind of thing where there are RJ45 sockets in the walls wired together) will have the standard for that -- CAT-5E. Unfortunately 10Gb/s Ethernet won't officially work over it -- you might be lucky, especially with short cables, but in general it won't work, or if it does it won't be reliable. CAT-6 cabling helps -- it can handle 10Gb/s over runs up to about 55 metres. And the ideal is CAT-6A, which can handle 10Gb/s over the same 100 metre cable lengths that you'd expect for the older, slower setups. What this meant was that an interim standard was created. 10GBASE-T is hot and needs cables that people don't necessarily have, especially when you're talking about what's installed in the walls of their building. But if you run it a bit slower, you can do so over older cables and without melting them. That's why I didn't mention 2.5Gb/s Ethernet earlier (or indeed the rarer 5Gb/s). They were introduced as slowed-down versions of 10Gb/s to get it to work on existing infrastructure without major upgrades. And that's great, right up until the point your ISP emails you to say that they're offering 10Gb/s to your home now... So, what can you do to run 10Gb/s without melting things? Let's think about what an SFP or SFP+ module actually is. It slots into a cage on a switch. On one side, there's an electrical connection to the switch hardware, which is carrying the signal -- incoming and outgoing -- using a particular protocol 4 . The module does its magic, and on the other side we have -- say -- 10GBASE-T to an RJ45 socket, or a blinking laser with an appropriate interface for optical fibre. What would happen if you just had a dumb electrical cable to connect an SFP+ cage on one switch to another on another switch? That actually works pretty well! It's called a passive Direct Attach Copper (DAC) cable. The interfacing is a little more complicated than just a completely dumb wire -- the switch will want to query the module in the cage to find out some details about it, so you need a tiny bit of electronics -- but it's still really simple. On top of that, if you add a bit of amplification to the DAC, then you get an active DAC, which can double that kind of length (though these are relatively rare). The neat thing about DACs is that they run much cooler than 10GBASE-T, using about a third of the power. Of course, they lose out in terms of range. But for simple stuff within one room, and especially between switches in a rack, they work really well. The next step on top of DACs is that you can convert the underlying SFP(+) protocol directly to light, and send it down an optical fibre -- normally called an Active Optical Cable, or an AOC for short (though I've seen the rather confusing terminology "optical DAC" in various places). With that, you can normally get up to 100m. These are cheap and easy to use (because they're all-in-one units, so you don't have any fiddly alignment of the fibre to do), so they're the best option once you pass passive-DAC distances. After that, though, you really need to switch to the official standards, and go to more traditional fibre-optic setups. I've done much less research into those, so won't try to explain them. Either way, for the home, anything above this level is probably overkill right now... So: moving from the 2.5Gb/s networks that work smoothly with the same infrastructure we've been using for the last 20 years or so to 10Gb/s is a tricky step change. Suddenly, things that didn't matter -- thermal management, cable lengths, and so on -- become important. And there are solutions, but you need to start actually understanding things again rather than just plugging stuff in and assuming it will work. Fun! Time to put it into practice :-) In my next post, I'll show exactly the changes I had to make to get my existing 2.5Gb/s network ported over to 10Gb/s -- the hardware I wound up buying, how well it works, and (importantly) how hot it all runs. To share our blazingly fast bonded dual ISDN Internet connection -- 128Kb/s.  ↩ I remember feeling a little sad when that happened, because it meant that what I felt was coolest about Ethernet -- the back-off-and-retry thing -- was no longer all that important. And when the connections went full duplex (a single switch port could both send and receive at the same time over the same cable) it was finished.  ↩ If you're thinking "what about 2.5Gb/s?", I'll come back to that -- it's an interesting case.  ↩ SFF-8472 for SFP, then there's SFF-8431 and SFF-8432 for SFP+.  ↩ To share our blazingly fast bonded dual ISDN Internet connection -- 128Kb/s.  ↩ I remember feeling a little sad when that happened, because it meant that what I felt was coolest about Ethernet -- the back-off-and-retry thing -- was no longer all that important. And when the connections went full duplex (a single switch port could both send and receive at the same time over the same cable) it was finished.  ↩ If you're thinking "what about 2.5Gb/s?", I'll come back to that -- it's an interesting case.  ↩ SFF-8472 for SFP, then there's SFF-8431 and SFF-8432 for SFP+.  ↩

0 views
The Jolly Teapot 7 months ago

Uninstalling apps (part 2)

Maybe this experiment won’t last, but this week, I decided to remove Wipr from my Mac and my iPhone. I wanted to see what my web browsing experience would be like without it. Wipr is arguably the best content blocker for Safari — I’ve been using it for years — and one of the main reasons I keep using Safari , despite everything else . This is what I wrote about Wipr back in March 2023 : I wish I didn’t have to use it, but the fact is that it might be the single app […] that I can’t function without. As far as content blockers go, Wipr has proven to be the best one for me, hands down. The must-have app of the must-have list. The reason I ended up uninstalling this extension is that I recently realised that I may not need it as much as I thought I did, at least not anymore. You see, in September, I gave another shot at DNS resolvers like NextDNS . These services allow for blocking trackers and surveillance ads before they even reach your computer. My previous attempts with NextDNS were all unsuccessful, as I encountered too many connection errors for my taste, never knowing if these came from the DNS itself, my DNS settings, my browser, my internet connection, or elsewhere. This time, maybe I paid more attention to the settings, or maybe they worked on these little issues, but I ended up pretty satisfied with it. I eventually tried other options, like Quad9 and Mullvad DNS . Today, I’m using Mullvad DNS, and so far it’s been great. I like that I don’t need to manage a full dashboard of options like the one in NextDNS, and so far it’s been much more reliable than dns0.eu , which I also tried in the past. With this DNS resolver, my web browsing experience has improved considerably, if I’m being honest. Even with content blockers turned off, I barely see any ads, have never experienced slow internet speeds, and Safari has never felt so snappy and memory-efficient on my Core i5-powered MacBook Air . At some point, I realised that Wipr was only there to remove empty advert blocks from webpages, which was certainly appreciated (less empty space), but I started to feel like I was maybe underusing this great extension, like having a great player sitting on the bench. Then I started using StopTheMadness Pro again. Maybe I should write another post about why I keep coming back to this extension, but, in a nutshell, it is a bit overwhelming to manage. I somehow always end up uninstalling it before I download it again. 1 With Mullvad DNS blocking ads and trackers, and StopTheMadness blocking some banners and skipping ads on YouTube, I started to feel bad for Wipr. After a few days of this experiment, the only complaint I have is seeing all the previously hidden cookie banners. They are incredibly annoying, but I tend to see them only once per website. Other than that, barely any ads, great performance: call me impressed. Now, for situations where something remains in the way, I usually try something with Reader mode or the Hide page elements feature, either with Safari or StopTheMadness. As a last resort, when a website is getting on my nerves, I call StopTheScript to the rescue. 2 Overall, it’s a pretty satisfying set-up. Speaking of set-up, if I don’t count “apps” installed and used via the terminal, I now only have four apps installed on my Mac, and two of them are Safari extensions. 3 These are BBEdit , NetNewsWire , StopTheScript, and StopTheMadness Pro. If you are a regular reader of my “ uses ” and “ now ” pages, you may have noticed that Wipr still appears on it, along with other apps that I didn’t mention here. This is because I kept it on my work computer, with which I don’t want to use Mullvad DNS. You may also have noticed that I recently removed GoodLinks . Indeed, I really like this app, but I “replaced” it with an Apple Shortcut on my phone and an AppleScript on my Mac, triggered using BBEdit. What the Apple Shortcut does, when accessed from the share menu on Safari, is append the title and URL of the current page (as a Markdown link) to a text file living on iCloud Drive, which is always open on my Mac. Before validating the action, the shortcut asks for an optional comment that will appear next to the link in the file, which I use mostly as a way to remember how I discovered a page (usually immortalised in the “via” comments on my Blend of links posts ). On the Mac, what I do is open BBEdit, select the “saved links” file, and run an AppleScript through a keyboard shortcut that does pretty much the same thing: appending the title and URL to the bottom of that file in Markdown format. Almost as simple as adding a page to GoodLinks, without the need for another app. To open these saved links, I can simply Command-click on them in BBEdit. To me, uninstalling apps is just as fun as trying out new ones . It forces me to think about what features I really need and how I could use the already installed apps in the best possible way. As I previously explained : Once or twice a year, I get this irresistible urge to uninstall apps from my devices. Apps that I don’t use very often, apps that can be replaced by websites easily, apps that I don’t need all the time, and so on. If things go the way they usually do, this uninstalling phase will be followed by an intense “trying out new apps” or “getting some of them back” phase, so don’t be surprised if, in a few weeks, you see me using Wipr again on all my devices. Blocking autoplay on YouTube profile pages alone justifies its use. Of course, replacing the Arial and Roboto fonts with Helvetica Neue on every website is more than a nice-to-have. ↩︎ Similarly to how it handles content blockers or Reader mode, I wish Safari natively offered the option to block JavaScript on a per-site basis , like Quiche Reader or Orion Browser do. ↩︎ I used quotation marks on apps in this sentence because I’m not sure how to call an “app” like Eleventy or Brew that lives only on the terminal. ↩︎ Blocking autoplay on YouTube profile pages alone justifies its use. Of course, replacing the Arial and Roboto fonts with Helvetica Neue on every website is more than a nice-to-have. ↩︎ Similarly to how it handles content blockers or Reader mode, I wish Safari natively offered the option to block JavaScript on a per-site basis , like Quiche Reader or Orion Browser do. ↩︎ I used quotation marks on apps in this sentence because I’m not sure how to call an “app” like Eleventy or Brew that lives only on the terminal. ↩︎

0 views
Binary Igor 1 years ago

Bitcoin P2P Network: peer discovery, reachability and resilience

Peer-to-Peer (P2P) Networks introduce a completely new set of challenges. In the traditional Client-Server Architecture, there is a server and client ... Things work completely differently in the Peer-to-Peer (P2P) Networks. These networks consist of equal peers that communicate directly with each other. Their goal is to be as decentralized as possible and not to have any single point of control or failure.

0 views
Binary Igor 1 years ago

Who controls the Internet and How it works?

We take the Internet, as it is, completely for granted. But have you ever wondered: what it is, how it works and who controls it? At its core, the Internet is just a...

0 views