OpenWrt Forum Archive

Topic: Dhcp and wifi

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

i set up my router for wpa but i don't understand why dhcp doesn't give ip to client!

root@OpenWrt:~# cat /etc/dnsmasq.conf
# filter what we send upstream
domain-needed
bogus-priv
filterwin2k
localise-queries

# allow /etc/hosts and dhcp lookups via *.lan
#local=/lan/
#domain=lan

# enable dhcp (start,end,netmask,leasetime)
dhcp-authoritative
#dhcp-range=192.168.1.100,192.168.1.250,255.255.255.0,12h
#dhcp-leasefile=/tmp/dhcp.leases

# use /etc/ethers for static hosts; same format as --dhcp-host
# <hwaddr> [<hostname>] <ipaddr>
read-ethers

# other useful options:
# default route(s): dhcp-option=3,192.168.1.1,192.168.1.2
#    dns server(s): dhcp-option=6,192.168.1.1,192.168.1.2



except-interface=vlan1

dhcp-range=vlan0,192.168.254.100,192.168.254.150,255.255.255.0,6h
dhcp-range=eth1,192.168.254.200,192.168.254.250,255.255.255.0,2h

dhcp-leasefile=/tmp/dhcp.leases

dhcp-option=vlan0,3,192.168.254.1
dhcp-option=vlan0,6,192.168.254.1
dhcp-option=eth1,3,192.168.254.1
dhcp-option=eth1,6,192.168.254.1
 /usr/sbin/nas -P /var/run/nas.lan.pid -l br0 -H 34954 -i eth1 -A -m 4 -k XXXXXXX -s OpenWrt -w 2 -g 3600

i resolved!

eth1 was down!

ifconfig eth1 up
and everything works fine!

but i don't understand why eth1 doen't go up at boot time!

does somebody know?

i resolved again!

it was because i had wifi_ifname nvram variables setted

after unset that variable everythings works fine also ifup, ifdown wifi

The discussion might have continued from here.