Monday, April 24, 2023
HomeNetworkingUse Present System Configurations in netlab « ipSpace.web weblog

Use Present System Configurations in netlab « ipSpace.web weblog


Anne Baretta determined to make use of netlab to check a proposed DMVPN topology. As netlab doesn’t help DMVPN (and possibly by no means will), he determined to make use of netlab capabilities to begin the lab topology and carry out preliminary configuration, including DMVPN configuration instructions as customized configurations. Right here’s how he described the method:


On this case I used netlab as a fast solution to get a topology up and operating, after which add the DMVPN configuration by hand.

I constructed a ‘third occasion’ underlay community within the lab, together with the IPsec tunnel to the IoT supplier, in addition to the redundant hub DMPVPN overlay with two NHRP cases, and it behaves as anticipated.


I (mis)used the netlab config command to merge full configuration information collected with netlab gather to restrict the copying and pasting (as an illustration after altering the topology). For each gadget I’d execute a command like netlab config config/hub1.cfg -l hub1, which I might additionally optimize with a Bash for loop:

for i in spoke1 spoke2 hub1 hub2 firewall iotprovider; do
  netlab config config/$i.cfg -l $i
executed

It’s a bit hacky, nevertheless it works (clearly inside limits…). I’m a correct Jinja2 template, however whereas it’s fewer strains it’s too ‘customized’ to be of a lot use 😕


An alternate answer could be to make use of per-node config parameter, for instance:

nodes:
  spoke1:
    config: config/spoke1.cfg
  spoke2:
    config: config/spoke2.cfg
  hub1:
    config: config/hub1.cfg
  ...

Lastly, a couple of gotchas:

  • Clearly one wouldn’t have the configuration information when beginning the lab for the primary time, which might crash the ultimate step within the gadget configuration course of. That’s not an enormous deal (the lab could be operating and configured), but when it bothers you, skip the customized configuration a part of the lab initialization by operating netlab up --no-config (begin the lab however don’t configure it) adopted by netlab preliminary -i -m (carry out preliminary configuration and configure modules, however don’t use the customized configuration templates).
  • Altering lab topology may change interface names, hyperlink IP prefixes, and interface IP addresses. It is perhaps a good suggestion to wash up the collected gadget configurations after operating netlab gather.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments