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

Re: Ifconfig



Amanda Shuler <shuleram@acm.cse.msu.edu> writes:

> 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?

ifconfig affects something only so long as the machine isn't rebooted
- the ethernet card itself never knows what IP address it has; only
the kernel knows this.  Therefore, at system startup, the kernel is
told by the intitialization scripts what IP address the ethernet card
has.

This is done in the script /etc/init.d/network - go edit that file to
suit your new IP address.  (That is, change any ifconfig line that's
setting the 192.168.1.1 ip address, or, if there is no such
line, add the ifconfig line you use above to that file).


Reply to: