cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
211
Views
0
Helpful
2
Replies
Highlighted

How to create one or multiple loopback interfaces without python code

 

 

 

I want to create as many loopbacks as defined, like 1 till 10, how can I accomplish that with YANG and XML, for instance in a  foreach loop, without code.

leaf loopback_amount {
tailf:info "Amount of loopbacks";
type uint32 {
range "1..10";
}
mandatory true;
}

<interface xmlns="urn:ios">
<Loopback>
<name>{/int_name}</name>
<ip-vrf>
<ip>
<vrf>
<forwarding>{/vrf_id}</forwarding>
</vrf>
</ip>
</ip-vrf>
<ip>
<address>
<primary>
<address>10.1.1.</ip_add></address>
<mask>255.255.255.255</mask>
</primary>
</address>
</ip>
</Loopback>

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Where do you plan to take the ip from?

View solution in original post

2 REPLIES 2
Highlighted
Cisco Employee

Where do you plan to take the ip from?

View solution in original post

Highlighted

from the yang file. and later from external ipam