Monitors That Throttle Downloads

Displays in general are a lot more complicated now than they used to be, but even still, you’d be forgiven for not expecting a monitor to slow down your internet connection. Yet that’s exactly what [Oscar] ran into recently, and fortunately for us, he was good enough to document how he figured out what was going on.

This bug might not have been discovered at all except for the fact that [Oscar] enjoys a 2.5 Gbps symmetric internet connection. When running a speed test he found he was getting the advertised speed for upload, but download was somehow limited to 600 Mbps. This was only with the USB-C to 2.5G Ethernet adapter he uses plugged into the monitor, which is acting as a hub. When it was plugged directly into the computer there were no dropped packets and he was able to get full speed. But the curious thing was the operating system was not noticing the dropped packets, so something was going on before the monitor was getting involved.

A driver update brought the speed to around 1.1 Gbps which was an improvement, but there was still a problem. Then [Oscar] tried using Ethernet flow control, which asks the sender of the packets to pause briefly if the receiver is dropping frames, rather than losing those frames completely. This also improved things, but still not completely. And it had the feeling of a workaround as well. What he’s settled on having been the problem in a nutshell is that the buffer on the 2.5 Gbps card would fill before the data would transfer through the hub to the computer, and if it overflows it will drop packets.

The solution was to upgrade to a 5 Gbps card with a larger buffer, and after that there were no more dropped frames. We might consider upgrading to fiber for faster speeds though.

UDP Broadcasting Meets The More Focused Multicasting

After previously exploring the basics of UDP broadcasting, why IPv4 subnets are an exciting feature that you really want to dive into, as well as the contentious topic of IPv6, there are still plenty of elephants to admire and cans of sardines to crack open. One of them being the topic of broadcasting versus multicasting, which at first glance sounds rather similar and may even have some wondering why you’d even bother with multicasting if you can just send-and-forget with IPv4 broadcast address.

Of course, we already found out that IPv4 broadcast addresses come in a few flavors, and that’s before you start even considering the implications of subnets and routing limits. When we then consider that in IPv6 broadcast addresses were dropped completely in favor of link-local multicast addresses, and that IPv4 also supports multicast, then this raises the question whether using IPv4 multicast’s own take on ‘link-local’ doesn’t make more sense.

Or perhaps more succinctly put, is IPv4’s take on link-local broadcasting as straightforward as IPv6’s?

Continue reading “UDP Broadcasting Meets The More Focused Multicasting” →

UDP Broadcasting And The Joys Of IPv4 Subnetting

In the previous installment on UDP broadcasting and service discovery, the basics of both were explored, including an implementation in the form of NyanSD and its protocol. Contained in the comment section was a very good demonstration of why one of the most exciting aspects of software development is the opportunity to share your latest creations with other people. This being the ability to get solid feedback on all the points – including any potential boneheaded omissions – that you really should address, whether intentional or accidental.

The most pertinent point raised was definitely that of broadcast addresses and IPv4 subnets, with the latter topic especially being something that the sysadmins at the office would talk about all the time, but which us software developers were always happy to ignore as something that didn’t concern us. Turns out the joke was on me and everyone else – like our esteemed readers – who thought that they could escape the fascinating world of subnets, as today we’ll take an in-depth look at what subnets are and how they are relevant to the world of UDP network discovery.

I somewhat alluded in the first article to the topic of ‘which broadcast address to use’ as being somewhat of a rough topic to figure out, which is clearly why I just stuck to a blatantly ‘works for me’ /24 subnet that usually will work on networks, until it does not.

Continue reading “UDP Broadcasting And The Joys Of IPv4 Subnetting” →

Between-Device Sharing Still Sucks

Once upon a time, computing was simple. You had files on a floppy disk. If you wanted to take them to a different computer, you ejected the disk from one machine and put it in another. It wasn’t fast, but it was easy and intuitive. Besides, you probably only had one computer of your own, anyway.

Life has since gotten a lot more complex. You’ve got a desktop, a laptop, a work laptop, your personal and business phones, and a smart watch to boot. You live amongst a swirling maelstrom of terabytes of data. Despite all the technical advances that got you here, it’s still a pain to get a file from one device to another, even when they’re sitting on the same desk. Why?!

Continue reading “Between-Device Sharing Still Sucks” →

When Mains Networking Fails, Use Phone Wires

A quiet shift over the last couple of decades in many places has been the disappearance of the traditional copper phone line. First the corded landline phone was replaced by cordless, then the phone migrated to a mobile device, and finally DSL connections are being supplanted by fiber. This leaves copper-era infrastructure in houses, which [TheHFTguy] decided to use for Ethernet.

The hack here isn’t that he bought some specialized network boxes from Germany, though knowing they exist is useful. Instead it comes in his suggestion that they use the same technology as mains networking. Mains network plugs are a dime a dozen, but noisy power lines can make them of limited use. Our hacking curiosity is whetted by the question of whether a cheap mains networking plug can have its networking — in reality a set of RF subcarriers — separated from its mains power supply, and persuaded to do the same job at a fraction of the cost. Come on commenters – has anyone ever tried this?

Tolerating Delay With DTN

The Internet has spoiled us. You assume network packets either show up pretty quickly or they are never going to show up. Even if you are using WiFi in a crowded sports stadium or LTE on the side of a deserted highway, you probably either have no connection or a fairly robust, although perhaps intermittent, network. But it hasn’t always been that way. Radio networks, especially, used to be very hit or miss and, in some cases, still are.

Perhaps the least reliable network today is one connecting things in deep space. That’s why NASA has a keen interest in Delay Tolerant Networking (DTN). Note that this is the name of a protocol, not just a wish for a certain quality in your network. DTN has been around a while, seen real use, and is available for you to use, too.

Think about it. On Earth, a long ping time might be 400 ms, and most of that is in equipment, not physical distance. Add a geostationary orbital relay, and you get 600 ms to 800 ms. The moon? The delay is 1.3 sec. Mars? Somewhere between 3 min and 22 min, depending on how far away it is at the moment. Voyager 1? Nearly a two-day round trip. That’s latency!

Continue reading “Tolerating Delay With DTN” →

Escaping The Linux Networking Stack At Cloudflare

Courtesy of the complex routing and network configurations that Cloudflare uses, their engineers like to push the Linux network stack to its limits and ideally beyond. In a blog article [Chris Branch] details how they ran into limitations while expanding their use of soft-unicast functionality that fits with their extensive use of anycast to push as much redundancy onto the external network as possible.

The particular issue that they ran into had to do with the Netfilter connection tracking (conntrack) module and the Linux socket subsystem when you use packet rewriting. For soft-unicast it is important that multiple processes are aware of the same connection, yet due to how Linux works this made it impossible to use packet rewriting. Instead they had to use a local proxy initially, but this creates overhead.

To work around this the solution appeared to be to abuse the TCP_REPAIR socket option in Linux, which normally exists to e.g. migrate VM network connections. This enables one to describe the entire socket connection state, thus ‘repairing’ it. Combined with TCP Fast Open to skip the whole handshake bit with a TFO ‘cookie’. This still left a few more issues to fix, with an early demux providing a potential solution.

Ironically, ultimately it was decided to not break the Linux networking stack that much and stick with the much less complicated local proxy to terminate TCP connections and redirect traffic to a local socket. Unfortunately escaping the Linux networking stack isn’t that straightforward.