Changeset 200
- Timestamp:
- Jan 26, 2017, 11:09:07 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r199 r200 7 7 use strict; 8 8 use warnings; 9 use version; our $VERSION = qv('0.5. 8');9 use version; our $VERSION = qv('0.5.9'); 10 10 11 11 use Readonly; … … 2474 2474 =head1 USAGE 2475 2475 2476 klask updatedb 2476 klask updatedb [--verbose] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] 2477 2477 klask exportdb --format [txt|html] 2478 2478 klask removedb computer* 2479 klask cleandb --day number_of_day --repair-dns --verbose2480 2481 klask updatesw 2479 klask cleandb [--verbose] --day number_of_day --repair-dns --verbose 2480 2481 klask updatesw [--verbose] 2482 2482 klask exportsw --format [txt|dot] 2483 2483 2484 2484 klask searchdb --kind [host|mac] computer [mac-address] 2485 2485 klask search computer 2486 klask search-mac-on-switch switch mac_addr2487 2488 klask ip-free --day number_of_day --format [txt|html] [vlan_name]2486 klask search-mac-on-switch [--verbose] [--vlan|-i vlan-id] switch mac_addr 2487 2488 klask ip-free [--verbose] --day number_of_day --format [txt|html] [vlan_name] 2489 2489 2490 2490 klask enable switch port … … 2496 2496 2497 2497 klask is a small tool to find where is a host in a big network. klask mean search in brittany. 2498 No hight level protocol like CDL, LLDP are use. 2499 Everything is just done with SNMP request on MAC address. 2500 2501 Limitation : loop cannot be detected and could be problematic when create the map. 2502 If you use PVST or MSTP and create loop between VLAN, 2503 you have to use portignore functionality on switch port to cut manually loop 2504 (see config file below). 2505 2506 When you use a management port to administrate the switch, 2507 it's not possible to create the map because the switch doesn't have a MAC address, 2508 so other switch cannot find downlink port... 2509 A way is if you have a computer directly connected on the switch is to put this IP as the fake ip for the switch. 2510 The MAC address associated will be use just for the map detection. 2511 The fake-ip parameter is defined in the config file. 2498 2512 2499 2513 Klask has now a web site dedicated for it ! … … 2507 2521 =head2 search 2508 2522 2509 This command takes one or more computer in argument. It search a computer on the network and give the port and the switch on which the computer is connected. 2523 This command takes one or more computer in argument. 2524 It search a computer on the network and give the port and the switch on which the computer is connected. 2510 2525 2511 2526 2512 2527 =head2 enable 2513 2528 2514 This command activate a port on a switch by snmp. So you need to give the switch and the port number on the command line. 2529 This command activate a port on a switch by SNMP. 2530 So you need to give the switch and the port number on the command line. 2515 2531 2516 2532 2517 2533 =head2 disable 2518 2534 2519 This command deactivate a port on a switch by snmp. So you need to give the switch and the port number on the command line. 2535 This command deactivate a port on a switch by SNMP. 2536 So you need to give the switch and the port number on the command line. 2520 2537 2521 2538 2522 2539 =head2 status 2523 2540 2524 This command return the status of a port number on a switch by snmp. So you need to give the switch name and the port number on the command line. 2541 This command return the status of a port number on a switch by SNMP. 2542 So you need to give the switch name and the port number on the command line. 2525 2543 2526 2544 2527 2545 =head2 updatedb 2528 2546 2529 This command will scan networks and update a database. To know which are the cmputer scan, you have to configure the file /etc/klask/klask.conf This file is easy to read and write because klask use YAML format and not XML. 2547 This command will scan networks and update a database. 2548 To know which are the cmputer scan, you have to configure the file F</etc/klask/klask.conf>. 2549 This file is easy to read and write because klask use YAML format and not XML. 2530 2550 2531 2551 2532 2552 =head2 exportdb 2533 2553 2534 This command print the content of the database. There is actually only one format. It's very easy to have more format, it's just need times... 2554 This command print the content of the database. There is actually only one format. 2555 It's very easy to have more format, it's just need times... 2535 2556 2536 2557 =head2 removedb … … 2551 2572 =head2 updatesw 2552 2573 2553 This command build a map of your manageable switch on your network. The list of the switch must be given in the file /etc/klask/klask.conf. 2574 This command build a map of your manageable switch on your network. 2575 The list of the switch must be given in the file F</etc/klask/klask.conf>. 2554 2576 2555 2577 2556 2578 =head2 exportsw --format [txt|dot] 2557 2579 2558 This command print the content of the switch database. There is actually two format. One is just txt for terminal and the other is the dot format from the graphviz environnement. 2580 This command print the content of the switch database. There is actually two format. 2581 One is just txt for terminal and the other is the dot format from the graphviz environnement. 2559 2582 2560 2583 klask exportsw --format dot > /tmp/map.dot … … 2565 2588 =head1 CONFIGURATION 2566 2589 2567 Because klask need many parameters, it's not possible actually to use command line parameters. The configuration is done in a /etc/klask/klask.conf YAML file. This format have many advantage over XML, it's easier to read and to write ! 2590 Because klask need many parameters, it's not possible actually to use command line parameters. 2591 The configuration is done in a /etc/klask/klask.conf YAML file. 2592 This format have many advantage over XML, it's easier to read and to write ! 2568 2593 2569 2594 Here an example, be aware with indent, it's important in YAML, do not use tabulation ! … … 2600 2625 - 1 2601 2626 - 2 2602 2603 I think it's pretty easy to understand. The default section can be overide in any section, if parameter mean something in theses sections. Network to be scan are define in the network section. You must put a add by network. Maybe i will make a delete line to suppress specific computers. The switch section define your switch. You have to write the port number to ignore, this is important if your switchs are cascade. Juste put the ports numbers between switch. 2627 fake-ip: 192.168.9.14 2628 2629 I think it's pretty easy to understand. 2630 The default section can be overide in any section, if parameter mean something in theses sections. 2631 Network to be scan are define in the network section. You must put a add by network. 2632 Maybe i will make a delete line to suppress specific computers. 2633 The switch section define your switch. 2634 You have to write the port number to ignore, this is important if your switchs are cascade. 2635 Juste put the ports numbers between switch. 2604 2636 2605 2637
Note: See TracChangeset
for help on using the changeset viewer.