I had I similar problem as this.
Then I learned how to use iwconfig properly.
If you learn that then you won't need airmon-ng
Basically, for aireplay-ng to work it must be on the right channel and in monitor mode (airmon-ng is supposed to do this for you)
Unfortunately for me airmon-ng didn't work properly)
So instead i have to do this. (note that it doesn't require creating a new device)
(run as root)
Code:
ifconfig $IFACE down
iwconfig $IFACE mode managed
ifconfig $IFACE up
iwconfig $IFACE channel $@
ifconfig $IFACE down
iwconfig $IFACE mode monitor
ifconfig $IFACE up
where $IFACE would be your inferface (wlan0)
and $@ is the channel number.
run ifconfig wlan0 to check that the channel has been changed correctly
Output should look like this:
Code:
$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11abg Mode:Monitor Frequency:2.412 GHz Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Note how it is in both monitor mode and the frequency is set.
I will include the commands above as a script (since this is how i use it)
The script has in it a list of the frequencies and channels.
If you try to change the channel while in monitor mode then it will not work (not sure why)
You need to change it to managed mode first. Often it will already be in managed mode but that doesn't matter.
Also note that you cannot change the device mode when it is up (hence the ifconfig wlan0 down)
And you cannot change the channel when it is down.
Here is my script:
Code:
#!/bin/bash
# this script is to change the channel of the wireless card to the one specified, then puts it in monitor mode.
# make sure you uncheck enable wireless in nm-applet before continuing (this script will have no effect otherwise)
# note that if you are using airmon-ng you may want to manually remove all of the monitor devices it has created. (you don't need them)
# to do this run "airmon-ng stop mon0" and if you had more then run "airmon-ng stop mon1" etc.
# this script has undefined consequences if the commands fail (no error checking)
# it would be good idea to run each of the commands listed here separately to make sure they all work before making use of this script
# note that this is just sequence of commands which I would normally run manually on my system, they may not work on yours.
# also you need to run the script as root
#change this to the interface you wish to change
IFACE="wlan0"
ifconfig $IFACE down
iwconfig $IFACE mode managed
ifconfig $IFACE up
iwconfig $IFACE channel $@
ifconfig $IFACE down
iwconfig $IFACE mode monitor
ifconfig $IFACE up
# this will be displayed on you terminal:
iwconfig $IFACE
# if the frequency hasn't changed then the script didn't work
#here is a list of channels and frequencies so that you know if your channel is set right:
#1 2.412
#2 2.417
#3 2.422
#4 2.427
#5 2.432
#6 2.437
#7 2.442
#8 2.447
#9 2.452
#10 2.457
#11 2.462
# frequencies are in GHz
# there are 13 channels in Europe apparently, I assume that they would be:
#12 2.467
#13 2.472
# but I am reading this off an American table, so i'm not sure
# here it is:
# http://www.cisco.com/en/US/docs/wireless/technology/channel/deployment/guide/Channel.html#wp134132
Hope that all made sense to somebody.