[lug] ifupdown mapping

Toni Janz egg at only-an-egg.org
Thu Oct 16 04:10:25 MDT 2003

* J. Wayde Allen (wallen at its.bldrdoc.gov) wrote:
> OK, I'm setting up a new Debian laptop and have been trying to create
> mappings for multiple network configurations.  According to the man pages
> for ifupdown I should be able to setup the /etc/network/interfaces file to
> read something like:
>   # The loopback interface
>   auto lo
>   iface lo inet loopback
>   mapping eth0
>      script /usr/local/somescript
>      map home eth0-home
>      map work eth0-work
>   iface eth0-home inet static
>      address xxx.xxx.xxx.xxx
>      netmask xxx.xxx.xxx.xxx
>   iface eth0-work inet static
>      address yyy.yyy.yyy.yyy
>      netmask yyy.yyy.yyy.yyy
> What I can't seem to get my head around is the mapping script.  What
> exactly does this do?  I guess it seems to me that the "map name" lines
> should point to the appropriate interface definition.  Can someone clarify
> this for me?
> - Wayde
>   (wallen at its.bldrdoc.gov)
>       --------------------------------------------------------
>                             ISART 2004
>        International Symposium on Advanced Radio Technologies
>          http://www.its.bldrdoc.gov/meetings/art/index.php
>       --------------------------------------------------------

I think an easy solution in your case might be this:


** begin snip in case you aren't feeling cut-n-pasty err...
drag-n-droppy even **

This package supports the built-in ethernet of laptops by providing several 
integrated features that automatically adapt the laptop to the network 
environment. The package is easily configured to support a wide variety of 
network environments, and supports manual as well as automatic management 
of the network interface.

The package can automatically: start and stop the network interface at appropriate 
times; disable the network interface when the network cable is removed, and enable 
it when the cable is inserted; select the network interface's IP address, either 
by probing the network for known hosts or by use of the DHCP protocol; customize 
the laptop's software configuration to match the network interface's IP address.

** end snip **

If you currently have access to the internet it should be as easy as
"apt-get install laptop-net"

Toni Janz
egg at only-an-egg.org

More information about the LUG mailing list