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

Re: laptop and different networks



Apparently, _Johan Brannlund_, on 13/05/05 04:44,typed:
> On Thu, 12 May 2005 18:50:07 +0200, H. S. wrote:
> 
> 
>>Hi,
> 
> 
> Hi.
> 
> 
>>I am supposed to configure a laptop so that is can be connected to a
>>CAT5 cable on either a home LAN or a university LAN. Currently, the
>>laptop is configured as a dhcp client in the home network and has a
>>fixed IP address in the university network.
> 
> 
> I'm in exactly the same situation and after some fiddling I've arrived at
> a setup that works very well. The packages I use are
> 
> ifplugd - automatically configure/deconfigure interfaces when the link
> status changes
> guessnet - tools for checking which network you're on
> resolvconf - notify libc etc of changes in current DNS servers
> nscd - cache DNS information (not really necessary, but useful if your ISP
> has flaky name servers)
> iputils-arping - useful for setting up your /etc/network/interfaces
> dhcp3-client - ISC DHCP client
> 
> The contents of (relevant parts of) the most important config files are as
> follows, with some additional comments interspersed:
> 
> /etc/network/interfaces
> -------------------------------
> auto lo
> iface lo inet loopback
> 
> mapping eth0
> script /usr/sbin/guessnet-ifupdown
> map ubc home
> map default: home
> 
> 
> iface ubc inet static
> address A.B.C.D  # Substitute your assigned static IP for A.B.C.D
> netmask 255.255.255.0 # Or whichever netmask you should have
> gateway X.Y.Z.W # Your default gw IP goes here
> dns-nameservers 1.2.3.4  5.6.7.8 # IP's of your nameservers go here
> test-peer address X.Y.Z.W mac e:f:g:h:i:j source A.B.C.D
> # The line just above checks the mac address of your default gateway
> # You should already know what "X.Y.Z.W" and "A.B.C.D" are
> # To find "e:f:g:h:i:j", type "arping X.Y.Z.W" in a terminal window
> 
> 
> iface home inet dhcp
> # No tests or anything else needed here. If the above test-peer
> # fails, the home interface should be brought up by default and 
> # everything set up via DHCP.
> 
> --------------------------------
> 
> 
> /etc/default/ifplugd
> -----------------------------------
> INTERFACES="eth0"
> HOTPLUG_INTERFACES=""


Mostly it worked. But I had to put HOTPLUG_INTERFACES="eth0" in
/etc/default/ifplugd to prevent boot process from hanging while startin
the mta. If I left HOTPLUG_INTERFACES="", during the boot process the
computer hangs at:
Starting MTA:

and I have to manually reset the laptop.

I have the laptop working on two networks at home (one static the other
dhcp). I will test the laptop in my university in a day or two.

Thanks a ton for your help.
->HS




-- 
Please remove the underscores ( the '_' symbols) from my email address
to obtain the correct one. Apologies, but the fudging is to remove spam.



Reply to: