OpenWrt Forum Archive

Topic: dnsmasq and loopback

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

Hi.
I can't seem to configure the dnsmasq right. My log gets filled with
Jan  1 16:58:38 (none) kern.info dnsmasq[647]: reading /etc/resolv.conf
Jan  1 16:58:38 (none) kern.info dnsmasq[647]: using nameserver 217.13.4.24#53
Jan  1 16:58:38 (none) kern.info dnsmasq[647]: using nameserver 217.13.7.140#53
Jan  1 16:58:38 (none) kern.info dnsmasq[647]: using local addresses only for domain lan
Jan  1 16:58:38 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  1 16:59:00 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  1 16:59:11 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  1 16:59:17 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  1 16:59:20 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  1 16:59:21 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo


All the time, and MSN keeps disconnecting.
How can I configure the DHCP req for loopback? (yes I have googled it, but are unable to make sense of what I find)
Pliz help

I found that even when I had specific DHCP host lines in /etc/ethers or /etc/hosts  it also required them to be in a servable range... can you include the output of a 'grep dhcp /etc/dnsmasq.conf' here?

thank you for replying


root@OpenWrt:~# grep dhcp /etc/dnsmasq.conf
# allow /etc/hosts and dhcp lookups via *.lan
dhcp-leasefile=/tmp/dhcp.leases
# use /etc/ethers for static hosts; same format as --dhcp-host

'k.

Do you have the hosts IP addresses and mac addresses you want assigned in /etc/ethers and /etc/hosts or are you just looking for a random address on your local network to be assigned?

In my experience, DNSmasq requires a dhcp-range that includes the addresses you have in /etc/hosts before it will give them out; mine includes the following line:

dhcp-range=192.168.1.69,192.168.1.71,78h

and then in /etc/hosts has:
192.168.1.69 mischievous mischievous.skylark.org.uk
192.168.1.70 flighty flighty.skylark.org.uk
192.168.1.71 flighty-lan flighty-lan.skylark.org.uk

and in /etc/ethers
00:60:08:55:21:39 mischievous.skylark.org.uk
00:14:51:ed:09:a3 flighty.skylark.org.uk
00:16:cb:87:03:9c flighty-lan.skylark.org.uk


For reference, I include the entire file here, but if you tell me exactly what you're trying to achieve I'll be glad to offer some more help.

# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.

# The following two options make you a better netizen, since they
# tell dnsmasq to filter out queries which the public DNS cannot
# answer, and which load the servers (especially the root servers)
# uneccessarily. If you have a dial-on-demand link they also stop
# these requests from bringing up the link uneccessarily.

# Never forward plain names (without a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
bogus-priv


# Uncomment this to filter useless windows-originated DNS requests
# which can trigger dial-on-demand links needlessly.
# Note that (amongst other things) this blocks all SRV requests,
# so don't use it if you use eg Kerberos.
# This option only affects forwarding, SRV records originating for
# dnsmasq (via srv-host= lines) are not suppressed by it.
filterwin2k

# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
#resolv-file=

# By  default,  dnsmasq  will  send queries to any of the upstream
# servers it knows about and tries to favour servers to are  known
# to  be  up.  Uncommenting this forces dnsmasq to try each query
# with  each  server  strictly  in  the  order  they   appear   in
# /etc/resolv.conf
#strict-order

# If you don't want dnsmasq to read /etc/resolv.conf or any other
# file, getting its servers from this file instead (see below), then
# uncomment this
no-resolv

# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv
# files for changes and re-read them then uncomment this.
no-poll

# Add other name servers here, with domain specs if they are for
# non-public domains.
#server=/localnet/192.168.0.1
server=212.23.6.100
server=212.23.3.100

# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
local=/skylark.org.uk/

# Add domains which you want to force to an IP address here.
# The example below send any host in doubleclick.net to a local
# webserver.
address=/doubleclick.net/127.0.0.1
address=/intellitxt.com/127.0.0.1
address=/hitbox.com/127.0.0.1
address=/overture.com/127.0.0.1
address=/sitemeter.com/127.0.0.1
address=/advertising.com/127.0.0.1
address=/apmebf.com/127.0.0.1
address=/atdmt.com/127.0.0.1
address=/statcounter.com/127.0.0.1

# If you want dnsmasq to change uid and gid to something other
# than the default, edit the following lines.
#user=
#group=

# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more than one interface.
interface=br0
# Or you can specify which interface _not_ to listen on
#except-interface=
# Or which to listen on by address (remember to include 127.0.0.1 if
# you use this.)
#listen-address=
# If you want dnsmasq to provide only DNS service on an interface,
# configure it as shown above, and then use the following line to
# disable DHCP on it.
#no-dhcp-interface=

# On systems which support it, dnsmasq binds the wildcard address,
# even when it is listening on only some interfaces. It then discards
# requests that it shouldn't reply to. This has the advantage of
# working even when interfaces come and go and change address. If you
# want dnsmasq to really bind only the interfaces it is listening on,
# uncomment this option. About the only time you may need this is when
# running another nameserver on the same machine.
#bind-interfaces

# If you don't want dnsmasq to read /etc/hosts, uncomment the
# following line.
#no-hosts
# or if you want it to read another file, as well as /etc/hosts, use
# this.
#addn-hosts=/etc/banner_add_hosts

# Set this (and domain: see below) if you want to have a domain
# automatically added to simple names in a hosts-file.
expand-hosts

# Set the domain for dnsmasq. this is optional, but if it is set, it
# does the following things.
# 1) Allows DHCP hosts to have fully qualified domain names, as long
#     as the domain part matches this setting.
# 2) Sets the "domain" DHCP option thereby potentially setting the
#    domain of all systems configured by DHCP
# 3) Provides the domain part for "expand-hosts"
domain=skylark.org.uk

# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.
dhcp-range=192.168.1.41,192.168.1.45,12h
dhcp-range=192.168.1.69,192.168.1.71,78h
dhcp-range=192.168.1.20,192.168.1.23,78h

# This is an example of a DHCP range where the netmask is given. This
# is needed for networks we reach the dnsmasq DHCP server via a relay
# agent. If you don't know what a DHCP relay agent is, you probably
# don't need to worry about this.
#dhcp-range=192.168.1.41,192.168.1.45,255.255.255.0,12h

# This is an example of a DHCP range with a network-id, so that
# some DHCP options may be set only for this network.
#dhcp-range=red,192.168.0.50,192.168.0.150

# Supply parameters for specified hosts using DHCP. There are lots
# of valid alternatives, so we will give examples of each. Note that
# IP addresses DO NOT have to be in the range given above, they just
# need to be on the same network. The order of the parameters in these
# do not matter, it's permissble to give name,adddress and MAC in any order

# Always allocate the host with ethernet address 11:22:33:44:55:66
# The IP address 192.168.0.60
#dhcp-host=11:22:33:44:55:66,192.168.0.60

# Always set the name of the host with hardware address
# 11:22:33:44:55:66 to be "fred"
#dhcp-host=11:22:33:44:55:66,fred

# Always give the host with ethernet address 11:22:33:44:55:66
# the name fred and IP address 192.168.0.60 and lease time 45 minutes
#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m

# Give the machine which says it's name is "bert" IP address
# 192.168.0.70 and an infinite lease
#dhcp-host=bert,192.168.0.70,infinite

# Always give the host with client identifier 01:02:02:04
# the IP address 192.168.0.60
#dhcp-host=id:01:02:02:04,192.168.0.60

# Always give the host with client identifier "marjorie"
# the IP address 192.168.0.60
#dhcp-host=id:marjorie,192.168.0.60

# Enable the address given for "judge" in /etc/hosts
# to be given to a machine presenting the name "judge" when
# it asks for a DHCP lease.
#dhcp-host=judge

# Never offer DHCP service to a machine whose ethernet
# address is 11:22:33:44:55:66
#dhcp-host=11:22:33:44:55:66,ignore

# Ignore any client-id presented by the machine with ethernet
# address 11:22:33:44:55:66. This is useful to prevent a machine
# being treated differently when running under different OS's or
# between PXE boot and OS boot.
#dhcp-host=11:22:33:44:55:66,id:*

# Send extra options which are tagged as "red" to
# the machine with ethernet address 11:22:33:44:55:66
#dhcp-host=11:22:33:44:55:66,net:red

# Send extra options which are tagged as "red" to
# any machine with ethernet address starting 11:22:33:
#dhcp-host=11:22:33:*:*:*,net:red

# Send extra options which are tagged as "red" to any machine whose
# DHCP vendorclass string includes the substring "Linux"
#dhcp-vendorclass=red,Linux

# Send extra options which are tagged as "red" to any machine one
# of whose DHCP userclass strings includes the substring "accounts"
#dhcp-userclass=red,accounts

# Send extra options which are tagged as "red" to any machine whose
# MAC address matches the pattern.
#dhcp-mac=red,00:60:8C:*:*:*

# If this line is uncommented, dnsmasq will read /etc/ethers and act
# on the ethernet-address/IP pairs found there just as if they had
# been given as --dhcp-host options. Useful if you keep
# MAC-address/host mappings there for other purposes.
read-ethers

# Send options to hosts which ask for a DHCP lease.
# See RFC 2132 for details of available options.
# Note that all the common settings, such as netmask and
# broadcast address, DNS server and default route, are given
# sane defaults by dnsmasq. You very likely will not need any
# any dhcp-options. If you use Windows clients and Samba, there
# are some options which are recommended, they are detailed at the
# end of this section.
# For reference, the common options are:
# subnet mask - 1
# default router - 3
# DNS server - 6
# broadcast address - 28

dhcp-option=6,192.168.1.100

# Override the default route supplied by dnsmasq, which assumes the
# router is the same machine as the one running dnsmasq.
#dhcp-option=3,1.2.3.4

# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5
#dhcp-option=42,192.168.0.4,10.10.0.5

# Set the NTP time server address to be the same machine as
# is running dnsmasq
#dhcp-option=42,0.0.0.0

# Set the NIS domain name to "welly"
#dhcp-option=40,welly

# Set the default time-to-live to 50
#dhcp-option=23,50

# Set the "all subnets are local" flag
#dhcp-option=27,1

# Send the etherboot magic flag and then etherboot options (a string).
#dhcp-option=128,e4:45:74:68:00:00
#dhcp-option=129,NIC=eepro100

# Specify an option which will only be sent to the "red" network
# (see dhcp-range for the declaration of the "red" network)
#dhcp-option=red,42,192.168.1.1

# The following DHCP options set up dnsmasq in the same way as is specified
# for the ISC dhcpcd in
# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt
# adapted for a typical dnsmasq installation where the host running
# dnsmasq is also the host running samba.
# you may want to uncomment them if you use Windows clients and Samba.
#dhcp-option=19,0           # option ip-forwarding off
#dhcp-option=44,0.0.0.0     # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
#dhcp-option=45,0.0.0.0     # netbios datagram distribution server
#dhcp-option=46,8           # netbios node type
#dhcp-option=47             # empty netbios scope.

# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client
# probably doesn't support this......
dhcp-option=119,skylark.org.uk

# Send RFC-3442 classless static routes (note the netmask encoding)
#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8

# Send encapsulated vendor-class specific options. The vendor-class
# is sent as DHCP option 60, and all the options marked with the
# vendor class are send encapsulated in DHCP option 43. The meaning of
# the options is defined by the vendor-class. This example sets the
# mtftp address to 0.0.0.0 for PXEClients
#dhcp-option=vendor:PXEClient,1,0.0.0.0

# Set the boot filename and tftpd server name and address
# for BOOTP. You will only need this is you want to
# boot machines over the network.
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3

# Set the limit on DHCP leases, the default is 150
#dhcp-lease-max=150

# The DHCP server needs somewhere on disk to keep its lease database.
# This defaults to a sane location, but if you want to change it, use
# the line below.
dhcp-leasefile=/tmp/dnsmasq.leases

# Set the DHCP server to authoritative mode. In this mode it will barge in
# and take over the lease for any client which broadcasts on the network,
# whether it has a record of the lease or not. This avoids long timeouts
# when a machine wakes up on a new network. DO NOT enable this if there's
# the slighest chance that you might end up accidentally configuring a DHCP
# server for your campus/company accidentally. The ISC server uses the same
# the same option, and this URL provides more information:
# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php
dhcp-authoritative

# Run an executable when a DHCP lease is created or destroyed.
# The arguments sent to the script are "add" or "del",
# then the MAC address, the IP address and finally the hostname
# if there is one.
#dhcp-script=/bin/echo

# Set the cachesize here.
#cache-size=150

# If you want to disable negative caching, uncomment this.
#no-negcache

# Normally responses which come form /etc/hosts and the DHCP lease
# file have Time-To-Live set as zero, which conventionally means
# do not cache further. If you are happy to trade lower load on the
# server for potentially stale date, you can set a time-to-live (in
# seconds) here.
#local-ttl=

# If you want dnsmasq to detect attempts by Verisign to send queries
# to unregistered .com and .net hosts to its sitefinder service and
# have dnsmasq instead return the correct NXDOMAIN response, uncomment
# this line. You can add similar lines to do the same for other
# registries which have implemented wildcard A records.
bogus-nxdomain=64.94.110.11

# If you want to fix up DNS results from upstream servers, use the
# alias option. This only works for IPv4.
# This alias makes a result of 1.2.3.4 appear as 5.6.7.8
#alias=1.2.3.4,5.6.7.8
# and this maps 1.2.3.x to 5.6.7.x
#alias=1.2.3.0,5.6.7.0,255.255.255.0


# Change these lines if you want dnsmasq to serve MX records.

# Return an MX record named "maildomain.com" with target
# servermachine.com and preference 50
#mx-host=maildomain.com,servermachine.com,50

# Set the default target for MX records created using the localmx option.
#mx-target=servermachine.com

# Return an MX record pointing to the mx-target for all local
# machines.
#localmx

# Return an MX record pointing to itself for all local machines.
#selfmx

# Change the following lines if you want dnsmasq to serve SRV
# records.  These are useful if you want to serve ldap requests for
# Active Directory and other windows-originated DNS requests.
# See RFC 2782.
# You may add multiple srv-host lines.
# The fields are <name>,<target>,<port>,<priority>,<weight>
# If the domain part if missing from the name (so that is just has the
# service and protocol sections) then the domain given by the domain=
# config option is used. (Note that expand-hosts does not need to be
# set for this to work.)

# A SRV record sending LDAP for the example.com domain to
# ldapserver.example.com port 289
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389

# A SRV record sending LDAP for the example.com domain to
# ldapserver.example.com port 289 (using domain=)
#domain=example.com
#srv-host=_ldap._tcp,ldapserver.example.com,389

# Two SRV records for LDAP, each with different priorities
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2

# A SRV record indicating that there is no LDAP server for the domain
# example.com
#srv-host=_ldap._tcp.example.com


# Change the following lines to enable dnsmasq to serve TXT records.
# These are used for things like SPF and zeroconf. (Note that the
# domain-name expansion done for SRV records _does_not
# occur for TXT records.)

#Example SPF.
#txt-record=example.com,v=spf1 a -all

#Example zeroconf
#txt-record=_http._tcp.example.com,name=value,paper=A4


# For debugging purposes, log each DNS query as it passes through
# dnsmasq.
#log-queries

# Include a another lot of configuration options.
#conf-file=/etc/dnsmasq.more.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

I have a ADSL netopia cayman 3351 as a bridge.
then I have my Asus/openwrt.
Openwrt recieves a dchp lease of 120sec from my service provider.
Openwrt is stabel, so that I can dl large files with it (wget).
BUT
My ethernet connected pc and my wifi laptop suffers from connection issues.
They can't dl large files, or stay connected to MSN or any other online service for long.
I want to fix this, so I look in my log (logread) and all I find is an error conserning loopback (lo) which I have posted earlier.
This messages is logged every minute, so I belive this to be the problem.

PS: as you can tell. I'm not a very experienced *nix user

Yeah thats ok. I've got years of *nix experience but I'm new to OpenWRT so we can work it out together wink

So, if I've got it right, you're terminating your ISP on OpenWRT, but want stable DHCP leases to your LAN?

In which case, I'd recommend using NAT (OpenWRT will do this out of the box) to hide your LAN behind the routers external IP Address, and just serve any random IP over your local network. This is the default behaviour, pretty much, so we shouldnt have to do much.

I don't think the lo messages will be the cause of your local instability issues. Assuming you haven't changed the defaults, your wifi + lan will be on 'br0', a single bridge interface. Normally OpenWRT would ignore requests from the WAN side, but if its terminating on lo because of PPP or something, you'll see them.

Can you chuck me the output of the following commands?

nvram get lan_ifname
nvram get br0_ipaddr
nvram get br0_netmask
nvram get dhcp_start
nvram get dhcp_num
nvram get wan_proto
nvram get wan_ifname

Stable DHCP lease is spot on smile

root@OpenWrt:~# nvram get lan_ifname
br0
root@OpenWrt:~# nvram get br0_ipaddr
root@OpenWrt:~# nvram get br0_netmask
root@OpenWrt:~# nvram get dhcp_start
10.0.0.50
root@OpenWrt:~# nvram get dhcp_num
root@OpenWrt:~# nvram get wan_proto
dhcp
root@OpenWrt:~# nvram get wan_ifname
vlan1

Hmmm not all nvram setting are .... set

Thats normal - the default script for dnsmasq tries to avoid having a configuration file so it passes everything in on the command line. I also typod wink I meant lan_ipaddr and lan_netmask wink

Im assuming your lan_ipaddr is something like '10.0.0.1' and your lan_netmask is 255.255.255.0

In that case we should be seeing your dhcp setting up to serve 150 possible ip addresses with a 12 hour lease , so that should be pretty stable.

'ps -ef | grep dnsmasq' will tell us if thats the case.

To suppress your lo errors for the time being kill it, and relaunch it with the '-I lo' argument, which tells it not to listen to that. Lets also take a look at the output of 'logread | grep -i dhcp' and your 'dnsmasq.leases' file (probably in /tmp)

Hell, throw a copy of the full ps -ef output for good measure. Im uncertain this is a DHCP issue at all, really, if your LAN clients are falling off the network atm. I suppose a good test might be to configure one of them with a static IP address for a little bit and see if the problem goes away wink

I assume your other boot up configs are still pretty stock? Running with the default firewall setup, etc?

lan_netmask is 255.0.0.0 cause that's my service providers

root@OpenWrt:~# ps -ef | grep dnsmasq
  647 nobody      424 S   dnsmasq -C /tmp/dnsmasq.conf
27742 root        292 S   grep dnsmasq


root@OpenWrt:~# logread | grep -i dhcp
Jan  2 01:44:04 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:44:26 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:44:37 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:44:43 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:44:46 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:44:47 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:46:04 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:46:26 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:46:37 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:46:43 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:46:46 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:46:47 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:48:04 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:48:26 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:48:37 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:48:43 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:48:46 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:48:47 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:50:04 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:50:26 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:50:37 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:50:43 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:50:46 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:50:47 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:52:04 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:52:26 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:52:37 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:52:43 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:52:46 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:52:47 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:54:04 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:54:26 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:54:37 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:54:43 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:54:46 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:54:47 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:56:03 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:56:25 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:56:36 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:56:42 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:56:45 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:56:46 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:58:02 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:58:24 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:58:35 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:58:41 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:58:44 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:58:45 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 01:59:42 (none) kern.info dnsmasq[647]: DHCPINFORM(br0) 10.0.0.94 00:15:00:23:fe:30
Jan  2 01:59:42 (none) kern.info dnsmasq[647]: DHCPACK(br0) 10.0.0.94 00:15:00:23:fe:30 mrpc
Jan  2 01:59:45 (none) kern.info dnsmasq[647]: DHCPINFORM(br0) 10.0.0.94 00:15:00:23:fe:30
Jan  2 01:59:45 (none) kern.info dnsmasq[647]: DHCPACK(br0) 10.0.0.94 00:15:00:23:fe:30 mrpc
Jan  2 02:00:01 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:00:23 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:00:34 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:00:40 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:00:43 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:00:44 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:02:00 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:02:22 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:02:33 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:02:39 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:02:42 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:02:43 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:03:59 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:04:21 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:04:32 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:04:38 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:04:41 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:04:42 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:05:58 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:06:20 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:06:31 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:06:37 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:06:40 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:06:41 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:07:57 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:08:19 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:08:30 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:08:36 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:08:39 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:08:40 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:09:56 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:10:18 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:10:29 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:10:35 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:10:38 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:10:39 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:11:56 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:12:18 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:12:29 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:12:35 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:12:38 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:12:39 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:13:56 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:14:18 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:14:29 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:14:35 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:14:38 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:14:39 (none) kern.warn dnsmasq[647]: no address range available for DHCP request via lo
Jan  2 02:15:53 (none) kern.info dnsmasq[27779]: reading /tmp/dhcp.leases


root@OpenWrt:~# ps -ef
  PID  Uid     VmSize Stat Command
    1 root        368 S   init
    2 root            SW  [keventd]
    3 root            SWN [ksoftirqd_CPU0]
    4 root            SW  [kswapd]
    5 root            SW  [bdflush]
    6 root            SW  [kupdated]
    8 root            SW  [mtdblockd]
   49 root            SWN [jffs2_gcd_mtd2]
   67 root        348 S   logger -s -p 6 -t
   69 root        368 S   init
   70 root        344 S   syslogd -C 16
   72 root        304 S   klogd
  206 root            SW  [khubd]
  518 root        328 S   wifi up
  560 root        380 S   udhcpc -i vlan1 -b -p /var/run/vlan1.pid -R
  565 root        468 S   /usr/sbin/nas -P /var/run/nas.lan.pid -l br0 -H 34954 -i eth1 -A -m 4 -k Forgot -s NN -w 2 -g 36
  653 root        400 S   /usr/sbin/dropbear
  657 root        380 S   httpd -p 80 -h /www -r OpenWrt
  658 root        260 S   telnetd -l /bin/login
  664 root        344 S   crond -c /etc/crontabs
18399 root        372 R   vi /etc/ethers
26399 root        600 R   /usr/sbin/dropbear
26400 root        512 S   -ash
27779 nobody      364 S   dnsmasq -I lo
27818 root        360 R   ps -ef


Pretty stock.
But I have followed www.macsat.com tutorials on all things

trying static now

Edit: didn't work

(Last edited by drde on 9 Jul 2006, 00:55)

huh, thats interesting - also, depending on how paranoid you are, you might want to change your wifi key now... I forgot that would be on the ps list too wink

I wasnt expecting to see dnsmasq running off /tmp/dnsmasq.conf wink lets kill + relaunch as dnsmasq -C /tmp/dnsmasq.conf -I lo

then throw me the output of /tmp/dnsmasq.conf

Cheers wink

Edited the post, so pass is now gone.

root@OpenWrt:~# dnsmasq -C /tmp/dnsmasq.conf -I lo
root@OpenWrt:~# cat /tmp/dnsmasq.conf
# filterwhat  we send upstream
domain-needed
bogus-priv
filterwin2k
localise-queries

# allow /etc/hosts and dhcp lookups via *.lan
local=/lan/
domain=lan
dhcp-leasefile=/tmp/dhcp.leases

# use /etc/ethers for static hosts; same format as --dhcp-host
# []
read-ethers
dhcp-range=br0,10.0.0.50,10.0.0.99,12h

Yeah, thats pretty much the same config as the default file would have given you. I'm kinda curious as to where its come from though; are you running RC5? Either way, your default is to offer a 12 hour lease on your bridge port so you shouldnt be seeing frequent interuptions unless your ISP is bouncing your link a lot, and as you say it works fine from your router but not your lan that seems unlikely.

Whats your /etc/init.d/S50dnsmasq say?

Try a static address for now - bed time for me soon but I'll take another peek tommorow and see how you're getting on. Don't forget to throw the contents of your leases file up so we can make sure 12 hour leases are being given and to check the spammy messages from logread are gone. Might be worth leaving this script running too, then checking the output in the morning:

while true; do
ping -c 1 -q <ISP ip address> || date >>/tmp/ispdown.log
ping -c 1 -q <LAN ip address> || date >>/tmp/landown.log
sleep 1
done

and put this in /etc/hotplug.d/iface/15-logupdown
#!/bin/sh
echo $ACTION `date` >>/tmp/ifupdown.log


It'll run a little loop testing your links to ISP and LAN and see if either of them are being bounced for any reason; a quick 'up/down' is unlikely to be caught though, unless its down via ifup/down commands (i.e. not just the ppp link going away on the WAN , etc)

How do I find my ISP's ip so that I can put it in your script?
It don't use pppoe and the ISP gives me an IP through DHCP.
I'm using 3dtrace to locate the ip, it it the first one after my local one?

that'll do, yep. its more of a connectivity test, so anything after your local net would work but theres less chance of a false positive the closer it is - fewer things to go wrong that aren't yours wink

root@OpenWrt:~# cat ifupdown.log
ifdown Sat Jan 1 01:33:53 UTC 2000
root@OpenWrt:~# cat ispdown.log
Sat Jan  1 01:34:03 UTC 2000
Sat Jan  1 01:34:14 UTC 2000
Sat Jan  1 01:34:25 UTC 2000
Sat Jan  1 01:34:36 UTC 2000
Sat Jan  1 01:34:47 UTC 2000
Sat Jan  1 01:34:58 UTC 2000
Sat Jan  1 01:35:09 UTC 2000
EDIT: etc etc
Sat Jan  1 01:49:02 UTC 2000
Sat Jan  1 01:49:13 UTC 2000
Sat Jan  1 01:49:24 UTC 2000
Sat Jan  1 01:49:35 UTC 2000
Sat Jan  1 01:49:46 UTC 2000
Sat Jan  1 01:49:57 UTC 2000
Sat Jan  1 01:50:08 UTC 2000

(Last edited by drde on 9 Jul 2006, 12:27)

Where do we go from here?

The discussion might have continued from here.