cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
499
Views
0
Helpful
1
Replies

RESTCONF QUESTION - IGMP STATIC - Cisco IOX-XE Programmability

tkopel
Cisco Employee
Cisco Employee

Hi team,

  

I'm trying to configure the following static layer 2 IGMP using REST API:

ip igmp snooping vlan 1 static 239.1.2.3 interface Gi1/0/15

ip igmp snooping vlan 1 static 239.1.2.3 interface Gi1/0/16

 

The intent is to configure IGMP snooping on the same VLAN, with the same static IP address, but on different interfaces.

 

We noticed that in the YANG model you can assign a single interface to a particular group, unlike the CLI:

      container vlan {
        description "IGMP Snooping enable for Catalyst VLAN";
        list range {
         key "range";
         leaf range {
           description "Vlan number";
           type uint16 {
             range "1..1001 | 1006..4094";
           }
         }
         leaf immediate-leave {
           description "Enable IGMPv2 immediate leave processing";
           type empty;
         }
         leaf last-member-query-count {
           description "Interval (milliseconds)";
           type uint8 {
             range "1..7";
           }
         }
         leaf last-member-query-interval {
           description "Interval (milliseconds)";
           type uint16 {
             range "100..32767";
           }
         }
..
         container static {
           description "Configure an L2 port as a member of a group";
           list ipv4 {
             key "ipv4";
             leaf ipv4 {
               description "IP address of the group";
               type inet:ipv4-address;
             }
             leaf interface {
              description "GigabitEthernet IEEE 802.3z";
               type string;
             }
           }
     }

 

 

Also, in case we configured the CLI as above, using REST GET we received only the first record:

 {
 "Cisco-IOS-XE-switch:range": [
   {
     "range": 1,
     "static": {
       "ipv4": [
         {
           "ipv4": "239.1.2.3",
           "interface": "GigabitEthernet1/0/16"
         }
       ]
     }
   }
 ]
}

 

Do you know if there is any way to configure this using REST API? Have I missed something?

 

Thank you in advance!

1 Reply 1

yangorelik
Spotlight
Spotlight

This result is expected and fully corresponds to the YANG model - the ipv4 is a key of list element and it must be unique in the list. If device feature is different - allows multiple interfaces have the same static IPv4 address (this seems unbelievable to me), then model is wrong.

Yan Gorelik
YDK Solutions