Re: different networks, same computer (map mapping ?)
Apparently, _John Schmidt_, on 01/11/04 19:48,typed:
I have a similar setup. I used ifplugd and guessnet. You have to modify
slightly /etc/network/interfaces. I supposed you don't need ifplugd, but it
is nice to be able to start up my laptop quickly without having any type of
network cable installed. Once you plug a cable in, ifplugd will configure
things for you.
Anyway, here are some snippets from my /etc/network/interfaces file:
# The primary network interface
# turn off since ifplugd is controlling things
#auto eth0
mapping eth0
script /usr/sbin/guessnet-ifupdown
map default: none
map timeout: 3
map verbose: true
iface work inet dhcp
test-peer address x.x.x.x MAC.address
iface home inet static
address 192.168.1.5
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
test-peer address 192.168.1.1 MAC.address
Note:
x.x.x.x is the IP address of a known computer on the network that should be
always there. The MAC.address is the hardware MAC address of this computer.
Pretty simple setup but works nicely.
John
I installed ifplugd and guess-net. My ifplugd config is:
#----------------------------------------------------------
{~}> cat /etc/default/ifplugd
# This file may be changed either manually or by running dpkg-reconfigure.
#
# N.B.: dpkg-reconfigure deletes everything from this file except for
# the assignments to variables INTERFACES, HOTPLUG_INTERFACES, ARGS and
# SUSPEND_ACTION. When run it uses the current values of those variables
# as their default values, thus preserving the administrator's changes.
INTERFACES="eth0"
HOTPLUG_INTERFACES=""
ARGS="-q -f -u0 -d5 -w -I"
SUSPEND_ACTION="stop"
#----------------------------------------------------------
and my interfaces file is:
#----------------------------------------------------------
{~}> cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
#mapping
mapping eth0
script /usr/sbin/guessnet-ifupdown
# map home work
map default: none
map timeout: 3
map verbose: true
#home network
iface home inet dhcp
test-peer address 192.168.0.2 source 192.168.0.15
#university network
iface work inet static
address X.Y.Z.A
netmask 255.255.255.0
gateway X.Y.Z.1
network X.Y.Z.0
broadcast X.Y.Z.255
dns-nameservers a.b.c.d e.f.g.h
test-peer address a.b.c.d source X.Y.Z.A
#----------------------------------------------------------
This setup doesn't work. The boot process hangs just after the "starting
MTA: Exim" message. But I choose the interfaces file so that eth0 is
configured at dhcp in my home, the boot process works and a few messages
after "starting MTA: exim" it also gives the message "network
interfaces plugging demon".
Could you give more information about your interfaces file and ifplugd
config.? I seem to be missing something very basic here.
thanks,
->HS
Reply to: