Changeset 200 for trunk/klask


Ignore:
Timestamp:
Jan 26, 2017, 11:09:07 PM (7 years ago)
Author:
g7moreau
Message:
  • Better doc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r199 r200  
    77use strict;
    88use warnings;
    9 use version; our $VERSION = qv('0.5.8');
     9use version; our $VERSION = qv('0.5.9');
    1010
    1111use Readonly;
     
    24742474=head1 USAGE
    24752475
    2476  klask updatedb
     2476 klask updatedb [--verbose] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l]
    24772477 klask exportdb --format [txt|html]
    24782478 klask removedb computer*
    2479  klask cleandb  --day number_of_day --repair-dns --verbose
    2480 
    2481  klask updatesw
     2479 klask cleandb  [--verbose] --day number_of_day --repair-dns --verbose
     2480
     2481 klask updatesw [--verbose]
    24822482 klask exportsw --format [txt|dot]
    24832483
    24842484 klask searchdb --kind [host|mac] computer [mac-address]
    24852485 klask search   computer
    2486  klask search-mac-on-switch switch mac_addr
    2487 
    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]
    24892489
    24902490 klask enable  switch port
     
    24962496
    24972497klask is a small tool to find where is a host in a big network. klask mean search in brittany.
     2498No hight level protocol like CDL, LLDP are use.
     2499Everything is just done with SNMP request on MAC address.
     2500
     2501Limitation : loop cannot be detected and could be problematic when create the map.
     2502If you use PVST or MSTP and create loop between VLAN,
     2503you have to use portignore functionality on switch port to cut manually loop
     2504(see config file below).
     2505
     2506When you use a management port to administrate the switch,
     2507it's not possible to create the map because the switch doesn't have a MAC address,
     2508so other switch cannot find downlink port...
     2509A way is if you have a computer directly connected on the switch is to put this IP as the fake ip for the switch.
     2510The MAC address associated will be use just for the map detection.
     2511The fake-ip parameter is defined in the config file.
    24982512
    24992513Klask has now a web site dedicated for it !
     
    25072521=head2 search
    25082522
    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.
     2523This command takes one or more computer in argument.
     2524It search a computer on the network and give the port and the switch on which the computer is connected.
    25102525
    25112526
    25122527=head2 enable
    25132528
    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.
     2529This command activate a port on a switch by SNMP.
     2530So you need to give the switch and the port number on the command line.
    25152531
    25162532
    25172533=head2 disable
    25182534
    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.
     2535This command deactivate a port on a switch by SNMP.
     2536So you need to give the switch and the port number on the command line.
    25202537
    25212538
    25222539=head2 status
    25232540
    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.
     2541This command return the status of a port number on a switch by SNMP.
     2542So you need to give the switch name and the port number on the command line.
    25252543
    25262544
    25272545=head2 updatedb
    25282546
    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.
     2547This command will scan networks and update a database.
     2548To know which are the cmputer scan, you have to configure the file F</etc/klask/klask.conf>.
     2549This file is easy to read and write because klask use YAML format and not XML.
    25302550
    25312551
    25322552=head2 exportdb
    25332553
    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...
     2554This command print the content of the database. There is actually only one format.
     2555It's very easy to have more format, it's just need times...
    25352556
    25362557=head2 removedb
     
    25512572=head2 updatesw
    25522573
    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.
     2574This command build a map of your manageable switch on your network.
     2575The list of the switch must be given in the file F</etc/klask/klask.conf>.
    25542576
    25552577
    25562578=head2 exportsw --format [txt|dot]
    25572579
    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.
     2580This command print the content of the switch database. There is actually two format.
     2581One is just txt for terminal and the other is the dot format from the graphviz environnement.
    25592582
    25602583 klask exportsw --format dot > /tmp/map.dot
     
    25652588=head1 CONFIGURATION
    25662589
    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 !
     2590Because klask need many parameters, it's not possible actually to use command line parameters.
     2591The configuration is done in a /etc/klask/klask.conf YAML file.
     2592This format have many advantage over XML, it's easier to read and to write !
    25682593
    25692594Here an example, be aware with indent, it's important in YAML, do not use tabulation !
     
    26002625       - 1
    26012626       - 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
     2629I think it's pretty easy to understand.
     2630The default section can be overide in any section, if parameter mean something in theses sections.
     2631Network to be scan are define in the network section. You must put a add by network.
     2632Maybe i will make a delete line to suppress specific computers.
     2633The switch section define your switch.
     2634You have to write the port number to ignore, this is important if your switchs are cascade.
     2635Juste put the ports numbers between switch.
    26042636
    26052637
Note: See TracChangeset for help on using the changeset viewer.