1

My computer is on 10.0.1.0/24 with a DHCP granted IP address. There is also a NAS device with an IP address of 10.0.1.10 (which I assume is static). I would like to take the NAS off of the LAN and connect to it directly from my computer with a USB-Ethernet dongle but preferably without doing a lot of reconfiguring of addresses and so forth.

I set my dongle's IP to 10.0.1.9 and then I used route print to discover that the dongle was given an IF number of 8. So then I tried

route -4 ADD 10.0.1.10 METRIC 1 IF 8

But all I get is the "usage" output for the route command, which I assume means that it failed (not to mention that the desired route is not in a subsequent route print output).

Is there some way to get this to work?

  • Do you mean a direct ethernet cable connection from the NAS or isolate it on the LAN itself? – JakeGould Mar 1 '18 at 2:22
  • 2
    If you want to isolate it, give it a different lan subnet. Like 10.10.10.0 /24. And put your usb-ethernet to the same segment. Your assumption is probably incorrect, most home nas units have configurable nics. You can most likely point a browser at http or 10.0.1.10 to configure it – Tim_Stewart Mar 1 '18 at 3:15
  • Bridge the network interface of the USB dongle with the network interface of your LAN hardware. I can tell you how to do this in Linux, but you seem to use Windows (you didn't set an OS tag). – dirkt Mar 1 '18 at 7:33
1

Use a different IP subnet

The reason your attempted solution hasn't worked is because you're using an IP address for your NAS that's valid on your already-existing network. Your computer already has a route to that network and isn't going to cooperate with the suggestion to use a different path (the dongle) to get to one of those IPs.

You have two options:

  1. Use the dongle
  2. Don't use the dongle

Option 1 is what you're trying. For it to work you need to use an IP network that doesn't overlap your 10.0.1.0/24, such as 192.168.50.0/24. Assign your dongle and NAS an IP from this range and you're done.

Option 2. However you don't have to physically take the NAS off the existing network to separate it from other nodes. Most OSes allow you to assign multiple IP addresses to a network interface. Using this capability you could assign your primary NIC a second IP address from the 192.168.50.0/24 network, and also assign a matching address to the NAS without moving it to another physical network. These two devices would be the only ones using those addresses on the main network and as such you'd have the same end result of isolating them from the rest of the network.

Obviously the suitability and usefulness of this second approach depends on your circumstances. For example if you want to isolate the NAS for security reasons, physical network separation should be preferred (for example, a quick inspection with Wireshark would reveal the presence of the NAS). On the other hand, if you might want to access the NAS from a third device from the main network, using the alternate IP addressing strategy would be advantageous.

0

If you want to keep the IP address of your NAS, that means that even though the NAS is physically connected to an USB network adapter to your PC, it should stay in the same subnet of your LAN. (Otherwise, as explained in the other answer, you need a different subnet and a different IP address).

The way to ensure that both your LAN interface on your PC and the new USB network adapter end ip in the same subnet is to bridge both network adapters.

Note that this doesn't logically isolate the NAS from the rest of the LAN: The NAS will still be accessible from the rest of the LAN as before, under the same IP as before. It will just be physically differently connected. If you really want to isolate the NAS so it's no longer accessible from the rest of the LAN, again you'll need a different IP and subnet for it, and you'll have to go through the reconfiguring hassle.

You didn't give an OS tag, but assuming you are on some kind of Windows, here is a tutorial that explains how to bridge network adapters under Windows. Note that you now need to use the bridge network adapter instead of the original LAN adapter to access your LAN, so make sure to read the tutorial completely, and enable the bridge network adapter.

  • Broadcast domain =! Subnet. For example in my answer, "option 2" would have the NAS on the same physical network and therefore reachable by other nodes via broadcast on the data link layer (broadcast domain) but it would be in a different IP subnetwork due to its addressing. Otherwise good answer and suggestion for bridging. – Twisty Impersonator Mar 1 '18 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.