[Cialug] SED replace IP help

Daniel A. Ramaley daniel.ramaley at DRAKE.EDU
Fri Sep 22 14:55:29 CDT 2006


I'm not entirely sure that i understand the question. From your post it 
sounds to me like you have a machine that is supposed to get its IP via 
DHCP, but it is configured with a manually assigned IP. Why can't you 
just pull a new IP via DHCP?

How to change the IP of a machine depends on what distribution you are 
using. On the Red Hat based distros i'd look 
in /etc/sysconfig/network-scripts for a file named similarly to 
ifcfg-eth0 (or just CD to /etc/sysconfig and run "find . -exec grep -H 
192.168.1.1 {} \;" to list any files containing "192.168.1.1", though 
you may wish to change "192.168.1.1" to the IP you are looking for). 
Once the IP is changed, you might also have to look in /etc/hosts and 
see if it needs to be changed in there as well.

On Friday 22 September 2006 14:25, Adk wrote:
>Our local group has a server for our list and a couple of non-profits.
>Local ISP just upgraded one of their routers and now we have lost
>the IP that their DHCP was handing out. It had been a workable
> situation before and IP never changed unless they made an equipment
> change. We have no money to purchase a static IP- $120/yr.
>
>We are running DNS, Web, and mail on the box.
>
>Can I use sed to search the complete drive and replace the IP?
>What would be the exact command?
>
>Our local guru help is out of town and we need to get this box up
> soon.
>
>Allen Kiddoo
>Muscatine
>
>________________________________________________
>VHCS Webmail
>
>
>_______________________________________________
>Cialug mailing list
>Cialug at cialug.org
>http://cialug.org/mailman/listinfo/cialug

-- 
------------------------------------------------------------------------
Dan Ramaley                            Dial Center 118, Drake University
Network Programmer/Analyst             2407 Carpenter Ave
+1 515 271-4540                        Des Moines IA 50311 USA


More information about the Cialug mailing list