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

Re: Switching from dynamic IP to static IP



On Wednesday, 16.02.2005 at 11:57 -0500, Tong wrote:

> Hi, 
> 
> My IP get changed by my router from time to time, and there is no way to
> assign a fixed IP from the router side. 
> 
> So I need to switch from dhcp to static IP. 
> 
> I've done that in RH before. Basically, I only need to change the
> following two files:
> 
> /etc/sysconfig/network:
> 
> NETWORKING=yes
> HOSTNAME=xpt
> GATEWAY=192.168.0.1
> 
> 
> /etc/sysconfig/network-scripts/ifcfg-eth0:
> 
> DEVICE=eth0
> BOOTPROTO=static
> IPADDR=192.168.0.100
> NETMASK=255.255.255.0
> GATEWAY=192.168.0.1
> ONBOOT=yes
> 
> However, I found that the file /etc/sysconfig/network does not exist in
> Debian. What files should I change in Debian? Thanks.

The 'Debian Way' to do this doesn't involve editing files directly.

Install the program etherconf (or use dpkg-reconfigure etherconf if you
already have it) and it will ask you questions about your IP setup
(DHCP, or static, gateways DNS etc.) and write out the appropriate files
for you.

Dave.
-- 
Dave Ewart - davee@sungate.co.uk - jabber: davee@jabber.org
All email from me is now digitally signed, key from http://www.sungate.co.uk/
Fingerprint: AEC5 9360 0A35 7F66 66E9 82E4 9E10 6769 CD28 DA92

Attachment: signature.asc
Description: Digital signature


Reply to: