Basic Dial-In using gNMI
Last updated
Last updated
On the ubuntu server (10.200.255.4), bring down the TIG stack using sudo docker compose down.
Edit the docker-compose file so that dial_in is used. Comment out dial_out.
In NSO, edit the telegraf_dial_in.conf file and scroll down to “INPUT PLUGINS.” Change the addresses and username/password credentials:
Launch the docker container using:
Configure Dial-In MDT on XR1 using the following parameters:
Use port 57400
Do not use TLS
MDT using dial-in session initiation is very simple to configure on IOS-XR. You can only use gRPC for dial-in, so all you do is start the gRPC server, set the port, and configure TLS settings. In this lab, we are not using TLS, so we simply use the no-tls keyword.
All of the complexity is present on the TIG container. This container is already configured with the YANG model path information.
On IOS-XR, we can confirm that the session is up:
Above we see that the destination is dialin. Due to this, the group ID and subscription ID appear to be dynamically generated. The IDs beginning with GNMI__ refers to the fact that gNMI is used for the dialin session.
We can also see that the sensor paths were dynamically created. We can tell because the group ID begins with GNMI__
We should also be aware of the commands to view more general gRPC status. The following command shows that the gRPC server is running, TLS is disabled, and the router is listening on port 57400.
We can also see the current gRPC streams:
Interestingly, the gRPC statistics shows all counters as zero. All of these appear to be actions such as replace/delete config, get operational data, etc.
gNMI stands for gRPC Network Management Interface. This is a network management protocol that is yang-based, very much like NETCONF. Where NETCONF uses SSH for transport, gNMI uses gRPC (which itself uses HTTP2, which allows for TLS). Where NETCONF uses XML for encoding, gNMI uses proto buffs. This allows for compressed data, giving gNMI better throughput and scalability than NETCONF.
gNMI uses four functions:
Capabilities
Get
Set
Subscribe
The subscribe function is what we are interested in for MDT. The collector initiates (dials in) the session with the router, and using the subscribe function, specifies the YANG model, encoding type, and streaming interval (i.e. 30seconds). This is why we don’t have to configure any of these parameters on the router itself.
You may have seen that IOS-XR has recently begun supporting gNMI for dialout as well. How can that work? The way it works is that the router initiates a session with the collector using the grpc tunnel command. This appears to just allow the collector to learn about the router. Then the collector initiates the MDT session by using the subscribe function like normal. So gNMI still works the same as always. The difference is just that the router can inform the collector of its presence, allowing the collector to send the subscribe message and start the MDT session.