Example for Configuring Dynamic Telemetry Subscription Based on gRPC (IPv4 Collector)

Networking Requirements

As the network scale increases, carriers need to optimize networks and rectify faults based on device information. For example, if a user wants to monitor an interface for a period of time, configure dynamic telemetry subscription. To stop monitoring, tear down the connection. The subscription is automatically canceled and cannot be restored. This avoids the long-term load on devices and simplifies the interaction between users and devices.

As shown in Figure 1, DeviceA supports telemetry and establishes a gRPC connection with the collector. Interface1 of DeviceA needs to be monitored, and data needs to be sent to the collector as required.

Figure 1 Networking of configuring gRPC-based dynamic telemetry subscription

In this example, Interface1 and Interface2 represent GE 0/1/1 and GE 0/1/2, respectively.



Configuration Roadmap

The configuration roadmap is as follows:

  1. Create a local user, add the user to the administrator group, and configure the service type of the user.
  2. Set the source IP address to be listened for during dynamic telemetry subscription.

  3. Configure the number of the port to be listened during dynamic telemetry subscription.

  4. Enable the gRPC service.

Data Preparation

To complete the configuration, you need the following data:

  • IP address of Interface1: 192.168.1.1 (Interface1 on DeviceA and the collector must be routable.)

  • Number of the port to be listened for: 20000

Procedure

  1. Configure an IP address and a routing protocol for each interface so that all devices can communicate at the network layer.
  2. Create a local user, add the user to the administrator group, and configure the service type of the user.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] aaa
    [~DeviceA-aaa] local-user hhww123 password irreversible-cipher Hello-13579
    [*DeviceA-aaa] local-user hhww123 service-type http
    [*DeviceA-aaa] local-user hhww123 user-group manage-ug
    [~DeviceA-aaa] commit
    [~DeviceA-aaa] quit

  3. Set the source IP address to be listened for during dynamic telemetry subscription.

    [~DeviceA] interface GigabitEthernet0/1/1
    [~DeviceA-GigabitEthernet0/1/1] ip address 192.168.1.1 24
    [*DeviceA-GigabitEthernet0/1/1] quit
    [*DeviceA] grpc
    [*DeviceA-grpc] grpc server
    [*DeviceA-grpc-server] source-ip 192.168.1.1

  4. Configure the number of the port to be listened during dynamic telemetry subscription.

    [*DeviceA-grpc-server] server-port 20000

  5. Enable the gRPC service.

    [*DeviceA-grpc-server] server enable
    [*DeviceA-grpc-server] commit

Configuration Files

Device A configuration file

#
sysname DeviceA
# 
aaa
  local-user hhww123 password irreversible-cipher $1c$%L%X:Jn3hY$5^%T5I\4HG>j|i~s,{.@FpH*2XGM\R;7#$"\i!L0$
  local-user hhww123 service-type http
  local-user hhww123 user-group manage-ug
#
interface GigabitEthernet0/1/1
 undo shutdown
 ip address 192.168.1.1 255.255.255.0
#
grpc
 #
 grpc server
  source-ip 192.168.1.1
  server-port 20000
  server enable
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >