7

I forgot to change the static IP of a network device before moving it from my datacenter network to my home LAN. Since it isn't configured properly for my LAN network, I'm not sure how to access it.

Constraints: It's a NAS (a LaCie Network Space MAX) and can only be accessed via web console. I know what IP address, gateway, mask, etc. it is trying to use. I don't want to reset it to factory settings, which might have nasty consequences. I also don't want to rearrange my LAN network to pretend to be the datacenter network just to access this device.

Basically, once I can get to the point where I can ping its static IP, I should be able to have full access to it.

My theory is that I can use routing to access the device, but I'm not sure how to configure routing. I have a LAN router which has a 'dynamic routing' (RIP1) feature, and allows static routing by setting destination LAN IP, subnet mask, default gateway, hop count, and interface (LAN or WAN). Can I use static routing to reach my device? If so, what settings do I use?

2 Answers 2

9

To be able to access the device, all you need is an additional IP address in the same network as the device which has a wrong IP.

There is no need to directly attach the device to your computer.

Example in Linux, where my network is 10.0.0.0/24, on interface wlan1, and the device with a static IP has 192.168.1.1 :

Check my newtork interface device name:

$ ip -o addr ... 3: wlan1 inet 10.0.0.201/24 brd 10.0.0.255 scope global wlan1 ... 

Add an IP to the interface:

dev=wlan1 ip2=192.168.1.4/24 ip address add $ip2 dev $dev 

Now it should work:

$ ip -o addr ... 3: wlan1 inet 10.0.0.201/24 brd 10.0.0.255 scope global wlan1 inet 192.168.1.4/24 scope global wlan1 ... $ ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_req=1 ttl=254 time=111 ms 64 bytes from 192.168.1.1: icmp_req=2 ttl=254 time=1.59 ms 
2
  • This worked great, but I'm at a loss trying to understand why. Could you recommend where to read something on this topic? Commented Apr 6, 2017 at 20:56
  • @MightyPork: Well, I had read an O'Reilly book titled "TCP/IP networking" or something similar, but that was some 25 years ago... :-). Basically, the IP address(es) and network mask(s) on your interface(s) tell the machine on which network(s) they are, and other machines on the same network can be reached directly. If you try to reach any other address, your machine will directly send the request through your gateway. Commented Apr 7, 2017 at 15:21
8
  1. Put your laptop/computer on the same subnet as the currently configured static IP is on. For instance if the current static IP is 10.10.10.1/24 then make your laptop 10.10.10.2/24 and then connect an ethernet cable directly between the laptop and the NAS.
  2. Open the NAS management page on your browser and login
  3. Go to the Network settings and (recommended) change it to DHCP and then save the settings (and will probably require it to reboot)
  4. Disconnect your laptop (and change back its network settings) and plug the NAS into your home router
  5. Possibly manually (or by killing power) reboot the NAS again in order to get a DHCP address from your home router
3
  • Alternatively, for step (1) add an ALIAS to your current NIC's IPv4 assignments, so you don't lose normal traffic while adding this extra NIC Address to access your device. Commented Mar 25, 2015 at 18:04
  • anyone attempting this on OSX should duplicate their existing network (select gear icon -> duplicate this service) and then set the IP manually. That way both networks can co-exist and you can access the device in question while remaining on your default network. Commented Jul 26, 2016 at 21:16
  • 1
    As per @mivk's answer, this method is probably overcomplicated. Though mivk's answer only has an example for linux systems, the concept should be easily portable to other systems: add a secondary IP in the same subnet of the device you're trying to connect to, no direct connections or rebooting necessary! Commented Nov 4, 2020 at 14:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.