Hi Folks,
This is a share and seek message:
I am using the following set of commands to configure gNMI access in Junos version 23.4R19 in VLAB (available in jlabs.juniper.net). Is there an Junos version-safe equivalent command to do the same in any Junos version (that supports gNMI)?
show version
configure
show system services ssh
set system services ssh allow-tcp-forwarding
commit
exit
edit system services extension-service request-response grpc
commit
exit
jcluser@vMX-addr-0# show system services extension-service request-response grpc
clear-text {
address 0.0.0.0;
port 57400;
}
- Make sure that 'show version' shows that the version is 23.4R1.9
- Make sure that 'show system services ssh' "no-tcp-forwarding" is not there
Set up a tunnel from your PC to the lab:
ssh -nNT -L 57400:100.123.1.0:57400 user-name@vLAB_Device_IP -p vLAB_port
Test
$ gnmic --address 127.0.0.1:57400 --username user-name --password your-password --insecure get --encoding json_ietf --type CONFIG --path "juniper:/"
[
{
"source": "127.0.0.1:57400",
"timestamp": 1785237401219732623,
"time": "2026-07-28T16:46:41.219732623+05:30",
"updates": [
{
"Path": "juniper:/",
"values": {
"": {
"configuration": {
"@": {
"junos:commit-localtime": "2026-07-28 11:15:17 UTC",
"junos:commit-seconds": "1785237317",
"junos:commit-user": "jcluser",
"xmlns": "http://xml.juniper.net/xnm/1.1/xnm"
},
"chassis": {
"fpc": [
{
"lite-mode": [
null
],
"name": 0,
"pic": [
{
"name": 0,
"number-of-ports": 8
}
]
}
]
},
"interfaces": {
"interface": [
{
"name": "fxp0",
"unit": [
{
"family": {
"inet": {
"address": [
{
"name": "100.123.1.0/16"
}
]
}
},
"name": 0
}
]
}
]
},
"protocols": {
"router-advertisement": {
"interface": [
{
"managed-configuration": [
null
],
"name": "fxp0.0"
}
]
}
},
"routing-options": {
"static": {
"route": [
{
"name": "0.0.0.0/0",
"next-hop": [
"100.123.0.1"
]
}
]
}
},
"system": {
"host-name": "vMX-addr-0",
"login": {
"user": [
{
"authentication": {
"encrypted-password": "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"class": "super-user",
"name": "jcluser",
"uid": 2000
}
]
},
"processes": {
"dhcp-service": {
"traceoptions": {
"file": {
"filename": "dhcp_logfile",
"size": "10m"
},
"flag": [
{
"name": "packet"
}
],
"level": "all"
}
}
},
"root-authentication": {
"encrypted-password": "XXXXXXXXXXXX"
},
"scripts": {
"language": "python3"
},
"services": {
"extension-service": {
"request-response": {
"grpc": {
"clear-text": {
"address": "0.0.0.0",
"port": 57400
}
}
}
},
"netconf": {
"ssh": {}
},
"rest": {
"enable-explorer": [
null
],
"http": {
"port": 3000
}
},
"ssh": {
"allow-tcp-forwarding": [
null
],
"root-login": "allow"
}
},
"syslog": {
"file": [
{
"contents": [
{
"any": [
null
],
"name": "interactive-commands"
}
],
"name": "interactive-commands"
},
{
"contents": [
{
"name": "any",
"notice": [
null
]
},
{
"info": [
null
],
"name": "authorization"
}
],
"name": "messages"
}
],
"user": [
{
"contents": [
{
"emergency": [
null
],
"name": "any"
}
],
"name": "*"
}
]
}
},
"version": "23.4R1.9"
}
}
}
}
]
}
]
$
------------------------------
SAMEER DUBEY
------------------------------