Daftar Materi :
I. Zebra (Linux Router Software)
II. SNMP / NET-SNMP (Simple Network Management Protocol)
III. MRTG (Multi Router Traffic Graph)
I. Zebra (Linux Router Software) :
Zebra is TCP/IP routing software that supports BGP-4, BGP-4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng. It is distributed under the GNU General Public License and runs on Linux as well as other UNIX variants. Zebra is included in most modern distributions as routing software. The latest version, along with documentation, is available at the GNU Zebra Web. The original Zebra package was written by Kunihiro Ishiguro and Yoshinari Yoshikawa back in 1996. Today, the package is maintained primarily by IP Infusion -- of which Mr. Ishiguro is the CTO -- with the assistance of networking engineers and open source volunteers. Zebra is unique in its design because it takes a modular approach to the protocols that it manages. Protocols can be enabled or disabled as network requirements dictate. By far the most useful feature we found with Zebra was its close similarity to the Cisco IOS configuration formats. While there are some differences from IOS, the feel is close enough that network engineers already familiar with IOS will feel very comfortable in the environment. While Zebra has not yet hit version 1.0 -- the version at the time of this writing is 0.93b -- the quality of the product is adequate for small networks that need a core router. |
I.a File konfigurasi :
Konfigurasi file terdapat di file zebra.conf, untuk konfigurasi routing protocol terdapat di file rip.conf dan ospf.conf. (Terletak di /usr/local/zebra/etc).
|
I.b Cara konfigurasi zebra : dengan melakukan telnet ke port 2601 :
|
I.c Installasi Zebra.
- Unpack source : gunzip dan tar –xvf
- Konfigurasi dengan :
#./configure –prefix=/usr/local/zebra –enable-snmp # make # make install # make clean |
- Pindah ke direktori /usr/local/zebra/etc
- Kopi zebra.conf.example menjadi zebra.conf, edit jika diperlukan.
- Pindah ke direktori /usr/local/zebra/sbin
- Jalankan Zebra dengan :
#./zebra& |
- Lakukan telnet ke local :
I.d Konfigurasi dengan MRLG (Multi Router Looking Glass) :
The Multi-Router Looking Glass, or MRLG, written by John Frazier of EnterZone, is a Web-based utility that can be used to display the interfaces and routes recognized by Zebra. MRLG is really nothing more than a Web interface to the Zebra shell with a limited set of commands, but in the course of our testing, we found it to be a quick and useful way to display routes. So, before getting to the configuration of the Zebra protocols, we'll show you how we installed it. |
- Unpack source : Gunzip dan tar –xvf
- Jalankan perintah :
# perl MakeFile.PL # make # make test # make install |
- Pindah ke direktori source Zebra : /tmp/zebra-0.94/tools/
- Kopikan file mrlg.cgi ke /var/www/cgi-bin.
- Modifikan file mrlg.cgi:
a. Baris ke 36 :
$url="http://www.sample.com/mrlg.cgi"; to: $url="http://127.0.0.1/cgi-bin/mrlg.cgi"; |
b. Baris ke 168 dan 174 :
|
- Untuk mengecek akses ke browser : http://127.0.0.1/cgi-bin/mrlg.cgi :
I.e Lab. Simulation (RIP)
Konfigurasi Router C :
- set dummy interface :
# modprobe dummy |
- Konfigurasi IP :
|
- Set RIP protocol :
a. Set rip konfigurasi /usr/local/zebra/etc, kopikan rip.conf.example menjadi rip.conf.
b. Jalankan rip service di /usr/local/zebra/sbin/ : #>./ripd&
c. Konfigurasi RIP :
|
Konfigurasi Router A :
- set dummy interface :
# modprobe dummy |
- Konfigurasi IP :
|
- Set RIP protocol :
a. Set rip konfigurasi /usr/local/zebra/etc, kopikan rip.conf.example menjadi rip.conf.
b. Jalankan rip service di /usr/local/zebra/sbin/ : #>./ripd&
c. Konfigurasi RIP :
|
Konfigurasi Router B :
- set dummy interface :
# modprobe dummy |
- Konfigurasi IP :
|
- Set RIP protocol :
a. Set rip konfigurasi /usr/local/zebra/etc, kopikan rip.conf.example menjadi rip.conf.
b. Jalankan rip service di /usr/local/zebra/sbin/ : #>./ripd&
c. Konfigurasi RIP :
|
- Cek routing table Router C :
|
- Cek ping ke 10.0.0.1 dan 10.0.1.1
- Test router failover : matikan interface / kabel eth0 dari router A : (Tunggu > 2 menit)
|
- Cek routing table router A sebelum failover :
|
- Cek routing table router A setelah failover :
|
I.f Lab. Simulation (OSPF)
- Matikan service RIP : kill
- Kopi konfigurasi ospf.conf.example ke ospf.conf.
- Konfigurasi dengan telnet ke port 2604
- Konfigurasi Router A/B/C :
|
- Cek Routing Table :
|
- Lakukan failover testing.
II. SNMP / NET-SNMP (Simple Network Management Protocol)
SNMP operates at the application level using TCP/IP transport-level protocols so it can ignore the underlying network hardware. This means the management software uses IP, and so can control devices on any connected network:not just those attached to its physical network. This also has disadvantages: if the IP routing is not working correctly between two devices, it's impossible to reach the target to monitor or reconfigure it. There are two main elements in the SNMP architecture: the agent and the manager. It's a client-server architecture, where the agent is the server and the manager is the client. The agent is a program running in each of the monitored or managed nodes of the network. It provides an interface to all the items of their configuration. These items are stored in a data structure called a management information base (MIB), which we explain later. It's the server side, as long as it maintains the information being managed and waits for commands from the client. The manager is the software that runs in the monitoring station of the network, and its role is contacting the different agents running in the network to poll for values of its internal data. It's the client side of the communication. There is a special command in the SNMP command set called trap that permits an agent to send unsolicited data to the manager, to inform it of events, such as errors, shutdowns, etc. In essence, SNMP is a very simple protocol as long as all the operations it performs deal with the fetch-and-store paradigm, and this allows for a small commands set. A manager can perform only two different operations on an agent: request or set the value of a variable in the MIB of the agent. These two operations are known as get-request and set-request. There's a command to respond to a get-request called get-response, which is used only by the agent. The extensibility of the protocol is directly related to the capability of the MIB to store new items. If a manufacturer wants to add some new commands to a device such as a router, he must add the appropriate variables to its database (MIB). Almost all manufacturers implement versions of SNMP agents in their devices: routers, hubs, operating systems, and so on. Linux is not an exception to this, and publicly available SNMP agents for Linux can be found on the Internet. |
Software SNMP di linux :
- cmu-snmp
- net-snmp untuk Zebra
II.a.1 Installasi cmu-snmp
# gunzip cmu-snmp-linux-3.2-bin.tar.gz # tar xvf cmu-snmp-linux-3.2-bin.tar # /tmp/cmu-snmp-linux-3.2/etc/installconf -mini # /usr/sbin/snmpd -f ; echo 'starting snmpd' |
a.2 SNMP Tools :
|
a.3 Testing :
# /usr/bin/snmpget -v 1 localhost public interfaces.ifNumber.0 # /usr/bin/snmpwalk -v 1 localhost public system Hasil :
|
II.b.1 Installasi net-snmp
- Unpack soure : tar
- Kompile :
# configure --with-mib-modules=smux # make # make install |
- Konfigurasi file /usr/local/share/snmp/snmpd.conf
# smuxpeer 1.3.6.1.6.3.1 test |
III. MRTG (Multi Router Traffic Graph)
MRTG is an advanced tool written by Tobias Oetiker and Dave Rand to graphically represent the data SNMP agents brings to SNMP managers. It generates nice HTML pages with GIF graphics about inbound and outbound traffic in network interfaces in almost real time. This abstracts the idea of dealing directly with objects of an MIB with a command line tool like CMU-SNMP. This is the simplest and most powerful tool to monitor my routers I have found on the Internet. MRTG uses an SNMP implementation coded entirely in Perl, so there is no need to install other packages. The main program is written in C to speed up the logging process and the generation of GIF images. The graphics are generated with the help of the GD library from Thomas Boutell, author of the WWW FAQ. One of the highlights of MRTG is its expandability and powerful configuration. It's very easy to monitor any SNMP variables instead of traffic, like error packets, system load, modem availability and others. It's even possible to import data from an external program to feed the data, so you can use it to monitor login sessions and other information not available through SNMP. |
III.a Installasi
- Konfigurasi Zlib :
gunzip -c zlib-*.tar.gz | tar xf - rm zlib-*.tar.gz mv zlib-* zlib cd zlib ./configure make cd .. |
- Konfigurasi libpng :
gunzip -c libpng-*.tar.gz |tar xf - rm libpng-*.tar.gz mv libpng-* libpng cd libpng make -f scripts/makefile.std CC=gcc ZLIBLIB=../zlib ZLIBINC=../zlib rm *.so.* *.so cd .. |
- Konfigurasi gd : (2.0.11) :
gunzip -c gd-2.0.11.tar.gz |tar xf - mv gd-2.0.11 gd cd gd env CPPFLAGS="-I../zlib -I../libpng" LDFLAGS="-L../zlib -L../libpng" ./configure --disable-shared \ --without-freetype --without-jpeg make cp .libs/* . |
- Konfigurasi MRTG :
cd /usr/local/src gunzip -c mrtg-2.14.3.tar.gz | tar xvf - cd mrtg-2.14.3 |
- Kompile MRTG :
./configure --prefix=/usr/local/mrtg-2 Atau ./configure --prefix=/usr/local/mrtg-2 \ --with-gd=/usr/local/src/gd \ --with-z=/usr/local/src/zlib \ --with-png=/usr/local/src/libpng # make # make install |
- Setting mrtg.cfg :
# cfgmaker public@192.168.233.1 > mrtg.cfg # ./mrtg mrtg.cfg # indexmaker mrtg.cfg > /usr/local/web/mrtg/index.html |
- Setting Schedule :
# crontab –e */5 * * * * <mrtg-bin>/mrtg <path to mrtg-cfg>/mrtg.cfg \ --logging /var/log/mrtg.log |
===== Selesai =====