CLI for the Moon

After trudging through the grossness of trying to add to $PS1 from a script, I got to thinking it would be fun to have the phase of the moon on my shell prompt.

June 18, 2018

PS1: The shell prompt variable and the tricky parts about setting it

I wanted to add some information to the shell prompt from a script recently and learned some things about bash, PS1 and shell variables along the way. What is a shell prompt and why would I want to set it? The shell prompt is the chunk of text that comes before your cursor when you open a terminal. For instance, a bash prompt might look like this: bash-3.2$ echo "hi" hi bash-3....

June 16, 2018

Telnet

An exchange I had a few months ago went something like this: Me: Weird, my requests aren’t getting through, but I can ping the server just fine. Coworker: I can’t telnet to the port… the firewall is probably blocking your traffic. <later> Me (to myself): 🤨 wtf does telnet do? telnet came up again as I was reading Compute Networking: A Top Down Approach. It demonstarted using telnet to interact with a mail server using SMTP....

June 11, 2018

Reflections on TIL posts

TL;DR Here are things I found helpful the past few days: Set goals, set time limits, enforce with timers Outline, outline, outline Be genuine The Experiment Last Wednesday, I decided to try out a new blog format with shorter posts covering topics that I was learning about that day. My goal was to write a post a day for 3 days. I anticipated investing an hour a day into this....

June 7, 2018

Why does TCP even need a 3-way handshake?

The 3-way handshake. It’s inevitable in any TCP discussion that you mention the TCP connection establishment three-way handshake. After writing about QUIC and how it aims to have 0-RTT connection establishment cost, I started wondering why TCP needed that 1-RTT 3-way handshake in the first place.

June 6, 2018

TIL: QUIC is like TLS over UDP

QUIC (Quick UDP Internet Connections) is a new(ish) protocol for developing applications on the internet. It aims to provide TLS-like encryption without the overhead of TCP.

June 3, 2018

TIL: The difference between netstat and ss

Motivation In this post, I’m going to go over two tools for inspecting the socket states (netstat and ss), and why to choose one over the other (spoiler: you can really choose either). This is not going to be a 12 ways to inspect socket states article, there are lots of those. What is a socket? A socket is a Linux file descriptor for communicating with the network. In Linux, they say everything is a file....

May 31, 2018

TIL: There are 16 T1 Internet Service Providers

I’ve been collecting information for a “Practical Guide to Linux Networking” by reading material I can find. Two things I’ve been reading recently are: A Practical Guide to (Correctly) Troubleshooting with Traceroute a presentation by Richard A Steenbergen Compute Networking: A Top Down Approach a textbook by Kurose and Ross In the traceroute guide, Richard mentions that it’s useful to find the boundaries of your network and that it’s also useful to be able to translate DNS names to ISP’s....

May 30, 2018

New Format: Today I Learned

I am going to try a new format where I write about something I learned. My goals with this format are: Increase the amount of writing I do Increase the frequency of writing Lower the barrier for making a new post Document things I’ve learned My rough goal is to spend: 20 minutes researching / outlining 20 minutes writing 20 minutes editting We’ll see how this time commitment works out, it may be a little extreme for daily writing....

May 30, 2018

Dumb dig clone in Rust

Why write a DNS client When I started digging in to DNS, I thought it would be interesting to try implementing a very simple DNS client similar to dig, but using Rust. My goal was to better understand DNS at the protocol level. I wanted to know what bytes were being sent and received to drive the system. The final result is in this repo). In the rest of the post, I’ll detail what I found out along the way....

February 19, 2018