Results 1 to 6 of 6
Hi, all,
I have two wireless cards, wlan0 and wlan1
I want to configure wlan1 with an IP address 192.168.1.254
in run-level 3 mode
I typed
Code:
ifconfig wlan1 192.168.1.254
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-04-2012 #1Just Joined!
- Join Date
- May 2012
- Posts
- 82
ifconfig ip address doesn't work
Hi, all,
I have two wireless cards, wlan0 and wlan1
I want to configure wlan1 with an IP address 192.168.1.254
in run-level 3 mode
I typed
then I typedCode:ifconfig wlan1 192.168.1.254
it shows the ip address for wlan1 is 192.168.1.254Code:ifconfig
however, after tens of seconds, there is no IPV4 addresses for wlan1. What is wrong with this?
a similiar phenomenon is if I use "ifconfig wlan0 down" to disable wlan0, and then I type, "wlan0" is not shown. However, after some time, it shows again.Code:ifconfig
- 06-05-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,700
that sounds quite odd. a couple of questions first:
1. what is your distro?
2. are wlan0 and wlan0 using the same driver? you can check with:
3. is the device wlan1 already configured for DHCP? if so, have you tried disabling that in the network configuration files (distro-dependent)?Code:ethtool -i wlan0;ethtool -i wlan1
- 06-05-2012 #3Just Joined!
- Join Date
- May 2012
- Posts
- 82
1. what is your distro?
----------------------------------------------------------------------
fedora 16
2. are wlan0 and wlan0 using the same driver? you can check with:
-----------------------------------------------------------------Code:ethtool -i wlan0;ethtool -i wlan1
wlan0 iw13945
wlan1 ath5k
3. is the device wlan1 already configured for DHCP? if so, have you tried disabling that in the network configuration files (distro-dependent)?
-----------------------------------------------------------------
yes
the problem is that I want to make the laptop into a access point.
so I use wlan1 for the AP wireless card. And I used hostapd and DHCP server on wlan1. The WLAN1 is put in master mode and as a router. Before I start the hostapd and DHCP server mode, the wlan1 is with a DHCP-allocated IP address, but after I start hostapd, the allocated ip address disappears. If I use "ifconfig" to configure wlan1 with a private ip address, this address only persists for tens of seconds and thus the AP works for tens of seconds. But sometimes, it works normally. So it is very strange.
- 06-06-2012 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,700
i wonder if using the ip tool (from the iproute2 package) to change the ip address (instead of ifconfig) would make a difference? i really have no idea, as like you say, this issue is weird. but it is worth a shot. usage, e.g.:
Code:ip addr add 192.168.1.2/24 dev wlan0
- 06-06-2012 #5
- 06-06-2012 #6Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,700
something else occurred to me. you might want to try disabling the NetworkManager and Avahi stuff, just as an experiment. you have to make sure that all your wireless settings are in the /etc/sysconfig/network-scripts/ifcfg-* scripts, though (they should be already). or you can use iwconfig to set them manually, of course.
to see if they are running:
to turn off either service found to be running:Code:systemctl status NetworkManager.service systemctl status avahi-daemon.service
and disable them:Code:systemctl stop NetworkManager.service systemctl stop avahi-daemon.service
now would be a good time to double-check your ifcfg-* scripts (make sure wireless settings are in there, maybe disable DHCP in favor of static ip, if possible, etc.).Code:systemctl disable NetworkManager.service systemctl disable avahi-daemon.service
then restart networking:
then make sure your wirless stuff started up properly using iwconfig.Code:service network restart
if that doesn't help, you can re-enable disabled services with:
and then restart them with:Code:systemctl enable <service_name>.service
or just reboot.Code:systemctl restart <service_name>.service


Reply With Quote

