OpenWrt Forum Archive

Topic: dhcp on alias interface

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,

I'm trying to setup dhcp to run on an alias interface which according to the docs should work just fine. However i can't seem to get it to work, it never hands out an IP if i use the alias interface, but if i use the main lan interface it works right away.

I know i can use the dnsmasq.conf as a backup which i know works from my older whiterussian version, but i was hoping to use the new luci config format as it's easier on the eyes and for less technical people to edit.

I've tried many different way to configure this, but below is what i have currently

/etc/conf/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.guest'
        #list server            '/mycompany.local/1.2.3.4'
        #option nonwildcard     0
        #list interface         br-lan

config dhcp lan
        option interface        guest
        option start    2
        option limit    200
        option leasetime        60m

config dhcp wan
        option interface        wan
        option ignore   1

/etc/config/network

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 'type'           'bridge'
        option 'ifname'         'eth0'
        option 'proto'          'static'
        option 'ipaddr'         '192.168.0.1'
        option 'netmask'        '255.255.255.0'

config 'alias' 'guest'
        option 'interface'      'lan'
        option 'proto'          'static'
        option 'ipaddr'         '192.168.182.1'
        option 'netmask'      '255.255.254.0'

config 'interface' 'wan'
        option 'ifname'         'eth2'
        option 'proto'          'dhcp'

Thanks for any help anyone can give.

Isn't this something fairly easy and common place? I'm sure its something simple but no mater what method i try i can't get it to work w/ the luci configuration.

Does anyone know?

finally guessed the right configuration...

config 'dhcp'
   option 'interface' 'guest'
   option 'start' '2'
   option 'limit' '200'
   option 'leasetime' '60M'

So basically you need to setup dhcp w/ out a name like the default config seemed to have w/ lan and wan

(Last edited by 0xception on 23 Jul 2009, 05:10)

The discussion might have continued from here.