Establishing a NETCONF Session
1. Enter the following command to open an SSH connection:
2. Type or paste the following hello message:
3. Type or paste the following rpc message. The get operation is used as an example.
© Copyright Lenovo 2016
SSH is the widely used protocol for NETCONF sessions. The default SSH port for
NETCONF is 830. The client may also connect to the switch through SSH port 22.
Follow these steps to establish a NETCONF session. Enter commands in the client
Linux Shell.
Note: You can open a maximum of four simultaneous sessions.
ssh admin@{switch IP address} p 830 s netconf
<hello>
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
</capabilities>
</hello>
]]>]]>
The switch returns a hello message:
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:capability:writablerunning:1.0</capab
ility>
<capability>urn:ietf:params:netconf:capability:rollbackonerror:1.0</capa
bility>
<capability>urn:ietf:params:netconf:capability:startup:1.0</capability>
</capabilities>
<sessionid>102</sessionid>
</hello>
]]>]]>
<rpc messageid="100">
<get>
<filter type="subtree">
<configurationtext/>
</filter>
</get>
</rpc>
]]>]]>
669
Chapter 43: NETCONF