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

Re: /etc/network/interfaces



On Thu, Aug 22, 2002 at 10:42:39AM +1000, Russell wrote:
> Have you tried the basics first? Mapping is only needed if you want
> to switch between multiple networking configurations, which i haven't
> used. My interfaces is:
> 
>   auto lo eth0
> 
>   iface lo inet loopback
> 
>   iface eth0 inet static
>     address 192.168.0.3
>     netmask 255.255.255.0
>     gateway 192.168.0.1
> 
> Do 'ifconfig' to show the status of your interfaces.
> You should do '/etc/init.d/networking restart' to get
> the new file read. IIRC, auto command does 'ifconfig' at
> a lower level, and iface does 'route add'.
> 
> Other files to fill in manually are: /etc/hosts, /etc/host.conf,
> /etc/hostname, /etc/networks, /etc/resolve.conf.
> /etc/nsswitch.conf is used, but the default is usually ok.

  Just out of interest, has anyone found a useful script to use with the
  map clause. When I fiddled with it, I found that the script has to
  output to stdout the name of the config to use. My script ended up
  being something like:

  #!/bin/sh

  echo "eth0-home"
  #echo "eth0-work"

  And I would just edit it to change it. It seemed to me that it would
  be difficult to write a script that dynamically worked out what
  network you were in. Either that or it would have to interupt the boot
  process to prompt the user for a location.

  What would a useful (for automation) script look like?

  Geoff



Reply to: