# stupid problem with wi-fi

## marson

Hi all

First of all I am sorry for my english but I try to describe my problem as clean as I can

I have stupid problem with my wi-fi card in my ASUS A6Jc laptop. In this laptop is Intel ipw3945ABG Network Connection. I installed this card by this How-to  http://gentoo-wiki.com/HARDWARE_ipw3945, and I used iwlwifi driver. Now I try to describe my problem :

Wi-fi connection works fine but only if I configure my wired (ethernet) card to works with DHCP, but when I assign static IP and static gateway to my wired card, my wireless card stop working. to be more literal, when wired card has assigned static IP, my wireless card is recognised by system during boot, got an it's own IP addres but unfortunately I cannot see any pages or ever I cannot ping anywhere, ewen to other computer in LAN.

Below I put my config files :

[/quote][/bug]

```
/etc/conf.d/net
```

 *Quote:*   

> 
> 
> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> ...

 

```
 /etc/resolw.conf
```

 *Quote:*   

> 
> 
> # Generated by dhcpcd for interface wlan0
> 
> nameserver 194.204.152.34
> ...

 

When I tried to ping locally using wireless network when my wired card has static IP I always get :

```

laptop ~ # ping 10.0.0.1 -c3

PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.

From 10.0.0.8 icmp_seq=1 Destination Host Unreachable

From 10.0.0.8 icmp_seq=2 Destination Host Unreachable

From 10.0.0.8 icmp_seq=3 Destination Host Unreachable

--- 10.0.0.1 ping statistics ---

3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2008ms

, pipe 3

```

It seems like my wireless card try to retrieve request to wired card address or something. What I doing wrong

----------

## jcat

If both interfaces are on the same subnet, you may find it easier to disable the one you're not using.

Can we see the output of 

```
ifconfig -a
```

 and 

```
netstat -r
```

Cheers,

jcat

----------

## marson

sure below that is :

```
 ifconfig -a
```

 *Quote:*   

> 
> 
> laptop ~ # ifconfig -a
> 
> eth0      Link encap:Ethernet  HWaddr 00:18:F3:3A:A0:4A
> ...

 

```
netstat -r
```

 *Quote:*   

> 
> 
> laptop ~ # netstat -r
> 
> Kernel IP routing table
> ...

 

```
 and my iwconfig output : 
```

 *Quote:*   

>  wlan0     IEEE 802.11g  ESSID:"Dom"
> 
>           Mode:Managed  Frequency:2.462 GHz  Access Point: 00:14:BF:6E:66:98
> 
>           Retry min limit:7   RTS thr:off   Fragment thr=2346 B
> ...

 

during tests I don't use any security options like WPA or WEP. only mac filtering by my Linksys WAG 200G router

----------

## jcat

I can see a strange entry in your routing table:

```
link-local * 255.255.0.0 U 0 0 0 wlan0 
```

but I don't think that's causing the issue.

I don't think you require this line in /etc/conf.d/net either

```
routes_wlan0=( "default via dhcp" ) 
```

Can wee see netstat and ifconfig etc when eth0 is configured with DHCP?

Cheers,

jcat

----------

## marson

As you wish

```
ifconfig
```

 *Quote:*   

> 
> 
> eth0      Link encap:Ethernet  HWaddr 00:18:F3:3A:A0:4A
> 
>           inet addr:169.254.173.112  Bcast:169.254.255.255  Mask:255.255.0.0
> ...

 

 *Quote:*   

> netstat -r[/code]
> 
> 

 

laptop ~ # netstat -r

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

10.0.0.0        *               255.255.255.0   U         0 0          0 wlan0

link-local      *               255.255.0.0     U         0 0          0 eth0

link-local      *               255.255.0.0     U         0 0          0 wlan0

loopback        *               255.0.0.0       U         0 0          0 lo

default         10.0.0.1        0.0.0.0         UG        0 0          0 wlan0

```
iwconfig
```

 *Quote:*   

> 
> 
> laptop ~ # iwconfig
> 
> lo        no wireless extensions.
> ...

 

In this case wired card cable is unplug, when I plugged my ethernet cable into a laptop's socked, the abowe configuration looks like this:

```
ifconfig -a
```

 *Quote:*   

> laptop ~ # ifconfig -a
> 
> eth0      Link encap:Ethernet  HWaddr 00:18:F3:3A:A0:4A
> 
>           inet addr:10.0.0.12  Bcast:10.0.0.255  Mask:255.255.255.0
> ...

 

```
netstat -r
```

 *Quote:*   

> laptop ~ # netstat -r
> 
> Kernel IP routing table
> 
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> ...

 

[/code]iwconfig

```

[quote]lo        no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:"Dom"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:14:BF:6E:66:98

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B

          Encryption key:off

          Link Quality=74/100  Signal level=-45 dBm  Noise level=-84 dBm

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

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

eth0      no wireless extensions.

[/quote]
```

----------

## jcat

I've got to admit I can't see a big issue here.  It seems that you're using IPv6 as well as 4, but that doesn't normally cause an issue.

Things to note:

When you have eth0 set to DHCP _without_ the cable plugged you're routing table is like this:

```
Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

10.0.0.0 * 255.255.255.0 U 0 0 0 wlan0

link-local * 255.255.0.0 U 0 0 0 eth0

link-local * 255.255.0.0 U 0 0 0 wlan0

loopback * 255.0.0.0 U 0 0 0 lo

default 10.0.0.1 0.0.0.0 UG 0 0 0 wlan0 
```

Which means that wlan0 is the is the interface used for all comms for 10.0.0.0/24 and the default gateway.

When you have eth0 set to to dhcp _with_ the cable plugged in, or statically assigned with or without the cable your routing table is as follows:

```
Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

10.0.0.0 * 255.255.255.0 U 0 0 0 eth0

10.0.0.0 * 255.255.255.0 U 0 0 0 wlan0

link-local * 255.255.0.0 U 0 0 0 eth0

link-local * 255.255.0.0 U 0 0 0 wlan0

loopback * 255.0.0.0 U 0 0 0 lo

default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0

default 10.0.0.1 0.0.0.0 UG 0 0 0 wlan0 
```

Which indicates that all eth0 is the is the interface used for all comms for 10.0.0.0/24 and the default gateway (as it's first in the routing table).

So all I can think of is that you're assuming it works with eth0 using DHCP only, because whether you have the Ethernet cable in or out the routing table will still allow comms to work.  Whereas, if you have eth0 statically set the routing table will only allow comms if you have eth0 plugged in (because eth0 is used for all comms no matter what, as it's first in the routing table).

Does that make sense?   :Smile: 

Cheers,

jcat

----------

## Dairinin

Marson, your config is a total mess from ip stack's point of view  :Smile: 

Try not to use same network on different interfaces unless in bridge. Also try not to install several common routes as linux does not understand them like cisco does  :Smile: 

----------

## jcat

 *Dairinin wrote:*   

> Marson, your config is a total mess from ip stack's point of view 
> 
> Try not to use same network on different interfaces unless in bridge. Also try not to install several common routes as linux does not understand them like cisco does 

 

It will just use whatever's first in the routing table, it won't try and do anything clever by default.  That's what routing protocols are for!  :Smile: 

Cheers,

jcat

----------

## Dairinin

 *jcat wrote:*   

>  *Dairinin wrote:*   Marson, your config is a total mess from ip stack's point of view 
> 
> Try not to use same network on different interfaces unless in bridge. Also try not to install several common routes as linux does not understand them like cisco does  
> 
> It will just use whatever's first in the routing table, it won't try and do anything clever by default.  That's what routing protocols are for! 
> ...

 

That's what I ment. No load balancing by default, and either no control over which route kernel uses for packet forwarding.

----------

