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

Re: network setup script ??



On Sun, May 21, 2000 at 03:26:24PM +0200, Ron Rademaker wrote:
> 2. Get the eth0 interface 'up' using ifconfig ( command = 
> ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} ). Check
> the files /etc/init.d/networking and /etc/network/interfaces.
> 3. Add a route: route add -net ${NETWORK}ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
> 		route add -net ${NETWORK}

Another way of doing this is to use the ifup/ifdown utilities. That is,
add something like the following to /etc/network/interfaces:

	iface eth0 inet static
		address 192.168.1.2
		netmask 255.255.255.0
		network 192.168.1.0

If you've got access to the real world, add a line like:

		gateway 192.168.1.1

and your default route'll be setup too. To up and down the interface, run
"ifup eth0" or "ifdown eth0", or just leave it to /etc/init.d/networking,
which is run at bootup and shutdown.

See ifup(8) and interfaces(5) for more info.

Cheers,
aj

(netbase maintainer)

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG encrypted mail preferred.

  ``We reject: kings, presidents, and voting.
                 We believe in: rough consensus and working code.''
                                      -- Dave Clark

Attachment: pgpTVUiE_JKl5.pgp
Description: PGP signature


Reply to: