batctl

Langue: en

Version: Jan 04, 2010 (ubuntu - 25/10/10)

Section: 8 (Commandes administrateur)

NAME

batctl - B.A.T.M.A.N. advanced control and management tool

SYNOPSIS

batctl [batctl-optionscommand [command-options]

DESCRIPTION

batctl offers a convenient way to configure the batman-adv kernel module as well as displaying debug information such as originator tables, translation tables and the debug log. In combination with a bat-hosts file batctl allows the use of host names instead of MAC addresses.

B.A.T.M.A.N. advanced operates on layer 2. Thus all hosts participating in the virtual switched network are transparently connected together for all protocols above layer 2. Therefore the common diagnosis tools do not work as expected. To overcome these problems batctl contains the commands ping, traceroute, tcpdump which provide similar functionality to the normal ping(1), traceroute(1), tcpdump(1) commands, but modified to layer 2 behaviour or using the B.A.T.M.A.N. advanced protocol.

OPTIONS

batctl-options:
-h print general batctl help
-v print batctl version
commands:
interface|if [none|interface]
If no parameter is given the current interface settings are displayed otherwise the parameter(s) are added as new interfaces. Use the "none" keyword to deactivate all interfaces.
originators|o [-w][-n]
Once started batctl will display the originator table. Use the "-w" option to let batctl refresh the list every second. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output.
interval|it [orig_interval]
If no parameter is given the current originator interval setting is displayed otherwise the parameter is used to set the originator interval. The interval is in units of milliseconds.
loglevel|ll [level]
If no parameter is given the current log level settings are displayed otherwise the parameter is used to set the log level. Level 0 disables all verbose logging. Level 1 enables messages related to routing / flooding / broadcasting. Level 2 enables messages related to route or hna added / changed / deleted. Level 3 enables all messages. The messages are sent to the kernel log. Use dmesg(1) to see them. Make sure to have debugging output enabled when compiling the module otherwise the verbose logging output as well as the loglevel options won't be available.
log|l [logfile][-w][-n]
batctl will read the file logfile, or stdin if the logfile parameter is not given, applying filtering so only the B.A.T.M.A.N. Advanced messages are displayed. Once the end of the file has been reached batctl will exit unless the option "-w" was specified which causes batctl to continue reading the file and print log output whenever new log data has been appended to the file. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output.
translocal|tl [-w][-n]
Display the local translation table. Use the "-w" option to let batctl refresh the list every second. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output.
transglobal|tg [-w][-n]
Display the global translation table. Use the "-w" option to let batctl refresh the list every second. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output.
vis_server|vs [enabled|disabled]
If no parameter is given the current vis server setting is displayed. Otherwise the parameter is used to enable or disable the vis server.
vis_data|vd dot|json [-n|--numbers][-H|--no-HNA][-2|--no-2nd]
Display the visualisation data in dot(1) or JSON format. If "--numbers" or "-n" is given batctl will not replace the MAC addresses with bat-host names in the output. With "--no-HNA" or "-H" the HNA entries are not displayed, so the pure mesh topology can be seen. With "--no-2nd" or "-2" a dot cluster is not formed around primary and secondary addresses from the same device.
aggregation|ag [1|0]
If no parameter is given the current aggregation setting is displayed. Otherwise the parameter is used to enable or disable packet aggregation.
ping|p [-c count][-i interval][-t time] MAC_address|bat-host_name
Layer 2 ping of a MAC address or bat-host name. batctl will try to find the bat-host name if the given parameter was not a MAC address. The "-c" option tells batctl how man pings should be sent before the program exits. Without the "-c" option batctl will continue pinging without end. Use CTRL + C to stop it. With "-i" and "-t" you can set the default interval between pings and the timeout time for replies, both in seconds.
traceroute|tr [-n] MAC_address|bat-host_name
Layer 2 traceroute to a MAC address or bat-host name. batctl will try to find the bat-host name if the given parameter was not a MAC address. batctl will send 3 packets to each host and display the response time. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output.
tcpdump|td [-p filter][-n] interface ...
batctl will display all packets that are seen on the given interface(s). The "-p" options allows the filtering of certain packet types: 1 - batman ogm packets, 2 - batman icmp packets, 4 - unicast packets, 8 - broadcast packets, 16 - vis packets, and 32 - none batman packets. These numbers can be added to filter more than one packet type, e.g. use "-p 3" to display batman ogm packets and batman icmp packets only. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output.
bisect [-l MAC][-t MAC][-r MAC][-s min [- max]][-o MAC][-n] logfile1 [logfile2 ... logfileN]
Analyses the logfiles to build a small internal database of all sent sequence numbers and routing table changes. This database can then be analyzed in a number of different ways. With "-l" the database can be used to search for routing loops. Use "-t" to trace OGMs of a host throughout the network. Use "-r" to display routing tables of the nodes. The option "-s" can be used to limit the output to a range of sequence numbers, between min and max, or to one specific sequence number, min. Furthermore using "-o" you can filter the output to a specified originator. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output.

FILES

bat-hosts
This file is similar to the /etc/hosts file. You can write one MAC address and one host name per line. batctl will search for bat-hosts in /etc, your home directory and the current directory. The found data is used to match MAC address to your provided host name or replace MAC addresses in debug output and logs. Host names are much easier to remember than MAC addresses.

SEE ALSO

ping(1), traceroute(1), tcpdump(1), dmesg(1), dot(1)

AUTHOR

batctl was written by Andreas Langer <a.langer@q-dsl.de> and Marek Lindner <lindner_marek@yahoo.de>.

This manual page was written by Simon Wunderlich <siwu@hrz.tu-chemnitz.de>, Marek Lindner <lindner_marek@yahoo.de> and Andrew Lunn <andrew@lunn.ch>