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

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

yfherzog
Cisco Employee
Cisco Employee

Where do you plan to take the ip from?

View solution in original post

2 Replies 2

yfherzog
Cisco Employee
Cisco Employee

Where do you plan to take the ip from?

from the yang file. and later from external ipam