Skip to content

Commit

Permalink
Update NETCONF_over_SSH_demo.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ksator authored Jul 18, 2021
1 parent 4aaf2b3 commit 6aa1a84
Showing 1 changed file with 71 additions and 21 deletions.
92 changes: 71 additions & 21 deletions NETCONF_over_SSH_demo.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
### Verify NETCONF is enabled and running

```
s70515#sh version
Arista DCS-7050CX3-32S-F
Expand All @@ -21,13 +23,19 @@ s70515#sh management api netconf
Enabled: Yes
Server: running on port 830, in default VRF
```
Start a NETCONF over SSH session

### Start a NETCONF over SSH session

```
s70515#netconf start-client
```

### Advertise the client capabilities

Once the NETCONF session is open, the NETCONF server (EOS device) advertises its capabilities.

You must advertise the client capabilities. Example:

```
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
Expand All @@ -40,15 +48,19 @@ You must advertise the client capabilities. Example:
</hello>
]]>]]>
```
Get all configuration and state data

### Get all configuration and state data

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<get>
</get>
</rpc>
]]>]]>
```
Get the operational status of an Interface

### Get the operational status of an Interface

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
<get>
Expand All @@ -67,7 +79,9 @@ Get the operational status of an Interface
</rpc>
]]>]]>
```
Get the whole running configuration

### Get the whole running configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3">
<get-config>
Expand All @@ -78,7 +92,9 @@ Get the whole running configuration
</rpc>
]]>]]>
```
Get the running configuration of an interface

### Get the running configuration of an interface

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4">
<get-config>
Expand All @@ -96,7 +112,9 @@ Get the running configuration of an interface
</rpc>
]]>]]>
```
Get the interface description from the running configuration

### Get the interface description from the running configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
<get-config>
Expand All @@ -118,7 +136,9 @@ Get the interface description from the running configuration
</rpc>
]]>]]>
```
Lock the running configuration

### Lock the running configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="6">
<lock>
Expand All @@ -129,7 +149,9 @@ Lock the running configuration
</rpc>
]]>]]>
```
Edit the running configuration using EOS native data model

### Edit the running configuration using EOS native data model

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="7">
<edit-config>
Expand All @@ -148,7 +170,9 @@ Edit the running configuration using EOS native data model
</rpc>
]]>]]>
```
Edit the running configuration using OpenConfig data model

### Edit the running configuration using OpenConfig data model

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="8">
<edit-config>
Expand All @@ -170,7 +194,9 @@ Edit the running configuration using OpenConfig data model
</rpc>
]]>]]>
```
Edit the running configuration to delete an existing existing data

### Edit the running configuration to delete an existing existing data

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9">
<edit-config>
Expand All @@ -193,7 +219,9 @@ Edit the running configuration to delete an existing existing data
</rpc>
]]>]]>
```
Unlock the running configuration

### Unlock the running configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="10">
<unlock>
Expand All @@ -204,7 +232,9 @@ Unlock the running configuration
</rpc>
]]>]]>
```
Save running configuration on the flash

### Save running configuration on the flash

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11">
<copy-config>
Expand All @@ -220,7 +250,9 @@ Save running configuration on the flash
</rpc>
]]>]]>
```
Copy the running configuration datastore to the startup configuration datastore

### Copy the running configuration datastore to the startup configuration datastore

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="12">
<copy-config>
Expand All @@ -234,7 +266,9 @@ Copy the running configuration datastore to the startup configuration datastore
</rpc>
]]>]]>
```
Lock the candidate configuration

### Lock the candidate configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="13">
<lock>
Expand All @@ -245,7 +279,9 @@ Lock the candidate configuration
</rpc>
]]>]]>
```
Edit the candidate configuration

### Edit the candidate configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="14">
<edit-config>
Expand All @@ -267,14 +303,18 @@ Edit the candidate configuration
</rpc>
]]>]]>
```
Commit the configuration change (from the candidate to the running configuration)

### Commit the configuration change (from the candidate to the running configuration)

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="15">
<commit/>
</rpc>
]]>]]>
```
Unlock the candidate configuration

### Unlock the candidate configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="20">
<unlock>
Expand All @@ -285,7 +325,9 @@ Unlock the candidate configuration
</rpc>
]]>]]>
```
Edit the candidate configuration

### Edit the candidate configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="21">
<edit-config>
Expand All @@ -304,7 +346,9 @@ Edit the candidate configuration
</rpc>
]]>]]>
```
Get part of the candidate configuration

### Get part of the candidate configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
<get-config>
Expand All @@ -322,18 +366,24 @@ Get part of the candidate configuration
</rpc>
]]>]]>
```

### Revert the candidate configuration to the current running configuration

If you decide to not commit the candidate configuration, you can revert the candidate configuration to the current running configuration

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="90">
<discard-changes/>
</rpc>
]]>]]>
```
Close the session

### Close the session

```
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="100">
<close-session>
</close-session>
</rpc>
]]>]]>
```
```

0 comments on commit 6aa1a84

Please sign in to comment.