# Problems with eth0 and wlan0

## dbbolton

I would like to connect to my network through my wlan0 interface. Right now, it seems the system is defaulting to eth0.

How can I make it default to wlan0?

What I have tried:

```

ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0

rc-update add wlan0 default

rc-update del eth0 default

```

I am not even sure that my wireless is working because of this.

/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 :]!).

config_eth0=( "192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255" )

routes_eth0=( "default via 192.168.1.1" )

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "192.168.1.64 netmask 255.255.255.0 brd 192.168.1.255" )

```

/etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

    ssid="wpanetwork" # the one i need to use right now

    psk="passphrase"

    priority=5

}

network={

    ssid="wepnetwork"

    key_mgmt=NONE

    wep_key0="1234ABCD"

    wep_tx_keyidx=0

    priority=4

}

```

I have set r8169 (for eth0) and iwl3945 (for wlan0) to be loaded automatically,

----------

## rainer

I'm not an Guru at all but I might have some ideas for further exploring the problem:

There is no network cable connected to eth0?

Can you ping 192.168.0.1 from 192.168.0.65?

Output of ifconfig and iwconfig?

----------

## dbbolton

I gave up using WPA supplicant and tried using wicd. I added the daemon to the default runlevel, but the tray applet couldn't find my network.

ifconfig

```

eth0      Link encap:Ethernet  HWaddr 00:18:f3:3b:3b:19  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:28 Base address:0x4000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

iwconfig

```

wlan0     IEEE 802.11abg  ESSID:"bolton"  

          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated   

          Tx-Power=15 dBm   

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

          Encryption key:correct key

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

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

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

```

This iwconfig was after I ran:

```

iwconfig wlan0 mode managed channel 06 essid bolton key ABCDEF1234

```

After that, I still got the "network is unreachable" error when I tried to ping my router.

I double checked to make sure that the iwl3945 driver was loaded, and launched wicd-gtk again, but it still didn't see my wireless network.

I think the wicd issue is separate, so I will just start another thread for that.

----------

