Multi Router Traffic Grapher SNMP Configuration Pe LAB
Multi Router Traffic Grapher • Γενικά • SNMP • Configuration ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
Configuration File Example Workdir: /usr/local/apache/w 3/html/stats/mrtg Refresh: 300 Write. Expires: No ################################### # Description: Cisco Internetwork Operating System Software <BR> IOS (tm) RSP # Software (RSPISV-M), Version 11. 2 (11)P, RELEASE SOFTWARE (fc 1) <BR> # Copyright (c) 1986 -1998 by cisco Systems, Inc. <BR> Compiled Tue 06 -Jan-98 05: 55 # by dschwart # Contact: # System Name: Bono. # Location: #. . . . . . . . . Target[143. 233. xxx. x]: 6: public@143. 233. 169. 61 Max. Bytes[143. 233. xxx. x]: 32000 With. Peak[143. 233. xxx. x]: ym Options[143. 233. xxx. x]: growright, bits Title[143. 233. xxx. x]: Bono. (teipir-athens. grnet. gr): Serial 1. 1 Page. Top[143. 233. xxx. x]: <A HREF="http: //platon. teipir. gr/"> <IMG SRC=". /tei 1. jpg"></IMG></A><BR> <H 1>MRTG Traffic Analysis by Pe. LAB </H 1> <TABLE> <A HREF=". . /index. html"> <IMG SRC="clouds 4. GIF"></IMG> </A> <TR><TD>Maintainer: </TD> <TD><A HREF="mailto: noc@teipir. gr">noc@teipir. gr</A></TD></TR> <TR><TD>Interface: </TD><TD>Serial 1. 1 (6)</TD></TR> <TR><TD>IP: </TD><TD>teipir-athens. grnet. gr (194. 177. 208. 154)</TD></TR> <TR><TD>Max Speed: </TD> <TD>256 k. Bits/s (frame-relay)</TD></TR> </TABLE> ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
Διαδικασία Προσθήκης Interface • • Προσθέτουμε στο mrtg. cfg μια εγγραφή για το καινούριο interface Ενημέρωση της ιστοσελίδας με τα core_links καθώς και με όλα τα interfaces. <strong>Serial 1 ( Σύνδεση με το ΕΔΕΤ )</strong> <a href=» http: //gun. teipir. gr/stats/mrtg/link_to_new_interface. html» > <img src=» http: //gun. teipir. gr/stats/mrtg/ link_to_new_interface –day. gif» border=0></a> • Στον κώδικα του save_mrtg. c πρέπει να προστεθεί : sprintf (filename, “%s. num_interface-day. gif”, new_interface ); sprintf (command 1, “cp %s/%s %s”, path 1, filename, path 2); system (command 1); • Ενημερώνουμε την σελίδα στο http: //gun. teipir. gr/stats/ με το καινούριο interface ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
Common Log File Format • Παράδειγμα τυπικής εγγραφής 143. 233. 169. 110 - -[29/Sep/1998: 11: 44: 11 +0300] "GET /new/wwwadm. gif HTTP/1. 0" 304 0 • Εξήγηση host ident authuser date request status bytes ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
Original Pwebstats print "<h 3>Hosts accessing this server, ordered by number of accesses: "; print "</h 3>"; print "<h 4>Top Ten Hosts: </h 4>n"; print "<pre>"; print "Host Accessing the Server : accesses : bytes transferred n"; print "-----------------------------------n"; open(HOSTS, "$hosts_tmp"); $i=0; while( <HOSTS> ) { chop; ($serv, $num)=split(/t/); if( $i < 10 ){ printf "%-37 s : %8 s : %17 sn", $serv, &commas($num), &commas($hostbytes{$serv}); } else { last; } $i++; } close(HOSTS); print "</pre><p><a href="hosts/$server. $period. total-hosts. html"> <strong>List of hosts accessing the server (more than $host_threshold times). </str ong></a> n"; ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
Changed Pwebstats print "<hr><center>n"; print "<h 3 align="center"><font color="#000080">Hosts accessing this server, ordered by number of accesses: </font></h 3>"; print "<h 4>Top Ten Hosts: </h 4>n"; print "<table border=2 bgcolor="#CCFFFF">n"; print "<tr bgcolor="#FFCC 00">n"; print "<td align=center>Host Accessing the Server</td> <td align=center>accesses</td> <td align=center>bytes transferred</td></tr>n"; open(HOSTS, "$hosts_tmp"); $i=0; while( <HOSTS> ) { print "<tr>n"; chop; ($serv, $num)=split(/t/); if( $i < 10 ){ printf "<td align=center>%-37 s</td><td align=center>%8 s</td> <td align=center>%17 s</td>n", $serv, &commas($num), &commas($hostbytes{$serv}); } else { last; } $i++; </tr> } close(HOSTS); print "</table></center>n"; print "</pre><p><a href="hosts/$server. $period. total-hosts. html"> <strong>List of hosts accessing the server (more than $host_threshold times). </strong></a> n"; ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
TACACS+ (Terminal Access Controller Access Control System) • H authenticarion διαδικασία του tacacs έχει τρείς τύπους πακέτων: – Start – Continue – Reply ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
Ρυθμίσεις στον Router ! aaa new-model aaa authentication login default tacacs+ enable aaa authentication ppp default if-needed tacacs+ aaa authorization exec tacacs+ if-authenticated aaa authorization commands 1 tacacs+ if-authenticated none aaa authorization commands 15 tacacs+ if-authenticated none aaa authorization network tacacs+ local enable password ww ! chat-script default "" at&fls 0=1&h 1&r 2&c 1&d 2&b 1 e 0 q 2 OK ! interface Ethernet 0 ip address 10. 6. 1. 200 255. 0 ! ! chap/ppp authentication user: interface Async 1 ip unnumbered Ethernet 0 encapsulation ppp configuration του ασύγχρονου interface 1 async mode dedicated peer default ip address pool async no cdp enable ppp authentication chap ! ip local pool async 10. 6. 100. 101 10. 6. 100. 103 tacacs-server host 171. 68. 118. 101 το key με το οποίο θα επιτυγχάνεται η tacacs-server timeout 10 επικοινωνία με τον server, ο οποίος έχει IP tacacs-server key cisco διεύθυνση 171. 68. 118. 101 line 1 session-timeout 20 exec-timeout 120 0 autoselect during-login script STARTup default script reset default modem Dialin configuration τηςdial-up transport input all γραμμής 1 stopbits 1 rxspeed 115200 txspeed 115200 flowcontrol hardware ! end ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
Ρυθμίσεις στον Server # Handshake with Router--NAS needs 'tacacs-server key cisco': key = "cisco"το key με το οποίο επιτυγχάνεται η επικοινωνία ! User who can telnet in to configure: user = admin { default service = permit login = cleartext "admin" } # ppp/chap authentication line 1 - password must be cleartext per chap spec user = chapuser { chap = cleartext "chapuser" service = ppp protocol = ip { default attribute = permit } } Κλήση εξωτερικών προγραμμάτων user = chapuser { chap = cleartext "chapuser" after authentication “path_to_external_programm” service = ppp protocol = ip { } } ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
LOG αρχείο Εγγραφή κατα την είσοδο του χρήστη στο σύστημα Thu Jun 4 00: 28: 46 1998 143. 233. 169. 130 task_id=113 service=ppp vasko Async 3 async START Εγγραφή κατα την έξοδο του χρήστη από το σύστημα Thu Jun 4 00: 58: 32 1998 143. 233. 169. 130 vasko Async 3 async STOP task_id=113 service=ppp protocol=ip addr=143. 233. 169. 133 bytes_in=104404 bytes_out=3777657 paks_in=3538 paks_out=3370 elapsed_time=1785 ΤΕΙ ΠΕΙΡΑΙΑ-Τμ. Η. Υ. Σ. Pe. LAB: Οκτ. '98 Πτυχιακή
- Slides: 57