Thank you Brian for showing me that "route -v" is my friend :-) That really helped me debug this configuration.
Thank you J. Bakshi for your explication of the use of the pre-up and pre-down instructions. Turns out that one of the problems with my configuration was that I had both a "scan_ssid=1" and a "priority=15" in each of my stanzas in the wpa-roam.conf file- this is a no-no. Eliminating the former resolved most of the puzzling behavior. After more experimentation I found that by using J. Bakshi's idea I was able to configure things so that now the proper interface is used regardless of whether the Ethernet is plugged in or not at bootup, and remains properly configured regardless of how many times I might plug|unplug the Ethernet cable. Here's the pertinent stanza from the /etc/network/interfaces file: iface eth0 inet static wpa-debug-level 3 post-up /sbin/ifdown eth1 post-up /sbin/iwconfig eth1 txpower off post-down /sbin/iwconfig eth1 txpower on post-down /sbin/ifup eth1 address 192.168.1.69 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 Yes, it _required_ both the pre-up and post-down statements. Note: I decided to go with static, but this is unrelated to the discussion. For the record, in case the reader has stumbled upon this post via Google or such for help with setting up wireless from the command line (CLI), I have attached my /etc/network/interfaces, /etc/default/ifplugd, and /etc/wpa_supplicant/wpa-roam.conf files. Note: this works without using a wpa_supplicant.conf or guessnet. Of course, my configuration is not complicated by a firewall or a proxy service... And of course, there are always other ways to do things... Thanks again, Keith > On Tue, 1 Nov 2011 00:47:27 +0000 > Brian <a...@cityscape.co.uk> wrote: > >> On Mon 31 Oct 2011 at 12:53:21 -0700, kei...@strucktower.com wrote: >> >> > If I boot the laptop with the Ethernet cable plugged in (eth0), that >> > connection works fine. > > A good practice might be to down the unused interface. > > When using wired power-down wifi, as well as ifdown > > ` ` ` ` > pre-up /sbin/ifdown wlan0 > pre-up /sbin/iwconfig wlan0 txpower off > ` ` ` ` > > When using wifi do the opposite. > > You can also power-on wifi when wired is unplugged > > ` ` ` ` > down /sbin/iwconfig wlan0 txpower on > ` ` ` ` > > pre-up, pre-down, post-up,.. etc.. statements are very helpful... >
interfaces
Description: Binary data
wpa-roam.conf
Description: Binary data
ifplugd
Description: Binary data