Use Existing Machine Configurations in netlab « ipSpace.web blog site

[ad_1]

Anne Baretta made a decision to use netlab to test a proposed DMVPN topology. As netlab doesn’t support DMVPN (and probably hardly ever will), he made a decision to use netlab capabilities to get started the lab topology and conduct initial configuration, adding DMVPN configuration instructions as custom made configurations. Here’s how he described the method:


In this case I utilised netlab as a quick way to get a topology up and managing, and then incorporate the DMVPN configuration by hand.

I built a ‘3rd party’ underlay network in the lab, including the IPsec tunnel to the IoT provider, as perfectly as the redundant hub DMPVPN overlay with two NHRP instances, and it behaves as predicted.


I (mis)employed the netlab config command to merge entire configuration documents gathered with netlab gather to restrict the copying and pasting (for occasion right after switching the topology). For each and every machine I’d execute a command like netlab config config/hub1.cfg -l hub1, which I could also optimize with a Bash for loop:

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

It’s a little bit hacky, but it performs (clearly inside of limits…). I am hunting at a suitable Jinja2 template, but while it’s less strains it is too ‘custom’ to be of much use 😕


An alternate option would be to use per-node config parameter, for illustration:

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

Ultimately, a few gotchas:

  • Of course one particular wouldn’t have the configuration information when starting off the lab for the first time, which would crash the ultimate stage in the gadget configuration procedure. Which is not a big offer (the lab would be managing and configured), but if it bothers you, skip the customized configuration component of the lab initialization by operating netlab up --no-config (start off the lab but don’t configure it) followed by netlab preliminary -i -m (complete initial configuration and configure modules, but really don’t use the personalized configuration templates).
  • Changing lab topology may possibly adjust interface names, website link IP prefixes, and interface IP addresses. It may be a superior idea to clear up the gathered unit configurations after jogging netlab obtain.

[ad_2]

Source connection