Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a NSLU2 (debian server) that was configured for an old network, with a static IP address on Ethernet.

Now I've moved, and the server boots using the old IP address, so I can't access it when I connect it to my router with Ethernet, or even when I connect it to my PC via Ethernet.

I don't remember what was its old IP address, I tried 192.168.0.1/2/3/4 and 192.168.1.1/2/3/4 but no response to the ping (I'm pretty sure the old address was in there).

How can I change the IP address, or ssh to it now ? The debian system is installed on a USB stick, is there a file that I can edit on my computer to make it start ok ?

share|improve this question

migrated from serverfault.com Jun 14 '11 at 18:49

This question came from our site for professional system and network administrators.

add comment

4 Answers

up vote 1 down vote accepted

Load up wireshark and monitor the network until you see a packet coming from the server. Hopefully there is some service such as DNS or NTP that will trigger a network query. You can go through the packet list for any unknown IP addresses - that will probably be the server IP address.

share|improve this answer
    
That is a great idea!! I tried that, but nothing else than my macbook's requests showed up. I think my NSLU2 is dead (or at least the USB stick with the system installed on it). I'll flash it. Thanks –  Matthieu Napoli Jun 14 '11 at 19:34
add comment

If you can access the server directly, edit the file /etc/network/interfaces

A sample configuration for a static server is:
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254

If you want the IP addess set on the server, change the above to suit your needs.

If you want to switch over to DHCP, then change the configuration to read
auto eth0
iface eth0 inet dhcp

share|improve this answer
add comment

If you have another computer that can read the USB stick, then the IP address is probably set in /etc/network/interfaces. You will definitely need to change the address setting, and possibly the other settings as well, depending on how different your new network is. If you don't have some of these settings, don't worry, the absolute minimum is address and netmask for an interface with no gateway to the internet:

iface eth0 inet static
        address 192.168.1.4
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

If you can read it but not edit it, set up a computer with a (different) static IP address in the same network with the same netmask and it should be able to ssh to the IP address shown in the file.

share|improve this answer
add comment

Try changing the IP address on your PC to a manual address that is in the correct range for the server. plug them both into the same switch and ssh away. once you have it set, switch your PC back yo DHCP.

share|improve this answer
    
That's exactly what I did (I tried 192.168.0.50 and 192.168.1.50) but no response at all (see my question). –  Matthieu Napoli Jun 14 '11 at 18:56
    
Do you have nmap on your mac? You could do a ping scan of the network to see what all addresses respond. –  uSlackr Jun 15 '11 at 2:46
    
Thanks, I've finally managed to find it, I had to do a full reset but now it show up on the network. But I didn't know nmap thanks. –  Matthieu Napoli Jun 15 '11 at 7:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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