You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New formatting options for BGP graphs:
* VRF sessions are either omitted or shown as dotted lines
* The graph can be limited to a subset of address families
Unified parsing of BGP formatting options:
* D2 and Graph output modules use the same code to parse BGP formatting
parameters
Changes in integration tests:
* The BGP topology includes VRFs and EVPN
* The graph creation scripts create more BGP graphs with various
formatting options
Copy file name to clipboardExpand all lines: docs/outputs/d2.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The *d2* output module is invoked by specifying the `-o d2` parameter in the **[
8
8
A single formatting modifier can be used to specify the graph type:
9
9
10
10
***topology** (default) -- Includes point-to-point links, multi-access bridges, and stub subnets. When the network topology contains BGP information, the graph groups nodes into autonomous systems. Alternatively, you could set **defaults.outputs.graph.groups** attribute to use topology **[groups](topo-groups)** to group graph nodes.
11
-
***bgp** -- Include autonomous systems, nodes, and BGP sessions. With the **rr** option (specified with `netlab create -o graph:bgp:rr`), RR-client sessions are drawn as directed arrows.
11
+
***bgp** -- Include autonomous systems, nodes, and BGP sessions. The formatting modifier can include the [BGP formatting parameters](outputs-d2-bgp-parameters). For example, `netlab create -o graph:bgp:vrf` draws VRF BGP sessions as dotted lines.
12
12
13
13
```{tip}
14
14
The network topology graph description contains nodes and links, but no placement information. D2 is pretty good at figuring out how to draw the required graph, but it pays off to test out the [layout engines](https://d2lang.com/tour/layouts). Changing the [order of links](outputs-d2-link-node-attributes) might also unclutter the diagrams.
@@ -23,10 +23,19 @@ Graphing routines use **[default](topo-defaults)** topology settings to modify t
23
23
***outputs.d2.node_address_label** (default: True) -- add node loopback IP addresses or IP addresses of the first interface (for hosts) to node labels.
24
24
***outputs.d2.node_interfaces** (default: False) -- add list of interfaces and their IP addresses to nodes[^DG].
25
25
***outputs.d2.as_clusters** (default: True) -- use BGP autonomous systems to cluster nodes in the topology graph. BGP AS clusters are always used in BGP graphs.
26
-
***outputs.d2.rr_sessions** (default: True) -- draw IBGP sessions between BGP route reflectors and clients as directional connections.
27
26
28
27
[^DG]: The results look disgusting. If you find a better way to get it done, please submit a PR. Thank you!
29
28
29
+
(outputs-d2-bgp-parameters)=
30
+
These default settings modify how the BGP graphs look:
31
+
32
+
***outputs.d2.bgp.rr** (default: True) -- draw arrows on BGP sessions to indicate peer-to-peer versus reflector-client sessions
***outputs.d2.bgp.af._af_** (default: all address families) -- when one or more **af** parameters (valid keys: **ipv4**, **ipv6**, **vpnv4**, **vpnv6**, **6pe**, **evpn**) are set to *True*, the graph is limited to BGP sessions of the specified address families.
35
+
***outputs.d2.bgp.novrf** (default: False) -- do not include VRF BGP sessions in the graph
36
+
37
+
You can specify the above BGP parameters in the *graph format* CLI argument.
Copy file name to clipboardExpand all lines: docs/outputs/graph.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The *graph* output module is invoked with the **[netlab graph](netlab-graph)** c
9
9
A single formatting modifier can be used to specify the graph type:
10
10
11
11
***topology** (default) -- Display inter-node links, multi-access- and stub subnets. When the network topology contains BGP information, the graph groups nodes into autonomous systems. Alternatively, you could set **defaults.outputs.graph.groups** attribute to use topology **[groups](topo-groups)** to group graph nodes.
12
-
***bgp** -- Include autonomous systems, nodes, and BGP sessions. With the **rr** option (specified with `netlab create -o graph:bgp:rr`), RR-client sessions are drawn as directed arrows.
12
+
***bgp** -- Include autonomous systems, nodes, and BGP sessions. The formatting modifier can include [BGP formatting parameters](outputs-graph-bgp-parameters). For example, `netlab create -o graph:bgp:rr` draws RR-client sessions as directed arrows.
13
13
14
14
## Modifying Graph Attributes
15
15
@@ -19,7 +19,16 @@ Graphing routines use **[default](topo-defaults)** topology settings to modify t
19
19
***outputs.graph.groups** -- use the specified list of groups (or all groups when set to *True*) to create graph clusters
20
20
***outputs.graph.interface_labels** -- Add IP addresses to links in **topology** graph. Results in a cluttered image (but feel free to fix that and submit a pull request).
21
21
***outputs.graphs.node_address_label** (default: *True*) -- add node loopback IP addresses or IP addresses of the first interface (for hosts) to node labels.
22
-
***outputs.graph.rr_sessions** (default: *False*) -- draw IBGP sessions between BGP route reflectors and clients as directional connections.
22
+
23
+
(outputs-graph-bgp-parameters)=
24
+
These default settings modify how the BGP graphs look:
25
+
26
+
***outputs.graph.bgp.rr** (default: True) -- draw arrows on BGP sessions to indicate peer-to-peer versus reflector-client sessions
***outputs.graph.bgp.af._af_** (default: all address families) -- when one or more **af** parameters (valid keys: **ipv4**, **ipv6**, **vpnv4**, **vpnv6**, **6pe**, **evpn**) are set to *True*, the graph is limited to BGP sessions of the specified address families.
29
+
***outputs.graph.bgp.novrf** (default: False) -- do not include VRF BGP sessions in the graph
30
+
31
+
You can specify the above BGP parameters in the *graph format* CLI argument.
0 commit comments