Transparently Bridge 2 AP on routerboard 133c
June 25, 2007 at 11:32 am | In mikrotik | Leave a CommentSettingan untuk 2 AP RB 133c sama dengan RB 532a.semalam setelah 4jam “gulat” dengan RB 133c dtemukan settingan yang tidak brbeda dgn RB 532A.
thanx.salam metal
Transparently Bridge 2 AP on routerboard 532A
March 22, 2007 at 3:12 am | In mikrotik | 1 Commentdalam satu board RB 532A dijadikan 2 AP dengan 2 PCi.logikanya adalah bridge ether,wlan1 dan wlan2,sehingga hanya dibutuhkan 1IP.
langkah :
1. Buat interface bridge untuk wlan1,wlan2 dan ethernet.
[admin@ganezaa]> interface bridge add name=wds-bridge
untuk ethernet:
[admin@ganezaa]> interface bridge port add interface=ether1 bridge=wds-bridge
untuk wlan1 :
[admin@ganezaa]> interface bridge port add interface=wlan1 bridge=wds-bridge
untuk wlan2 :
[admin@ganezaa]> interface bridge port add interface=wlan2 bridge=wds-bridge
2. konfigurasi wireless wlan1 dan wlan2
[admin@ganezaa]> interface wireless set wlan1 ssid=MikroTik frequency=5805 \
\… mode=ap-bridge disabled=no
3. setting wds untuk AP wlan1 dan wlan2
[admin@ganezaa]> interface wireless> set wlan1 wds-mode=dynamic \
\… wds-default-bridge=wds-bridge
4. setting ip address untuk bridge
[admin@ganezaa]> ip address add address=10.100.0.200/24 interface=wds-bridge
5. reboot system
overclocking routerboard 532A
March 21, 2007 at 10:06 am | In mikrotik | Leave a Comment/system routerboard settings set cpu-frequency=330
lalu ketik,tanpa perlu reboot:
/system routerboard settings keep-frequency
sejauh ini blom ada masalah,mohon pencerahan…..
uang gratis,free money!
March 20, 2007 at 8:37 am | In Computer Stuff, Coretan, curahan | 1 Commenthttp://www.adbrite.pasarbisnis.info/?id=ganezaa
Compile Kernel
February 26, 2007 at 3:33 pm | In FreeBSD | Leave a CommentCompile kernel biasanya dilakukan bila kita menambahkan hardware baru atau saat menginstalasi software tertentu yang membutuhkan penyesuaian pada kernel. Berikut sekilas tentang compile dan install kernel FreeBSD.
Pertama cek dulu apakah sudah ada source kernel FreeBSD nya, yaitu dalam /usr/src/sys yang berisi berbagai sub-direktori yang merupakan bagian-bagian dari kernel. Apabila source kernel-nya belum ada maka kita dapat menginstallnya terlebih dulu :
root@bsd > /stand/sysinstall
Kemudian pilih menu “Configure” –> “Distributions” –> “src” –> “sys” . Baru kita akan diberi pilihan media instalasinya, lewat CD , FTP dan lain-lain. Pilih sesuai keinginan kita, then tunggu sampai selesai. Setelah install selesai :
root@bsd > cd /usr/src/sys/i386/conf/
backup dulu file konfigurasi kernel nya :
root@bsd /usr/src/sys/i386/conf > cp GENERIC KERNELBARU
Kemudian Edit file konfigurasi KERNELBARU sesuai kebutuhan, Jangan lupa mengganti baris “ident” dari GENERIC menjadi KERNELBARU (sesuaikan dengan nama file konfigurasinya). Setelah itu :
root@bsd /usr/src/sys/i386/conf > config KERNELBARU
root@bsd /usr/src/sys/i386/conf > cd ../../compile/KERNELBARU
root@bsd /usr/src/sys/compile/KERNELBARU > make depend
root@bsd /usr/src/sys/compile/KERNELBARU > make
root@bsd /usr/src/sys/compile/KERNELBARU > make install
Setelah Install selesai, reboot system.
Untuk dokumentasi lebih detil nya ada di http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html dan untuk troubleshooting bisa melihat di http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-trouble.html#KERNELCONFIG-NOBOOT
G-net Pekalongan, May 23 2002
Transparent Traffic shapper
February 22, 2007 at 6:11 am | In mikrotik | Leave a CommentThis example shows how to configure a transparent traffic shaper. The transparent traffic shaper is essentially a bridge that is able to differentiate and prioritize traffic that passes through it.
Quick Start for Impatient
Configuration snippet from the MikroTik router:
/ interface bridge
add name="bridge1"
/ interface bridge port
add interface=ether2 bridge=bridge1
add interface=ether3 bridge=bridge1
/ ip firewall mangle
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \
new-connection-mark=http_conn passthrough=yes
add chain=prerouting connection-mark=http_conn action=mark-packet \
new-packet-mark=http passthrough=no
add chain=prerouting p2p=all-p2p action=mark-connection \
new-connection-mark=p2p_conn passthrough=yes
add chain=prerouting connection-mark=p2p_conn action=mark-packet \
new-packet-mark=p2p passthrough=no
add chain=prerouting action=mark-connection new-connection-mark=other_conn \
passthrough=yes
add chain=prerouting connection-mark=other_conn action=mark-packet \
new-packet-mark=other passthrough=no
/ queue simple
add name="main" target-addresses=10.0.0.12/32 max-limit=256000/512000
add name="http" parent=main packet-marks=http max-limit=240000/500000
add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000
add name="other" parent=main packet-marks=other max-limit=128000/128000
Explanation
Each piece of code is followed by the explanation of what it actually does.
Bridge
/ interface bridge
add name="bridge1"
/ interface bridge port
add interface=ether2 bridge=bridge1
add interface=ether3 bridge=bridge1
We create a new bridge interface and assign two ethernet interfaces to it. Thus the prospective traffic shaper will be completely transparent to the client.
Mangle
/ ip firewall mangle
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \
new-connection-mark=http_conn passthrough=yes
add chain=prerouting connection-mark=http_conn action=mark-packet \
new-packet-mark=http passthrough=no
All traffic destined to TCP port 80 is likely to be HTTP traffic and therefore is being marked with the packet mark http. Note, that the first rule has passthrough=yes while the second one has passthrough=no. (You can obtain additional information about mangle at http://www.mikrotik.com/docs/ros/2.9/ip/mangle)
/ ip firewall mangle
add chain=prerouting p2p=all-p2p action=mark-connection \
new-connection-mark=p2p_conn passthrough=yes
add chain=prerouting connection-mark=p2p_conn action=mark-packet \
new-packet-mark=p2p passthrough=no
add chain=prerouting action=mark-connection new-connection-mark=other_conn \
passthrough=yes
add chain=prerouting connection-mark=other_conn action=mark-packet \
new-packet-mark=other passthrough=no
Same as above, P2P traffic is marked with the packet mark p2p and all other traffic is marked with the packet mark other.
Queues
/ queue simple
add name="main" target-addresses=10.0.0.12/32 max-limit=256000/512000
We create a queue that limits all the traffic going to/from the client (specified by the target-address) to 256k/512k.
/ queue simple
add name="http" parent=main packet-marks=http max-limit=240000/500000
add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000
add name="other" parent=main packet-marks=other max-limit=128000/128000
All sub-queues have the main queue as the parent, thus the aggregate data rate could not exceed limits specified in the main queue. Note, that http queue has higher priority than other queues, meaning that HTTP downloads are prioritized.
http://wiki.mikrotik.com/
Tutorial bagaimana melakukan konfigurasi DHCPD config pada Linux RedHat
February 20, 2007 at 6:54 am | In Linux Server | 2 CommentsManajemen IP address itu penting banget buat seorang admin jaringan. Dengan manajemen IP, seorang administrator dapat membatasi jumlah client yg terkoneksi dgn jaringannya.
DHCP server membagikan IP pada client2 yg ada dlm networknya sesuai rentang yg dikonfigurasikan. Untuk client yg harus menggunakan IP tertentu juga dapat di set di konfigurasinya.
Sekedar tips, kalo ga mau susah2 untuk membatasi IP client anda, pada subnetmask nya isikan dengan angka yg anda inginkan
IP –> 192.168.10.17 — 222.255.255.0 —-> angka nol disini memungkinkan adanya 254 user yg terkoneksi (IP 192.168.10.0 digunakan sebagai network ID jaringannya dan 192.168.10.255 sebagai broadcastnya)
Ganti segment terakhir pada subnetmask dgn angka sesuae jmlah client, rumusnya 254 dkurangi jumlah client
e.g: ada 62 client, maka 254 – 62 = 192 –> subnetmask anda 255.255.255.192
Namun cara diatas hanya untuk membatasi rentang IP saja, bukan untuk memberikan IP dinamis pada client. Untuk memberi IP pada client ya harus pake dhcp server.
Langkah² membuat DHCP server pada mesin RedHat Linux
1. Instal paket dhcpd.3.*.*.rpm ( * adl versi dhcpd nya)
2. buat file di direktori /etc dengan nama dhcpd.conf dengan teks editor yg anda sukai (saya pake vi yg dasar:))
3. Copy dan paste kan script di bawah ini :
ddns-update-style interim;
# Required for dhcp 3.0+ / Red Hat 8.0+
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 { <== isikan subneting dan netmask network anda)
# Range of IP addresses to be issued to DHCP clients
range 192.168.1.128 192.168.1.254; <== IP yg akan digunakan oleh host (isikan sesuai jumlah client anda)
# Default subnet mask to be used by DHCP clients
option subnet-mask 255.255.255.0; <== isikan subnetmask network anda (sesuaikan juga dgn jmlh client)
# Default broadcastaddress to be used by DHCP clients
option broadcast-address 192.168.1.255; <== isikan broadcast network anda (broadcast adl IP maximal network anda ditambah 1)
# Default gateway to be used by DHCP clients
option routers 192.168.1.1; <=== isikan gateway server anda
option domain-name “your-domain.org”; <=== isikan domain anda (optional)
# Default DNS to be used by DHCP clients
option domain-name-servers 40.175.42.254, 40.175.42.253; <== dns server anda (optional)
option netbios-name-servers 192.168.1.100;
# (Optional. Specify if used on your network)
# DHCP requests are not forwarded. Applies when there is more than one ethernet device and forwarding is configured.
# option ipforwarding off;
# Amount of time in seconds that a client may keep the IP address <== waktu maximum penggunaan IP (jika melebihi maka harus request lagi)
default-lease-time 21600;
max-lease-time 43200;
# Eastern Standard Time
option time-offset -18000;
# Default NTP server to be used by DHCP clients
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# — Selects point-to-point node (default is hybrid). Don’t change this unless you understand Netbios very well
# option netbios-node-type 2;
# We want the nameserver “ns2″ to appear at a fixed address.
# Name server with this specified MAC address will recieve this IP. <== jika ada komputer yg harus menggunakian IP tertentu isikan mac address NICnya disini dgn IP yg diinginkan
host ns2 {
next-server ns2.your-domain.com;
hardware ethernet 00:02:c3:d0:e5:83;
fixed-address 40.175.42.254;
}
# Laser printer obtains IP address via DHCP. This assures that the
# printer with this MAC address will get this IP address every time. <== untuk penggunaan printer jaringan
host laser-printer-lex1 {
hardware ethernet 08:00:2b:4c:a3:82;
fixed-address 192.168.1.120;
}
}
skrip di atas dpat anda temukan di /usr/share/doc/dhcp-3.X/dhcp.conf.sample
4. simpan dan keluarlah dari text editor anda
5. ketikkan perintah berikut pada konsole
# service dhcpd start
# /etc/rc.d/init.d/dhcpd configtest (gunakan /usr/sbin/dhcpd -f pada distro lain)
6. jika tidak ada pesan error maka anda sudah berhasil….tinggal clientnya dikonfigurasi
7. untuk melihat client yg merequest IP dan IP yg aktif lihat file /var/lib/dhcp/dhcpd.leases dengan text editor anda
by : bengkring
http://www.benpinter.net/
clearing cache squid
February 20, 2007 at 5:22 am | In Linux Server | 1 Commentjust stop squid, and erase all the files in your cache directory… for example:
Code:
squid -k shutdown
rm -fr /var/lib/squid/cache/*
then re-create the swap directory structure:
Code:
squid -z
then start squid again…
PS: you can also run “squid -z” without first deleting the cache files, and AFAIK that way it creates a new directory structure without wiping-out the old one, but i’m not sure if that’s what happens as i’ve never done it…
web-proxy clean automatic
February 20, 2007 at 3:18 am | In mikrotik | 1 CommentNAT PROXY
/ ip firewall nat add chain=dstnat src-address=10.0.0.0/16 dst-address=0.0.0.0/0 protocol=tcp dst-port=80 \
action=redirect to-ports=3126 comment=”Proxy” disabled=no
Proxy-off
/ system script add name=”Proxy-off” source=”/ip firewall nat set \[/ip firewall nat find \
comment=\"Proxy\"\] disable=yes
\n/ip web-proxy set enabled=no” \
policy=ftp,reboot,read,write,policy,test,winbox,password
Proxy-limpacache
/ system script add name=”Proxy-limpacache” source=”/ip web-proxy clear-cache” \
policy=ftp,reboot,read,write,policy,test,winbox,password
Proxy-on
/ system script add name=”Proxy-on” source=”/ip web-proxy set enabled=yes
\n/ip firewall nat \
set \[/ip firewall nat find comment=\"Proxy\"\] disable=no
\n” \
policy=ftp,reboot,read,write,policy,test,winbox,password
scheduler proxy-off
/ system scheduler add name=”control-proxy-off” on-event=Proxy-off start-date=nov/29/2006 start-time=02:30:00 interval=15d comment=”" disabled=no
scheduler proxy-limpacache
/ system scheduler add name=”control-proxy-limpacache” on-event=Proxy-limpacache start-date=nov/29/2006 start-time=02:31:00 interval=15d comment=”" disabled=no
scheduler proxy-on
/ system scheduler add name=”controle-proxy-on” on-event=Proxy-on start-date=nov/29/2006 start-time=02:40:00 interval=15d comment=”" disabled=no
Queue dengan SRC-NAT dan WEB-PROXY
February 20, 2007 at 3:15 am | In mikrotik | Leave a CommentPada penggunaan queue (bandwidth limiter), penentuan CHAIN pada MENGLE sangat menentukan jalannya sebuah rule. Jika kita memasang SRC-NAT dan WEB-PROXY pada mesin yang sama, sering kali agak sulit untuk membuat rule QUEUE yang sempurna. Penjelasan detail mengenai pemilihan CHAIN, dapat dilihat pada manual Mikrotik di sini.
Percobaan yang dilakukan menggunakan sebuah PC dengan Mikrotik RouterOS versi 2.9.28. Pada mesin tersebut, digunakan 2 buah interface, satu untuk gateway yang dinamai PUBLIC dan satu lagi untuk jaringan lokal yang dinamai LAN.
[admin@instaler] > in pr Flags: X - disabled, D - dynamic, R - running # NAME TYPE RX-RATE TX-RATE MTU 0 R public ether 0 0 1500 1 R lan wlan 0 0 1500 |
Dan berikut ini adalah IP Address yang digunakan. Subnet 192.168.0.0/24 adalah subnet gateway untuk mesin ini.
[admin@instaler] > ip ad pr Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK BROADCAST INTERFACE 0 192.168.0.217/24 192.168.0.0 192.168.0.255 public 1 172.21.1.1/24 172.21.1.0 172.21.1.255 lan |
Fitur web-proxy dengan transparan juga diaktifkan.
[admin@instaler] > ip web-proxy pr
enabled: yes
src-address: 0.0.0.0
port: 3128
hostname: "proxy" transparent-proxy: yes
parent-proxy: 0.0.0.0:0
cache-administrator: "webmaster"
max-object-size: 4096KiB
cache-drive: system
max-cache-size: none
max-ram-cache-size: unlimited
status: running
reserved-for-cache: 0KiB
reserved-for-ram-cache: 154624KiB
|
Fungsi MASQUERADE diaktifkan, juga satu buah rule REDIRECTING untuk membelokkan traffic HTTP menuju ke WEB-PROXY
[admin@instaler] ip firewall nat> pr Flags: X - disabled, I - invalid, D - dynamic 0 chain=srcnat out-interface=public src-address=172.21.1.0/24 action=masquerade
1 chain=dstnat in-interface=lan src-address=172.21.1.0/24 protocol=tcp dst-port=80 action=redirect to-ports=3128
|
Berikut ini adalah langkah terpenting dalam proses ini, yaitu pembuatan MANGLE. Kita akan membutuhkan 2 buah PACKET-MARK. Satu untuk paket data upstream, yang pada contoh ini kita sebut test-up. Dan satu lagi untuk paket data downstream, yang pada contoh ini kita sebut test-down.
Untuk paket data upstream, proses pembuatan manglenya cukup sederhana. Kita bisa langsung melakukannya dengan 1 buah rule, cukup dengan menggunakan parameter SRC-ADDRESS dan IN-INTERFACE. Di sini kita menggunakan chain prerouting. Paket data untuk upstream ini kita namai test-up.
Namun, untuk paket data downstream, kita membutuhkan beberapa buah rule. Karena kita menggunakan translasi IP/masquerade, kita membutuhkan Connection Mark. Pada contoh ini, kita namai test-conn.
Kemudian, kita harus membuat juga 2 buah rule. Rule yang pertama, untuk paket data downstream non HTTP yang langsung dari internet (tidak melewati proxy). Kita menggunakan chain forward, karena data mengalir melalui router.
Rule yang kedua, untuk paket data yang berasal dari WEB-PROXY. Kita menggunakan chain output, karena arus data berasal dari aplikasi internal di dalam router ke mesin di luar router.
Paket data untuk downstream pada kedua rule ini kita namai test-down.
Jangan lupa, parameter passthrough hanya diaktifkan untuk connection mark saja.
[admin@instaler] > ip firewall mangle print Flags: X - disabled, I - invalid, D - dynamic 0 ;;; UP TRAFFIC chain=prerouting in-interface=lan
src-address=172.21.1.0/24 action=mark-packet
new-packet-mark=test-up passthrough=no 1 ;;; CONN-MARK
chain=forward src-address=172.21.1.0/24
action=mark-connection
new-connection-mark=test-conn passthrough=yes
2 ;;; DOWN-DIRECT CONNECTION
chain=forward in-interface=public
connection-mark=test-conn action=mark-packet
new-packet-mark=test-down passthrough=no
3 ;;; DOWN-VIA PROXY
chain=output out-interface=lan
dst-address=172.21.1.0/24 action=mark-packet
new-packet-mark=test-down passthrough=no
|
Untuk tahap terakhir, tinggal mengkonfigurasi queue. Di sini kita menggunakan queue tree. Satu buah rule untuk data dowstream, dan satu lagi untuk upstream. Yang penting di sini, adalah pemilihan parent. Untuk downstream, kita menggunakan parent lan, sesuai dengan interface yang mengarah ke jaringan lokal, dan untuk upstream, kita menggunakan parent global-in.
[admin@instaler] > queue tree pr Flags: X - disabled, I - invalid 0 name="downstream" parent=lan packet-mark=test-down limit-at=32000 queue=default priority=8
max-limit=32000 burst-limit=0
burst-threshold=0 burst-time=0s
1 name="upstream" parent=global-in
packet-mark=test-up limit-at=32000
queue=default priority=8
max-limit=32000 burst-limit=0
burst-threshold=0 burst-time=0s |
Variasi lainnya, untuk bandwidth management, dimungkinkan juga kita menggunakan tipe queue PCQ, yang bisa secara otomatis membagi trafik per client.
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.