4

I'm looking to purchase a portable NAS, say the Synology DS1019+ for example, to use as a shared storage drive between two workstations beside each other.

There is no wired network access anywhere close, so the workstations are connected to the network via Wi-Fi.

What I want to do is set the NAS up merely as a local storage drive between the two, without it being connected to the network - there's no need.

What are my options here? Can I simply buy a small 4 port switch, and hook up the two workstations and the NAS to the switch? Will the computers still being on the Wi-Fi cause any issues?

Dave M
  • 4,494
  • 21
  • 30
  • 30
technotron101
  • 41
  • 1
  • 3
  • That's what I was worried about. Is there any way to get around this, bar connecting the entire thing to the existing network? – technotron101 Jan 17 '20 at 00:47
  • That's not correct. You can assign a static ip address to the NAS and to the workstation interfaces that are connected to the NAS. You don't need to use DHCP for this. None of these interfaces need a default gateway because they don't need to connect to the internet, only to each other. – joeqwerty Jan 17 '20 at 01:45
  • He stated that the NAS doesn't need to connect to the internet. He never stated that the workstations don't need to. To clarify what I said above, he can assign a static IP to the NAS provided that it's on the same subnet as the workstations and have it communicate as in that case, a default gateway won't be needed. A static IP address for the workstations isn't needed and doesn't even matter. – Nasir Riley Jan 17 '20 at 06:29
  • I stated this below, but it's better to just move the NAS elsewhere and connect it directly to the network because if the workstations ever move or have to be connected to a different subnet where their IP addresses will be different, they won't be able to connect to the NAS anymore. – Nasir Riley Jan 17 '20 at 06:41

3 Answers3

4

It is quite simple to achieve, you just need to have an eye on the routing of the computers.

Say your WiFi Network has the Network 192.168.178.0/24, means the WiFi network has an address range from 192.168.178.1 - 192.168.178.255.

When you connect a computer via WiFi, the router will configure that machine via DHCP to send all packets from the 192.168.178.0/24 network to the router, and sets itself as a default gateway, that you talk to the router when you want to access a IP from the internet. That's all fine and we won't touch the WiFi network and it's configuration.

Now, you just make up a new network, configure all relevant Ethernet interfaces with it, lets say the 192.168.177.0/24 network.

Machine A's wired Ethernet configuration:
Static IP: 192.168.177.11
Netmask: 255.255.255.0
with no gateway!

Machine B's wired Ethernet configuration:
Static IP: 192.168.177.12
Netmask: 255.255.255.0
with no gateway!

NAS's wired Ethernet configuration
Static IP: 192.168.177.10
Netmask: 255.255.255.0
with no gateway!

Then your two computers can access the WiFi Network with internet access, and when you address the 192.168.177.0/24 Network, your computers will choose the cable to talk with each other or your NAS beside your coexisting WiFi network simultaneously - so both connects are active.

The easiest way to configure the NAS is to connect it once to an existing network like the WiFi router (with cable), then you can address it with one of your computers and configure the static IP - after you have done that, your NAS is not available in your WiFi network anymore, but when you have set up your Computers' Ethernet-Interfaces, you can continue talking to you NAS in your isolated, cable-bound network.

And if you are cool and use Linux, here is a sample Machine A's wired Ethernet network configuration in /etc/network/interfaces, assuming you're running a Debian based Linux (like Ubuntu and also Raspberry PI), assuming it's Ethernet interface is called eth0.

auto eth0
iface eth0 inet static
    address 192.168.177.11/24

Cheers

ahandi
  • 61
  • 6
  • And in case your computers are laptops you use somewhere else with an ethernet connection, I suggest you get yourself an USB3 Ethernet dongle where you configure your isolated network, then you have no struggle when you connect your machine via cable to another network – ahandi Jan 17 '20 at 01:55
  • The workstations are connected to the network via wifi which indicates that they need a connection to the rest of the internet and network. Configuring them to have static IP addresses from a created network with no gateway would ruin that. It's better to assign a static IP address to the NAS that's on the same subnet with the workstations assuming that that's even viable in the situation. Overall, it's better to just hook the NAS up to the network anywhere because if those workstations ever move to a different subnet, it's not going to work anymore. – Nasir Riley Jan 17 '20 at 06:39
  • @ahandi you might want to clarify that when you write ethernet interfaces that you mean the wired ethernet interfaces used to connect the two computers and the NAS, and to not modify the WiFi networking configuration at all, so that both network interfaces are active. You might also note that a Linux system may require the addition of a route entries to support both networks, and may require the setting of the default route to the WiFi network. – simpleuser Jan 21 '20 at 21:24
  • @simpleuser Thank you for your advice, I have updated my answer - but if you set no gateway for the the Ethernet network, there is no way it could kill WiFi's default route. – ahandi Jan 23 '20 at 17:41
2

Most Synology devices have DHPC servers built in to the device. To build on what ahandi suggested.

NAS's Ethernet-Configuration
Static IP: 192.168.177.10
Netmask: 255.255.255.0
with no gateway!

DHCP Server configuration on Synology
Start IP: 192.168.177.11
End IP: 192.168.177.254
Subnet Mask: 255.255.255.0
DNS: 192.168.177.10 (The Synology)
No gateway

Adding the DHCP server means you can connect any computer that switch and it will get an IP address from the Synology and therefore get access to the NAS.

egas
  • 21
  • 1
  • It may not be a good idea to have the Synology device give out IPs to the computers because it's never been stated that the devices don't need to connect to the internet. It also may not give out an IP address that's on the same subnet with the workstations. As it's not connected to the network, there'd be no gateway for it to connect with the workstations. – Nasir Riley Jan 17 '20 at 06:33
0

You don't need a switch, the NAS you are looking at has 2 ethernet ports. You can connect each one of the two PC's to one port on the NAS.

If the NAS wouldn't have enough ports, then you would need a switch (or if you need to connect more computers in the future).

As for configuring IP addresses - maybe you don't even need to configure anything, machines sometimes also have a link-local ip, in the 169.254.0.0/16 range (169.254.0.0 - 169.254.255.255), see this.

You could look up the IP of the NAS from the commandline on each of the PC's:

  • Windows:
    Open command line and issue the command: arp -a

  • Debian: Issue the command arp -a, make sure to have the net-tools package installed.

You will see a list like:

arp -a

Interface: 169.254.aaa.bbb --- 0xe
  Internet Address      Physical Address      Type
  169.254.xxx.yyy       00-11-22-33-44-55     dynamic
  224.0.0.22            01-00-5e-00-00-16     static
  224.0.0.251           01-00-5e-00-00-fb     static
  224.0.0.252           01-00-5e-00-00-fc     static
  239.255.255.250       01-00-5e-7f-ff-fa     static
  255.255.255.255       ff-ff-ff-ff-ff-ff     static

The machine at 169.254.xxx.yyy will be your NAS. It may be a different IP for the other PC.

You can then connect to this IP, as usual with your NAS software.

Do keep in mind that any WiFi drivers or software (or even Windows itself - group policies) might disable WiFi when ethernet is plugged in. You should disable that before performing any solutions mentioned here.

If this works - this is literally the easiest and "just plug and play" solution.

Whenever I need to transfer big files quickly between two machines (be it Windows or Linux OS based), I always just directly connect them, find the link-local address and access that address from the other machines. The only times this didn't work - the OS firewall needed to be configured to allow file sharing, after which this always worked.

Gizmo
  • 279
  • 2
  • 11
  • Two problems with that: First, the ethernet ports are not intended to be used that way. The DS _can_ admittedly be configured to work like that, but it's nowhere near an out of box experience. A lot of out-of-line things that _can_ be done with a DS are kinda uncomfortably hitting an obstacle sooner or later. It really, really works best if used as-intended, and none different. Second, you can't do it with "normal" cables, you'll need cross-over cables (which most people don't have at home, or need for any useful purpose). – Damon Jan 17 '20 at 09:36
  • @Damon any modern device from years [1998 and up](https://patents.google.com/patent/US7366771B2/en) (or even sooner) has [dynamic TX/RX allocation](https://en.wikipedia.org/wiki/Medium-dependent_interface#Auto_MDI-X), no-one today needs cross-over cables. – Gizmo Jan 17 '20 at 12:11
  • As for the first "problem", it _probably_ (I assume what you have in mind) has to do with no internet connectivity, the OP described their solution as "don't need/want internet access". So, of course my solution won't support Public Cloud Integration, just as all the other solutions here will not support that. Still doesn't mean that it won't support local network discovery (it very probably will) and transferring files (it will _definitely_ support that) - which the device is intended for. – Gizmo Jan 17 '20 at 12:22