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.
The configuration roadmap is as follows:
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
<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
[~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
[*DeviceA-grpc-server-ipv6] server-port 20000
[*DeviceA-grpc-server-ipv6] server enable [*DeviceA-grpc-server-ipv6] commit
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