No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S600-E V200R012C00 NETCONF YANG API Reference

This document describes the NETCONF YANG API functions supported by the switch, including the data model and samples.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
SSH TCP Port Forwarding

SSH TCP Port Forwarding

This section describes the configuration model of SSH TCP port forwarding and provides examples of XML packets.

Data Model

The configuration model file matching SSH TCP port forwarding is huawei-ssh.yang.

Table 2-66  Configuration of SSH TCP port forwarding

Object

Description

Value

Remarks

/huawei-ssh:tcp-port-forwarding/operator

Configures a channel for TCP port forwarding.

The value is of the enumerated type:
  • create: Create a channel for TCP port forwarding.
  • destroy: Delete a channel for TCP port forwarding.

N/A

/huawei-ssh:tcp-port-forwarding/forwarding-type

Indicates the type of TCP port forwarding.

The value is of the enumerated type:

remote: Specify remote port forwarding.

N/A

/huawei-ssh:tcp-port-forwarding/remote/listening-port

Indicates the listening port of a peer device.

The value is an integer in the range from 0 to 65535.

Ports 0 to 1023 are privileged ports. If the peer device cannot be listened to because of insufficient permission, the SSH channel fails to be established.

/huawei-ssh:tcp-port-forwarding/remote/ip-address

Indicates the destination IP address of packets in remote port forwarding mode.

The value is in dotted decimal notation.

These two objects are mutually exclusive, so only one of them can be delivered.

/huawei-ssh:tcp-port-forwarding/remote/host-name

Indicates the name of the destination host to which packets are forwarded in remote port forwarding mode.

The value is a character string.

/huawei-ssh:tcp-port-forwarding/remote/server-port

Indicates the listening port number of the destination host to which packets are forwarded in remote port forwarding mode.

The value is an integer in the range from 0 to 65535.

N/A

/huawei-ssh:tcp-port-forwarding/remote/ssh-server-name

Indicates the destination host connected to the SSH client.

The value is a character string.

The commonly used format is user@xx.xx.xx.xx -p PortNumber, in which the user name of the SSH server, host IP address, and port number are specified.

Configuring the SSH TCP Port Forwarding Function

This section describes how to configure the SSH TCP port forwarding function using the rpc method.

Table 2-67  Configuring SSH TCP port forwarding

Operation

XPATH

rpc

/huawei-ssh:tcp-port-forwarding/

Data Requirements

Table 2-68  Configuring SSH TCP port forwarding

Item

Data

Description

Channel for TCP port forwarding

create

-

Type of TCP port forwarding

remote

-

IP address of the VRP protocol stack

192.168.2.1

-

Listening port number of the VRP protocol stack

22

-

Port number of the TCP port forwarding channel listened by the controller

55811

-

SSH server IP address on the controller

10.171.45.155

-

SSH server port number on the controller

10022

User name used to log in to the SSH server on the controller

huawei

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <tcp-port-forwarding xmlns="urn:huawei:params:xml:ns:yang:huawei-ssh">
    <operator>create</operator> 
    <forwarding-type>remote</forwarding-type>
    <remote> 
      <listening-port>55811</listening-port>
      <ip-address>192.168.2.1</ip-address>
      <server-port>22</server-port> 
      <ssh-server-name>huawei@10.171.45.155 -p 10022</ssh-server-name>
    </remote> 
  </tcp-port-forwarding>
</rpc>

Response Example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2ac0550f-49dc-11e7-b586-f0bc1781395f">
  <result>
    <ok/>
  </result>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="cfc47140-49dc-11e7-8c66-f0bc1781395f">
  <rpc-error>
    <error-message> Some unspecified error occurred. </error-message>
  </rpc-error>
</rpc-reply>
Translation
Download
Updated: 2018-09-01

Document ID: EDOC1100037962

Views: 6245

Downloads: 8

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next