Routers and switches are typically used to connect NAS, PCs, servers, SBCs, and other computing devices over a local network. However, there are several reasons why you might want to forego a router/switch and connect two devices directly via their Ethernet ports. Maybe you don't want other devices on the network to access sensitive files. Or maybe you've finally upgraded to 10GbE NICs but are limited by the slower speeds of your switch's SFP+/RJ45 jacks. Whatever your reasons, here's a detailed guide on how to pair your NAS with a PC over Ethernet.
I 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 optimizing the NAS settings, you need to create a static IP for the network interface between your PC and the NAS.
- Right-click the Start button and select Run.
- Input ncpa.cpl in the Open bar and beat OK.
- Right-click on the Ethernet adapter connected to the NAS and select Characteristics.
- Double-click Internet Protocol Version 4 (TCP/IPv4).
- Turn on the Option field next to the Use the following IP address: Option, fill in the (static) IP address, Subnet maskAnd Default gatewayand press Save.
Setting up a static IP for the NAS
About the web user interface
If you choose the easier method first, you will need to use two Ethernet cables with your NAS if you want to change the network settings in your NAS: one to pair the NAS with a router/switch and another to connect it to your PC. Assuming you have both sets of cables connected to the respective devices, you should follow the steps below to set a static IP for the storage server:
- Register with Web user interface Enter your login information and go to network Tab.
- Tap the Edit Symbol next to the interface that connects your NAS to your PC.
In most cases, this is the interface that does not IPv4 address.
- Deactivate DHCP and click on the Add Button next to the Alias Tab.
- Enter the static IP address followed by Subnet mask for the NAS and press the Save Button.
- Enter the New IPv4 standard gateway and press Register.
- Choose Test changes and check the Confirm Option before pressing Test changes again in the pop-up dialog box.
Without web user interface
If you only have a single Ethernet jack or can't connect your NAS to a switch, you can connect your NAS to a keyboard, mouse, and monitor to set up the static IP. Although TrueNAS Scale allows you to do this via the CLI, not all NAS manufacturers support this feature for their pre-built enclosures, so you'll need to check beforehand.
- Knock 1 on the TrueNAS CLI to Network interface Page.
- Select the Network interface connected to your PC.
- Sentence ipv4_dhcp To NOenter the static IP address (with the Subnet mask) next to aliasand press Save.
- Knock A to apply the changes and P to save the new network interface settings.
Connect to the NAS using the new static IP
Once you switch to the new static IP, you will find that the NAS is no longer accessible from the old IP address, so you will need to use the static IP address to log into the NAS's UI.
- Enter the new IP address into your browser and log in to the web interface again.
- Click on Go to network settings in the pop-up window.
- Press Save to confirm the changes.
An easy way to create a one-to-one connection between your PC and NAS
If you've followed all the steps correctly, you'll be able to transfer files to and from the NAS without the need for any special networking accessories. While this configuration shouldn't be a problem 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 want to use your NAS as a dedicated storage, file sharing, and backup server for all of your devices.