Jump to content

Recommended Posts

Posted

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:192.168.1.225 Bcast:192.168.1.255 Mask:255.255.255.0

Routing table from the client:

Destination Gateway Genmask Flags Metric Ref Use Iface

192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0

default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

resolv.conf from client:

domain lan

search lan

nameserver 208.67.222.222

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,192.168.1.254'

option dhcp_option 'lan,6,208.67.222.222'

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 127.0.0.1

option netmask 255.0.0.0

config interface lan

option ifname eth0

option type bridge

option proto static

option ipaddr 192.168.1.1

option netmask 255.255.255.0

option dns '208.67.222.222 208.67.220.220'

option gateway 192.168.1.254

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

Join the conversation

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

Guest
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...