The histogram tools command shows several summarized distributions:
ports and subscribers
The distribution of outside ports in a NAT pool for an aggregate number of subscribers. The output of the histogram command can reveal the number of subscribers in a pool that are heavy port users, or it can reveal the average number of ports used by most subscribers
port blocks and subscribers in a NAT pool
The distribution of port blocks in an L2-aware NAT pool for an aggregate number of subscribers. The output of the histogram command can reveal how subscribers are using port blocks in the aggregate.
extended port blocks and outside IP addresses in a NAT pool
The distribution of extended port blocks in NAT pool in relation to an aggregate number of outside IP addresses. The output of the histogram command can reveal how extended port blocks are distributed over IP addresses in an aggregate. This is applicable only for a L2-aware NAT pool with extended port blocks enabled, or a deterministic LSN pool.
The operator can use the displayed information to adjust the port block size per subscriber, the amount of port blocks per subscriber, or see port usage trends over time. Consequently, the operator can adjust the configuration as the port demand per subscriber increases or decreases over time. For example, an operator may find that the port usage in a pools increased over a period of time. Accordingly, the operator can plan to increase the number of ports per port block.
The output of the histogram command is described in the following examples:
ports and subscribers per NAT pool (L2-aware or LSN)
The output is organized in port buckets with the number of subscribers in each bucket.
show router nat pool <name> histogram ports
- ports bucket-size <size> num-buckets <number>
<size> : [1..65536]
<number> : [2..50]
show router nat pool "pool-1" histogram ports bucket-size 200 num-buckets 10
===============================================================================
Usage histogram NAT pool "pool-1" router "Base"
===============================================================================
Num-ports Sub-TCP Sub-UDP Sub-ICMP
-------------------------------------------------------------------------------
1-199 17170 0 0
200-399 8707 0 0
400-599 2406 0 0
600-799 635 0 0
800-999 322 0 0
1000-1199 0 0 0
1200-1399 0 0 0
1400-1599 0 0 0
1600-1799 0 0 0
1800- 0 0 0
-------------------------------------------------------------------------------
No. of entries: 10
===============================================================================
port blocks and subscribers per NAT pool (L2-aware and LSN)
The output is organized by the increasing number of port blocks in a NAT pool with the number of subscribers using the number of port blocks indicated in each line.
show router nat pool <name> histogram port-blocks
show router nat pool "l2a" histogram port-blocks
===============================================================================
Usage histogram NAT pool "l2a" router "Base" port blocks per subscriber
===============================================================================
Num port-blocks Num subscribers
-------------------------------------------------------------------------------
1 17398
2 8550
3 2352
4 940
5 0
6 0
7 0
8 0
9 0
10 0
-------------------------------------------------------------------------------
No. of entries: 10
===============================================================================
extended port blocks in a NAT pool and outside IP addresses (L2-aware NAT and deterministic LSN)
The output is organized in extended port-block buckets in a NAT pool with the number of outside IP addresses in each bucket.
show router nat pool demo histogram extended-port-blocks-per-ip
- extended-port-blocks-per-ip bucket-size <size> num-buckets <number>
<size> : [1..65536]
<number> : [2..50]
show router nat pool "l2a" histogram extended-port-blocks-per-ip bucket-size 1 num-buckets 10
===============================================================================
Usage histogram NAT pool "l2a" router "Base" extended port blocks per IP address
===============================================================================
Num extended-port-blocks Num IP addresses
-------------------------------------------------------------------------------
- -
1-1 1039
2-2 6182
3-3 777
4-4 194
5-5 0
6-6 0
7-7 0
8-8 0
9- 0
-------------------------------------------------------------------------------
No. of entries: 10
===============================================================================
The output of each command can be periodically exported to an external destination with the cron command. The following displays an example of the output:
/configure system
script-control {
script "nat_histogram" owner ‟TiMOSCLI” {
admin-state enable
location "ftp://*:*@138.203.8.62/nat-histogram.txt"
}
script-policy "dump_nat_histogram" owner ‟TiMOS CLI” {
admin-state enable
results "ftp://*:*@138.203.8.62/nat_histogram_results.txt"
script {
name "nat_histogram"
}
}
}
cron {
schedule "nat_histogram_schedule" owner ‟TiMOS CLI” {
admin-state enable
interval 600
script-policy {
name "dump_nat_histogram"
}
}
The nat-histogram.txt file contains the command execution line. For example:
tools dump nat histogram router 4 pool "deterministic" bucket-size 10 num-buckets 10
This command is executed every 10 minutes (600 seconds) and the output of the command is written into a set of files on an external TFP server as displayed in the following example:
[root@ftp]# ls nat_histogram_results.txt*
nat_histogram_results.txt_20130117-153548.out
nat_histogram_results.txt_20130117-153648.out
nat_histogram_results.txt_20130117-153748.out
nat_histogram_results.txt_20130117-153848.out
nat_histogram_results.txt_20130117-153948.out
nat_histogram_results.txt_20130117-154048.out
[root@ftp]#