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

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

Ooops.... my bad...

After I posted this message I found out that there is another problem with
my configuration.... so now I am sorry I attached those configuration

Although the interfaces "work" as expected, I later noticed that my syslog
was getting filled with about 15 events logged _per_second_, evidently due
to some continued cycling through bringing the eth1 up and down over and

At first I thought, OK, I'll just replace the

allow-hotplug eth1


auto eth1

(in the /etc/network/interfaces file) and that seemed to slow things down.
But still, eth1 is mysteriously (to me) being brought down every few
minutes and immediately brought back up. I don't understand this, and have
been working on it all afternoon trying to learn what triggers these

I think I may start a new thread about that. But I feel bad if anyone were
to use my posted configurations files thinking that they are good-to-go
as-is ...

I've also removed the "auto eth1" statement from /e/n/i, which means I
have to bring eth1 up manually with "ifup eth1", but still the syslog
shows me that the interface is being brought down and then back up every
few minutes...


> 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
> netmask
> network
> broadcast
> gateway
> 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 <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...

Reply to: