# Device Programmability

**URL:** https://forum.networklessons.com/t/device-programmability/6698
**Category:** Lessons Discussion
**Created:** [April 2, 2019, 9:36am UTC](https://forum.networklessons.com/t/device-programmability/6698 "2019-04-02T09:36:22Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [April 2, 2019, 9:36am UTC](https://forum.networklessons.com/t/device-programmability/6698/1 "2019-04-02T09:36:23Z")

</div>

This topic is to discuss the following lesson:

> **[Device Programmability](https://networklessons.com/network-automation/device-programmability)**
>
> This lesson about network automation explains how to use NETCONF, RESTCONF, and gRPC to configure Cisco IOS network devices.

---

<div class="post-metadata">

### Author: ![snseldeniz](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@snseldeniz](https://forum.networklessons.com/u/snseldeniz)
#### Post date: [June 9, 2019, 4:03pm UTC](https://forum.networklessons.com/t/device-programmability/6698/2 "2019-06-09T16:03:09Z")

</div>

Hello Rene,

I have been watching videos about Device Programmability and Automation for last two months. It seems Netconf and Restconf more complicated compared to Netmiko or Ansible. Besides that I see a lot of companies asking for Restconf. I think we can do a lot of configurations easily by using Ansible. In presence of Ansible or other tools, why do companies still use Restconf and Netconf?

Could you please help me understand this?

Thanks

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [June 17, 2019, 8:54am UTC](https://forum.networklessons.com/t/device-programmability/6698/3 "2019-06-17T08:54:41Z")

</div>

Hi Sinasi,

NETCONF/RESTCONF don’t have to exclude Ansible/Netmiko. In fact, Ansible is a great way to work with NETCONF/RESTCONF.

With network automation, the CLI doesn’t work very well. It was created for humans, not scripts. You can use Ansible with regular CLI commands but you can also use it with NETCONF or RESTCONF.

Even if you use NETCONF/RESTCONF, you still need tools to talk with a device somehow. You could use a python script or something like postman. That’s great for some quick examples but not the best way to work with it every day. You could use Ansible and talk with your routers using NETCONF/RESTCONF.

> **[ansible.netcommon.netconf\_config module – netconf device configuration —...](https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/netconf_config_module.html)**

> **[ansible.netcommon.restconf\_get module – Fetch configuration/state data from...](https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/restconf_get_module.html)**

RESTCONF/NETCONF are a better way to talk with your router/switch, Ansible is the tool you use.

Does that help?

Rene

---

<div class="post-metadata">

### Author: ![hsawiris](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/h/278dde/32.png) [@hsawiris](https://forum.networklessons.com/u/hsawiris)
#### Post date: [November 17, 2019, 6:56pm UTC](https://forum.networklessons.com/t/device-programmability/6698/4 "2019-11-17T18:56:40Z")

</div>

Hi Rene,

I created a netmiko script to do sh run on IOS-XE router and it works with Visual Studio. Can I use the same script with Postman or do I have to convert it to json first?

in other words, how can we get python scripts to work with Restconf.

Thanks

Hany

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [December 2, 2019, 11:45am UTC](https://forum.networklessons.com/t/device-programmability/6698/5 "2019-12-02T11:45:25Z")

</div>

Hi Hany,

Netmiko is a library to interact with network devices through SSH. You can use it to automate things that you would normally do yourself with SSH.

Postman is (simply said) an API client. If you want to interact with your router through postman, you’ll have to use something that both postman and the router support (like RESTCONF).

If you want to use Python with RESTCONF, you can use the requests library.

Cisco DevNet has some examples. Here’s one to get the hostname of a router:

> <https://github.com/CiscoDevNet/restconf-examples/blob/master/restconf-102/get_hostname.py>

Here’s one to create a static route:

> <https://github.com/CiscoDevNet/restconf-examples/blob/master/restconf-102/create_static.py>

This works, but building python scripts with the requests library like this can be a pain. I looked, but there aren’t any good RESTCONF python libraries. NETCONF is probably easier, because of the excellent [ncclient library](https://github.com/ncclient/ncclient).

Rene

---

<div class="post-metadata">

### Author: ![aquas19](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@aquas19](https://forum.networklessons.com/u/aquas19)
#### Post date: [February 21, 2020, 4:07pm UTC](https://forum.networklessons.com/t/device-programmability/6698/6 "2020-02-21T16:07:34Z")

</div>

Hi Rene,  
i have a very basic question,i know from github we can get scripts,and they need to run on a linux based server to change the config on network kit.My point of confusion is, how does the linux box know to reach the network kit,is it all down to routing /static route in a vmware environment or is there a setting i have missed which points the linux box to the router eg.

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [February 24, 2020, 11:11am UTC](https://forum.networklessons.com/t/device-programmability/6698/7 "2020-02-24T11:11:31Z")

</div>

Hello Naila

It simply comes down to the network connection that your Linux based Git server has to the particular network device. You create credentials for a user in the device itself (either locally or via RADIUS) and then provide those credentials to your configuration on the Linux box. Then using various options such as those described in the lesson, you can access the device and manipulate the configuration as you see fit.

I hope this has been helpful!

Laz

Edited: Just a clarification. The GIT server simply stores the code. It is where the repositories with scripts and codes are kept. If however you use something like Ansible, then you create and run your code or scripts locally, then push them to the Git server to store them. More about Ansible can be found here:  
[https://networklessons.comconfiguration-management-tools-and-version-control-systems](https://networklessons.comconfiguration-management-tools-and-version-control-systems)

---

<div class="post-metadata">

### Author: ![tapuret](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tapuret](https://forum.networklessons.com/u/tapuret)
#### Post date: [February 27, 2020, 7:35pm UTC](https://forum.networklessons.com/t/device-programmability/6698/10 "2020-02-27T19:35:46Z")

</div>

Hi Rene,  
I don’t see in ASR1001, netconf-yang or rest api container service, no solution to manage it alternative to cli. Some technology to do it?. info:

Cisco IOS XE Software, Version 03.13.04.S - Extended Support Release  
Cisco IOS Software, ASR1000 Software (X86\_64\_LINUX\_IOSD-UNIVERSALK9-M), Version 15.4(3)S4, RELEASE SOFTWARE (fc3)

cisco ASR1001 (1RU) processor (revision 1RU) with 3751503K/6147K bytes of memory.  
4 Gigabit Ethernet interfaces  
32768K bytes of non-volatile configuration memory.  
8388608K bytes of physical memory.  
7741439K bytes of eUSB flash at bootflash:.

thanks!!

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [February 28, 2020, 10:52am UTC](https://forum.networklessons.com/t/device-programmability/6698/11 "2020-02-28T10:52:16Z")

</div>

Hello Jorge

It could be that the specific IOS doesn’t support this functionality. Looking at the [Cisco Feature Navigator](https://cfn.cloudapps.cisco.com/ITDIT/CFN/jsp/index.jsp) for your particular version of IOS, it depends on the feature set and licence that you have as shown:

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/1/1e363a4e22cac62425e136d3df8ec43638a880f2.png)

However, it seems that the programmbility documentation that Cisco offers is from IOS XE Fuji 16.X and later. In order to fully take advantage of it you’ll require the newer IOS.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![kristina.hrivikova](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/f05b48/32.png) [@kristina.hrivikova](https://forum.networklessons.com/u/kristina.hrivikova)
#### Post date: [March 8, 2020, 5:17pm UTC](https://forum.networklessons.com/t/device-programmability/6698/12 "2020-03-08T17:17:02Z")

</div>

Hi everyone,  
could anyone please help me with RIP configuration using YANG models and RESTCONF?  
I am quite new in RESTCONF so I would appreciate detailed instructions. I was trying to configure it using YANG models from GitHub, ( [https://github.com/YangModels/yang/tree/master/vendor/cisco/xe/1693](https://github.com/YangModels/yang/tree/master/vendor/cisco/xe/1693) )  
My cisco ios is 16.9.3

I would like to configure a basic topology, see picture below. I know how to configure RIP using Cisco CLI, but I dont know how to do it using RESTCONF.

 ![Screenshot_1](https://cdn-forum.networklessons.com/uploads/default/original/2X/0/0d0442e5c0549ee7100c2aa14f7fcebee54c25d3.png)

Thank you for you assistance.  
Kristina

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [March 9, 2020, 10:44am UTC](https://forum.networklessons.com/t/device-programmability/6698/13 "2020-03-09T10:44:55Z")

</div>

Hello Kristina

I suggest you first go over RESTCONF as a concept as described in the [Device Programmability lesson](https://networklessons.com/network-automation/device-programmability). There you will find examples as well as practical implementations of RESTCONF for configuration. Some additional helpful content can be found at [this Cisco documentation](https://content.cisco.com/chapter.sjs?uri=/searchable/chapter/content/en/us/td/docs/ios-xml/ios/prog/configuration/167/b_167_programmability_cg/restconf_programmable_interface.html.xml).

Once you go over those you should be in a position to begin implementation of your topology. If you run into any specific problems or issues with your configuration, please let us know more specifically about what we can help you with.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![kristina.hrivikova](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/f05b48/32.png) [@kristina.hrivikova](https://forum.networklessons.com/u/kristina.hrivikova)
#### Post date: [March 10, 2020, 8:03pm UTC](https://forum.networklessons.com/t/device-programmability/6698/14 "2020-03-10T20:03:40Z")

</div>

Hi,  
I have tried to configure RIP, and I was able to configure it using RESTCONF (i just need to test the connectivity between routers).

I have found out issue with deleting the configuration? Is it even possible?  
I have RIP configured on the ROUTER and I tried to delete it using this URL:

```
DELETE https: //192.168.10.55/restconf/data/Cisco-IOS-XE-native:native/router
Status: 204 No Content 

```

But if i show running config on ROUTER, i see that RIP is still configured.

Even when i run GET URL to show RIP configuration:

```
https: //192.168.10.55/restconf/data/Cisco-IOS-XE-native:native/router/Cisco-IOS-XE-rip:rip
Status: 404 Not Found

https ://192.168.10.55/restconf/data/Cisco-IOS-XE-native:native/router
Status: 204 No Content 

```

Thanks for you answer.

Kristina

---

<div class="post-metadata">

### Author: ![Sameer603](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Sameer603](https://forum.networklessons.com/u/Sameer603)
#### Post date: [March 16, 2020, 4:32pm UTC](https://forum.networklessons.com/t/device-programmability/6698/15 "2020-03-16T16:32:56Z")

</div>

Hi ,

What is Netconf , yang and yml file , is there any tutorial references to understand these terms and uses ?

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [March 17, 2020, 6:13am UTC](https://forum.networklessons.com/t/device-programmability/6698/16 "2020-03-17T06:13:17Z")

</div>

Hello Sameer

Here are some lessons that cover these topics:

> **[Device Programmability](https://networklessons.com/network-automation/device-programmability)**
>
> This lesson about network automation explains how to use NETCONF, RESTCONF, and gRPC to configure Cisco IOS network devices.

[https://networklessons.comdata-models-and-structures](https://networklessons.comdata-models-and-structures)

> **[Introduction to SDN OpenDaylight](https://networklessons.com/network-automation/introduction-to-sdn-opendaylight)**
>
> This lesson explains how to configure the OpenDaylight SDN controller with OpenFlow and how to use the Yang UI, Postman and a Python script.

As for .yml files, these are script files written in the YAML language. This language is commonly used for configuration files and in applications where data is being stored or transmitted. It can be used for many of the same communications applications as XML, but is more human-readable, and thus more user friendly. YAML is most often used with Ansible, a network orchestration tool. You can find out more about YAML and Ansible at the following lesson:

> **[Network Automation and Orchestration](https://networklessons.com/network-automation/network-automation-and-orchestration)**
>
> This lesson explains the basics of network automation and orchestration with examples such as ansible, docker, kubernetes.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![Sameer603](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Sameer603](https://forum.networklessons.com/u/Sameer603)
#### Post date: [March 17, 2020, 7:13am UTC](https://forum.networklessons.com/t/device-programmability/6698/17 "2020-03-17T07:13:33Z")

</div>

Thanks Laz , i will go through it and will get back if there any doubts .

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [March 17, 2020, 10:40am UTC](https://forum.networklessons.com/t/device-programmability/6698/18 "2020-03-17T10:40:34Z")

</div>

Hello Kristina

I took a look at this behaviour with Rene, and it seems that this is a bug or an error in the IOS. Specifically, we tried to configure OSPF and then to remove OSPF configuration using the DELETE HTTP command, and the configuration was removed successfully.

Configuring RIP was also successful, but when it came down to deleting the configuration, it would not be removed, so we go the same results as you.

Looking further into the problem, we found the following error messages generated on the CLI of the router:

```
*Mar 17 10:08:32.988: %DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'cisco' authenticated successfully from 10.82.100.188:0 and was authorized for rest over http. External groups: PRIV15
*Mar 17 10:08:33.265: %DMI-3-CLI_GEN_FAIL: R0/0: nesd: Failed to generate CLI change set internal error (18): internal error.
*Mar 17 10:08:33.267: %DMI-5-CONFIG_I: R0/0: nesd: Configured from NETCONF/RESTCONF by cisco, transaction-id 365

```

Notice the error marked **DMI-3-CLI\_GEN\_FAIL**. It states _“Failed to generate CLI change set internal error (18): internal error.”_ I was unable to find information about such an error online, but it seems to indicate that there is an error as far as the IOS is concerned.

Specifically, we were using the following IOS version:

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/4/4d9fc85d62f8a29ece42976aa6b5f7d7c62fdc2d.jpeg)

Note that the “Status: 204 No Content” is not actually a problem, as many commands don’t actually result in a response that contains content. 204 states that the command was sent successfully, but the device doesn’t necessarily send a response back, and in many cases this is normal behaviour. You need to go into the device to verify your changes.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![luigivalenza](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/luigivalenza/32/2656_2.png) [@luigivalenza](https://forum.networklessons.com/u/luigivalenza)
#### Post date: [April 17, 2020, 11:04am UTC](https://forum.networklessons.com/t/device-programmability/6698/19 "2020-04-17T11:04:54Z")

</div>

Hi,

just one question on which I can’t find any answers on line.

What is “arpgmp”, why you are using “arpgmp” and not “ARP”?

I can’t understand what this “gmp” is.

Thanks

---

<div class="post-metadata">

### Author: ![u.forte1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/u/a9a28c/32.png) [@u.forte1](https://forum.networklessons.com/u/u.forte1)
#### Post date: [April 17, 2020, 7:51am UTC](https://forum.networklessons.com/t/device-programmability/6698/20 "2020-04-17T07:51:00Z")

</div>

Hi all

I want information please how i can learn and implement restconf language ?  
i want know how i can make practise with restconf language  
and wich are the step to implement its?

thanks

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [April 20, 2020, 9:17am UTC](https://forum.networklessons.com/t/device-programmability/6698/21 "2020-04-20T09:17:19Z")

</div>

Hello Ugo

You can find out more about RESTCONF at the following lesson:

> **[Device Programmability](https://networklessons.com/network-automation/device-programmability)**
>
> This lesson about network automation explains how to use NETCONF, RESTCONF, and gRPC to configure Cisco IOS network devices.

Included in this lesson, you will find some examples of the implementation of RESTCONF and how it works as well as some implementations that you can try as well. Some additional resources you may find useful include:

> **[Programmability Configuration Guide, Cisco IOS XE Everest 16.6.x - RESTCONF...](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/166/b_166_programmability_cg/restconf_prog_int.html)**
>
> Programmability Configuration Guide, Cisco IOS XE Everest 16.6.x-RESTCONF Programmable Interface

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![u.forte1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/u/a9a28c/32.png) [@u.forte1](https://forum.networklessons.com/u/u.forte1)
#### Post date: [April 20, 2020, 9:36am UTC](https://forum.networklessons.com/t/device-programmability/6698/22 "2020-04-20T09:36:29Z")

</div>

very very thanks i will look

[Next page](https://forum.networklessons.com/t/device-programmability/6698.md?page=2)
