Static IP

Duane Attaway dattaway at dattaway.org
Mon Feb 24 17:49:42 CST 2003


On Mon, 24 Feb 2003, Peter Amisano wrote:

> I set up a box while contracting with Sprint to pull an IP via DHCP.  I
> used SUSE Linux on a Sun box, but cannot remember what the SUSE menu
> system looks like(I was trying to help over the phone)
> 
> How can I set a set a static IP via the command line?

dhcpd seems to try and get the last number used if it is available, so I'd 
set the dhcp cache file to what you want so it can request it.  For 
example, my /etc/dhcpc/dhcpcd-eth0.cache says:

root at satellite dattaway # cat /etc/dhcpc/dhcpcd-eth0.info
IPADDR=24.166.190.52
NETMASK=255.255.252.0
NETWORK=24.166.188.0
BROADCAST=255.255.255.255
GATEWAY=24.166.188.1
DOMAIN='kc.rr.com'
...

I can pretty much set IPADDR to what I want and if it available, I will 
get it.  Pretty handy if I have my laptop unconnect for long periods of 
time.

--
"It is the duty of a patriot to protect his country from its government"
-Thomas Paine
http://dattaway.org    




More information about the Kclug mailing list