# Madwifi - Unable to resolve http requests

## 414C485649

Hello! I'm getting some trouble with my wireless card (Atheros chip).  I've emerged wireless-tools, madwifi-ng and madwifi-ng tools, and loaded the modules

```
$ modprobe ath_pci

$ modprobe wlan_scan_sta

```

After that I do:

```
$ ifconfig eth0 down

$ ifconfig ath0 up

$ iwconfig ath0 ap auto

$ dhcpcd ath0

```

After that I can do ping to any page and I can lynx google, but only.  When I try to emerge something it calculates the dependencies but when it sends the http request, it never get a response.  The same with lynx to other pages. 

What I'm doing wrong? or what's the problem?

Thanks in advance

----------

## didymos

Sounds like the router/ap you're connecting to isn't properly forwarding packets.  Without knowing more about you're setup, it's hard to say.

----------

## 414C485649

I'm sure it's not router/ap problem because I have other machines connected working perfectly. And also I have windows in my laptop (where I'm trying to configure madwifi in gentoo) and there's no problem.

What other things do you need to know about? configuration files? modules loaded?

Thanks for your response.

----------

## didymos

Well, your network config files, whether the default route on gentoo is getting set correctly.  One thing I thought of is mtu.  I'm betting that currently, the mtu for ath0 is 1500.  If your router/ap is connected to a dsl line, setting the mtu on ath0 to 1492 might fix the problem.

----------

## 414C485649

Changing the mtu did not fix the problem.

About my files.

/etc/conf.d is blank (for use with dhcp)

/etc/resolv.conf says:

```
# Generated by dhcpcd for interface ath0

nameserver 192.168.1.1

```

ifconfig shows:

```
ath0      Link encap:Ethernet  HWaddr 00:11:F5:3B:9C:E6

          inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1492  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:6079 (5.9 Kb)  TX bytes:2642 (2.5 Kb)

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)

wifi0     Link encap:UNSPEC  HWaddr 00-11-F5-3B-9C-E6-80-B6-00-00-00-00-00$

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:199

          RX bytes:335988 (328.1 Kb)  TX bytes:4469 (4.3 Kb)

          Interrupt:19 Memory:ddf40000-ddf50000

```

iwconfig shows:

```
lo        no wireless extensions.

eth0      no wireless extensions.

wifi0     no wireless extensions.

ath0      IEEE 802.11g  ESSID:"default"

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:15:E9:F3:C0:$

          Bit Rate:24 Mb/s   Tx-Power:16 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=33/94  Signal level=-62 dBm  Noise level=-95 dBm

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

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

```

----------

## didymos

Is there anyway to check the logs on the router, or something equivalent, to see if the packets are making it to the Gentoo box?  Also, try doing this as root while you have say, an emerge --sync trying to run on another console:

```

tcpdump -i ath0

```

Something isn't letting packets through. Are you using a firewall on the Gentoo box?

----------

## 414C485649

Thank you for your help.  Today I found out that the problem is not with my gentoo box but with my home network,  because at university wireless works fine. Now I have to find what's the problem with the network configuration   :Confused: 

Anyway here are the results of the tcpdump and here the commands I ran in the other shell.

Thanks again.

----------

## didymos

Well, I still have no answer for you, but the one thing that  really struck me as odd about the tcpdump is that the receive windows were kind of small.  I'm speaking relatively, though.  A small rwin isn't necessarily abnormal, but from the output, even the small rwins looked smaller than they should. And of course, a bunch of packets just aren't getting through, but then we already knew that.  But to show you what I mean, a sync for me eventually settles into a rough pattern that mostly looks like this:

```

01:41:14.606526 IP owl.gentoo.org.rsync > adsl-68-127-49-1.dsl.chic01.pacbell.net.40282: P 53669:53673(4) ack 162 win 45 <nop,nop,timestamp 1837227981 78885957>

01:41:14.606839 IP adsl-68-127-49-1.dsl.chic01.pacbell.net.40282 > owl.gentoo.org.rsync: . ack 53673 win 2003 <nop,nop,timestamp 78885977 1837227981>

01:41:14.642028 IP owl.gentoo.org.rsync > adsl-68-127-49-1.dsl.chic01.pacbell.net.40282: . 53673:55113(1440) ack 162 win 45 <nop,nop,timestamp 1837227981 78885957>

01:41:14.677163 IP owl.gentoo.org.rsync > adsl-68-127-49-1.dsl.chic01.pacbell.net.40282: . 55113:56553(1440) ack 162 win 45 <nop,nop,timestamp 1837227981 78885957>

01:41:14.677216 IP adsl-68-127-49-1.dsl.chic01.pacbell.net.40282 > owl.gentoo.org.rsync: . ack 56553 win 2003 <nop,nop,timestamp 78886047 1837227981>

01:41:14.708274 IP owl.gentoo.org.rsync > adsl-68-127-49-1.dsl.chic01.pacbell.net.40282: P 56553:57765(1212) ack 162 win 45 <nop,nop,timestamp 1837227983 78885977>

01:41:14.708652 IP adsl-68-127-49-1.dsl.chic01.pacbell.net.40282 > owl.gentoo.org.rsync: . ack 57765 win 2003 <nop,nop,timestamp 78886078 1837227983>

01:41:14.759948 IP owl.gentoo.org.rsync > adsl-68-127-49-1.dsl.chic01.pacbell.net.40282: . 57765:59205(1440) ack 162 win 45 <nop,nop,timestamp 1837227993 78886047>

01:41:14.795489 IP owl.gentoo.org.rsync > adsl-68-127-49-1.dsl.chic01.pacbell.net.40282: . 59205:60645(1440) ack 162 win 45 <nop,nop,timestamp 1837227993 78886047>

01:41:14.795545 IP adsl-68-127-49-1.dsl.chic01.pacbell.net.40282 > owl.gentoo.org.rsync: . ack 60645 win 2003 <nop,nop,timestamp 78886165 1837227993>

01:41:14.826304 IP owl.gentoo.org.rsync > adsl-68-127-49-1.dsl.chic01.pacbell.net.40282: P 60645:61861(1216) ack 162 win 45 <nop,nop,timestamp 1837227993 78886078>

```

and the rwins tend to be the same throughout the sync, with some variation.  I'm not going to deliberately sync against raptor.gentoo.org, so I can't say how that would compare to your system.

----------

## 414C485649

Yep.. I see.  I'm going to review my router/ap settings but I have no idea what to look for.  :Sad: 

----------

## 414C485649

Updates:  I've upgraded my router firmware,  contacted my ISP ... but they don't know what is gentoo   :Mad:   and now I don't know what to do   :Sad: 

----------

