[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Switching from static IP to DHCP



On Thu, Mar 20, 2003 at 03:45:42PM -0500, Roberto Sanchez wrote:
> When I am on the static network, I su to root and call
> ifup eth0 -i file1
> 
> When I am on the dynamic network, I su to root and call
> ifup eth0 -i file2

If you know some internal IP of the networks where you have
a static address you can put it all in one file using a mapping
(see /usr/share/doc/ifupdown/examples):

===
mapping eth0
  script /usr/share/doc/ifupdown/examples/ping-places.sh
  map 10.0.0.254/24 10.0.0.10 home
     
iface home inet static
  address 10.0.0.80
  netmask 255.255.255.0
  gateway 10.0.0.10
	    
iface eth0 inet dhcp
===

sam
-- 
sam clegg
:: sam@superduper.net :: http://superduper.net/ :: PGP : D91EE369 
$superduper: .signature,v 1.11 2003/03/24 15:30:23 sam Exp $

--
The cost of the first 25 Tomahawk Missiles launched in the first hour of the
first day in the war with Iraq was more than fifty times the annual HUD budget
to End Homelessness in America. [CNN - March 20, 2003]
--

Attachment: pgpyO4pN7LrxB.pgp
Description: PGP signature


Reply to: