01-23-2018 06:20 AM - edited 03-01-2019 04:05 AM
Hi,
I'm trying to create a service for L3VPN that uses static routes to be able to point at CE subnets. My initial try worked without a problem. That is when only one single static route was configured. But, an issue with multiple static routes (max 10) came to light that I haven't been able to solve. I tried nesting a multiple static route list within my CE-link list, but I'm having problems with it and TBH I'm stuck. I've tried several things that would make this post confusing, so I won't go into that yet.
I'm attaching my yang model. You'll see how my line of thinking is: create a single PE-CE link and that link should have multiple static routes attached to it (numbered 1 through 10), then the next PE-CE link, could have one or many static routes related to it (at this point, also numbered 1 through 10). And so on. See attach.
Initially I used a very basic template, and my first problem was that variables (inside nested prefixes list) wouldn't fill out at all, so I tried using string instruction but whenever I configured the second link those static routes would overwrite the first. Tried using the foreach instruction, with similar (not same) results. Like I said, I'm not sure I should go into that, it's be just confusion. So I'm attaching the template as well.
I'm aware my problem is I haven't quite grasped the concepts of context bouncing yet, so here I am.
Hope someone can help me out.
Thanks!
c.
Solved! Go to Solution.
01-23-2018 07:25 AM
Hi Carlos,
Yep, there are a few issues with your templates I think.
For example in your template you reference the following:
<ipv4>
<unicast>
<routes-ip>
<net>{/ce-prefix}/{xr-ce-subnet-mask}</net>
<address>{ce-nexthop}</address>
</routes-ip>
</unicast>
</ipv4>
According to your model you would really need:
<ipv4>
<unicast>
<routes-ip>
<net>{prefixes/ce-prefix}/{prefixes/xr-ce-subnet-mask}</net>
<address>{ce-nexthop}</address>
</routes-ip>
</unicast>
</ipv4>
Have you tried using the template debug features to check your templates?
-Dan
01-23-2018 07:25 AM
Hi Carlos,
Yep, there are a few issues with your templates I think.
For example in your template you reference the following:
<ipv4>
<unicast>
<routes-ip>
<net>{/ce-prefix}/{xr-ce-subnet-mask}</net>
<address>{ce-nexthop}</address>
</routes-ip>
</unicast>
</ipv4>
According to your model you would really need:
<ipv4>
<unicast>
<routes-ip>
<net>{prefixes/ce-prefix}/{prefixes/xr-ce-subnet-mask}</net>
<address>{ce-nexthop}</address>
</routes-ip>
</unicast>
</ipv4>
Have you tried using the template debug features to check your templates?
-Dan
01-23-2018 08:03 AM
Like I said, I'm aware that my biggest problem right now is figuring out how you move in and out of contexts. Thank you very very much, Dan.
(I knew it was something silly like that, but just couldn't find it)
01-23-2018 08:06 AM
Hi Carlos,
Sure thing. There might be other stuff as I didn’t test all of this.
-Dan
01-23-2018 09:04 AM
Nope, worked exactly as I wanted it to. Thanks again!
c.
01-23-2018 09:07 AM
Okay, great.
-Dan
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