Documentation
Name
net traffic load - load a traffic matrix
Synopsis
load
[--dst=]
[--src=]
[--summary]
<file>
Arguments
- --dst=
- optionally mention a destination type
- --src=
- optionally mention a source type
- --summary
- optionally request a summary of the operation
- file
- the traffic matrix file
Description
This command loads a traffic matrix out of a text file. The text file does not contain a "real" matrix, but instead a series of flows. A flow mentions a source and a destination as well as a volume. There are different ways to identify the source and the destination of a flow.
To clarify the notion of flows, let's use the following example traffic matrix file. The file has 5 lines, 4 of which describe traffic flows. The first line is a header line that informs C-BGP of the columns provided in the file. In the example, a flow has an IP address as source (srcIP) and an IP address as destination (dstIP). Flows shown in the example also mention a destination mask (prefix length - dstMask) and a volume (octets).
srcIP dstIP dstMask octets
1.0.0.1 3.0.0.1 32 1
1.0.0.1 3.0.0.3 32 2
1.0.0.3 2.0.0.1 32 4
2.0.0.3 1.0.0.3 32 8
When the above traffic matrix is loaded, the following actions are performed by C-BGP. For each flow, C-BGP identifies a source node based on the flow's source. From that node, a lookup is performed in the routing table to find an entry towards the flow's destination. The link between the node and the routing table entry's next-hop is loaded with the flow's volume. Then, the process continues from the next-hop node until the destination is reached or a node on the path has no entry in its routing table.
Actually, for each flow, the operations performed by C-BGP are equivalent to a call of the record-route command with the --load option. The following example illustrate how the use of record-route could be used to load the first flow in the above traffic matrix file.
cbgp> net node 1.0.0.1 record-route --load=1 3.0.0.1
cbgp>
The columns/fields that can be specified in the traffic matrix header line are shown in the following table along with a short description. The field names are inspired from those used in the flow-tools utility (see http://code.google.com/p/flow-tools/).
Field name | Description |
---|---|
srcAS | source AS number |
dstAS | destination AS number |
srcIP | source IP address |
dstIP | destination IP address |
srcMask | source IP prefix length (ignored) |
dstMask | destination IP prefix length |
octets | volume |
packets | number of packets (ignored) |
srcPort | source transport layer port (ignored) |
dstPort | destination transport layer port (ignored) |
prot | transport-layer protocol (ignored) |
The default flow source identifier is provided by the srcIP field. This behaviour can be modified by using the --src option. This option can take the following values: ip if the source is an IP address (default) or asn if the source is an AS number (ASN).
The default flow destination identifier is provided by the dstIP field. This behaviour can be modified by using the --dst option. This option can take the following values: ip if the destination is an IP address (default) or pfx if the destination is an IP prefix. In the later case, an exact-match search is performed in each node's routing table to find the next-hop.
See also
To obtain the load of a link, see command net link X Y show info or command net node X iface Y load show.