Documentation > Userspace Application > Flags > --bib
--bib
Index
Description
Interacts with Jool’s Binding Information Base (BIB). If you don’t know what that is, please follow the link before continuing.
Syntax
jool --bib <protocols> [--display] [--numeric] [--csv]
jool --bib <protocols> --count
jool --bib <protocols> --add <bib4> <bib6>
jool --bib <protocols> --remove (<bib4> | <bib6> | <bib4> <bib6>)
Options
Operations
--display
: The BIB tables are printed in standard output. This is the default operation.--count
: The number of entries per BIB table are printed in standard output.--add
: Combines<bib6>
and<bib4>
into a static BIB entry, and uploads it to Jool’s tables.--remove
: Deletes from the tables the BIB entry described by<bib6>
and/or<bib4>
.
<protocols>
<protocols> := [--tcp] [--udp] [--icmp]
The command will only operate on the tables mentioned here. If you omit this entirely, Jool will fall back to operate on all three tables.
--numeric
By default, the application will attempt to resolve the name of the IPv6 node of each BIB entry. If your nameservers aren’t answering, this will slow the output down.
Use --numeric
to turn this behavior off.
--csv
By default, the application will print the tables in a relatively console-friendly format.
Use --csv
to print in CSV format, which is spreadsheet-friendly.
<bib4>
, <bib6>
<bib4> := <IPv4 address>#(<port> | <ICMP identifier>)
<bib6> := <IPv6 address>#(<port> | <ICMP identifier>)
A BIB entry is composed of a IPv6 transport address (the IPv6 node’s connection identifiers) and a IPv4 transport address (the connection identifiers Jool is using to mask the IPv6 ones).
If you’re adding or removing a BIB, you provide both addresses via these parameters.
Note that the <bib4>
component must be a member of Jool’s IPv4 pool, so make sure you have registered it there first.
Within a BIB table, every IPv4 transport address is unique. Within a BIB table, every IPv6 transport address is also unique. Therefore, If you’re removing a BIB entry, you actually only need to provide one of them. You can still input both to make sure you’re deleting exactly what you want to delete, though.
Examples
Assumptions:
- 4.4.4.4 belongs to the IPv4 pool.
- The name of 6::6 is “potato.mx”.
- 6::6 already spoke to a IPv4 node recently, so the database will not start empty.
Display the entire database:
$ jool --bib --display
TCP:
[Dynamic] 4.4.4.4#1234 - potato.mx#1234
(Fetched 1 entries.)
UDP:
(empty)
ICMP:
(empty)
Publish a couple of TCP services:
# jool --bib --add --tcp 6::6#6 4.4.4.4#4
# jool --bib --add --tcp 6::6#66 4.4.4.4#44
Display the TCP table:
$ jool --bib --display --tcp
TCP:
[Static] 4.4.4.4#4 - potato.mx#6
[Static] 4.4.4.4#44 - potato.mx#66
[Dynamic] 4.4.4.4#1234 - potato.mx#1234
(Fetched 3 entries.)
Same, but do not query the DNS:
$ jool --bib --display --tcp --numeric
TCP:
[Static] 4.4.4.4#4 - 6::6#6
[Static] 4.4.4.4#44 - 6::6#66
[Dynamic] 4.4.4.4#1234 - 6::6#1234
(Fetched 3 entries.)
Publish a UDP service:
# jool --bib --add --udp 6::6#6666 4.4.4.4#4444
Dump the database on a CSV file:
$ jool --bib --display --numeric --csv > bib.csv
Display the number of entries in the TCP and ICMP tables:
$ jool --bib --count --tcp --icmp
TCP: 3
ICMP: 0
Remove the UDP entry:
# jool --bib --remove --udp 6::6#6666