Re: Ifconfig
On Mon, Nov 23, 1998 at 01:31:09PM -0500, 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
[snip]
>
>
> How do I get it to stay at 192.168.76.76?
>
Check the file /etc/init.d/network. It is run at boot and configures
the networking parameters. On my box (with a NE200 NIC) it looks
like:
#! /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=193.10.242.45
NETMASK=255.255.255.0
NETWORK=193.10.242.0
BROADCAST=193.10.242.255
GATEWAY=193.10.242.1
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
So, open the file and change the IP adress there and reboot (or run
the script) and the IP adress should now be set up correctly.
HTH
--
------------------------------------------------------------------
+ Peter Granroth + Microsoft is NOT the answer +
+ mailto:devnull@granroth.ml.org + Microsoft is the question +
+ http://granroth.ml.org + The answer is NO +
------------------------------------------------------------------
Reply to:
- References:
- Ifconfig
- From: Amanda Shuler <shuleram@acm.cse.msu.edu>