< Home

Configuring the User Interface

This section provides a sample of configuring the user interface using the config method.

Table 1 Configuring the user interface

Operation

XPATH

edit-config:config

  • /huawei-user-interface:user-interfaces/user-interface/name
  • /huawei-user-interface:user-interfaces/user-interface/authentication-mode/aaa/aaa-protocol
  • /huawei-user-interface:user-interfaces/user-interface/authentication-mode/password/password-protocol
  • /huawei-user-interface:user-interfaces/user-interface/authentication-mode/password/password
  • /huawei-user-interface:user-interfaces/user-interface/privilege-level
  • /huawei-user-interface:user-interfaces/user-interface/idle-timeout/minutes
  • /huawei-user-interface:user-interfaces/user-interface/idle-timeout/seconds
  • /huawei-user-interface:user-interfaces/user-interface/screen-length/line-num
  • /huawei-user-interface:user-interfaces/user-interface/acl/ipv4-inbound
  • /huawei-user-interface:user-interfaces/user-interface/acl/ipv4-outbound
  • /huawei-user-interface:user-interfaces/user-interface/acl/ipv6-inbound
  • /huawei-user-interface:user-interfaces/user-interface/acl/ipv6-outbound

Data Requirements

Table 2 Configuring the user interface

Item

Data

Description

User interface name

vty 4

Set the password, priority, timeout interval, number of lines displayed on each terminal screen, and ACL on the VTY 4 user interface.

Login protocol corresponding to password authentication as the user interface authentication mode

all

Local authentication password

root@123

User interface priority

15

User connection timeout period, in minutes

30 minutes

User connection timeout period, in seconds

49 seconds

Number of lines on each terminal screen

512

ACL that restricts users with an IPv4 address or within an address segment from logging in to a device

test1

ACL that restricts IPv4 users who have logged in to a device from logging in to other devices

test2

ACL that restricts users with an IPv6 address or within an address segment from logging in to a device

test3

ACL that restricts IPv6 users who have logged in to a device from logging in to other devices

test4

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <user-interface:user-interfaces xmlns:user-interface="urn:huawei:params:xml:ns:yang:huawei-user-interface">
        <user-interface:user-interface>
          <user-interface:name>vty 4</user-interface:name>
          <user-interface:password-protocol>all</user-interface:password-protocol>
          <user-interface:password>root@123</user-interface:password>
          <user-interface:privilege-level>15</user-interface:privilege-level>
          <user-interface:idle-timeout>
            <user-interface:minutes>30</user-interface:minutes>
            <user-interface:seconds>49</user-interface:seconds>
          </user-interface:idle-timeout>
          <user-interface:screen-length>
            <user-interface:line-num>512</user-interface:line-num>
          </user-interface:screen-length>
          <user-interface:acl>
            <user-interface:ipv4-inbound>test1</user-interface:ipv4-inbound>
            <user-interface:ipv4-outbound>test2</user-interface:ipv4-outbound>
            <user-interface:ipv6-inbound>test3</user-interface:ipv6-inbound>
            <user-interface:ipv6-outbound>test4</user-interface:ipv6-outbound>
          </user-interface:acl>
        </user-interface:user-interface>
      </user-interface:user-interfaces>
    </config>
  </edit-config>
</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="1"> 
  <ok/> 
</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="2">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic