Re: DHCP for PCMCIA interface: Being Canonical
Bruce <bestb@sympatico.ca> writes:
> I have a wireless (SMC 2632W) PCMCIA network card on my laptop which runs
> Debian/Sid.
(This is important.)
> Works great, once up. However, I do have to manually "pump -i wlan0"
> for it to get its address from the friendly neighbourhood DHCP
> server.
...
> I could probably hobble together some script to "get this working", without
> too much troble but I know that whatever I come up with will not be the
> canonical solution.
>
> What is the canonical Debian way to get your pcmcia (wireless) card to fetch
> it's IP from a DHCP server on boot?
In Debian unstable (and possibly in testing), the PCMCIA setup will
fall back to running 'ifup wlan0' or whatever if there's not explicit
configuration in /etc/pcmcia/* for the network card. I think this is
great, personally. :-) In your case, then, the thing to do is to add
to /etc/network/interfaces
# No 'auto wlan0'!
iface wlan0 inet dhcp
...and you should be set.
------------------------------------
My actual setup is a bit more complicated. I use guessnet to bring
myself up on a couple of known static addresses, and there are
services (most notably the Zephyr host manager, zhm) that become
really unhappy without network. So I actually have an
/etc/network/interfaces.m4, which I process with m4 to create the
actual interfaces file. I also have a chunk of Perl that outputs a
set of interfaces lines for a CIDR-style network declaration; if I
call the script with "18.208.0.22/16" as a parameter, it will output
correct address, netmask, broadcast, and gateway lines (using MIT's
convention of using the first address in the block, e.g. 18.208.0.1,
as the gateway). I should put the actual infrastructure on the Web
somewhere; the net result, though, is that I wind up with a file that
looks like
mapping eth0
script /usr/bin/guessnet
map 18.101.2.57 00:60:XX:XX:XX:XX 18.101.2.49 eth0-home
map 18.208.0.22 00:E0:XX:XX:XX:XX 18.208.0.1 eth0-et
iface eth0-home inet static
INTERFACE(18.101.2.57/28)
up ifconfig eth0 mtu 1480
SERVICE(zhm)
QUIKSERV(eth0-et, 18.208.0.22/16)
iface eth0-none inet dhcp
SERVICE(zhm)
Useful packages to have installed are 'guessnet' and
'libnet-netmask-perl'; useful documentation includes interfaces(5) and
'info m4'.
--
David Maze dmaze@debian.org http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: