On Sun, 23 Jan 2005 14:55:44 -0500, Curt Howland <[EMAIL PROTECTED]> wrote: > If you're not averse to a little bit of hand editing, this is how I do > it: > > In /etc/network/interfaces > -------------------------- > #iface eth0 inet dhcp > iface eth0 inet static > address 10.12.14.16 > netmask 255.255.255.0 > -------------------------- > > Then when I'm in a place like a hotel, I comment out the static > entries and remove the comment from the dhcp, to wit: > > -------------------------- > iface eth0 inet dhcp > #iface eth0 inet static > # address 10.12.14.16 > # netmask 255.255.255.0 > -------------------------- > > Then "ifdown eth0" and "ifup eth0" > > Of course, since you're using a pcmcia network card, you could just > make the change before plugging in your card and when the card is > inserted it will load the new configuration. > > Curt- > > On Sunday 23 January 2005 14:31, Pollywog was heard to say: > > Thanks, I saw something about the map scheme when I was searching > > for answers to my problem, but I found it rather confusing. I will > > try this if the 'dhclient eth0' command fails to connect me. The > > information you posted will be very helpful. > --
You could also extend the approach to doing schemes or themes inside the /etc/network/interfaces file for wireless and wired networks. I travel with laptops to several settings that vary between wireless and wired. I have a set of schemes that load different wireless setups like essid, key, etc and then you can extend the above commands even more by calling a scheme with the ifup command. On my laptop it works very well for bringing up a variety of wired and wireless network configurations without having to install a second package or write scripts. Here is a snippet of my /etc/network/interfaces file, auto eth0 iface eth0 inet dhcp iface home inet dhcp wireless-essid yyyyyy wireless-key xxxxxxxxxx iface tmobile inet dhcp wireless-essid tmobile iface eds inet dhcp wireless-essid aaaaaa wireless-key ddddddddd I used to have a stanza setup for a static IP thing at a colo I worked at with a wired connection called "work" as well. So when I want to bring up a specific interface I visit, I just do "ifup eth1=work" or eds or whatever. If I go somewhere like a hotel I have not connected at before, I've found 99% of the time they use dhcp so its pretty easy to modify the script or just use a manual setup to make things work and get a sense of the requirements. Often hotels have printouts on the wireless setups or how broadband works in a room. Usually this information can be easily modified to a /etc/network/interfaces script if you are gonna be there for awhile. -- Michael Perry [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]