Fault Injection in Network Namespace and Veth Environments

Prelude This is a followup from my previous post and a sort of continuation on the series of the topic, where we are exploring ways to make our test system more “unreliable” in order to observe if our applications behave nicely under challenging and not-ideal environments. In this article we are going to explore some linux technologies: Network Namespaces (netns) Virtual Ethernet Devices (veth) Network Emulation (netem) scheduling policy The goal is to setup a virtual network link inside our system, make the two network devices talk each other and then simulate a bad/slow/glitchy/flaky communication to test how applications behave under difficult conditions. ...

January 6, 2024 · Andrea Manzini

a very simple NTP client in D

I am quite a fan of the D programming language and I think it deserves more attention, even if since a few months it’s becoming more and more popular, as it gained top20 in the TIOBE Index for February 2020. As an experiment in network programming, I took this simple NTP client written in C and translated to D ; in my opinion while it’s keeping the low-level nature, it’s shorter, clearer and more effective. It’s only a dozen lines of code, but full program is available on my github; stars and contributions are welcome! ...

February 20, 2020 · Andrea Manzini

linux: how to access DHCP options from client

As you may know, you can configure any DHCP server to send many options to the clients; for example to setup dns domains, http proxy (WPAD) and so on. If you need to access these options from a linux client, you must configure the client to ASK the server for the new options, by editing /etc/dhcp/dhclient.conf, and add an entry like: option WPAD code 252 = string; also request WPAD; done that, when you’ll ask for a dhcp, the dhclient process will invoke your hook scripts with two new environment variables, old_WPAD and new_WPAD, with the values before and after the renewal. ...

November 6, 2017 · Andrea Manzini