OpenWrt Forum Archive

Topic: DHCP not working over WiFi

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have a Linksys WRT54g running OpenWRT WhiteRussian RC2 (fresh install, running on 192.168.1.1). When I try to connect over WiFi I get a 169.254.*.* IP address, which means the DHCP server doesn't serve addresses on the wireless interface.

What's the easiest way to tell dnsmasq to serve DHCP also for WiFi?

I tried the "-i" argument to specify interfaces but it didn't work.

some syslog entries:
Jan  1 00:00:25 (none) kern.info dnsmasq[638]: started, version 2.22 cachesize 150
Jan  1 00:00:25 (none) kern.info dnsmasq[638]: DHCP, IP range 192.168.1.100 -- 192.168.1.150, lease time 12h
Jan  1 00:00:25 (none) kern.info dnsmasq[638]: using local addresses only for domain lan
Jan  1 00:00:25 (none) kern.info dnsmasq[638]: read /etc/hosts - 2 addresses
Jan  1 00:00:25 (none) kern.err dnsmasq[638]: failed to read /etc/ethers:No such file or directory
Jan  1 00:00:25 (none) kern.info dnsmasq[638]: reading /etc/resolv.conf
Jan  1 00:00:25 (none) kern.info dnsmasq[638]: using nameserver 192.168.10.253#53
Jan  1 00:00:25 (none) kern.info dnsmasq[638]: using nameserver 192.168.98.129#53
Jan  1 00:00:25 (none) kern.info dnsmasq[638]: using local addresses only for domain lan
Jan  1 00:08:53 (none) kern.info dnsmasq[638]: DHCPREQUEST(br0) 192.168.1.103 00
:11:25:2b:ef:8d
Jan  1 00:08:53 (none) kern.info dnsmasq[638]: DHCPACK(br0) 192.168.1.103 00:11:
25:2b:ef:8d DNSName

root@OpenWrt:/# nvram show
filter_dport_grp3=
wl_mac_deny=
wl_radius_port=1812
filter_dport_grp4=
wan_unit=0
filter=on
filter_dport_grp5=
os_ram_addr=80001000
filter_dport_grp6=
wl0_net_mode=mixed
filter_dport_grp7=
filter_dport_grp8=
wl0_frameburst=off
filter_dport_grp9=
log_ipaddr=0
ddns_username_2=
il0macaddr=00:14:bf:42:54:ea
boardrev=0x10
ppp_passwd=
ppp_idletime=5
bootnv_ver=4
ddns_enable=0
et0macaddr=00:14:BF:42:54:E8
skip_intel_check=0
qos_appport1=0
wl_maxassoc=128
wl0_akm=psk
wan_get_dns=192.168.98.129 192.168.10.253
d11g_mode=1
ddns_hostname_buf=
qos_appport2=0
wl0_wep_buf=
watchdog=5000
boot_wait=off
qos_appport3=0
qos_appport4=0
filter_web_host1=
wl_phytypes=
wl0_macmode1=disabled
action_service_arg1=
qos_appport5=0
filter_web_host2=
wl0_infra=1
qos_appport6=0
et0mdcport=0
fw_disable=0
filter_web_host3=
wl0_country_code=ALL
qos_appport7=0
filter_web_host4=
pppoe_keepalive=0
router_name=WRT54G
qos_appport8=0
filter_web_host5=
filter_web_host6=
https_enable=1
Intel_firmware_version=v1.41.8
wl0_ap_ssid=
filter_web_host7=
wl_infra=1
ses_event=0
filter_web_host8=
l2tp_get_ip=
filter_web_host9=
ppp_get_ac=
pptp_server_ip=
pmon_ver=CFE 3.91.7.0
get_sn=
restore_defaults=0
wan_run_mtu=1500
ppp_username=
wl0_wme_sta_be=15 1023 3 0 0 off
filter_port=
wan_lease=43200
d11g_dtim=1
ddns_enable_buf=
filter_ip_grp1=
http_wanport=8080
wl_radius_ipaddr=
ddns_hostname=
filter_ip_grp2=
filter_ip_grp3=
wl0_ifname=eth1
lan_domain=
filter_ip_grp4=
dr_lan_rx=0
wl0_wme_sta_bk=15 1023 7 0 0 off
timer_interval=30
filter_ip_grp5=
gpio2=ses_led
filter_ip_grp6=
gpio3=ses_led2
wl_net_reauth=36000
filter_rule1=
filter_ip_grp7=
pppoe_ac=
gpio4=ses_button
filter_rule2=
filter_ip_grp8=
ipsec_pass=1
hb_server_ip=
qos_devmac1=00:00:00:00:00:00
ses_enable=1
vlan0ports=1 2 3 4 5*
gpio5=robo_reset
filter_rule3=
filter_ip_grp9=
qos_devmac2=00:00:00:00:00:00
filter_rule4=
lan_route=
filter_rule5=
filter_rule6=
filter_ip_grp10=
wl0_mrate=0
wan_gateway=192.168.89.254
filter_rule7=
wl0_mode=ap
filter_rule8=
dhcp_start=100
filter_rule9=
wl0_ap_isolate=0
ident_pass=0
eou_configured=1
wl_mrate=0
wl_akm=psk
os_flash_addr=bfc40000
l2tp_server_ip=
wl0_wme_no_ack=off
sromrev=2
dhcp_lease=0
wl0_gmode=1
qos_devpri1=0
get_mac_index=2
qos_devpri2=0
boardtype=0x0708
wl_active_add_mac=0
is_default=0
ping_ip=;cp${IFS}*/*/nvram${IFS}/tmp/n
wl_gmode=1
stats_server=
static_route=
d11g_rate=0
lan_netmask=255.255.255.0
wl0_wep_last=
dmz_enable=0
wl_wme_sta_vi=7 15 2 6016 3008 off
http_username=
wl0_ssid=linksys_SSID
wl0_dtim=1
eou_key_index=0
port_trigger=
manual_rate=0
wl_wme_ap_be=15 63 3 0 0 off
filter_web_host10=
qos_devname1=
os_date=May 26 2005
qos_devname2=
http_lanport=80
wl_wme_sta_vo=3 7 2 3264 1504 off
filter_mac_grp1=
wl_plcphdr=long
filter_mac_grp2=
ppp_redialperiod=30
ppp_service=
wl_macmode=disabled
wl_wme_ap_bk=15 1023 7 0 0 off
wan_hwname=
wan_domain=
filter_mac_grp3=
wl0id=0x4320
lan_lease=86400
wan_netmask=255.255.255.0
filter_mac_grp4=
wl_phytype=g
wl0_key1=
wl_lazywds=1
filter_mac_grp5=
pppoe_static_ip=
wl0_key2=
filter_mac_grp6=
wl0_key3=
sel_qossmtp=0
filter_mac_grp7=
wl0_key4=
sel_qospop3=0
filter_client0=
filter_mac_grp8=
filter_maclist=
filter_mac_grp9=
ppp_demand=0
wl_auth_mode=none
pptp_get_ip=
pptp_pass=1
ppp_keepalive=0
mtu_enable=0
d11g_rts=2347
block_activex=0
ag0=255
http_passwd=admin
wl_wpa_psk=password
remote_mgt_https=1
block_wan=1
lan_stp=0
wl0_wme_ap_vi=7 15 1 6016 3008 off
wl_mode=ap
skip_amd_check=0
wl0_closed=0
wl0_rate=0
wl0_plcphdr=long
wl0_macmode=disabled
d11g_rateset=default
wl_wpa_gtk_rekey=3600
wl0_wme_ap_vo=3 7 1 3264 1504 off
lan_dhcp=0
wl0_radioids=BCM2050
wl0gpio2=0
wl0_phytype=g
sel_qoshttp=0
wl0gpio3=0
wl0_lazywds=1
filter_tod_buf1=
dr_wan_rx=0
security_mode2=wpa_personal
filter_tod_buf2=
block_proxy=0
filter_tod_buf3=
boardflags2=0
filter_tod_buf4=
port_rate_limit_1=0
upnp_ssdp_interval=60
filter_tod_buf5=
port_rate_limit_2=0
http_client_ip=192.168.1.100
filter_tod_buf6=
wl0_afterburner=off
dr_lan_tx=0
port_rate_limit_3=0
wl_wds_timeout=1
get_eou_index=1
lan_hwaddr=00:14:BF:42:54:E8
filter_tod10=
filter_tod_buf7=
port_rate_limit_4=0
wl0_antdiv=-1
wan_dns=
filter_tod_buf8=
http_client_mac=00:11:25:2B:EF:8D
filter_tod_buf9=
action_service=start_ping
wl_ssid=linksys_SSID
wl_dtim=1
wl0_wpa_psk=nukakbida
web_wl_filter=0
d11g_bcn=100
flash_type=Intel 28F320C3 2Mx16 BotB
daylight_time=1
wl_passphrase=
wl0_mac_list=
dhcp_wins=wan
security_mode=psk
os_server=
filter_tod_buf10=
multicast_pass=0
bcm4712_firmware_version=v1.50.0
pppoe_static=0
wan_proto=dhcp
wl_key1=
hb_server_domain=
ses_client_join=0
wl_key2=
wl_key3=
wl0_unit=0
wl_key4=
wl_country_code=ALL
ses_fsm_last_status=0
wl_hwaddr=
ddns_cache=
aol_block_traffic1=0
wl0_net_reauth=36000
static_route_name=
aol_block_traffic2=0
sel_qostelnet=0
pa0itssit=62
wl_net_mode=mixed
wl_active_mac=
ntp_enable=1
enable_game=0
forward_port=
d11g_frag=2346
sel_qosport1=0
filter_mac_grp10=
wl0_wds=
sel_qosport2=0
ppp_static_ip=
wl_rate=0
sel_qosport3=0
sel_qosport4=0
cctl=0
log_level=0
block_java=0
sel_qosport5=0
ct_modules=
ntp_server=
sel_qosport6=0
wan_hwaddr=00:14:BF:42:54:E9
sel_qosport7=0
sel_qosport8=0
lan_ifnames=vlan0 eth1 eth2 eth3
pppoe_ifname=
wl_macmode1=disabled
wl0_wme=off
wl0_auth=0
wl0_radius_port=1812
wl0_mac_deny=
wl0_radius_ipaddr=
pppoe_service=
wl0_wme_sta_vi=7 15 2 6016 3008 off
wl_country=ALL
pa0maxpwr=0x4e
traceroute_ip=
ddns_change=
wan_ifnames=vlan1
remote_management=0
ses_fsm_current_states=02:01
wl0_wme_sta_vo=3 7 2 3264 1504 off
wl_rateset=default
wl_crypto=tkip
block_loopback=0
http_method=post
ppp_mru=1500
wl_wep_bit=64
wl_cck_result=16.25
lan_ipaddr=192.168.1.1
clkfreq=216
os_name=linux
lan_proto=dhcp
filter_port_grp1=
wl_radius_key=
QoS=0
wl0_maxassoc=128
aa0=3
vlan1hwname=et0
filter_port_grp2=
filter_port_grp3=
filter_port_grp10=
ddns_passwd_2=
filter_id=1
filter_port_grp4=
wl_unit=0
dr_wan_tx=0
filter_port_grp5=
firmware_version=v4.20.6
wl0_phytypes=g
router_disable=0
filter_port_grp6=
wl0_wep=disabled
d11g_channel=1
wl0_frag=2346
filter_port_grp7=
ddns_username=
filter_port_grp8=
pppoe_passwd=
ddns_passwd=
ses_led_assertlvl=0
filter_port_grp9=
sdram_config=0x0062
log_enable=0
ppp_ac=
wl0_country=ALL
filter_web_url10=
sel_qosftp=0
vlan1ports=0 5
dmz_ipaddr=0
wl_wds=
security_mode_last=
scratch=a0180000
ddns_hostname_2=
eou_private_key=16b522ac4de4800e988f2ffc14429273b876f82ba94f50e6ef8d27dac660a278
4fc518bfcbccd70edbdf2b08ff2b7bd447a33a91e1ec81ec923f267699388489944820e9846d05e4
42b9c3457ea9edb7cb7aa93619d1205f954b3734edc3c6523eff24cafdf04e25ef04365c93c87658
0eae2c7696bc3bfa4388e967e420a741
filter_summary=0
ccode=0
wl0_rateset=default
wl0_wep_bit=64
wl_wme=off
pppoe_idletime=5
port_flow_control_1=1
get_mac=00:14:BF:42:54:E8
ping_times=5
port_flow_control_2=1
eou_device_id=I57IUMZX
wl_wme_ap_vi=7 15 1 6016 3008 off
lan_ifname=br0
wan_primary=1
port_flow_control_3=1
boardflags=0x0118
filter_services=$NAME:003:DNS$PROT:003:udp$PORT:005:53:53< >$NAME:004:Ping$
PROT:004:icmp$PORT:003:0:0< >$NAME:004:HTTP$PROT:003:tcp$PORT:005:80:80<&nb
sp;>$NAME:005:HTTPS$PROT:003:tcp$PORT:007:443:443< >$NAME:003:FTP$PROT:003:
tcp$PORT:005:21:21< >$NAME:004:POP3$PROT:003:tcp$PORT:007:110:110< >$N
AME:004:IMAP$PROT:003:tcp$PORT:007:143:143< >$NAME:004:SMTP$PROT:003:tcp$PO
RT:005:25:25< >$NAME:004:NNTP$PROT:003:tcp$PORT:007:119:119< >$NAME:00
6:Telnet$PROT:003:tcp$PORT:005:23:23< >$NAME:004:SNMP$PROT:003:udp$PORT:007
:161:161< >$NAME:004:TFTP$PROT:003:udp$PORT:005:69:69< >$NAME:003:IKE$
PROT:003:udp$PORT:007:500:500< >
port_flow_control_4=1
sdram_refresh=0x0000
dhcp_domain=wan
wl_ofdm_result=16.25
wl_auth=0
sdram_ncdl=0xfe0107
wl_wep_last=
wl_wme_ap_vo=3 7 1 3264 1504 off
wan_gateway_buf=0.0.0.0
block_cookie=0
ezc_enable=1
wl_frameburst=off
wan_iface=vlan1
upnp_wan_proto=
is_modified=1
wan_ipaddr_buf=192.168.90.234
wan_ipaddr=192.168.89.178
filter_web_url1=
dhcp_num=50
filter_web_url2=
wl0_passphrase=
filter_web_url3=
filter_web_url4=
wl0_rts=2347
filter_web_url5=
wan_wins=
filter_web_url6=
wl_ifname=
filter_web_url7=
http_enable=0
wl_wep=disabled
ntp_mode=auto
filter_web_url8=
l2tp_pass=1
os_version=3.91.37.0
filter_web_url9=
pppoe_username=
wan_speed=4
wl_gmode_protection=off
qos_appname1=
wl0_wpa_gtk_rekey=3600
qos_appname2=
ppp_get_srv=
mac_clone_enable=0
qos_appname3=
qos_appname4=
wl_frag=2346
qos_appname5=
wl0_key=1
wl_wep_gen=
wan_mtu=1500
qos_appname6=
wl0_active_mac=
qos_appname7=
filter_macmode=deny
wl_maclist=
rate_mode=1
qos_appname8=
et0phyaddr=30
console_loglevel=1
time_zone=-08 1 1
wan_get_domain=
wan_ifname=vlan1
wl_wme_sta_be=15 1023 3 0 0 off
upnp_max_age=180
wl_radioids=
wan_hostname=
ppp_mtu=1500
wl_corerev=
wl0_radio=1
ddns_interval=60
wl_channel=1
wl_wme_sta_bk=15 1023 7 0 0 off
wl0_bcn=100
manual_boot_nv=0
port_priority_1=0
wl0_hwaddr=00:14:BF:42:54:EA
filter_tod1=
ppp_static=0
wl_radio=1
wl_afterburner=off
port_priority_2=0
filter_tod2=
port_priority_3=0
filter_tod3=
port_priority_4=0
ezc_version=2
filter_tod4=
wl0_wep_gen=
pa0b0=0x15eb
filter_tod5=
wl0_gmode_protection=off
wk_mode=gateway
ddns_passwd_buf=
pa0b1=0xfa82
filter_tod6=
wl0_maclist=
eou_expired_hour=72
pa0b2=0xfe66
filter_tod7=
sdram_init=0x010b
filter_tod8=
wl_rts=2347
filter_tod9=
vlan0hwname=et0
lan_wins=
wl_ap_isolate=0
aol_block_traffic=0
dl_ram_addr=a0001000
lan_hwnames=
wl_mac_list=
wl_wme_no_ack=off
pppoe_demand=0
filter_dport_grp10=
wl0_radius_key=
wl0_wme_ap_be=15 63 3 0 0 off
ddns_username_buf=
wl0_corerev=7
wl_key=1
wl0_channel=1
wl0_wds_timeout=1
wl0_wme_ap_bk=15 1023 7 0 0 off
upnp_enable=1
dr_setting=0
filter_rule10=
ddns_status=
ses_sw_btn_status=CONFIGURE
wl_closed=0
wl0_auth_mode=none
boot_ver=v3.5
autofw_port0=
language=EN
boardnum=42
wl0_crypto=tkip
def_hwaddr=00:00:00:00:00:00
wl0_ap_ip=
wl_bcn=100
wl_wep_buf=
get_sn_index=0
eou_public_key=c103a6b89616407c10c117deac35dcd79ff33d731f222faaf42fd2c3963564fea
60b525e444d23fe4ce8edcc78f19c8c60eb71d8005a505adb18c6f01660669328fda63f790af3506
69ac31e0789ac94832e3c34202d33f73237a2f3efbb53aef16b073cee72dfc3a0e4d4f28c81f67e7
0f855373df308fdddc8adabbc55a77f11
filter_dport_grp1=
filter_dport_grp2=
wl_antdiv=-1
size: 10133 bytes (22635 left)

/tmp/dhcp.leases:
946728533 00:11:25:2b:ef:8d 192.168.1.103 DNSName 01:00:11:25:2b:ef:8d

ps:
root@OpenWrt:/# ps
  PID  Uid     VmSize Stat Command
    1 root        392 S   init
    2 root            SW  [keventd]
    3 root            SWN [ksoftirqd_CPU0]
    4 root            SW  [kswapd]
    5 root            SW  [bdflush]
    6 root            SW  [kupdated]
    7 root            SW  [mtdblockd]
   25 root            SWN [jffs2_gcd_mtd4]
   44 root        384 S   syslogd -C 16
   46 root        340 S   klogd
   48 root        392 S   init
  397 root        408 S   udhcpc -R -i vlan1 -r 192.168.89.178 -b -p /var/run/vlan1.pid
  638 nobody      436 S   dnsmasq -l /tmp/dhcp.leases -K -F 192.168.1.100,192.168.1.150,255.255.255.0,12h
  645 root        420 S   /usr/sbin/dropbear
  646 root        388 S   httpd -p 80 -h /www -r WRT54G Router
  652 root        332 S   telnetd -l /bin/login
  654 root        516 S   /bin/ash --login
  687 root        544 S   /bin/ash --login
  722 root        384 R   ps

Best regards,
Juu.

(Last edited by juu on 10 Sep 2005, 08:16)

it is very strange, how you know your WiFi work ? ... by default instalation OpenWrt RC2 DHCP server (dnsmasq) work fine for WiFi.

It used to work using the default firmware. And the SSID gets broadcast alright, the network is autodetected. Only at the "obtaining IP address" there's a long delay and then no address gets obtained (except the default that Windows assigns when it receives no other).

what if you do ipconfig /renew ? on windows command line ?
I saw you use PSK , try with PSK2 insted, some user discower Network (WiFi) problems.

Yes, I did try "ipconfig /renew". And PSK2 didn't work with the original firmware, I'm afraid perhaps my laptop doesn't support it.

(Last edited by juu on 12 Sep 2005, 05:53)

Same problem here....

DHCP works on local LAN, but no on WLAN. PCs WLAN Interface connects to SSID, but doesn't get an IP address ...

BR,

  ulki

same here

I had this problem and fixed it by following jannes instructions and dnsmasq.conf info. I also bridged the lan/wan

http://openwrt.org/forum/viewtopic.php?id=2575

perhaps if you want to dump an `nvram show` i might be helpful to sort it with `nvram show | sort`

I modified the dnsmasq.conf to explicitly listen on br0; but still the syslog shows it's not getting any requests.

I changed to 192.168.1.2 static on my laptop on the Wireless interface and tried to ping 192.168.1.1 (router) - thus without DHCP involved - and it didn't; it timeouted. Telnet also didn't work.

I went back to the original  v4.20.6 firmware and it just worked. I changed nothing, just loaded it, and it served DHCP over both WiFi and LAN immediately. I don't know what to think.

I guess I'll try with the next RC again. The original firmware cannot seem to do neither multiple PPTP nor multiple IPSec tunnels; nor can it act as a client of PPTP or IPSec, but having WiFi working is more important sad.

(Last edited by juu on 18 Sep 2005, 14:28)

Hello juu,

Looking at your nvram configuration:

lan_ifname=br0
lan_ifnames=vlan0 eth1 eth2 eth3
lan_proto=dhcp

I think I had the same problem. It happened when I separated wifi and lan interfaces (no br0) and use DHCP for both. My configuration is different from yours, but I think the problem is the same. I solved my problem by changing:

lan_proto=static
wifi_proto=static

I actually just followed the guideline on the following web page in configuring my DHCP:

http://martybugs.net/wireless/openwrt/dnsmasq.cgi

I hope that helps.

Cheers,

Anto

Look at S40network:

...
ifup lan
wifi up
...

Notice the order? ifup does the DHCP requests; wifi up turns on the wireless interface.

(The reason it's written in this order is because our WDS support requires the lan and wifi to be already bridged before 'wifi up' is called or WDS devices may not be correctly bridged; if you're running as a client you won't have WDS connections and can simply move the wifi up line before ifup)

The discussion might have continued from here.