TG585v7 - Command line DHCP configuration

Creating a DHCP pool

To create a new DHCP address pool for future IP Address requests received by the router. This is done from the depths of the DHCP commands:

{Administrator}[dhcp server pool]=>

First, add a new pool "container". Don't worry about address ranges yet. For now, just create a new pool called "new_pool" and give it an index (priority) number that determines which pool to take an address from first. Re-using a priority number appears to insert into this position, offsetting any pools already set at this level (i.e add a new index=1 and any index=1 or greater will be increased by 1 with the new pool inserted as '1')

{Administrator}[dhcp server pool]=>add
name = new_pool
[index] = 1
:dhcp server pool add name=test index=1
{Administrator}[dhcp server pool]=>

Now configure the details of the pool:

{Administrator}[dhcp server pool]=>config
name = LAN_private
[state] = enabled
[intf] = LocalNetwork
- the name 'home' side of the DSL box (see below)
[index] = 0
[poolstart] = 192.168.1.21
[poolend] = 192.168.1.29
[netmask] = 24
[gateway] = 192.168.1.1
[server] = 192.168.1.1
[primdns] = 192.168.1.1
[secdns] = 84.45.18.139
[dnsmetric] = 0
[primwins] =
[secwins] =
[leasetime] = 28800
- configures a 4 hour lease (28800 seconds)
[renewtime] =
[rebindtime] =
[unnumbered] =
[localgw] =
:dhcp server pool config name=LAN_private index=0 poolstart=192.168.1.21 poolend=192.168.1.29 primdns=192.168.1.1 secdns=84.45.18.139 leasetime=28800
{Administrator}[dhcp server pool]=>

Note that it doesn't seem to allow modification of a pool that has active leases, so if you get an error because the pool is in use, use :dhcp server lease list to list active leases, and :dhcp server lease delete (lease id) to selectively delete leases or :dhcp server lease flush to delete all leases.

The [interface] name of LocalNetwork is correct on for the 'home' (LAN & WLAN) IP interace for a default BeBox (probably O2 as well). It may be different for other flavours of ST585. You can get a list of all the configured IP interfaces at :ip iflist. An example of the output is below:

{Administrator}=>ip iflist
Interface Group MTU RX TX Admin Oper
0 loop. . . . . . . . . . . . . . local 65535 13309906 5159773 UP [UP]
(presumably) internal communication in the ST585
1 LocalNetwork. . . . . . . . . . lan 1500 17131070 258462849 UP [UP]
My LAN & WLAN connections
2 Static_IP . . . . . . . . . . . wan 1500 245718914 12026959 UP [UP]
My DSL connection to Be
{Administrator}=>

Back to the DHCP config...

Once the config command has been completed, you can list the available pools (including hopefully the new one) with :dhcp server pool list:
{Administrator}[dhcp server pool]=>list
Pool Start End Intf Admin State
0 LAN_private_pool 192.168.1.129 192.168.1.190 LocalNetwork UP STATIC
{Administrator}[dhcp server pool]=>

Thats it!