Mike Diehl
2009-Dec-30 06:06 UTC
[asterisk-users] Auto-provisioining Polycom 430 wth dd-wrt router
Hi all, I'm trying to use a wrt54gl router running dd-wrt as a provisioning server for a remote installation. I've got dhcp working and I have provisioning files ready to go. I understand that I need to set bootp option 66 to point to the tftp/ftp/http server. In fact, I have this working completely with the ISC dhcp server The problem is that I don't know how to get dd-wrt's dhcp server to send the right string to the phone. With ISC dhcpd, I used: option boot-server "ftp://user:passwd at 10.0.1.1"; option tftp-server-name "ftp://user:passwd at 10.0.1.1"; But what is the equivelent configuration for dnsmasq? If I can't get this working, I'll have to resort to hard-coding the information into each of 12 phones.... Yuck! -- Take care and have fun, Mike Diehl.
Holger von Ameln
2009-Dec-30 08:51 UTC
[asterisk-users] Auto-provisioining Polycom 430 wth dd-wrt router
From the dnsmasq Manpage: -O, --dhcp-option=[<network-id>,[<network-id>,]][encap:<opt>,][vendor:[<vendor-class>],][<opt>|option:<opt-name>],[<value>[,<value>]] Specify different or extra options to DHCP clients. By default, dnsmasq sends some standard options to DHCP clients, the netmask and broadcast address are set to the same as the host running dnsmasq, and the DNS server and default route are set to the address of the machine running dnsmasq. If the domain name option has been set, that is sent. This configuration allows these defaults to be overridden, or other options specified. The option, to be sent may be given as a decimal number or as "option:<option-name>" The option numbers are specified in RFC2132 and subsequent RFCs. The set of option-names known by dnsmasq can be discovered by running "dnsmasq --help dhcp". For example, to set the default route option to 192.168.4.4, do --dhcp-option=3,192.168.4.4 or --dhcp-option = option:router, 192.168.4.4 and to set the time-server address to 192.168.0.4, do --dhcp-option = 42,192.168.0.4 or --dhcp-option = option:ntp-server, 192.168.0.4 The special address 0.0.0.0 is taken to mean "the address of the machine running dnsmasq". Data types allowed are comma separated dotted-quad IP addresses, a decimal number, colon-separated hex digits and a text string. If the optional network-ids are given then this option is only sent when all the network-ids are matched. ..... So --dhcp-option=66,"ftp://user:passwd at 10.0.1.1" should do the trick... -- Holger von Ameln Peercom Ltd. & Co. KG http://www.peercom.net/peercomshop/ ---------------------------------------- holger.von.ameln at peercom.net Tel.: +49 (0) 511-84887106 ---------------------------------------- GF: Kati von Ameln Wei?e Hube 2a D-30519 Hannover ---------------------------------------- USt.-IdNr.: DE262241650 ---------------------------------------- Absenderkennzeichnung gem. ?37a HGB, ?80 Abs.1 S.1 AktienG sowie ?35a Abs.1 S.1 GmbHG: Peercom Ltd. & Co. KG, eingetragen im Handelsregister Hannover unter HRA 201164 Gesch?ftsf?hrung Kati von Ameln, Sitz der Gesellschaft ist Hannover. Am 30.12.2009 um 07:06 schrieb Mike Diehl:> dnsmasq-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091230/5e840135/attachment-0001.htm
Tzafrir Cohen
2009-Dec-30 09:48 UTC
[asterisk-users] Auto-provisioining Polycom 430 wth dd-wrt router
On Tue, Dec 29, 2009 at 11:06:40PM -0700, Mike Diehl wrote:> Hi all, > > I'm trying to use a wrt54gl router running dd-wrt as a provisioning server for > a remote installation. > > I've got dhcp working and I have provisioning files ready to go. I understand > that I need to set bootp option 66 to point to the tftp/ftp/http server. In > fact, I have this working completely with the ISC dhcp server > > The problem is that I don't know how to get dd-wrt's dhcp server to send the > right string to the phone. > > With ISC dhcpd, I used: > > option boot-server "ftp://user:passwd at 10.0.1.1"; > option tftp-server-name "ftp://user:passwd at 10.0.1.1"; > > But what is the equivelent configuration for dnsmasq?For starters, you should probably define this only to a subset of the phones. Look into defining classes, "nets", in the terminology of dnsmasq. Those are basically just arbitrary groups of clients (e.g.: all the SNOM phones). The 'net'[work] name parameter is an optional parameter in many places. For now I'll just ignore it. What version of dnsmasq do you use? The man page for dnsmasq here claims: -O, --dhcp-option=[<network-id>,[<network-id>,]][vendor:[<vendor- class>],][<opt>|option:<opt-name>],[<value>[,<value>]] ... The option numbers are specified in RFC2132 and subsequent RFCs. The set of option-names known by dnsmasq can be discovered by running "dnsmasq --help dhcp". IIRC at least in some phones the protocol 'ftp' is not taken from DHCP. Rather, it is defined in the phone. I also wonder how wise is it to broadcast an authentication token in a protocol such as DHCP. And last but not least, as part of recent race for feature bloat, latest versions of dnsmasq also double for a tftpd. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir