Re: [Madwifi-users] Unable to configure MadWifi as a simple AP on Ubuntu

Aditya Bhave <[email protected]> Tue, 25 May 2010 13:07:42 -0400
Newsgroups gmane.linux.drivers.madwifi.devel,gmane.linux.drivers.madwifi.user
Message-ID <[email protected]>
Hi,

The same problem is coming. Each of my laptops has an inbuilt 
non-Atheros WiFI card called wlan0 and an external PCMCIA-based Atheros 
card. To keep things simple, I disabled wlan0 using ifconfig wlan0 down. 
Here are the relevant command outputs

/*****************************************************************/
At the AP

ayb@AdLenovoLinux:~$ ifconfig
ath0      Link encap:Ethernet  HWaddr 06:0b:6b:20:72:f6
           inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
           inet6 addr: fe80::40b:6bff:fe20:72f6/64 Scope:Link
           UP BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:0 (0.0 B)  TX bytes:1721 (1.7 KB)

eth0      Link encap:Ethernet  HWaddr 00:24:7e:11:b6:09
           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)
           Memory:fc000000-fc020000

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:74065 errors:0 dropped:0 overruns:0 frame:0
           TX packets:74065 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:3008539 (3.0 MB)  TX bytes:3008539 (3.0 MB)

wifi0     Link encap:UNSPEC  HWaddr 
00-0B-6B-20-72-F6-00-00-00-00-00-00-00-00-00-00
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:6270 errors:0 dropped:0 overruns:0 frame:57740
           TX packets:2042 errors:342 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:199
           RX bytes:897647 (897.6 KB)  TX bytes:181270 (181.2 KB)
       Interrupt:16

ayb@AdLenovoLinux:~$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  
ESSID:"f2\x0D\xB71X\xA3Z%]\x05\x17X\xE9^\xD4\xAB\xB2\xCD\xC6\x9B\xB4T\x11\x0E\x82tA!=\xDC\x87" 

           Mode:Managed  Frequency:2.427 GHz  Access Point: Not-Associated
           Tx-Power=15 dBm
           Retry  long limit:7   RTS thr:off   Fragment thr:off
           Power Management:off

pan0      no wireless extensions.

wifi0     no wireless extensions.

ath0      IEEE 802.11g  ESSID:"Aditya"
           Mode:Master  Frequency:2.447 GHz  Access Point: 
06:0B:6B:20:72:F6
           Bit Rate:0 kb/s   Tx-Power:16 dBm   Sensitivity=1/1
           Retry:off   RTS thr:off   Fragment thr:off
           Power Management:off
           Link Quality=0/70  Signal level=-95 dBm  Noise level=-95 dBm
           Rx invalid nwid:902  Rx invalid crypt:0  Rx invalid frag:0
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ayb@AdLenovoLinux:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 ath0

/****************************************************************************************************/
On the STA
ayb@ADSonyVAIO:~$ iwconfig
lo        no wireless extensions.

eth1      no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:off/any
           Mode:Managed  Frequency:2.422 GHz  Access Point: Not-Associated
           Tx-Power=15 dBm
           Retry  long limit:7   RTS thr:off   Fragment thr:off
           Power Management:off

pan0      no wireless extensions.

wifi0     no wireless extensions.

ath2      IEEE 802.11g  ESSID:"Aditya"
           Mode:Managed  Frequency:2.447 GHz  Access Point: 
06:0B:6B:20:72:F6
           Bit Rate:48 Mb/s   Tx-Power:16 dBm   Sensitivity=1/1
           Retry:off   RTS thr:off   Fragment thr:off
           Power Management:off
           Link Quality=36/70  Signal level=-58 dBm  Noise level=-94 dBm
           Rx invalid nwid:658  Rx invalid crypt:0  Rx invalid frag:0
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ayb@ADSonyVAIO:~$ ifconfig
ath2      Link encap:Ethernet  HWaddr 00:0b:6b:20:40:dd
           inet addr:192.168.1.15  Bcast:192.168.1.255  Mask:255.255.255.0
           inet6 addr: fe80::20b:6bff:fe20:40dd/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:0 (0.0 B)  TX bytes:4966 (4.9 KB)

eth1      Link encap:Ethernet  HWaddr 00:13:a9:48:e9: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)

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:377 errors:0 dropped:0 overruns:0 frame:0
           TX packets:377 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:34584 (34.5 KB)  TX bytes:34584 (34.5 KB)

wifi0     Link encap:UNSPEC  HWaddr 
00-0B-6B-20-40-DD-00-00-00-00-00-00-00-00-00-00
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:2392 errors:0 dropped:0 overruns:0 frame:147
           TX packets:406 errors:8 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:199
           RX bytes:362890 (362.8 KB)  TX bytes:24726 (24.7 KB)
           Interrupt:16

wlan0     Link encap:Ethernet  HWaddr 00:18:de:62:bd:c5
           UP BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:15242 errors:0 dropped:0 overruns:0 frame:0
           TX packets:12162 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:2790387 (2.7 MB)  TX bytes:1296883 (1.2 MB)

ayb@ADSonyVAIO:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     2      0        0 ath2
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 ath2
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 ath2

Any help will be appreciated

Thanks
regards,
Aditya Bhave


On 05/22/2010 02:06 AM, Venkat Ch wrote:
> Hi Aditya,
>
>   It is an issue with routing that is causing the ping problem. Your 
> wireless settings are fine.
>
> Please do the following. This is a simple setup that will work. Once 
> you make this work, you can proceed further adding other interfaces.
>
> At AP:
> ---------
>
> route del -net 192.168.0.0 netmask 255.255.255.0
> ifconfig ath1 192.168.1.1 netmask 255.255.255.0
>
> AT STA:
> -----------
> ifconfig ath1 192.168.1.10 netmask 255.255.255.0
>
>
> If you see any issues, send the output of the commands of iwconfig and 
> route -n on both sides again.
>
> Thanks & Regards
> Venkat
>
>
> On Sat, May 22, 2010 at 8:50 AM, Aditya Bhave <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Thanks for your reply Venkat
>
>     On the AP
>     iwconfig gives
>     ath1      IEEE 802.11g  ESSID:"Aditya"
>               Mode:Master  Frequency:2.447 GHz  Access Point:
>     00:0B:6B:20:40:DD
>               Bit Rate:0 kb/s   Tx-Power:16 dBm   Sensitivity=1/1
>               Retry:off   RTS thr:off   Fragment thr:off
>               Power Management:off
>               Link Quality=48/70  Signal level=-47 dBm  Noise
>     level=-95 dBm
>               Rx invalid nwid:78  Rx invalid crypt:0  Rx invalid frag:0
>               Tx excessive retries:0  Invalid misc:0   Missed beacon:0
>
>     route -n gives
>     ayb@AdLenovoLinux:~$ route -n
>     Kernel IP routing table
>     Destination     Gateway         Genmask         Flags Metric
>     Ref    Use Iface
>     192.168.1.0     0.0.0.0         255.255.255.0   U     0     
>     0        0 ath1
>     192.168.0.0     0.0.0.0         255.255.255.0   U     2     
>     0        0 wlan0
>     0.0.0.0         192.168.0.1     0.0.0.0         UG    0     
>     0        0 wlan0
>
>     wlan0 is the name of my inbuilt Intel wireless card. Im using a
>     PCMCIA Atheros card named ath1
>
>     On the STA
>     iwconfig gives
>     ath1      IEEE 802.11g  ESSID:"Aditya"
>               Mode:Managed  Frequency:2.447 GHz  Access Point:
>     00:0B:6B:20:40:DD
>               Bit Rate:54 Mb/s   Tx-Power:20 dBm   Sensitivity=1/1
>               Retry:off   RTS thr:off   Fragment thr:off
>               Power Management:off
>               Link Quality=39/70  Signal level=-54 dBm  Noise
>     level=-93 dBm
>               Rx invalid nwid:1464  Rx invalid crypt:0  Rx invalid frag:0
>               Tx excessive retries:0  Invalid misc:0   Missed beacon:0
>
>     and route -n gives
>
>     Kernel IP routing table
>     Destination     Gateway         Genmask         Flags Metric
>     Ref    Use Iface
>     192.168.0.0     0.0.0.0         255.255.255.0   U     2     
>     0        0 wlan0
>     169.254.0.0     0.0.0.0         255.255.0.0     U     0     
>     0        0 ath1
>     169.254.0.0     0.0.0.0         255.255.0.0     U     1000  
>     0        0 wlan0
>     0.0.0.0         192.168.0.1     0.0.0.0         UG    0     
>     0        0 wlan0
>
>     Thanks
>     regards,
>     Aditya Bhave
>
>
>
>
>
>     On 05/21/2010 07:24 AM, Venkat Ch wrote:
>>     Can you please send the output of "iwconfig" and "route -n" at
>>     both STA and AP.
>>
>>
>>     Thanks & Regards
>>     Venkata Rao chimata
>>
>>     On Fri, May 21, 2010 at 2:39 AM, Aditya Bhave <[email protected]
>>     <mailto:[email protected]>> wrote:
>>
>>         Hi,
>>
>>         Im trying to configure MadWifi as an AP on laptop A and
>>         connecting a
>>         client from laptop B. Although the station B associates
>>         correctly, Im
>>         unable to even do a simple ping to the AP
>>
>>         Here is my configuration
>>
>>         Laptop A: Lenovo Thinkpad
>>         Card: lshw -C network
>>                description: interface
>>                product: Atheros AR5001X+ Wireless Network Adapter
>>                vendor: Atheros Communications Inc.
>>                physical id: 0
>>                bus info: pci@0000:16:00.0 <mailto:pci@0000:16:00.0>
>>                logical name: wifi0
>>                version: 01
>>                serial: 00:0b:6b:20:40:dd
>>                width: 32 bits
>>                clock: 33MHz
>>                capabilities: bus_master cap_list logical
>>                configuration: broadcast=yes driver=ath_pci latency=96
>>         maxlatency=28 mingnt=10 multicast=yes
>>                resources: irq:16 memory:c4000000-c400ffff
>>
>>         Here is the script I used to create an AP
>>         /*********
>>         #!/bin/sh
>>
>>         sudo modprobe -r ath5k || true
>>         sudo modprobe -r ath9k || true
>>         sudo modprobe -r ath_pci || true
>>         sudo modprobe ath_pci autocreate=none
>>
>>         sudo wlanconfig ath1 destroy || true
>>         sudo wlanconfig ath1 create wlandev wifi0 wlanmode ap    #
>>         set up the AP
>>         sudo iwpriv ath1 mode 3                    # 11g mode
>>         sudo iwconfig ath1 essid "Aditya"      # essid
>>         sudo iwconfig ath1 key off                # no wep
>>         sudo iwconfig ath1 enc off                # no wep
>>         sudo iwpriv ath1 wpa 0                    # no wpa
>>
>>         sudo ifconfig ath1 up
>>         sleep 1
>>         sudo ifconfig ath1 192.168.1.1 netmask 255.255.255.0
>>
>>         sudo sysctl -w dev.wifi0.diversity=0
>>         sudo sysctl -w dev.wifi0.txantenna=1
>>         sudo sysctl -w dev.wifi0.rxantenna=
>>         ************************/
>>
>>         Laptop B: Dell Inspiron
>>         Card: description: Wireless interface
>>               product: AR928X Wireless Network Adapter (PCI-Express)
>>               vendor: Atheros Communications Inc.
>>               physical id: 0
>>               bus info: pci@0000:0c:00.0 <mailto:pci@0000:0c:00.0>
>>               logical name: wifi0
>>               version: 01
>>               serial: 00:15:6d:84:35:8e
>>               width: 64 bits
>>               clock: 33MHz
>>               capabilities: bus_master cap_list logical ethernet
>>         physical wireless
>>               configuration: broadcast=yes driver=ath_pci latency=0
>>         multicast=yes wireless=IEEE 802.11g
>>               resources: irq:19 memory:dfcf0000-dfcfffff
>>
>>         Here is the script I used to create a STA
>>         /*************
>>         #!/bin/sh
>>
>>         sudo modprobe -r ath5k || true
>>         sudo modprobe -r ath9k || true
>>         sudo modprobe -r ath_pci || true
>>
>>         sudo modprobe ath_pci autocreate=none
>>         sudo wlanconfig ath1 destroy || true
>>         sudo wlanconfig ath1 create wlandev wifi0 wlanmode sta
>>         sudo iwpriv ath1 mode 3     # 11g
>>         sudo iwconfig ath1 essid "Aditya"
>>         sleep 1
>>
>>         sudo sysctl -w dev.wifi0.diversity=0
>>         sudo sysctl -w dev.wifi0.txantenna=1
>>         sudo sysctl -w dev.wifi0.rxantenna=1
>>
>>         ***********************/
>>
>>         In NetworkManager, I configured so that address is obtained
>>         through DHCP
>>         whenever the STA connects to AP "Aditya"
>>         Here is my dhcpd.conf file
>>         /***************
>>         option domain-name-servers 192.168.1.1;
>>
>>         default-lease-time 86400;
>>         max-lease-time 604800;
>>
>>         authoritative;
>>
>>         # basic setup by ADITYA BHAVE
>>         subnet 192.168.1.0 netmask 255.255.255.0 {
>>             range 192.168.1.10 192.168.1.20;
>>             option subnet-mask 255.255.255.0;
>>             option broadcast-address 192.168.1.255;
>>             option routers 192.168.1.1;
>>         }
>>         /*****************************/
>>
>>         Firstly, the STA is unable to obtain an address through DHCP.
>>         I then manually gave the STA an address of 192.168.1.10, with
>>         a netmask
>>         of 255.255.255.0 and a gateway of 192.168.1.1. I even ran the
>>         following
>>         command
>>         route add default gw 192.168.1.1
>>
>>         Inspite of both the above changes, a ping command fails
>>         ayb@AD-DELL:~$ ping -I ath1 192.168.1.1
>>         PING 192.168.1.1 (192.168.1.1) from 192.168.1.2 ath1: 56(84)
>>         bytes of data.
>>          From 192.168.1.2 icmp_seq=1 Destination Host Unreachable
>>          From 192.168.1.2 icmp_seq=3 Destination Host Unreachable
>>          From 192.168.1.2 icmp_seq=4 Destination Host Unreachable
>>          From 192.168.1.2 icmp_seq=5 Destination Host Unreachable
>>          From 192.168.1.2 icmp_seq=6 Destination Host Unreachable
>>
>>         Can someone please help to diagnose this problem?
>>
>>         Thanks
>>         regards,
>>         Aditya Bhave
>>
>>
>>
>>         ------------------------------------------------------------------------------
>>
>>         _______________________________________________
>>         Madwifi-devel mailing list
>>         [email protected]
>>         <mailto:[email protected]>
>>         https://lists.sourceforge.net/lists/listinfo/madwifi-devel
>>
>>
>>
>>
>>     -- 
>>     Peace is its own reward
>
>
>
>
> -- 
> Peace is its own reward
>
>
> ------------------------------------------------------------------------------
>
>    
>
>
> _______________________________________________
> Madwifi-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/madwifi-users
>

------------------------------------------------------------------------------

_______________________________________________
Madwifi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/madwifi-devel