OpenWrt Forum Archive

Topic: No IP for Wifi

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

Hello there. I seperated lan from wifi. first i thought that everything worked fine but then i tried to connect through wlan. i mentioned that my pc can connect to the network but it wont get an ip nor can it ping the router or any other address. i have read the other posts in this forum about that problem but they didnt help me much.

Now i come straight to my settings:

Linksys WRT54GS (lan=vlan0, wan=vlan1, wifi=eth1)

NVRAM: (i post everything that i think can be necessary)

vlan0ports=1 2 3 4 5*
wl0_mode=ap

lan_ipaddr=192.168.1.1
lan_netmask=255.255.255.0
lan_ifname=vlan0
lan_proto=static

wifi_ipaddr=192.168.2.1
wifi_netmask=255.255.255.0
wifi_ifname=eth1
wifi_proto=dhcp

wan_proto=pppoe
wan_ifname=ppp0



dnsmasq.conf:

domain-needed
bogus-priv
filterwin2k
localise-queries

except-interface=vlan1

dhcp-authoritative
dhcp-range=eth1,192.168.2.100,192.168.2.250,255.255.255.0,12h
dhcp-option=eth1,3,192.168.2.1
dhcp-option=eth1,6,192.168.2.1
dhcp-leasefile=/tmp/dhcp.leases

read-ethers


I just modified nvram and dnsmasq.conf. have i done something wrong? did i forget something?

best regards

Xel`Ra

Hi,

wifi_proto should also be static. wifi_proto=dhcp would meen that the wifi interface it self get his ip-address by an external dhcp server. But you defined the ip by hand in wifi_ipaddr, so wifi_proto=static have to use.
the other nvram variables are good.

In the standart config of openWRT dnsmasq donĀ“t use the /etc/dnsmasq.conf  file,  but will be configured by the /etc/init.d/S50dnsmasq  startup-script. So a change in dnsmasq.conf will not effect to the funktionality.
Change the S50dnsmasq, that dnsmasq will be start without any arguments.
Than you can use /etc/dnsmasq.conf to configure dnsmasq.

Note for 2 subnets you have  to define 2 dhcp-ranges.
dhcp-range=vlan0,192.168.1.100,192.168.1.250,255.255.255.0,12h
dhcp-range=eth1,192.168.2.100,192.168.2.250,255.255.255.0,12h
for more details look at this thread: http://forum.openwrt.org/viewtopic.php?id=2235

thanks for the quick reply.

but 2 questions

1. how can i change S50dnsmasq? can you post some code? i am too much a newbie

2. why do i have to define a dhcp range for lan. i dont use dhcp for lan and dont want dhcp working for lan.

regards

Xel`Ra

P.S.:

how can i write my configs in notepad and then copy them from my desktop to the router? with cp? but how to copy from network source?

(Last edited by xelra on 17 Aug 2005, 12:30)

The discussion might have continued from here.