# [SOLVED] Wireless only functional if wired is disconnected

## nerr

Hey everybody, I'm fairly new to Gentoo, but have gotten far enough to install KDE, and configure my wireless network connection.  I cannot for the life of me figure out what is wrong with it now.  If I have a wired connection plugged in, I am able to connect to a network.  If I attempt to use the wireless after unplugging the wired connection, it will not function.  The only time my wireless will function is when I boot the system WITHOUT a wired connection attached.  As soon as one is attached, the wireless connection will no longer function.

I'm completely clueless as to what the problem is here.  My card is a Broadcom BCM4322 and I'm using the broadcom-sta driver on kernel 2.6.32-gentoo-r7.  My network is WPA2-Personal using AES (CCMP, not TKIP).  I will post any config files I can think of, but please don't hesitate to ask for more information!  I'd really like to get this working as soon as possible.

/etc/conf.d/net

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

config_eth1=( "dhcp" )

config_eth0=( "dhcp")
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
# The below line not be changed otherwise we refuse to work

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

network={

        ssid="********"

        proto=WPA2 RSN

        key_mgmt=WPA-EAP WPA-PSK

        pairwise=CCMP

        group=CCMP

        eap=TTLS PEAP TLS

        psk="********"

        priority=5

        }
```

iwconfig eth1

```
eth1      IEEE 802.11abgn  ESSID:"********"  Nickname:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1C:10:CD:51:DF

          Bit Rate=2 Mb/s   Tx-Power:24 dBm

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Managementmode:All packets received

          Link Quality=5/5  Signal level=-41 dBm  Noise level=-91 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:1  Invalid misc:0   Missed beacon:0
```

ifconfig

```
eth0      Link encap:Ethernet  HWaddr 00:22:19:de:12:60

          inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::222:19ff:fede:1260/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:7455 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5554 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:9419974 (8.9 MiB)  TX bytes:630069 (615.3 KiB)

          Interrupt:23 Base address:0xa000

eth1      Link encap:Ethernet  HWaddr 00:24:2c:7a:dc:94

          inet addr:192.168.1.24  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::224:2cff:fe7a:dc94/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:4124 errors:0 dropped:0 overruns:0 frame:394

          TX packets:2546 errors:6 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:4832128 (4.6 MiB)  TX bytes:373996 (365.2 KiB)

          Interrupt:21
```

iwlist eth1 scan

```
eth1      Scan completed :

          Cell 01 - Address: 00:1C:10:CD:51:DF

                    ESSID:"********"

                    Mode:Managed

                    Frequency=2.422 GHz (Channel 3)

                    Quality:5/5  Signal level:-45 dBm  Noise level:-92 dBm

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : PSK
```

I find it so strange that the wireless device will only function if the wired device has been disconnected since reboot.  Here's hoping that we can find a solution for this dilemma fast!  Thank you!Last edited by nerr on Tue Jun 08, 2010 10:07 pm; edited 1 time in total

----------

## Logicien

Hi,

you do not tell us what exactly is at the other end, I suppose a router with a wireless card and RJ45 connectors. I see that your wired and wireless cards are on the same network 192.168.1.0. I would prefer to configure the router to give IP address on two differents networks, one for the wired card and one for the wireless card. I think it can help. As I know, differents physicals networks are on separates logicals networks and are only links together with dridge(s).

----------

## DONAHUE

So both interfaces are running (Bravo, well done) but the default interface is eth0. You can check that eth1 is fully operational by running 

```
ping -c2 -I eth1 google.com
```

.

what happens if you run:

```
/etc/init.d/net.eth0 stop

/etc/init.d/net.eth1 restart
```

having booted with wired wired?  :Very Happy: 

Are you running wpa_gui, wifi radar, ifplugd, wicd, or network manager?

----------

## nerr

My apologies, it is a Linksys router.  The only reason I object to separating wired and wireless networks is because it has never been a necessity in the past, and I'd prefer to not complicate my network.  Other distributions have accepted and worked well with this same configuration in the past, so all I can figure is that it must be something to do with a config file or driver in Gentoo.

----------

## nerr

EDIT: Sorry for the double post, just wanted to grab attention again because I didn't realize DONAHUE had posted before I made my first reply.   :Very Happy: 

 *DONAHUE wrote:*   

> So both interfaces are running (Bravo, well done) but the default interface is eth0. You can check that eth1 is fully operational by running 
> 
> ```
> ping -c2 -I eth1 google.com
> ```
> ...

 

The ping command works sporadically.  There is really no good pattern as to whether it will run or not, but it usually runs only when I'm on wired.

Stopping eth0 and restarting eth1 appears to have worked for the time being, as I am posting this from wireless right now.  I have wpa_gui (which only works as root), and wicd (although I have not configured wicd at all).

----------

## DONAHUE

Personally I like wpa_gui and have had no luck with wicd or network manager.

Purloined knowledge:

 *Quote:*   

> Dynamic method: 'wpa_gui', 'wpa_cli'
> 
> wpa_gui or wpa_cli require a very minimal wpa_supplicant.conf.
> 
> A simple example:
> ...

 

Of course this solution requires adding a group and putting users in it.

As I believe things to work, at boot time the first net.interface started will become default and stay as default until the interface is stopped. The commands above cause the wired to lose default status and wireless to gain it. ifplugd should give the same effect but will shift to the wired whenever it is plugged.

----------

## d2_racing

Hi, what happen when you run this :

```

# /etc/init.d/dhcpcd restart

# /etc/init.d/net.eth1 restart

# ifconfig -a

# iwconfig

```

----------

## nerr

Hello again, ifplugd seems to be exactly what I was looking for.  By removing eth0 from starting at boot-time and allowing it to be controlled by ifplugd, I have the wired/wireless interface switching that I desire.  :Smile:  Thank you very much for your help, DONAHUE, and I appreciate your input as well d2_racing!  Consider this problem SOLVED!  :Very Happy: 

----------

## d2_racing

Have fun now  :Razz: 

----------

