List of dnsmasq’s DHCP options

There are a lot of dhcp options that available on dnsmasq based on RFC2132, unfortunately the option list are not available on documentation but in other hand we can use this command to show it all.

 
$ dnsmasq --help dhcp

Here the example for command above

Known DHCP options:
1 netmask
2 time-offset
3 router
6 dns-server
7 log-server
9 lpr-server
13 boot-file-size
15 domain-name
16 swap-server
17 root-path
18 extension-path
19 ip-forward-enable

……

As you can see first column is indicated as configuration code number and in other right column is alias name, as human i prefer the alias name because it’s more convince to remember and understandable 😀 . Here’s the comparation

Alias name

dhcp-option=option:netbios-ns,192.168.40.2
dhcp-option=option:netbios-dd,192.168.40.2
dhcp-option=option:netbios-nodetype,8
dhcp-option=option:dns-server,0.0.0.0,8.8.8.8

Configuration Code

dhcp-option=44,192.168.40.2
dhcp-option=45,192.168.40.2
dhcp-option=46,8
dhcp-option=6,0.0.0.0,8.8.8.8

You decide …..

Create 7zip Archive File With High Compression On Centos

Install 7zip on Centos if it not installed (requiring EPEL repo).


[ root@ centos ~ ]# yum install p7zip

Here’s the command for create high compression 7zip file.


[ root@centos ~ ]# 7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on zimbralog.7z /var/log/zimbra.log

Argument explanation:

  • -t7z   7z archive
  • -m0=lzma lzma method
  • -mx=9 level of compression = 9 (Ultra)
  • -mfb=64 number of fast bytes for LZMA = 64
  • -md=32m dictionary size = 32 megabytes
  • -ms=on solid archive = on

Cleaning Python Bytecode

When you creating a python module all python files that included will be compiled into pyc (byte code file) that will be executing by python’s virtual machine, but those files sometime causing some problem when you deal with migrating python version (from 2.6 to 2.7in my case).

 Bad magic forms.pyc

Some of the solution that i’ve done is by cleaning all *.pyc files in working directory by using find command as shown below


find . -name "*.pyc" -exec rm -rf {} \;

Catatan Insomnia #1

(Tulisan ini diketik bebas sambil menunggu adzan subuh ditengah kutukan insomnia melanda).

Teringat pada saat waktu kecil gw dulu dimana waktu untuk melek ketika malam hanya dibatasi sampai jam 21:00 saja dengan patokan acara wajib pasti ada disemua channel TV yaitu “Dunia Dalam Berita” yang biasanya suka memotong film box office seru, para “petinggi-petinggi keluarga” (disingkat ppk) dengan kompaknya menggiring tidur padahal kemampuan mata untuk melek masih bisa diuji sampe tengah malem berbekal charge tidur siang (dengan paksaan tentunya 😦   ).

Continue reading “Catatan Insomnia #1”