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

RESOLVED: Learning ifpludg in CLI, WAS Re: laptop wireless setup, wpa_supplicant.conf, etc

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

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,

> On Tue, 1 Nov 2011 00:47:27 +0000
> Brian <ad44@cityscape.co.uk> wrote:
>> On Mon 31 Oct 2011 at 12:53:21 -0700, keitho@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...

Attachment: interfaces
Description: Binary data

Attachment: wpa-roam.conf
Description: Binary data

Attachment: ifplugd
Description: Binary data

Reply to: