I have a centos server that was previously on my company's network using a static IP address, but it has since been blocked/firewalled on the network such that I'm not even able to ping it. I was told I was supposed to use a DHCP-issued IP, and I have since repented in dust and ashes. But now it remains to access the server and configure it to use a new DHCP-issued IP, to which I am clueless as to how to do so.

I have at my disposal, a windows laptop, an ethernet cable, network access in my company and physical access to the server. How can I go about accessing the server, and then configuring it to use a DHCP-provided IP?

What I've Tried

  • connecting to the server via a LAN cable and ssh-ing in via putty. Doesn't work as I can't even ping the server even when connected via LAN.
  • You'll need a crossover cable, and just plug your laptop directly into the back of the server. If you don't have a crossover, any network switch is the alternative. Configure laptop on IP on same subnet, and connect direct. – Sobrique Apr 12 '16 at 10:38
  • Crossover isn't even necessary nowadays, I guess most network card from this century can detect that. – Jakob Lenfers Apr 12 '16 at 10:41
  • Is this a Unix server? Do you have a separate console for it? It sounds like someone on the networking team didn't coordinate with you for this change ahead of time. – Jeff Schaller Apr 12 '16 at 10:45
  • Centos server. I don't have a console for it. For now it's just a cage of steel and silicon sitting in a corner. @Sobrique tried your method and it works! Feel free to post as an answer so I can accept it :) – JP_smasher Apr 13 '16 at 2:03

I have at my disposal ... physical access to the server.

Log in directly at the server console (assuming it has one, most unices do). You want to bring or borrow an external display, unless there is KVM at your disposal, but small LCD displays are lightweight.

Configuring DHCP client depends heavily on your OS and distribution, as a first step try dhclient eth0 or udhcpc -i eth0. You might need to install a dhcp client first, which might be difficult without a network access.

  • Without network access you just need a copy of the install media for the distro. Every distro should come with a dhcp client on it already. – Centimane Apr 12 '16 at 11:04
Step 1: Ask the network staff (switch operators) which mac-addresses they see on the server's switchport. Note down this mac-address.
Step 2: Ask the people who run the companys dhcp server for the correct ip issued to the mac-address.
Step 3: Verify that the ip - address is in your network-segment, or in a segment that can be routed to yours (ask here if neccessary).
Step 4: Access the server by using this ip-address.
Step 5: If it didn't work, provide the gathered information here, and ping the thread again.

Good Luck !

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.