Simplify netlab Topologies with Url Groups « ipSpace.net weblog

[ad_1]

Final month I explained how you can simplify your VLAN- or VRF lab topologies with VRF- and VLAN hyperlinks, immediately environment vlan.access or vrf attribute on a established of inbound links. Website link groups allow you to do the same for any established of backlink characteristics.

Sample Topology

Picture you have a little community with a few PE-routers connected to a central P-router:


As extended as you’re Alright with the default parameters (default OSPF cost, default IPv4 handle pool), you could describe that lab with a extremely very simple topology file:

defaults.system: eos
module: [ ospf ]
nodes: [ pe1, pe2, pe3, p ]
one-way links: [ pe1-p, pe2-p, pe3-p ]

Now let us presume that you’d like to use unnumbered main inbound links, established OSPF value on people hyperlinks, and established backlink job to main. You can no lengthier use the straightforward record of inbound links but have to define url attributes on just about every single backlink. Not only is the topology file more difficult to read through, it also consists of copy attributes.

defaults.product: eos
module: [ ospf ]
nodes: [ pe1, pe2, pe3, p ]
back links:
- pe1:
  p:
  unnumbered: legitimate
  ospf.price tag: 100
  part: core
- pe2:
  p:
  unnumbered: correct
  ospf.price: 100
  role: core
- pe3:
  p:
  unnumbered: true
  ospf.cost: 100
  job: core

netlab release 1.5.1 introduced url teams – a uncomplicated way to set the similar established of characteristics on a lot of back links.

Hyperlink teams are described in the inbound links checklist all you have to do is to set the group attribute to explain to netlab it is dealing with a group of one-way links, and outline member one-way links in the members attribute.

Applying a main group, we can get our lab topology again into an uncomplicated-to-browse just about-non-redundant format:

defaults.gadget: eos
module: [ ospf ]
nodes: [ pe1, pe2, pe3, p ]
hyperlinks:
- team: core
  unnumbered: genuine
  ospf.charge: 100
  position: main
  associates: [ pe1-p, pe2-p, pe3-p ]

Behind the Scenes

Ahead of starting off the topology details transformation approach, netlab expands link teams into person one-way links:

  • A new link facts construction is developed for every member backlink, growing numerous simplified connection definition formats into dictionaries.
  • Group characteristics are added to the link attribute. Link attributes (if specified) consider priority about group attributes.

Applying this system, netlab developed the subsequent set of one-way links from the earlier mentioned topology file:

Core links made from the core connection team

$ netlab produce -o yaml:backlinks
- interfaces:
  - ifindex: 1
    ifname: Ethernet1
    ipv4: accurate
    node: pe1
  - ifindex: 1
    ifname: Ethernet1
    ipv4: legitimate
    node: p
  linkindex: 1
  node_count: 2
  ospf:
    value: 100
  function: core
  form: p2p
  unnumbered: legitimate
- interfaces:
  - ifindex: 1
    ifname: Ethernet1
    ipv4: accurate
    node: pe2
  - ifindex: 2
    ifname: Ethernet2
    ipv4: legitimate
    node: p
  linkindex: 2
  node_depend: 2
  ospf:
    cost: 100
  job: main
  variety: p2p
  unnumbered: correct
- interfaces:
  - ifindex: 1
    ifname: Ethernet1
    ipv4: legitimate
    node: pe3
  - ifindex: 3
    ifname: Ethernet3
    ipv4: accurate
    node: p
  linkindex: 3
  node_depend: 2
  ospf:
    charge: 100
  job: main
  type: p2p
  unnumbered: real

Get Started

Url groups have been introduced in netlab release 1.5.1. To upgrade, execute pip3 set up --up grade networklab.

New to netlab? Get started with the Receiving Commenced doc and the set up manual.

[ad_2]

Resource connection