Jump to content











Photo
- - - - -

DHCP Settings in tftpd32


  • Please log in to reply
2 replies to this topic

#1 SkipCarter

SkipCarter
  • Members
  • 2 posts
  •  
    United States

Posted 02 April 2013 - 05:46 PM

Just installed tftpd32 v4.0 on two (32bit Windows 7) machines, with the same issue on both.  I'm having trouble saving DHCP Pool Definitions.  Every time I re-open the DHCP Settings tab, all settings revert back to 0's.  Tried to run as administrator. resetting ini's file protection, etc.  Actually, the ini file re-writes fine and saves the settings for all other functions, and will even rewrite when for example, setting the Mask.  For anything DHCP Pool related, it just does not add anything to the ini file.

 

What am I doing wrong?  Thanks


Edited by SkipCarter, 02 April 2013 - 05:51 PM.


#2 SkipCarter

SkipCarter
  • Members
  • 2 posts
  •  
    United States

Posted 02 April 2013 - 06:51 PM

By the way, if anyone has a working v4.0 ini file with the DHCP Pool variables in place, can you paste it here?  Worse case I can set manually and make the file read-only.  Thanks



#3 grrrd

grrrd

    Frequent Member

  • Advanced user
  • 132 posts
  •  
    United Kingdom

Posted 04 April 2013 - 08:56 AM

[DHCP]
Lease_NumLeases=0
Lease (minutes)=2816
Mask=16777215
BootFile=pxeboot.n12
PoolSize=10
IP_Pool=36797706 
DNS=553363648 
Gateway=20020490
DomainName=
AddOptionNumber1=0
AddOptionValue1=
AddOptionNumber2=0
AddOptionValue2=
AddOptionNumber3=0
AddOptionValue3=
AddOptionNumber4=0
AddOptionValue4=
AddOptionNumber5=0
AddOptionValue5=
AddOptionNumber6=0
AddOptionValue6=
AddOptionNumber7=0
AddOptionValue7=
AddOptionNumber8=0
AddOptionValue8=
AddOptionNumber9=0
AddOptionValue9=
AddOptionNumber10=0
AddOptionValue10=

[TFTPD32]
BaseDirectory=c:\tftpd32\boot
TftpPort=69
Hide=1
WinSize=0
Negociate=1
PXECompatibility=0
DirText=0
ShowProgressBar=0
Timeout=3
MaxRetransmit=6
SecurityLevel=0
UnixStrings=1
Beep=0
VirtualRoot=1
MD5=0
LocalIP=
Services=15
TftpLogFile=c:\tftpd32\TFTPD32.log
SaveSyslogFile=
PipeSyslogMsg=0
LowestUDPPort=0
HighestUDPPort=0
MulticastPort=0
MulticastAddress=
PersistantLeases=0
DHCP Ping=0
DHCP LocalIP=
Max Simultaneous Transfers=100
UseEventLog=0
Console Password=tftpd32
Support for port Option=0

 

Thats my current tftpd32.ini for V4. the ip pool starts at 10.125.49.2 and has a pool size of 10. 

 

Thanks to support here before i have a script that generates this ini for me when passing variables into it (for the ini uses HEX numbers instead of ip addresss;

 

@echo off
c:
cd\tftpd32
rem goto T01
rem === version 03 ====
rem === try writing ===
rem === If tftpd32.ini exist tftpd32.ini will overwritten !!! ===
type nul>tftpd32.ini||goto :EOF
rem codedip for 255.255.255.0 is 16777215
rem codedip for 192.168.0.30 is 503359680
rem codedip for 192.168.0.2 is 33597632
rem codedip for 192.168.0.250 is -100620096
rem LocalIP is blank
rem === generate tftpd32.ini ===
(
echo [DHCP]
echo Lease_NumLeases=0
echo Lease ^(minutes^)=2816
)>>tftpd32.ini
call:ipcoding <<input SubnetMask>>
(
echo Mask=%codedip%
echo BootFile=pxeboot.n12
echo PoolSize=10
)>>tftpd32.ini
call:ipcoding <<Input start IP pool addy>>
echo IP_Pool=%codedip% >>tftpd32.ini
call:ipcoding <<Input DNS Addy>>
echo DNS=%codedip% >>tftpd32.ini
call:ipcoding <<Input Default Gateway Addy>>
(
echo Gateway=%codedip%
echo DomainName=
echo AddOptionNumber1=0
echo AddOptionValue1=
echo AddOptionNumber2=0
echo AddOptionValue2=
echo AddOptionNumber3=0
echo AddOptionValue3=
echo AddOptionNumber4=0
echo AddOptionValue4=
echo AddOptionNumber5=0
echo AddOptionValue5=
echo AddOptionNumber6=0
echo AddOptionValue6=
echo AddOptionNumber7=0
echo AddOptionValue7=
echo AddOptionNumber8=0
echo AddOptionValue8=
echo AddOptionNumber9=0
echo AddOptionValue9=
echo AddOptionNumber10=0
echo AddOptionValue10=
echo.
echo [TFTPD32]
echo BaseDirectory=c:\tftpd32\boot
echo TftpPort=69
echo Hide=1
echo WinSize=0
echo Negociate=1
echo PXECompatibility=0
echo DirText=0
echo ShowProgressBar=0
echo Timeout=3
echo MaxRetransmit=6
echo SecurityLevel=0
echo UnixStrings=1
echo Beep=0
echo VirtualRoot=1
echo MD5=0
echo LocalIP=
echo Services=15
echo TftpLogFile=c:\tftpd32\TFTPD32.log
echo SaveSyslogFile=
echo PipeSyslogMsg=0
echo LowestUDPPort=0
echo HighestUDPPort=0
echo MulticastPort=0
echo MulticastAddress=
echo PersistantLeases=0
echo DHCP Ping=0
echo DHCP LocalIP=
echo Max Simultaneous Transfers=100
echo UseEventLog=0
echo Console Password=tftpd32
echo Support for port Option=0
)>> tftpd32.ini
exit
goto:EOF
:T01
Call:ipcoding %1
Echo codedip=%codedip%
goto:eof

::   -   S u b r o u t i n e s   -   ::

:ipcoding
:: Usage:  Call :ipcoding ipv4
::    e.g. call :ipcoding 192.168.0.1
:: Returns  : codedip for tftpd32.ini
SET xip=%1
SET xip=%xip:.= %
Call:ipcoding2 %xip%
if %Error% GTR 0 Set codedip=0
set xip=
goto:EOF
:ipcoding2
:: Usage:  Call :ipcoding2 u v w x
::    e.g. call :ipcoding2 192 168 0 1
:: Returns  : codedip for tftpd32.ini
Set codedip=
set Error=0
If "%1"=="" (Set Error=1)&(goto:EOF)
If "%2"=="" (Set Error=2)&(goto:EOF)
If "%3"=="" (Set Error=3)&(goto:EOF)
If "%4"=="" (Set Error=4)&(goto:EOF)
rem elimates pre zeros
set /a ip1=10000%1 %%10000
IF %ip1% GTR 255 SET ip1=255

set /a ip2=10000%2 %%10000
IF %ip2% GTR 255 SET ip2=255

set /a ip3=10000%3 %%10000
IF %ip3% GTR 255 SET ip3=255

set /a ip4=10000%4 %%10000
IF %ip4% GTR 255 SET ip4=255

set /a ip2=256*%ip2%
set /a ip3=256*256*%ip3%
rem if %ip4% EQU 127, than 256*256*256*%ip4% = 2,130,706,432
set /a ip4=256*256*256*%ip4%
set /a codedip=%ip1%+%ip2%+%ip3%+%ip4%

:EOF
For %%a in (1 2 3 4) do set ip%%a=
For %%a in (xmask xippool xdns xgateway) do set %%a=

goto :EOF
exit

 

Just replace the <<Input subnet/starting IP Pool / DNS / Default Gateway>>






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users