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

Re: Ifconfigy



On Mon, 23 Nov 1998, Amanda Shuler wrote:

   I have a question about ifconfig.
   I have a machine that I am trying to configure to put onto a local
   network.
   I'm an assigning it IP address 192.168.76.76
   I type:
   	ifconfig eth0 192.168.76.76
   
   then I check it with ifconfig and everything is correct.  I reboot the
   machine, and recheck ifconfig -- it's wrong.  It resets the IP address to
   192.168.1.1 everytime!  
   
   Currently, I do not have this machine physically hooked up to the network,
   because I was just doing the configuration and I didn't want to knock
   another (very important) machine off the network.  If the ethernet card is
   not actually hooked up to the network, will that cause this "reset" to
   happen upon every boot?
   
   How do I get it to stay at 192.168.76.76?

Your machines startup files are located in /etc/init.d.  The network
configuration is done in /etc/init.d/network.  A default Debian config
for the file you gave would be:

#! /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=192.168.76.76
NETMASK=255.255.255.0
NETWORK=192.168.76.0
BROADCAST=192.168.76.255
GATEWAY=192.168.76.1
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1


If you do not have a gateway configured, you may need to customize the
script /etc/init.d/network to the necessary ifconfig commands.

Hope this helps.
Dennis
-- 
Dennis Kelly <dpk@egr.msu.edu>
Network Adminstrator
College of Engineering, MSU
353-4844 (phone)
222-5875 (pager)


Reply to: