This post is part 26 of 39 in the series Taming the Terminal

In part 23 of n we took a big-picture look at how TCP/IP networking works. As a quick reminder, the most important points were:

  • Our computer networks use a stack of protocols known as TCP/IP
  • We think of the stack of protocols as being broken into four layers:
  • The Link Layer – lets computers that are on the same network send single packets of data to each other
  • The Internet Layer – Lets computers on different networks send single packets of data to each other
  • The Transport Layer – lets computers send meaningful streams of data between each other
  • The Application Layer – where all the networked apps we use live
  • Logically, data travels across the layers – HTTP to HTTP, TCP to TCP, IP to IP, ethernet to ethernet, but physically, data travels up and down the stack, one layer to another, only moving from one device to another when it gets to the Link Layer at the very bottom of the stack.
  • In the previous instalment we looked at how IP subnet works. The key takeaway was that a computer needs a minimum of three settings correctly configured to be able to participate in an IP network: an IP address, a subnet mask, and a default gateway (the IP address of the router providing access outside the subnet). We also looked at how to read those three settings from your Mac using the GUI and the Terminal. Finally, we noted that historically, those settings had to manually configured, but that today, almost all computers acquire those settings automatically. In this instalment we’ll look at the protocol that makes that possible, the Dynamic Host Configuration Protocol, or DHCP.

    Read more

    Tagged with:

    Taming the TerminalI’ve not been happy with any of the free subnet calculators I’ve found online, and that came to a head when I was looking for something I could feel happy recommending within the Taming the Terminal series. The great thing about being able to code is that you can scratch your own itch!

    The calculator I’ve written is primarily designed around expanding out the network information users will find in the Windows Control Panel, OS X System Preferences, or from terminal commands like ipconfig (Windows) and ifconfig (Linux, Unix, OS X). It’s not realistic to expect users to convert netmasks from one notation to another, so the calculator is very liberal in the netmasks it accepts.

    The secondary audience for the calculator is students and anyone else interested in understanding the math behind IP subnets. To that end there is button that will expand the interface out to show the binary calculations being carried out under the hood.

    Check it out at: www.SubnetCalc.it

    This is a very new site, so I’m definitely open to constructive criticism, but please bear in mind the target audience is home users, not IT Pros, so I’m going to be very reluctant to follow through with any suggestions to add more complication to the interface.

    I started this project by developing a set of JavaScript classes for representing and manipulating IP addresses, Netmasks, and IP Subnets. I’ve released that library under a BSD license over on my GitHub page – bartificer.ip.js.

    Tagged with:

    This post is part 25 of 39 in the series Taming the Terminal

    In part 23 of n we took a big-picture look at how TCP/IP networking works. As a quick reminder, the most important points were:

    • Our computer networks use a stack of protocols known as TCP/IP
    • We think of the stack of protocols as being broken into four layers:
    • The Link Layer – lets computers that are on the same network send single packets of data to each other
    • The Internet Layer – Lets computers on different networks send single packets of data to each other
    • The Transport Layer – lets computers send meaningful streams of data between each other
    • The Application Layer – where all the networked apps we use live
  • Logically, data travels across the layers – HTTP to HTTP, TCP to TCP, IP to IP, ethernet to ethernet, but physically, data travels up and down the stack, one layer to another, only moving from one device to another when it gets to the Link Layer at the very bottom of the stack.
  • In the previous instalment we focused on the lowest of the four layers, the link layer, and looked at how ethernet and ARP work. In this instalment we’ll move one layer up the stack and take a closer look at the IP protocol. A concept absolutely central to IP’s operation is that of related groups of IP addresses known as IP Subnetworks or just subnets. This is the concept we’ll be focusing on in this instalment.

    Read more

    Tagged with: