Jump to content

Default gateway on the mark is not what is supposed to be given out by DHCP

Recommended Posts

I have dnsmasq setup on the fon to give out IP addresses and also to set the route and default gateway. It gives out IP addresses fine:

Example from client:

wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx

inet addr: Bcast: Mask:

Routing table from the client:

Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 wlan0

default UG 0 0 0 wlan0

resolv.conf from client:

domain lan

search lan


So it is getting an ip and setting the dns just as I want but it is leaving the default gateway to the IP of the fon and not what I have it set to do.

Here is the configuration for dnsmasq setup on the fon:

root@OpenWrt:/etc/config# cat dhcp

config dnsmasq

option domainneeded 1

option boguspriv 1

option filterwin2k '0' #enable for dial on demand

option localise_queries 1

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 2h

option dhcp_option 'lan,3,'

option dhcp_option 'lan,6,'

config dhcp wan

option interface wan

option ignore 1

Here are the network settings:

root@OpenWrt:/etc/config# cat network

# Copyright © 2006 OpenWrt.org

config interface loopback

option ifname lo

option proto static

option ipaddr

option netmask

config interface lan

option ifname eth0

option type bridge

option proto static

option ipaddr

option netmask

option dns ''

option gateway

As you can see in the dhcp configuration I have it set for option dhcp_option 'lan,3,' so why is it staying as on the clients??? I am sure I am probably overlooking something simple but am brain dead at the moment.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...