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

Re: How to set the LAN up automatically




On Wed, 26 Aug 1998, Alex Kwan wrote:

> Every time I want to make my LAN up, I need to config as follow:
> # ifconfig eth0 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255
> up
> and
> #route add -net 192.168.1.0 eth0
> 
> I have try to added these two line on /etc/init.d/network and reboot,
> but still failure, If I want to use the eth0 I need to config as above
> again.
> How to set my LAN up automatically when the machine is boot?

What does your /etc/init.d/network look like?  Mine is:

---cut---
#!	/bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=130.139.64.47
NETMASK=255.255.255.0
NETWORK=130.139.64.0
BROADCAST=130.139.64.255
GATEWAY=130.139.64.1
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
---cut---

Maybe the module for your network card isn't loaded at boot time?

For example, I have a 3c905 network card that needs the 3c59x module
(intuitive eh?)  I can do thwo things:

Either have the module inserted always at boot time:
- put the word "3c59x" (without quotes) on a single line in /etc/modules.

Or have the module autoloaded by kerneld (or kmod) when it is requested:
- put the word "auto" on a single line in /etc/modules and comment out all
  other lines in that file.  And
- put a line "alias eth0 3c59x" in /etc/modules.conf to let the module
  autoloader know what module to load for the "eth0" device.

Cheers,


Joost


Reply to: