Wednesday, 28 August 2013

How to change Lease time in tftpd32 DHCP server!

The tftpd32  is one easy to use open source DHCP server. It can be used for testing many functionalities of DHCP client.
 
The parameter i was looking for, was, Lease time, through GUI we do not have option to change it. 
 
Using tftpd32.ini file we can change this paramter.
 
Steps to download and change the lease time on Windows XP platform as Host machine.
 
1) Download Tftpd32-4.00-setup.exe from http://tftpd32.jounin.net/tftpd32_download.html
 
2) Install the file on Windows XP.
 
3) Go to "C:\Program Files\Tftpd32" and start tftpd32.exe
 
4) Configure DHCP related parameter by going to its setting Like ( ip ppol, size of pool, default router and mask) , remove persistant leases ( uncheck)
 
5) Click Ok and close it
 
6) Open tftpd32.ini file in "C:\Program Files\Tftpd32" , the file will be like given below
 
 
 
[DHCP]
Lease_NumLeases=0
IP_Pool=17344704
PoolSize=0
BootFile=
DNS=17344704
Mask=16580607
Gateway=34121920
DomainName=
Lease (minutes)=2880
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=.
TftpPort=69
Hide=0
WinSize=0
Negociate=1
PXECompatibility=0
DirText=0
ShowProgressBar=1
Timeout=3
MaxRetransmit=6
SecurityLevel=1
UnixStrings=1
Beep=0
VirtualRoot=0
MD5=0
LocalIP=
Services=15
TftpLogFile=
SaveSyslogFile=
PipeSyslogMsg=0
LowestUDPPort=0
HighestUDPPort=0
MulticastPort=0
MulticastAddress=
PersistantLeases=0
DHCP Ping=1
DHCP LocalIP=
Max Simultaneous Transfers=100
UseEventLog=0
Console Password=tftpd32
Support for port Option=0
Keep transfer Gui=5
Ignore ack for last TFTP packet=0
Enable IPv6=0
 
7) Change "Lease (minutes)=2880" paramter to suit your requirements.
 
 
Keep Learning , Keep sharing !
 

 

Friday, 23 August 2013

Short tutorial on Busybox!

BusyBox:

1) It is a collection of common used Linux binaries.

2) Latest version is 29 June 2013 -- BusyBox 1.21.1 (stable) as of today (Aug 23, 2013).

4) It supports almost 292 various commands.

5) Use "yum install busybox" to install  it .



[root@localhost ~]# busybox --help
BusyBox v1.13.2 (2009-02-09 07:22:45 EST) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as!

Currently defined functions:
        [, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash,
        awk, basename, blkid, brctl, bunzip2, bzcat, bzip2, cal,
        cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd,
        chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp,
        cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc,
        dd, deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay,
        diff, dirname, dmesg, dnsd, dos2unix, du, dumpkmap, dumpleases,
        echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
        expand, expr, fakeidentd, false, fbset, fbsplash, fdformat,
        fdisk, fgrep, find, findfs, fold, free, freeramdisk, fsck,
        fsck.minix, ftpget, ftpput, fuser, getopt, getty, grep,
        gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid, hostname,
        httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifup,
        inetd, init, insmod, install, ip, ipaddr, ipcalc, ipcrm,
        ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill,
        killall, killall5, klogd, last, length, less, linux32, linux64,
        linuxrc, ln, loadfont, loadkmap, logger, login, logname,
        logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lzmacat,
        makedevs, makemime, man, md5sum, mdev, mesg, microcom, mkdir,
        mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe, more,
        mount, mountpoint, msh, mt, mv, nameif, nc, netstat, nice,
        nmeter, nohup, nslookup, od, openvt, passwd, patch, pgrep,
        pidof, ping, ping6, pipe_progress, pivot_root, pkill, popmaildir,
        poweroff, printenv, printf, ps, pscan, pwd, raidautorun,
        rdate, rdev, readahead, readlink, readprofile, realpath,
        reboot, reformime, renice, reset, resize, rm, rmdir, rmmod,
        route, rtcwake, run-parts, runlevel, runsv, runsvdir, rx,
        script, sed, sendmail, seq, setarch, setconsole, setfont,
        setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum,
        showkey, slattach, sleep, softlimit, sort, split, start-stop-daemon,
        stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff,
        swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar,
        tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, top,
        touch, tr, traceroute, true, tty, ttysize, udhcpc, udhcpd,
        udpsvd, umount, uname, uncompress, unexpand, uniq, unix2dos,
        unlzma, unzip, uptime, usleep, uudecode, uuencode, vconfig,
        vi, vlock, watch, watchdog, wc, wget, which, who, whoami,
        xargs, yes, zcat, zcip

[root@localhost ~]#

Thursday, 22 August 2013

A short tutorial on dmesg, Linux command !

The command is "dmesg" which means "display messages" or "driver messages" as per Wiki, but I think it should be "debug messages" as these messages helps the developers to debug the Linux Kernel problem occurred during boot-up time or later. These messages are mostly hardware related messages, in which the peripherals or the actual ports gets initialized. If we give this command without any option it will print all messages on screen.

The format of command:

Usage: dmesg [-c] [-n level] [-s bufsize]
The man file says:

[root@localhost ~]# man dmesg
Formatting page, please wait...
       The program helps users to print out their bootup messages.  Instead of
       copying the messages by hand, the user need only:
              dmesg > boot.messages
       and mail the boot.messages file to whoever can debug their problem.
OPTIONS
       -c     Clear the ring buffer contents after printing.
       -r     Print the raw message buffer, i.e., donĂ¢t strip  the  log  level
              prefixes.
       -sbufsize
              Use  a  buffer  of size bufsize to query the kernel ring buffer.
              This is 16392 by default.  (The  default  kernel  syslog  buffer
              size was 4096 at first, 8192 since 1.3.54, 16384 since 2.1.113.)
              If you have set the kernel buffer to be larger than the  default
              then this option can be used to view the entire buffer.
       -nlevel
              Set  the  level at which logging of messages is done to the con-
              sole.  For example, -n 1 prevents  all  messages,  expect  panic
              messages, from appearing on the console.  All levels of messages
              are still written to /proc/kmsg, so syslogd(8) can still be used
              to  control  exactly  where kernel messages appear.  When the -n
              option is used, dmesg will not print or clear  the  kernel  ring
              buffer.
              When  both options are used, only the last option on the command
              line will have an effect.
SEE ALSO
       syslogd(8)
AVAILABILITY
       The dmesg command is part of the util-linux-ng package and is available
       from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
                                                     
The commands which can be used are:

1) dmesg -> display whole output on screen

2) dmesg | less  -> display output as one screen at a time

3) dmesg > debug.log -> redirect all messages to log file

4) dmesg | grep usb/time/interrupt/tty/dma/memory -> to display(grep) only relevant or required information

5) dmesg -n 1 -> stop all messages except panic messages

I could not find information on various levels , let me know if any one of you know.

Heppy Learning, Happy Sharing!

Monday, 5 August 2013

Things to avoid in Life !

Recently I heard below things and like it. We all do it without knowing and if somebody else do it we feel irritated :-)
 
 

Me first Attitude (MFA)

TTT (Talk, Talk and Talk…)

PTB (Pass the buck)

I already Know IT (IAKI)

Prove it to me (PITM)

Related Posts Plugin for WordPress, Blogger...