Example for Configuring Dynamic Telemetry Subscription Based on gRPC (IPv6 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.

Device A communicates with the collector using an IPv6 address.

Figure 1 Configuring gRPC-based dynamic telemetry subscription

In this example, Interface1 and Interface2 represent GE0/1/1 and GE0/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 IPv6 address to be listened for during dynamic telemetry subscription.
  3. Configure the number of the port to be listened for during dynamic telemetry subscription.
  4. Enable the gRPC service.

Data Preparation

To complete the configuration, you need the following data:

  • IPv6 address of Interface1: 2001:db8:4::1 (Interface1 on DeviceA and the collector must be routable.)

  • Number of the port to be listened for: 20000

Procedure

  1. Configure an IPv6 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 IPv6 address to be listened for during dynamic telemetry subscription.

    [~DeviceA] interface GigabitEthernet0/1/1
    [~DeviceA-GigabitEthernet0/1/1] ipv6 enable
    [*DeviceA-GigabitEthernet0/1/1] ip address 2001:db8:4::1 64
    [*DeviceA-GigabitEthernet0/1/1] quit
    [*DeviceA] ipv6 route-static 2001:db8:3:: 64 GigabitEthernet0/1/1 2001:db8:4::2
    [*DeviceA] grpc
    [*DeviceA-grpc] grpc server ipv6
    [*DeviceA-grpc-server-ipv6] source-ip 2001:db8:4::1

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

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

  5. Enable the gRPC service.

    [*DeviceA-grpc-server-ipv6] server enable
    [*DeviceA-grpc-server-ipv6] 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
 ipv6 enable
 ipv6 address 2001:db8:4::1 64
#
ipv6 route-static 2001:db8:3:: 64 GigabitEthernet0/1/1 2001:db8:4::2
#
grpc
 #
 grpc server ipv6
  source-ip 2001:db8:4::1
  server-port 20000
  server enable
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic