01-04-2022 03:05 AM - edited 01-07-2022 06:39 AM
Hi All and HNY 2022!
I am currently building a stacked-service which aims to create a Routing-Instance from which i can peer with different ISPs
This stacked-Service relies on 3 packages : 1 top service and 2 bottom service (components services)
The first bottom service handles Iface, link, vlan configurations.
The second bottom service handles the creation of the routing-instance a well as the BGP configuration part.
Because i believe that those two bottom components services can be reusable by some other top services i decided to create a top service that would import both bottom services.
This service creates 1 routing-instance, 1 security-zone and its associated security-policy as well as 1 BGP Group and peer, 1 interface and 1 vlan.
How should i proceed to create 1 routing-instance which could host multiple BGP Group depending on the CSP chosen from an enumeration list ?
Let's say that i can choose between ISP1, ISP2, ISP3. Each time i choose an ISP in my list, i am then able to navigate through the sub-items for that particular ISP (vlan, ip address, peer ip address, peer asn). At the moment, i use the same leaf which result in bad template outputs because the different values (for ISP1, ISP2...) of each leaf are concatenated :
<ip-address>192.168.255.9/30192.168.255.13/30</ip-address>
where it should be :
<ip-address(ISP1)>192.168.255.9/30</ip-address>
<ip-address(ISP2)>192.168.255.13/30</ip-address>
...and so on
Thanks in advance for your help !
Solved! Go to Solution.
01-13-2022 07:07 AM - edited 01-13-2022 07:09 AM
In order to share my experience on creating a stacked service in NSO please find below a summary of the steps achieved to reach this goal.
To build some sort of usable stacked service design, one should consider the following hints or rules :
My project aimed to build a stacked service to allow the reuse of bottom packages (aka components) by different top services.
Does it mean that you should consider a Top Down approach ? Maybe yes. From my opinion, this is the best way to design your stack service, but it is still my own opinion
I will of course ask anyone of you comment, amend or even share his own personal experience on building stacked service.
Thanks again for the help provided by this great community ;-).
01-06-2022 08:03 AM
01-07-2022 05:54 AM
Hi vleijon,
Thanks a lot for your answer. I am currently struggling with loops at the moment.
My routing instance is supposed to be able to host multiple BGP peerings with external ISPs.
Which means that for a particular Routing-instance i should be able to loop the creation of an interface with multiple vlan (list), each vlan could be assigned multiple IPs(list) :
This is what i expect :
routing-instance 1 > csp1 > vlan1 > IP1
> csp2 > vlan2 > IP2
This is what i obtain at the moment because of a strange loop :
routing-instance 1 > csp1 > vlan1 > IP1&2
> csp2 > vlan2 > IP1&2
CSP is a list, VLAN is a list and IP is a list
Thanks in advance for your help.
Jerems
01-07-2022 06:45 AM
01-10-2022 12:48 AM
Hi Vleijon,
I found my answer through the addition of loops in my top service. Thanks for your comment that corrobrates my findings !
To build my top service, i had to pick up the service part of my several bottom service templates but i wasn't sure on how to manage loops in my newly created top service. It becomes more & more clear to me
01-10-2022 06:09 AM
01-10-2022 07:55 AM
Correct vleijon,
But honestly, i'm just a little bit confused when trying to understand the output of a "| debug template".
For /services/create_l3vpn:create_l3vpn[l3vpn_id='001']/devices[device='device1'], it evaluates to "device1"
Operation 'merge' on existing node: /devices/device[name='device1'] (from file "create_link-template.xml", line 5)
Processing instruction 'foreach': evaluating the node-set (from file "create_link-template.xml", line 9)
Evaluating "/junos/interface" (from file "create_link-template.xml", line 9)
Context node: /services/create_l3vpn:create_l3vpn[l3vpn_id='001']/devices[device='device1']
Result: empty node
For example, i often see this "empty node" result without having the ability to understand what is going wrong...
Thanks again !
01-13-2022 07:07 AM - edited 01-13-2022 07:09 AM
In order to share my experience on creating a stacked service in NSO please find below a summary of the steps achieved to reach this goal.
To build some sort of usable stacked service design, one should consider the following hints or rules :
My project aimed to build a stacked service to allow the reuse of bottom packages (aka components) by different top services.
Does it mean that you should consider a Top Down approach ? Maybe yes. From my opinion, this is the best way to design your stack service, but it is still my own opinion
I will of course ask anyone of you comment, amend or even share his own personal experience on building stacked service.
Thanks again for the help provided by this great community ;-).
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide