Tuning Freebsd router
Router memegang peranan penting dalam network karena dia adlah sebagai pintu gerbang keluar masuknya data.
Ada beberapa hal yang perlu di optimalkan :
1. Kernel, buang device yang tidak terpakai. untuk melihat device apa saja yang ada di pc, bisa di lihat di file /var/run/dmesg.boot
konfigurasi device di kernel ada di file /sys/i386/conf/GENERIC , contoh apabila server kita menggunakan harddisk sata maka options berikut di file GENERIC bisa dibuang :
device ahb # EISA AHA1742 family
device ahc # AHA2940 and onboard AIC7xxx devices
options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver.
device ahd # AHA39320/29320 and onboard AIC79xx devices
options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~215k to driver.
device amd # AMD 53C974 (Tekram DC-390(T))
device isp # Qlogic family
device ispfw # Firmware for QLogic HBAs- normally a module
device mpt # LSI-Logic MPT-Fusion
device ncr # NCR/Symbios Logic
device sym # NCR/Symbios Logic (newer chipsets + those of `ncr’)
device trm # Tekram DC395U/UW/F DC315U adapters
device adv # Advansys SCSI adapters
device adw # Advansys wide SCSI adapters
device aha # Adaptec 154x SCSI adapters
device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
device bt # Buslogic/Mylex MultiMaster SCSI adapters
device ncv # NCR 53C500
device nsp # Workbit Ninja SCSI-3
device stg # TMC 18C30/18C50
dan seterusnya. Kemudian kompile ulang kernel dengan perintah :
#cd /usr/src
#make buildkernel KERNCONF=MYKERNEL (MYKERNEL adalah nama kernel yang baru)
#make installkernel KERNCONF=MYKERNEL
2. Buang aplikasi yang tidak di pakai seperti sendmail, tambah baris di file /etc/rc.conf
sendmail_enable=”NONE”
3. Kurangi jumlah Console yang aktif, secara default Frebsd menyediakan 7 buah console. edit file /etc/ttys menjadi seperti :
ttyv0 “/usr/libexec/getty Pc” cons25 on secure
# Virtual terminals
ttyv1 “/usr/libexec/getty Pc” cons25 on secure
ttyv2 “/usr/libexec/getty Pc” cons25 on secure
#ttyv3 “/usr/libexec/getty Pc” cons25 on secure
#ttyv4 “/usr/libexec/getty Pc” cons25 on secure
#ttyv5 “/usr/libexec/getty Pc” cons25 on secure
#ttyv6 “/usr/libexec/getty Pc” cons25 on secure
#ttyv7 “/usr/libexec/getty Pc” cons25 on secure
ttyv3 “/usr/X11R6/bin/xdm -nodaemon” xterm off secure
4. Edit options performa TCP/IP di file /etc/sysctl.conf tambahkan baris berikut :
kern.ipc.nmbclusters=32768
kern.ipc.maxsockbuf=2097152
kern.ipc.somaxconn=8192
kern.maxfiles=65536
kern.maxfilesperproc=32768
net.inet.tcp.delayed_ack=0
net.inet.tcp.sendspace=65535
net.inet.udp.recvspace=65535
net.inet.udp.maxdgram=57344
net.local.stream.recvspace=65535
net.local.stream.sendspace=65535
5. Reboot System. Selesai deh Performa router anda pasti akan beda