Building a home lab behind a Mac Mini

Reacties Geen

I wanted to have a lab network in my house seperated from my normal network.
As I allready own a Mac Mini I decided to see if I could use it as router and server for my lab.

The steps involved are:
  1. Adding an interface and enable IP forwarding
  2. Enable and configure a DHCP server
  3. Enable and configure a TFTP server
  4. Enable and configure a NFS server

Adding an interface and enabling IP forwarding

This was relative easy. I just bought a noname USB Ethernet adapter and inserted it into a USB port of my Mac Mini. It showed up as interface en5. I configured it with a static IP address as I did with the build in interface (en0) but for a different subnet.

Then I enabled IP forwarding in the MAC with sysctl -w net.inet.ip.forwarding=1 and to make sure it stays that way after reboots I also edited /etc/sysctl.conf and inserted the line:


And that was all it took to enable the Mac Mini as router. It even works while I load the Mac Mini by playing Civilication VI on it.

Enabling and configuring a DHCP server

Create a DHCP config file with sudo vi /etc/bootpd.plist that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Then start the DHCP server with sudo launchctl load -w /System/Library/LaunchDaemons/bootps.plist

You can verify the DHCP server is now up with netstat -na|grep "\.67". And my Raspberry PI’s now get an IP address assigned from the range where the first PI in the subnet gets assigned.

See also:

Enabling and configuring a TFTP server

Enabling and configuring a NFS server

Other stuff

Current status

Currently this is a work in progress as I build each step I will document it and update this page.

In a sense this is pretty old stuff. I mean, some of it is identical to building a diskless network with Sparc stations. And that is something I did in the early 90’s and dates back even to older times.

Categorie ,


Er zijn nog geen reacties op dit artikel.


Schrijf je reactie hier. De met een * gemarkeerde velden zijn verplicht. Je ziet eerst een voorbeeld en daarna kun je de reactie definitief plaatsen.

← Ouder Nieuwer →