Routers and switches are typically used to connect NAS, PCs, servers, SBCs, and other computing devices over a local area network. However, there are a couple of reasons why you might want to ditch a router/switch and directly interface two devices using their Ethernet ports. Perhaps you don’t want other devices in the network to gain access to confidential files. Or maybe you've finally upgraded to 10GbE NICs, but are bottlenecked by the slower speeds of your switch’s SFP+/RJ45 sockets. Regardless of your reasons, here’s an in-depth guide on how to pair your NAS with a PC over Ethernet.
Aiffro K100 review: A compact, all-SSD NAS that also doubles as a mini-PC
Though its small form-factor restrict its usefulness in intensive workloads
I’ve used the TrueNAS Scale for this tutorial, but the overall process is the same regardless of your NAS.
Setting up a static IP for your PC
Before you go around tweaking the NAS settings, you’ll need to create a static IP for the network interface between your PC and the NAS. To do so,
- Right-click on the Start button and select Run.
- Enter ncpa.cpl into the Open bar and hit OK.
- Right-click on the Ethernet adapter connected to the NAS and select Properties.
- Double-click on Internet Protocol version 4 (TCP/IPv4).
- Toggle the radio button next to the Use the following IP address: option, fill in the (static) IP address, Subnet Mask, and Default gateway, and press Save.
Setting up a static IP for the NAS
Over the web UI
Going with the simpler method first, you’ll need to use two Ethernet cables with your NAS if you want to modify the network settings inside your NAS: one to pair the NAS to a router/switch and another to connect it to your PC. Assuming you’ve attached both sets of cables to their respective devices, these are the steps you should follow to set a static IP for the storage server:
- Log into the web UI using your credentials and head to the Network tab.
- Tap the Edit icon next to the Interface that connects your NAS to your PC. In most cases, this will be the Interface that doesn’t possess an IPv4 address.
- Disable DHCP and click on the Add button next to the Alias tab.
- Enter the static IP address followed by the subnet mask for the NAS and hit the Save button.
- Enter the New IPv4 Default Gateway and press Register.
- Select Test Changes and check the Confirm option before hitting Test Changes once again inside the pop-up dialog box.
Without a web UI
For those who only possess a single Ethernet socket or can’t connect their NAS to a switch, you can connect your NAS to the keyboard, mouse, and monitor to set up the static IP. Although TrueNAS Scale lets you do this via the CLI, not all NAS manufacturers support this facility for their pre-built enclosures, so you’ll have to do your research beforehand.
- Tap 1 on the TrueNAS CLI to enter the Network interface page.
- Pick the Network interface connected to your PC.
- Set ipv4_dhcp to No, enter the static IP address (with the subnet mask) next to alias, and hit Save.
- Tap A to apply the changes and P to save the new network interface settings.
Connecting to the NAS via the new static IP
Once you’ve switched to the new static IP, you’ll notice that the NAS is no longer accessible from the old IP address. So, you'll have to use the static IP address to log into the NAS' user interface.
- Enter the new IP address into your browser and log into the web UI once again.
- Click on Go To Network Settings inside the pop-up window.
- Press Save to confirm the changes.
Establishing a one-to-one connection between your PC and NAS
If you followed all the steps correctly, you’ll be able to transfer files to and from the NAS without requiring a dedicated networking accessory. While this setup shouldn’t pose any issues if your workspace only includes a NAS and a PC, you’ll need to invest in a dedicated router - or better yet, a switch - if you plan to use your NAS as a dedicated storage, file-sharing, and backup server for all your devices.
5 reasons you should buy a network switch for your home lab
If you don't have one already, here are 5 reasons why you should arm your home lab with a dedicated network switch
