cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
675
Views
1
Helpful
5
Replies

[Nested lists]

Carlos A. Silva
Level 3
Level 3

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.

1 Accepted Solution

Accepted Solutions

Dan.Sullivan
Cisco Employee
Cisco Employee

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

View solution in original post

5 Replies 5

Dan.Sullivan
Cisco Employee
Cisco Employee

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

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)

Hi Carlos,

Sure thing. There might be other stuff as I didn’t test all of this.

-Dan

Nope, worked exactly as I wanted it to. Thanks again!

c.

Okay, great.

-Dan