Reference12r1:DHCP client

From innovaphone-wiki

Jump to: navigation, search
There are other versions of this article: Reference | Reference11r1 | Reference12r1 (this version)

innovaphone devices include a DHCP client which allows the IP interface to be configured from a DHCP server.

In addition to that, telephone devices allow configuring a number of settings via special DHCP vendor options.

Here is how the DHCP client works.

Contents

Applies To

This information applies to

  • All innovaphone devices,

V11r1 and later

More Information

Problem Details

The innovaphone devices do support auto configuration via standard DHCP options.

They additionally support some innovaphone vendor specific options to effect some VoIP specific configuration.

Some of them are generic; some of them are specific to phone devices.


System Requirements

To use vendor specific DHCP options, a DHCP server that supports such options is required.

Most popular DHCP server implementations such as the Microsoft Windows DHCP service and the Linux dhcpd do so.


Configuration

For the DHCP server to support vendor specific options, the options must be made known to the server.

Consult the accompanying documentation which comes with your DHCP server implementation how to do this.

Supported Options

Name Data type Array Code Meaning How to code
H323 gatekeeper IP address Yes 200 Defines the IP address of both the primary and the alternate gatekeeper for the device. This is only required, if gatekeeper discovery is not feasible

This is an array of IP addresses. Put the primary gatekeepers IP into the first entry, the alternate gatekeepers IP into the second entry. Further entries are ignored.

H323 gatekeeper id String No 201 The gatekeeper id of the gatekeeper the device likes to register with. Usually required only if several gatekeepers are running and a particular one must be chosen during gatekeeper discovery

Type the gatekeeper id as configured in the gateway or PBX configuration into the string field.

POSIX TZ[1] String No 202 Defines both the time zone and the daylight saving time information.

Enter the correct TZ string into the string field as you would configure it in the devices configuration applet. See chapter 9.1.3 of the VoIP Gateways Version 5 manual.

This option is in fact identical to the standard DHCP option number 88 (TZ). However, various DHCP servers do not support this option, so it is provided as a redundant vendor specific option. If your DHCP server supports option 88, the vendor specific option is not needed.

Default coder String No 203 Defines the preferred coders for H.245 coder negotiation, as well as the packet size when sending RTP packets and the use of CNG and VAD.

This string option must contain the value of the “/coder” option in the phone configuration file, e.g. G729A,40,esx. After a “/” the value of the “/lcoder” option can be added to this string (since V6.00 sr1-hotfix3). G729A,60/G711A,30 for example defines G729A as the general coder and G711A as the coder to be used in networks considered local. Additional options are: e - Exclusive, s - Silence Compression, x0 - AES128/32, x1 - AES128/80, x2 - AES192/32, x3 - AES192/80, x4 - AES256/32, x5 - AES256/80, k0 - SDES-DTLS, k1 - DTLS-SDES, k2 - SDES, k3 - DTLS, k4 - no encryption, n - No DTMF Detection. If the x and k options are not set the default (SDES-DTLS and AES128/32) is used.

In addition to the preference for the general coder, the preference for the local network coder can be specified here (since V6.00 SR1-hotfix3). G729A,60/G711A,30 for example defines G729A as the general coder and G711A as the local network coder.

Since V9-hotfix2 it's possible to define a list of potentially used coders. Single entries as described above can be combined and are separated by a semicolon ';'.

This may lead to a string like:

G729A,60,x;G723-53,60,x/G722,30;G711A,30.

This kind of setting can be used as well for the general (remote) as for the local coder. The list entries will be negotiated from left to right, the first coder which fits to the phone will be used.

In case of an empty list or no match, the default remote or local coder will be used, combined with the flags set in the last entry in list (if any). Default remote coder is always G729, default local coder is the best one for the specific phone (G.722 for IP222/232/241; G.711A for older models), with no further preferences set (no SRTP, no DTMF).

Language String No 204 Defines the user interface language

This string must contain the value of the /lang option in the phone configuration file, e.g. eng

Dialing Location String No 205 Defines the various PBX access numbers (country code etc.) for the device.

This string must contain the /cc (Country Code), /ac (Area Code), /ntp (National Prefix), /itp (International Prefix), /col (Trunk Line Prefix) and /pbx (PBX Subscriber Number or comma separated MSN Numbers) parameters for dialing location configuration. Optional value is /len to set the maximum internal number length. Example: /cc 49 /ac 7031 /ntp 0 /itp 00 /col 0 /pbx 73009 /len 3. Although, to save bytes, you may omit the slashes (/).

VLAN ID Word (16bit) No 206 The 802.1q VLAN ID for traffic sent and received by the device

Enter the numerical ID into the 16bit edit field

VLAN Priority Byte (8bit) No 207 The 802.1p VLAN priority for traffic sent by the device

Enter the numerical priority into the 8bit edit field

TOS Bits String No 208 The values for the IP TOS/DSCP field in the IP header of UDP-RTP and TCP-signalling packets sent by the device (Bit 0..2 'precedence', bit 3..6 'type of service')

Enter the comma separated numerical priorities into the string field. You may prefix with 0x to specify hexadecimal numbers (or 0 to specify octal numbers). The default for RTP packets is 0xb8 (RFC 3246 - Expedited Forwarding), for signalling packets it is 0x68 (RFC 3246 - Assured Forwarding). 0xb8,0x68 for example defines the default values

Enbloc dialling Byte (8bit) No 209 The number of seconds dialled digits are kept in the phone before they are sent en-bloc to the gatekeeper

Enter the number of seconds into the 8bit edit field. A value of 0 indicates that en-bloc dialling is turned off and digits are sent to the gatekeeper as they are dialled

Dialtone type Byte (8bit) No 210 The type of dialtone to generate locally

Enter the numeric dialtone type (0 - EUROPE-PBX, 1 - EUROPE-PUBLIC, 2 - US, 3 - UK, 10 - ITALY-PBX, 4 - ITALY-PUBLIC, 5 - CZECH-PBX, 6 - CZECH-PUBLIC, 7 - SWEDEN, 8 - FRANCE, 9 - SWISS, 11 - BELGIUM, 12 - NETHERLANDS, 13 - NORWAY, 14 - DENMARK, 15 - GERMANY, 16 - SPAIN, 17 - FINLAND, 18 - AUSTRIA, 19 - IRELAND, 20 - AUSTRALIA, 21 - NEWZEALAND, 22 - MALAYSIA, 23 - TURKEY, 24 - RUSSIA, 25 - SOUTH AFRICA, 26 - BRAZIL )

Faststart Byte (8bit) No 211 Disable/Enable the H245 faststart procedure

To disable enter 0, otherwise enter 1 into the 8bit edit field

H245-Tunnelling Byte (8bit) No 212 Disable/Enable H245 tunneling

To disable enter 0, otherwise enter 1 into the 8bit edit field

Clock type Byte (8bit) No 213 Define format of date and time display

Enter the numeric clock type (0dd.mm.yy hh:mm, 24 hour clock; 1mm/dd hh:mm xm, 12 hour am/pm clock)

Static Routes String No 214 Static routes to be added to the routes already defined in the device configuration

The string (max 127 characters) must contain comma separated route definitions in the form address:mask:gateway where address, mask and gateway are expected in dotted decimal notation, mask (but not the colon) can be left off in a host route

Update URL String No 215 URL to retrieve update commands from. This is identical to the /url option parameter of the UP1 module

Complete URL as in http://192.168.0.10/file.txt. No symbolic host names are supported

Update Poll Interval Word (16bit) No 216 Standard poll interval in minutes. This is identical to the /poll option parameter of the UP1 module

Interval in minutes

LDAP directory String No 217 Defines the various Parameters required to access an LDAP directory Following parameters can be provided -addr (LDAP Server Address), -port (LDAP Port), -base (Search Base), -attr (Name Attributes), -phone (Number Attruibutes), -sort1st (Sort Results by 1st LDAP name attribute), -hold (Hold Server Connection), -mode (Mode), -dn (Username) -pw (Password), -obj (LDAP Object Filter).
Local Networks String No 218 Defines the networks to be considered local in coder negotiation.

The string (max. 253 characters) must contain a list of networks in form of comma separated address:mask pairs, for example 192.168.1.0:255.255.255.0,192.168.2.0:255.255.255.0.

STUN Server String No 219 Defines the IP addresses or domain names of STUN servers.

The string (max 127 characters) must be in the format defined in Reference12r1:IP4/General/STUN

VoIP Protocol String No 220 The VoIP Protocol to be used for the Primary Registration (User-1) of a VoIP telephone.

One of the following strings may be specified here: H.323, H.323/TCP, H.323/TLS, SIP/UDP, SIP/TCP, SIP/TLS.

TURN Server String No 221 Defines the IP address and credentials of a TURN server.

The string (max 253 characters) must contain the TURN server address and credentials in the form address:port:username:password or domain:port:username:password where address is expected in dotted decimal notation and port as decimal number. Any occurrence of comma, colon and backslash in the username or password must be preceeded by the escape character: a backslash.

NAT Detection Interval String No 222 Minutes between checks for NAT-type

The string must contain the number of minutes in decimal digits

  1. This option is in fact identical to the standard DHCP option number 88 (TZ). However, various DHCP servers do not support this option, so it is provided as a redundant vendor specific option. If your DHCP server supports option 88, the vendor specific option is not needed.

Windows Server DHCP

In this section, the installation of innovaphone vendor options is demonstrated using a Microsoft Windows 2000 DHCP server.

First you need to create a new vendor class.

Use the Define Vendor Class… / Herstellerklasse definieren menu entry on the DHCP server’s context menu

Image:How_to_use_the_innovaphone_DHCP_client_Dhcp1_conv.JPG‎


Add a new vendor class as follows:


Image:How_to_use_the_innovaphone_DHCP_client_Dhcp2_conv.JPG‎


Anzeigename / Display name innovaphone
Beschreibung / Description innovaphone VoIP Options
Kennung / ID (ASCII) 1.3.6.1.4.1.6666

Add the innovaphone options. Use the Configure predefined options / Vordefinierte Optionen einstellen entry in the DHCP server’s context menu

Image:How_to_use_the_innovaphone_DHCP_client_Dhcp3_conv.JPG‎


Select the innovaphone option class and add the innovaphone specific options according to the table above.


Image:How_to_use_the_innovaphone_DHCP_client_Dhcp4_conv.JPG‎


To configure innovaphone vendor specific options for a specific scope, use the Configure options / Optionen konfigurieren entry in the scopes context menu.

Image:DHow_to_use_the_innovaphone_DHCP_client_hcp5_conv.JPG‎


Select innovaphone in the Advanced / Erweitert tab sheet.

Image:How_to_use_the_innovaphone_DHCP_client_Dhcp7_conv.JPG‎


Tick the options you want to provide and edit the respective values.

Image:How_to_use_the_innovaphone_DHCP_client_Dhcp6_conv.JPG‎


To do the above automatically, just save the following code as innovaphone_dhcp.cmd and execute it at your DHCP Server.

Media:Innovaphone_dhcp_option.zip

netsh Dhcp Server Add Class "innovaphone" "innovaphone VoIP Options" 312e332e362e312e342e312e36363636 1 b
netsh Dhcp Server Add Optiondef 200 "H323 gatekeeper" IPADDRESS 1 vendor="innovaphone" comment="Defines the IP address of both the primary and the alternate gatekeeper for the device. This is only required, if gatekeeper discovery is not feasible" 0.0.0.0
netsh Dhcp Server Add Optiondef 201 "H323 gatekeeper id" STRING 0 vendor="innovaphone" comment="The gatekeeper id of the gatekeeper the device likes to register with. Usually required only if several gatekeepers are running and a particular one must be chosen during gatekeeper discovery" ""
netsh Dhcp Server Add Optiondef 202 "POSIX TZ" STRING 0 vendor="innovaphone" comment="Defines both the time zone and the daylight saving time information." ""
netsh Dhcp Server Add Optiondef 203 "Default coder" STRING 0 vendor="innovaphone" comment="Defines the preferred coders for H.245 coder negotiation, as well as the packet size when sending RTP packets and the use of CNG and VAD" ""
netsh Dhcp Server Add Optiondef 204 "Language" STRING 0 vendor="innovaphone" comment="Defines the user interface language" ""
netsh Dhcp Server Add Optiondef 205 "Location" STRING 0 vendor="innovaphone" comment="Defines the various PBX access numbers (country code etc.) for the device" ""
netsh Dhcp Server Add Optiondef 206 "VLAN ID" WORD 0 vendor="innovaphone" comment="The 802.1q VLAN ID for traffic sent and received by the device" 0
netsh Dhcp Server Add Optiondef 207 "VLAN Priority" BYTE 0 vendor="innovaphone" comment="The 802.1p VLAN priority for traffic sent by the device" 0
netsh Dhcp Server Add Optiondef 208 "TOS Bits" STRING 0 vendor="innovaphone" comment="The value for the IP TOS field in the IP header of voice traffic sent by the device" ""
netsh Dhcp Server Add Optiondef 209 "Enbloc dialling" BYTE 0 vendor="innovaphone" comment="The number of seconds dialled digits are kept in the phone before they are sent en-bloc to the gatekeeper" 0
netsh Dhcp Server Add Optiondef 210 "Dialtone type" BYTE 0 vendor="innovaphone" comment="The type of dialtone to generate locally" 0
netsh Dhcp Server Add Optiondef 211 "Faststart" BYTE 0 vendor="innovaphone" comment="Disable/Enable the H245 faststart procedure" 0
netsh Dhcp Server Add Optiondef 212 "H245-Tunnelling" BYTE 0 vendor="innovaphone" comment="Disable/Enable H245 tunneling" 0
netsh Dhcp Server Add Optiondef 213 "Clock type" BYTE 0 vendor="innovaphone" comment="Define format of date and time display" 0
netsh Dhcp Server Add Optiondef 214 "Static Routes" STRING 0 vendor="innovaphone" comment="Static routes to be added to the routes already defined in the device configuration" ""
netsh Dhcp Server Add Optiondef 215 "Update URL" STRING 0 vendor="innovaphone" comment="URL to retrieve update commands from. This is identical to the /url option parameter of the UP1 module" ""
netsh Dhcp Server Add Optiondef 216 "Update Poll Interval" WORD 0 vendor="innovaphone" comment="Standard poll interval in minutes. This is identical to the /poll option parameter of the UP1 module" 0
netsh Dhcp Server Add Optiondef 217 "LDAP directory" STRING 0 vendor="innovaphone" comment="Defines the various Parameters required to access an LDAP directory" ""
netsh Dhcp Server Add Optiondef 218 "Local Networks" STRING 0 vendor="innovaphone" comment="Defines the networks to be considered local in coder negotiation" ""
netsh Dhcp Server Add Optiondef 219 "STUN Server" STRING 0 vendor="innovaphone" comment="Defines the IP addresses or domain names of STUN servers" ""
netsh Dhcp Server Add Optiondef 220 "VOIP Protocol" STRING 0 vendor="innovaphone" comment="The VoIP Protocol to be used for the Primary Registration (User-1) of a VoIP telephone" ""
netsh Dhcp Server Add Optiondef 221 "TURN Server" STRING 0 vendor="innovaphone" comment="Defines the IP address and credentials of a TURN server" ""
netsh Dhcp Server Add Optiondef 222 "NAT Detection interval" STRING 0 vendor="innovaphone" comment="Minutes between checks for NAT-type " ""

ISC DHCP Server for Linux

The ISC DHCP Server is a standard DHCP daemon on many Linux distributions. Here is a sample configuration that provides vendor specific options for innovaphone devices:

option space innovaphone;
option innovaphone.h323-gatekeeper code 200 = array of ip-address;
option innovaphone.h323-gatekeeper-id code 201 = text;
option innovaphone.posix-tz code 202 = text;
option innovaphone.default-coder code 203 = text;
option innovaphone.language code 204 = text;
option innovaphone.location code 205 = text;
option innovaphone.vlan-id code 206 = unsigned integer 16;
option innovaphone.vlan-prio code 207 = unsigned integer 8;
option innovaphone.tos-bits code 208 = text;
option innovaphone.enbloc-dialing code 209 = unsigned integer 8;
option innovaphone.dialtone-type code 210 = unsigned integer 8;
option innovaphone.faststart code 211 = unsigned integer 8;
option innovaphone.h245-tunneling code 212 = unsigned integer 8;
option innovaphone.clock-type code 213 = unsigned integer 8;
option innovaphone.static-routes code 214 = text;
option innovaphone.update-url code 215 = text;
option innovaphone.update-poll-interval code 216 = unsigned integer 16;
option innovaphone.ldap-directory code 217 = text;
option innovaphone.local-networks code 218 = text;
option innovaphone.stun-server code 219 = text;
option innovaphone.voip-protocol code 220 = text;
option innovaphone.turn-server code 221 = text;
option innovaphone.nat-detection-interval code 222 = text;
 
class "innovaphone" {
match if option vendor-class-identifier = "1.3.6.1.4.1.6666";
}
 
pool {
#
# Options for phones
#
allow members of "innovaphone";
range 172.21.49.1 172.21.49.127;
vendor-option-space innovaphone;
option innovaphone.h323-gatekeeper 172.21.48.5;
option innovaphone.posix-tz "CET-1CEST-2,M3.5.0/2,M10.5.0/3";
option innovaphone.default-coder "G729,60,e";
option innovaphone.language "deu";
option innovaphone.vlan-id 0x10;
option innovaphone.tos-bits "0x10";
option innovaphone.update-url "http://172.16.100.200/v6/cmds.txt";
option innovaphone.update-poll-interval 0x168;
option innovaphone.ldap-directory "-addr 172.21.48.1 -port 712 -base dc=meta \
-attr sn,givenName,company -phone telephoneNumber:D,homePhone:P,mobile:M,:@ -mail mail"
;
}

If you are using ISC-DHCP on IPxx10 linux application plateform you will need to add these line on your dhcpd.conf file.

host selfmac {
#
# Find the mac address of your IPxx10Linux AP with ifconfig command
# And replace the following mac with yours to prevent ISC dhcp offer at itself
# If you do not, you will loose your Application platform
#
hardware ethernet 86:be:09:65:d3:53 ;
deny booting ;
}

Determining LDAP options

To determine a proper configuration for DHCP option configuring a phone, you best proceed as described in Reference12r1:Phone/State/DHCP-Options.

Please note that myPBX will not evaluate the DHCP option 217 (LDAP) vendor option. It is thus recommended to deploy the directory settings as part of the users Phone config entry (Directories). Setting it with DHCP vendor options may thus be considered deprecated!

Disabling the DHCP client

In certain circumstances, it is convenient to partly disable the DHCP client. This way, the device still gets its IP address from the DHCP server, however, additional settings possibly supplied by the DHCP server are ignored. This is especially useful if in a given setup, some devices are to be configured differently but the majority is still configured by DHCP.

This can be achieved using the following config file options

config change UP1 /no-dhcp the update server uses the config files configuration even though there is a configuration supplied from DHCP (innovaphone vendor options "Update URL [215]" and "Update Poll Interval [216]" are ignored).
config change DHCPn /no-vlan the VLAN settings use the config files configuration even though there is a configuration supplied from DHCP (innovaphone vendor options "VLAN ID [206]" and "VLAN Priority [207]" are ignored)...
config change DHCPn /no-vendor all innovaphone vendor options are ignored.

Known Problems with lengthy options

The minimum space available for options in a BOOTP/DHCP record is 312 byte. There are some extension mechanisms but only a few DHCP servers support it. The Windows 2000 DHCP server for example does not, but silently truncates options not fitting in this 312 byte space. Thus it’s nearly impossible to distribute the LDAP directory configuration with a Windows 2000 server but it’s no problem with the DHCP Server built into each innovaphone device.

Known Problems with VLAN Configurations

The handling of the 802.1q VLAN ID is a bit tricky. If not hard configured otherwise, the IP200 will request a DHCP lease using the Ethernet switch ports default VLAN ID (that is, it will not send any VLAN header). It will thus receive a DHCP offer dedicated to devices on that VLAN. If this offer includes a VLAN ID option, the IP200 will not accept the offered lease, set the VLAN ID to the value received in the otherwise disregarded offer and start the DHCP process all over again. Now, the DHCP request will be issued on a new VLAN ID. Therefore, the DHCP server will now send an offer dedicated for devices on that new VLAN. This will most probably be a different DHCP scope.

As a consequence, DHCP options of IP200’s on a non-default VLAN must be configured twice. The VLAN ID option itself must be configured in the default VLANs DHCP scope. All other options must be configured in the new VLANs DHCP scope.

Be sure to configure the VLAN in both scopes identically. If not, the DHCP client process will never terminate, since it will always detect a changed VLAN ID, set the VLAN ID and restart the DHCP process.

Here is how DHCP leases are handled in detail:

  • First Boot

The client will broadcast a DHCP DISCOVER, expecting an OFFER from the server including all requested parameters. If the client intends to use the offered lease, it will issue a request for the offered lease. Once it receives an ACK for the lease requested, it will configure itself accordingly. All lease information is stored in the devices config file using the /laddr option (unless suppressed using /no-keep).

  • Re-boot

If there is lease information (in the /laddr config file option), the client will broadcast requests for the same lease again. If there is no answer within 30 seconds, the device will configure itself using the parameters in /laddr. It will nevertheless continue to request this lease from the DHCP server again (every 30 seconds, a broadcast will be sent).

If the server acknowledges the old lease, the client will check for changes in the DHCP options and re-configure itself accordingly. Changed options will be saved in the config file.

If the server rejects the lease using a NAK, the client will forget about the lease and continue to operate like it does for the first boot.

  • First boot with VLAN ID option received

If an offered lease includes the VLAN-ID option and the ID proposed differs from the VLAN ID the devices currently operates with (that is, from the id configured in the devices configuration), the device will change its VLAN ID to the one received in the VLAN-ID option. It will not request the lease though. Instead, it will continue to send DISCOVER requests on the new VLAN ID. If a lease is obtained there, all lease information is stored in the config file as usual.

You can disable the VLAN-ID processing using the /no-vlan option.

  • Reboot with VLAN ID

If the device finds lease information in the config file at boot time and if there is a VLAN ID different from the devices current VLAN-ID, it will re-configure itself to the new VLAN ID and try to request the saved lease as usual. If the lease is rejected with a NAK by the server, the device will re-configure itself to the pre-configured VLAN ID and try to DISCOVER a new lease as usual.

VLAN set with LLDP

From version 10, VLAN is also set with LLDP if provided by the switch and this this takes precedence. See Reference10:Interfaces/ETH/VLAN.

Changing configuration options set by DHCP options

If a device has been configured by DHCP, you cannot change those parameters. Any attempt to do so will issue a “Reset required” message.

Personal tools