TCP/IP routing: accessing a LAN device with wrong static IP configuration
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?
- 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 laptop10.10.10.2/24
and then connect an ethernet cable directly between the laptop and the NAS. - Open the NAS management page on your browser and login
- Go to the Network settings and (recommended) change it to DHCP and then save the settings (and will probably require it to reboot)
- Disconnect your laptop (and change back its network settings) and plug the NAS into your home router
- Possibly manually (or by killing power) reboot the NAS again in order to get a DHCP address from your home router
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