I am connecting from a Windows 7 laptop to the TP-LINK router via WiFi
or Ethernet and want to use the router's DHCP server (dnsmasq) for the
laptop's IP config. However as seen in the syslog below, the dnsmasq
appears to be offering IP 0.0.0.145 instead of 10.20.40.145? so the
laptop's NIC is not getting the required config. Can someone please tell
me what is wrong with my config (see below)?

syslog: Oct 2 09:41:20 OpenWrt kern.info kernel: [ 1228.560000] eth0:
link down Oct 2 09:41:22 OpenWrt kern.info kernel: [ 1230.560000] eth0:
link up (100Mbps/Full duplex) Oct 2 09:41:25 OpenWrt daemon.info
dnsmasq-dhcp[1231]: DHCPREQUEST(eth0) 0.0.0.145 20:6a:8a:6a:2b:88 Oct 2
09:41:25 OpenWrt daemon.info dnsmasq-dhcp[1231]: DHCPACK(eth0) 0.0.0.145
20:6a:8a:6a:2b:88 AcerAspire5560G Oct 2 09:41:27 OpenWrt daemon.info
dnsmasq-dhcp[1231]: DHCPINFORM(eth0) 0.0.0.145 20:6a:8a:6a:2b:88 Oct 2
09:41:27 OpenWrt daemon.info dnsmasq-dhcp[1231]: DHCPACK(eth0) 0.0.0.145
20:6a:8a:6a:2b:88 AcerAspire5560G Oct 2 09:41:29 OpenWrt daemon.info
dnsmasq-dhcp[1231]: DHCPRELEASE(eth0) 0.0.0.145 20:6a:8a:6a:2b:88

ifconfig:

eth0 Link encap:Ethernet HWaddr 64:66:B3:EB:78:DA inet addr:10.20.40.1
Bcast:10.20.40.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST
MTU:1500 Metric:1 RX packets:2438 errors:0 dropped:473 overruns:0
frame:0 TX packets:338 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 RX bytes:345268 (337.1 KiB) TX bytes:37550
(36.6 KiB) Interrupt:4

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP
LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:28944 errors:0 dropped:0
overruns:0 frame:0 TX packets:28944 errors:0 dropped:0 overruns:0
carrier:0 collisions:0 txqueuelen:0 RX bytes:1968192 (1.8 MiB) TX
bytes:1968192 (1.8 MiB)

wlan0 Link encap:Ethernet HWaddr 64:66:B3:EB:78:DA inet addr:10.20.30.1
Bcast:10.20.30.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST
MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX
packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0
txqueuelen:32 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

/etc/config/network:

config interface lan option ifname eth0 option proto static list ipaddr
10.20.40.1 option netmask 255.255.255.0

config interface wlan option ifname wlan0 option proto static list
ipaddr 10.20.30.1 option netmask 255.255.255.0 option broadcast
10.20.30.255 option dns 211.29.132.12

config interface wan option proto dhcp option _orig_ifname wlan0 option
_orig_bridge false

/etc/config/dhcp:

config dnsmasq option domainneeded 1 option boguspriv 1 option
filterwin2k 0 # enable for dial on demand option localise_queries 1
option rebind_protection 1 # disable if upstream must serve RFC1918
addresses option rebind_localhost 0 # enable for RBL checking and
similar services option local /lan/ option domain lan option expandhosts
1 option nonegcache 0 option authoritative 1 option readethers 1 option
leasefile /tmp/dhcp.leases option resolvfile /tmp/resolv.conf.auto

config dhcp lan option interface lan option start 100 option limit
150 option leasetime 12h option dhcpv6 hybrid option ra hybrid option
ndp hybrid

config dhcp wan option interface wan option start 200 option limit 250
option leasetime 12h option ra hybrid option ndp hybrid

config odhcpd odhcpd option maindhcp 0 option leasefile
/tmp/hosts/odhcpd option leasetrigger /usr/sbin/odhcpd-update

config dhcp wan6 option dhcpv6 hybrid option ra hybrid option ndp hybrid
option master 1

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to