Getting Started with Modern IP in a Home/Lab Network

Published on 2024-09-11 by ADAM

Although this page is only available via Modern IP and thus would serve as a poor tutorial on how to start to bring such a Network up (being inaccessible to those still stuck on Legacy IP), I figured I would write a series of blog posts that document my journey to my current network. While this particular post won't be very valuable to folks, the subsequent posts in this series will hopefully be more valuable -- they'll document the things necessary to begin to jettison Legacy IP from your once you're up and running with Modern IP.

The first step in this process is, of course, to get onto the Modern IP (IPv6) network. Or is it? Actually, it isn't! The first thing you should do is just stick your toe in the water to see if it's fine. Find two machines in your lab that are on the same ethernet segment, give them both IPv6 addresses in the same subnet, and see if they can ping each other. You can do this before even mastering the basics of IPv6 address planning.

This is a great first exercise because you'll learn a few things:

  1. You'll begin to discover what (if any) hardware in your infrastructure is (still) not IPv6 ready.
  2. You'll gain a knowledge of the IPv6 tools in your chosen environment.
  3. You'll build confidence in your ability to undertake the effort to embrace Modern IP.
  4. You'll learn some of the ways that IPv6 is very similar to IPv4.
  5. You'll learn some of the ways that IPv6 is very different to IPv4.
  6. You'll start to shed some incorrect thinking about networks which comes from decades of embracing broken, legacy IPv4. (We call this 4-thinking or 4-think.)

You'll make some mistakes here. That's perfectly fine. Heck, the more mistakes you make, the better! This is your opportunity to learn. Approach this task like you would the first time you ever setup a v4 network at home or in your lab. It's just that this time you're actually armed with more network knowledge than you had the first time.

Pretty much everyone knows that IPv6 has way more addressing bits than IPv4 (that's why we are moving to it), and that it's meant to eventually replace IPv4. The usual comparisons of stars in galaxies and whatnot -- all of that really doesn't matter. The two VERY valuable things about IPv6 both do stem from its vastly expanded number of bits... but they really are:

  1. Every address can be public again.
  2. We no longer have to worry about the size of our subnets.

But let's just put all that to the side. For now, let's just treat IPv6 as IPv4 with 4x as many addressing bits. (There's more to it than that, but this is a great starting point.)

Let's get started with our first experiment (an example). Now you could do this with a pair of VMs in the same host machine and setup a virtual network -- but that brings its own traps. Start really simple. Find two machines with physical ethernet ports that you're willing to unplug from the network for 15 minutes. Then:

  1. Connect the two machines' ethernet ports together via a patch cable. Ever since Gigabit Ethernet became a standard, almost all ethernet ports are auto-sensing which eliminates the need for special crossover cables.
  2. Provision each with IPv6 addresses in the same subnet. Pick any "reasonable" prefix size, based upon your experience with IPv4.
  3. Bring up their interfaces.
  4. Try to ping between them.
  5. Try to SSH between them.

Just doing this experiment will get you past a whole bunch of hurdles. Here's an example run through (almost exactly what I did between my first two machines). Don't worry about IPv6's long addresses and the rules on compressing them. There's 8 "groups". Just give each group a number 1 thru 7. And leave the last byte in the last group for your subnet. Wouldn't you love to have a public /24 in IPv4? How about a public /16 even! Well, with all those extra bits, let's nab a /16 equivalent for ourselves. That'd be a /112! The last "group" in our network address is ours to play with. We could have 65 thousand hosts if the network gods gave us just the last group to play with. Let's assume they're at least that generous, for this experiment.

(IPv6 savvy folks will know that this is totally the wrong approach... but this is our first toe in the water. This isn't our real 6-network. It's a provisional, ad-hoc experiment for those with deeply ingrained 4-think. Put your pitchforks down.)

To help avoid some strange problems related to global internet connectivity, we'll start our custom addresses with fd01 instead of 1. Think of this, for the moment, as something resembling the 10.0.0.0 space of IPv4. It's quite different, but it's fine to start with.

Configure Machine A (running Linux):

% sudo ifconfig eth0 inet6 fd01:2:3:4:5:6:7:a/112
% sudo ifconfig eth0 up

Configure Machine B (running FreeBSD):

% sudo ifconfig em0 inet6 fd01:2:3:4:5:6:7:b/112
% sudo ifconfig em0 up

Then from each, try to ping the other.

First try to ping from Machine A:

% ping6 -c 4 fd01:2:3:4:5:6:7:b
PING fd01:2:3:4:5:6:7:b 56 data bytes
64 bytes from fd01:2:3:4:5:6:7:b: icmp_seq=1 ttl=64 time=5.47 ms
64 bytes from fd01:2:3:4:5:6:7:b: icmp_seq=2 ttl=64 time=7.45 ms
64 bytes from fd01:2:3:4:5:6:7:b: icmp_seq=3 ttl=64 time=7.75 ms
64 bytes from fd01:2:3:4:5:6:7:b: icmp_seq=4 ttl=64 time=7.23 ms

--- fd01:2:3:4:5:6:7:b ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 5.474/6.976/7.752/0.887 ms

% hostname
linux
% ssh -6 fd01:2:3:4:5:6:7:b
(user@fd01:2:3:4:5:6:7:b) Password for user@bsd:
% hostname
bsd

Once you've logged into Machine B from Machine A, you've sent dozens of packets, hundreds perhaps, over your ad-hoc IPv6 network. Pat yourself on the back. You just defeated the excuse: "But I've never tried to setup an IPv6 network before."

You should try a similar session for Machine B -- it's easy enough to test. It should work just the same. Pretty much every version of every major desktop OS for the past 10+ years has built-in IPv6 support, and it's ready to go once given an address. We gave these machines ad-hoc addresses. Of course IPv6 has ways of dynamically assigning addresses, just like IPv4. That can come much later. For now, this is a great stopping point.