DHCP 252 package not effective

I want to use OpenWRT to provide DHCP service for my local area network and specify my gateway, DNS, and proxy configuration for clients. Below is my configuration (working on the 192.168.77.0/24 network segment).

Currently, DNS and GATEWAY are working, but the PROXY configuration is not. Does anyone know why this is happening and how to correct my configuration?

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '0'
        option local '/lan/'
        option expandhosts '1'
        option cachesize '1000'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '0'
        option ednspacket_max '1232'
        option serversfile '/etc/dnsmasq.servers'
        list interface 'lan'
        list server '/spender.men/192.168.110.91'
        list notinterface 'vpn_cm'
        option logfacility 'LOCAL0'
        option domain 'spender.men'
        option authoritative '1'

config dhcp 'lan'
        option interface 'lan'
        option start '130'
        option limit '139'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_default '2'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        list dhcp_option '3,192.168.77.254'
        list dhcp_option '6,192.168.110.91'
        list dhcp_option '42,192.168.0.73'
        list dhcp_option '252,http://192.168.77.12/wpad.pac'
        list dhcp_option '44'
        option ignore '0'
        option dynamicdhcp '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

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

The gateway 192.168.77.254 is an unmanageable router; it cannot be configured—it's a very basic setup. The only solution is to disable DHCP.

192.168.77.12 is my OpenWRT router.

1 Like

I don’t see that dnsmasq supports option 252.

dnsmasq --help dhcp

Edit:
Perhaps it needs to be in quotes:

3 Likes

oh. I know why! 3ku