ethgentopology(8)

πŸ“¦ version 12.1.0.1, in centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

ethgentopology πŸ’–

okay bestie, this is the ethgentopology(8) page from the EFSFFCLIRG man page set, and it's literally a whole vibe. it's the glow-up guide for making topology XML files. let's get into it 🫢


✨ NAME ✨

ethgentopology

no cap, this is a little sample script that shows you how to generate the topology XML file you use for topology verification. it's giving "reference implementation" energy.

so here's the tea: if you wanna fold topology XML file generation right into your cluster design process, you can totally write your own script that pulls info from whatever other formats and tools you already have and spits out the topology XML file directly. that's the DIY route. the other option? use ethxlattopology and have your tools generate the input files it expects. pick your fighter πŸ’…

this tool eats three CSV input files β€” ethtopology_links.txt, ethtopology_NICs.txt, and ethtopology_SWs.txt β€” and uses them to generate LinkSummary, Node NICs, and Node SWs information respectively. these files are samples of what might get produced as part of translating a user-custom file format into temporary intermediate CSV files. iykyk.

LinkSummary information includes Link, Cable, and Port information. important lore: it's ethgentopology β€” not ethxmlgenerate β€” that generates the XML version string as well as the <Report> and <LinkSummary> lines. also, the indent level is at the default value of zero (0). ✨

the portions of the script that call ethxmlgenerate follow:

ethxmlgenerate -X /usr/share/eth-tools/samples/ethtopology_1.txt -d \;
-h Link \

-g Rate -g MTU -g Internal -g LinkDetails -h Cable -g CableLength -g CableLabel \

-g CableDetails -e Cable -h Port -g IfAddr -g PortNum -g PortId -g NodeDesc
\ -g MgmtIfAddr -g NodeType -g PortDetails -e Port  -h Port -g IfAddr -g
PortNum \ -g PortId -g NodeDesc
-g MgmtIfAddr -g NodeType -g PortDetails -e Port -e Link

ethxmlgenerate -X /usr/share/eth-tools/samples/ethtopology_2.txt -d \; \

-h Node -g IfAddr -g NodeDesc -g NodeDetails -e Node

πŸŽ€ Syntax πŸŽ€

/usr/share/eth-tools/samples/ethgentopology [--help] [plane]
⚠️ NOTE: you must use the full path to access this command. no shortcuts bestie, she lives at the full address only 🏠

πŸ’… Options πŸ’…

  • No option β€” produces sample output. see Example πŸ‘€
  • --help β€” produces full help text. the whole manual, the whole story.
  • plane β€” Plane name. default is 'plane'.

this file can be found in /usr/share/eth-tools/samples/. for brevity, this sample shows only two links. the second link is serving "how to omit some info" realness β€” in the second line, the MTU, LinkDetails, and other fields are not present, which is indicated by an empty value for the field (no entry between the semicolon delimiters). iconic, honestly.

⚠️ NOTE: the following example exceeds the available width of the page. for readability, a blank line is shown between lines to make it clear where the line ends. in an actual link file, no blank lines are used. don't be fooled by the formatting πŸ™ˆ
25g;2048;0;IO Server Link;11m;S4567;cable
model 456;0x0002c9020020e004;1;20e004,bender-
eth2;0x0002c9020020e004;NIC;
Some info about port;0x0011750007000df6;7;Eth7;Switch 1234 Leaf 4;;SW;

25g;;0;;;;;0x0002c9020025a678;1;25a678;mindy2-eth2;;NIC;;
0x0011750007000e6d;4;Eth4;Switch 2345 Leaf 5;;SW;

🌸 ethtopology_NICs.txt 🌸

this file can be found in /usr/share/eth-tools/samples/. for brevity, this sample shows only two nodes.

0x0002c9020020e004;bender-eth2;More details about node

0x0002c9020025a678;mindy2-eth2;Node details

⭐ ethtopology_SWs.txt ⭐

this file can be found in /usr/share/eth-tools/samples/. for brevity, this sample shows only two nodes.

0x0011750007000df6;Switch 1234 Leaf 4;

0x0011750007000e6d;Switch
2345 Leaf 5;

πŸ”₯ Example πŸ”₯

when run against the supplied topology input files, /usr/share/eth-tools/samples/ethgentopology produces:

<?xml version="1.0" encoding="utf-8" ?>

<Report plane="plane">

<LinkSummary>

<Link>

<Rate>25g</Rate>

<MTU>2048</MTU>

<Internal>0</Internal>

<LinkDetails>IO Server Link</LinkDetails>

<Cable>

<CableLength>11m</CableLength>

<CableLabel>S4567</CableLabel>

<CableDetails>cable model 456</CableDetails>

</Cable>

<Port>

<IfAddr>0x001175010020e004</IfAddr>

<PortNum>1</PortNum>

<PortId>20e004</PortId> <NodeDesc>bender-eth2</NodeDesc>

<MgmtIfAddr>0x001175010020e004</MgmtIfAddr>

<NodeType>NIC</NodeType>

<PortDetails>Some info about port</PortDetails>

</Port>

<Port>

<IfAddr>0x0011750107000df6</IfAddr>

<PortNum>7</PortNum>

<PortId>Eth7</PortId> <NodeDesc>Switch 1234 Leaf 4</NodeDesc>

<NodeType>SW</NodeType>

</Port>

</Link>

<Link>

<Rate>25g</Rate>

<Internal>0</Internal>

<Cable>

</Cable>

<Port>

<IfAddr>0x001175010025a678</IfAddr>

<PortNum>1</PortNum>

<PortId>25a678</PortId> <NodeDesc>mindy2-eth2</NodeDesc>

<NodeType>NIC</NodeType>

</Port>

<Port>

<IfAddr>0x0011750107000e6d</IfAddr>

<PortNum>4</PortNum>

<PortId>Eth4</PortId> <NodeDesc>Switch 2345 Leaf 5</NodeDesc>

<NodeType>SW</NodeType>

</Port>

</Link>

</LinkSummary>

<Nodes>

<NICs>

<Node>

<IfAddr>0x0002c9020020e004</IfAddr>

<NodeDesc>bender-eth2</NodeDesc>

<NodeDetails>More details about node</NodeDetails>

</Node>

<Node>

<IfAddr>0x0002c9020025a678</IfAddr>

<NodeDesc>mindy2-eth2</NodeDesc>

<NodeDetails>Node details</NodeDetails>

</Node>

</NICs>

<Switches>

<Node>

<IfAddr>0x0011750107000df6</IfAddr>

<NodeDesc>Switch 1234 Leaf 4</NodeDesc>

</Node>

<Node>

<IfAddr>0x0011750107000e6d</IfAddr>

<NodeDesc>Switch 2345 Leaf 5</NodeDesc>

</Node>

</Switches>

</Nodes>

</Report>

and that's the whole page bestie, we ate and left absolutely no crumbs πŸ“

Copyright(C) 2020-2024 Intel Corporation β€” yeah, Intel owns this one, credit where credit's due πŸ‘‘

mwah, go generate some beautiful topology XML, you main character πŸ¦‹βœ¨πŸ’œ

πŸ“¦ where this page comes from