Within the Concise Hyperlink Descriptions weblog put up, I described numerous information codecs that you may use to concisely listing nodes connected to a hyperlink. As we speak, we’ll deal with a mechanism that helps you see errors in your topology: a dictionary of hyperlinks.
Think about you could have a big topology with dozens of hyperlinks, and also you get an error saying, “there’s this drawback with hyperlinks[17]
”. It should be nice enjoyable counting the hyperlinks to seek out which one triggered the error, proper?
For instance, the next topology creates an error as a result of netlab tries to make use of a /30 prefix on the final hyperlink and belatedly figures out it wants yet one more IP deal with for the VRRP first-hop gateway:
Netlab topology creating an out-of-addresses error
defaults.system: frr
module: [ gateway ]
gateway.protocol: vrrp
nodes: [ a1, a2, c1, c2 ]
addressing.p2p:
ipv4: 10.0.42.0/28
hyperlinks:
- a1-c1
- a1-c2
- a2-c1
- a2-c2
- c1-c2
- a1:
a2:
gateway: True
The error netlab experiences while you attempt to begin the lab
% netlab up
[ERRORS] Errors present in topology.yml
[VALUE] hyperlinks: Can not use ipv4 prefix 10.1.0.20/30 to deal with 2 nodes plus first-hop gateway on hyperlinks[6]
[DATA] hyperlink information: {'_linkname': 'hyperlinks[6]', 'gateway': {'id': -2, 'protocol': 'vrrp', 'anycast':
{'mac': '0200.cafe.00ff', 'unicast': True}, 'vrrp': {'group': 1}, 'ipv4': '10.1.0.22/30'},
'interfaces': [{'node': 'a1', 'gateway': {'ipv4': '10.1.0.22/30'}}, {'node': 'a2',
'gateway': {'ipv4': '10.1.0.22/30'}}], 'linkindex': 6, 'node_count': 2, 'kind': 'p2p',
'prefix': {'ipv4': '10.1.0.20/30'}}
[HINT] Use a customized pool with prefix /29 or shorter on hyperlinks with default gateways
[FATAL] Can not proceed past this level as a consequence of errors, exiting
I’m fairly certain you could have higher issues to do than counting which hyperlink is the sixth one.
Let’s ignore for the second that it’s fairly straightforward to identify the error in our pattern topology as there’s a single hyperlink utilizing the gateway attribute.
The dictionary of hyperlinks function lets you group hyperlinks with frequent performance. For instance, our topology has core, entry and edge hyperlinks:
Modified lab topology grouping hyperlinks by their performance
defaults.system: frr
module: [ gateway ]
gateway.protocol: vrrp
nodes: [ a1, a2, c1, c2 ]
hyperlinks:
entry:
- a1-c1
- a1-c2
- a2-c1
- a2-c2
core:
- c1-c2
edge:
- a1:
a2:
gateway: True
It’s a lot simpler to identify errors when utilizing a structured dictionary of hyperlinks because the hyperlink names embody the teams you specified within the hyperlinks information construction:
% netlab up
[ERRORS] Errors present in topology.yml
[VALUE] hyperlinks: Can not use ipv4 prefix 10.1.0.20/30 to deal with 2 nodes plus first-hop gateway on hyperlinks.edge[1]
[DATA] hyperlink information: {'_linkname': 'hyperlinks.edge[1]', 'gateway': {'id': -2, 'protocol': 'vrrp',
'anycast': {'mac': '0200.cafe.00ff', 'unicast': True}, 'vrrp': {'group': 1}, 'ipv4':
'10.1.0.22/30'}, 'interfaces': [{'node': 'a1', 'gateway': {'ipv4': '10.1.0.22/30'}},
{'node': 'a2', 'gateway': {'ipv4': '10.1.0.22/30'}}], 'linkindex': 6, 'node_count': 2,
'kind': 'p2p', 'prefix': {'ipv4': '10.1.0.20/30'}}
[HINT] Use a customized pool with prefix /29 or shorter on hyperlinks with default gateways
[FATAL] Can not proceed past this level as a consequence of errors, exiting
To recap:
- The hyperlinks information construction in a netlab topology could be a listing of hyperlinks or a dictionary.
- The values of the hyperlinks dictionary may be lists of hyperlinks or additional dictionaries.
- Very early within the topology transformation course of, netlab flattens the hyperlinks dictionary into a listing of hyperlinks, retaining the dictionary keys within the
_linkname
component to ease troubleshooting.
Related subjects:
Within the Concise Hyperlink Descriptions weblog put up, I described numerous information codecs that you may use to concisely listing nodes connected to a hyperlink. As we speak, we’ll deal with a mechanism that helps you see errors in your topology: a dictionary of hyperlinks.
Think about you could have a big topology with dozens of hyperlinks, and also you get an error saying, “there’s this drawback with hyperlinks[17]
”. It should be nice enjoyable counting the hyperlinks to seek out which one triggered the error, proper?
For instance, the next topology creates an error as a result of netlab tries to make use of a /30 prefix on the final hyperlink and belatedly figures out it wants yet one more IP deal with for the VRRP first-hop gateway:
Netlab topology creating an out-of-addresses error
defaults.system: frr
module: [ gateway ]
gateway.protocol: vrrp
nodes: [ a1, a2, c1, c2 ]
addressing.p2p:
ipv4: 10.0.42.0/28
hyperlinks:
- a1-c1
- a1-c2
- a2-c1
- a2-c2
- c1-c2
- a1:
a2:
gateway: True
The error netlab experiences while you attempt to begin the lab
% netlab up
[ERRORS] Errors present in topology.yml
[VALUE] hyperlinks: Can not use ipv4 prefix 10.1.0.20/30 to deal with 2 nodes plus first-hop gateway on hyperlinks[6]
[DATA] hyperlink information: {'_linkname': 'hyperlinks[6]', 'gateway': {'id': -2, 'protocol': 'vrrp', 'anycast':
{'mac': '0200.cafe.00ff', 'unicast': True}, 'vrrp': {'group': 1}, 'ipv4': '10.1.0.22/30'},
'interfaces': [{'node': 'a1', 'gateway': {'ipv4': '10.1.0.22/30'}}, {'node': 'a2',
'gateway': {'ipv4': '10.1.0.22/30'}}], 'linkindex': 6, 'node_count': 2, 'kind': 'p2p',
'prefix': {'ipv4': '10.1.0.20/30'}}
[HINT] Use a customized pool with prefix /29 or shorter on hyperlinks with default gateways
[FATAL] Can not proceed past this level as a consequence of errors, exiting
I’m fairly certain you could have higher issues to do than counting which hyperlink is the sixth one.
Let’s ignore for the second that it’s fairly straightforward to identify the error in our pattern topology as there’s a single hyperlink utilizing the gateway attribute.
The dictionary of hyperlinks function lets you group hyperlinks with frequent performance. For instance, our topology has core, entry and edge hyperlinks:
Modified lab topology grouping hyperlinks by their performance
defaults.system: frr
module: [ gateway ]
gateway.protocol: vrrp
nodes: [ a1, a2, c1, c2 ]
hyperlinks:
entry:
- a1-c1
- a1-c2
- a2-c1
- a2-c2
core:
- c1-c2
edge:
- a1:
a2:
gateway: True
It’s a lot simpler to identify errors when utilizing a structured dictionary of hyperlinks because the hyperlink names embody the teams you specified within the hyperlinks information construction:
% netlab up
[ERRORS] Errors present in topology.yml
[VALUE] hyperlinks: Can not use ipv4 prefix 10.1.0.20/30 to deal with 2 nodes plus first-hop gateway on hyperlinks.edge[1]
[DATA] hyperlink information: {'_linkname': 'hyperlinks.edge[1]', 'gateway': {'id': -2, 'protocol': 'vrrp',
'anycast': {'mac': '0200.cafe.00ff', 'unicast': True}, 'vrrp': {'group': 1}, 'ipv4':
'10.1.0.22/30'}, 'interfaces': [{'node': 'a1', 'gateway': {'ipv4': '10.1.0.22/30'}},
{'node': 'a2', 'gateway': {'ipv4': '10.1.0.22/30'}}], 'linkindex': 6, 'node_count': 2,
'kind': 'p2p', 'prefix': {'ipv4': '10.1.0.20/30'}}
[HINT] Use a customized pool with prefix /29 or shorter on hyperlinks with default gateways
[FATAL] Can not proceed past this level as a consequence of errors, exiting
To recap:
- The hyperlinks information construction in a netlab topology could be a listing of hyperlinks or a dictionary.
- The values of the hyperlinks dictionary may be lists of hyperlinks or additional dictionaries.
- Very early within the topology transformation course of, netlab flattens the hyperlinks dictionary into a listing of hyperlinks, retaining the dictionary keys within the
_linkname
component to ease troubleshooting.
Related subjects: