When "traceroute" is issued to QFX/EX/MX/PTX over ssh-netconf session and format is text or ascii in RPC , no output is returned to receiving side. Ping command works with any formats, but traceroute does not work with "text" or "ascii." Traceroute works only when format is json or xml.
When "traceroute" is issued to QFX/EX/MX over ssh-netconf session and format=text or ascii in RPC , no output is returned to receiving side. Traceroute works when format is json or xml. Ping command works with any formats, but traceroute does not work with "text" or ascii.
Netconf trace-options comparison in working and non-working condition: Netconf server ---Management or in-band interface----10.0.0.2[QFX5200] << Device under test (DUT) Netconf Server, sends the requests/CLI commands over netconf-ssh toward QFX5200. 1) Login to DUT from Netconf server. root@Server:~% ssh [email protected] -p 830 -s netconf The authenticity of host '[10.0.0.2]:830 ([10.0.0.2]:830)' can't be established. ECDSA key fingerprint is SHA256:Z6vKKs4d8xYWa+uvZAD/BYba5wUkkUdoKco4DHNjLlI. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[10.0.0.2]:830' (ECDSA) to the list of known hosts. Password: <!-- No zombies were killed during the creation of this user interface --> <!-- user root, class super-user --> <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <capabilities> <capability>urn:ietf:params:netconf:base:1.0</capability> <capability>urn:ietf:params:netconf:capability:candidate:1.0</capability> <capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</capability> <capability>urn:ietf:params:netconf:capability:validate:1.0</capability> <capability>urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file</capability> <capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability> <capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability> <capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability> <capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability> <capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?scheme=http,ftp,file</capability> <capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring</capability> <capability>http://xml.juniper.net/netconf/junos/1.0</capability> <capability>http://xml.juniper.net/dmi/system/1.0</capability> </capabilities> <session-id>10480</session-id> </hello> ]]>]]> 2) Send a ping towards any IP address, and output is shown correctly on the NETCONF server terminal: root@Server:~% <rpc><command format='text'>ping 8.8.8.8</command></rpc> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos=http://xml.juniper.net/junos/20.2R0/junos> <output> PING 8.8.8.8 (8.8.8.8): 56 data bytes 64 bytes from 8.8.8.8: icmp_seq=0 ttl=109 time=5.089 ms --- 8.8.8.8 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 5.089/5.089/5.089/0.000 ms </output> </rpc-reply> ]]>]]> 3) For a traceroute, the output is pretty much empty in the NETCONF terminal: root@Server:~% <rpc><command format='text'>traceroute 8.8.8.8</command></rpc> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos=http://xml.juniper.net/junos/20.2R0/junos> 4) Running traceroute with format 'json' or 'xml' provides the right output. Command used: <rpc><command format='xml'>traceroute IP address</command></rpc> <rpc><command format='ascii'>traceroute 10.85.150.72</command></rpc> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/21.4R0/junos"> </rpc-reply> ]]>]]> <rpc><command format='xml'>traceroute 10.85.150.72</command></rpc> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/21.4R0/junos"> <traceroute-results xmlns="http://xml.juniper.net/junos/21.4R0/junos-probe-tests"> <target-host> 10.85.150.72 </target-host> <target-ip> 10.85.150.72 </target-ip> <max-hop-index> 30 </max-hop-index> <packet-size> 52 </packet-size> <hop> <ttl-value> 1 </ttl-value> <last-ip-address> 10.85.161.130 </last-ip-address> <last-host-name> 10.85.161.130 </last-host-name> <probe-result date-determined="1711469650"> <probe-index> 1 </probe-index> <ip-address> 10.85.161.130 </ip-address> <host-name> 10.85.161.130 </host-name> <icmp-type integer-type-value="11"> <icmp-timxceed/> </icmp-type> <icmp-code integer-code-value="0"> <icmp-timxceed-intrans/> </icmp-code> <rtt> 13422 </rtt> <probe-success/> </probe-result> <deleted for brevity> <traceroute-success/> </traceroute-results> </rpc-reply> ]]>]]> *********************************************************************************** Netconf Traceoptions enabled on DUT to check the processing of incoming RPC. Netconf Traceoptions Comparison for ping and traceroute with output format=text ************************************************************************************ Ping , with format=text Jan 16 14:56:05 [NETCONF] - [13210] Incoming: <rpc><command format='text'>ping 10.0.0.1 count 5</command></rpc> << <<<< Incoming RPC with 5 ICMP requests to 10.0.0.1 Jan 16 14:56:05 [NETCONF] - [13210] Outgoing: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/22.2R0/junos"> Jan 16 14:56:05 [NETCONF] - [13210] Outgoing: <rpc-reply> Jan 16 14:56:05 [NETCONF] - [13210] Outgoing: <output> <<<<< Output tag is present Jan 16 14:56:05 [NETCONF] - [13210] Outgoing: PING 10.0.0.1 (10.0.0.1): 56 data bytes Jan 16 14:56:05 [NETCONF] - [13210] Outgoing: 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=3.860 ms Jan 16 14:56:06 [NETCONF] - [13210] Outgoing: 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=10.745 ms Jan 16 14:56:07 [NETCONF] - [13210] Outgoing: 64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=14.301 ms Jan 16 14:56:08 [NETCONF] - [13210] Outgoing: 64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=38.214 ms Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: 64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=13.370 ms Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: --- 10.0.0.1 ping statistics --- Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: 5 packets transmitted, 5 packets received, 0% packet loss Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: round-trip min/avg/max/stddev = 3.860/16.098/38.214/11.647 ms Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: </output> << Output tag Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: </rpc-reply> Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: </rpc-reply> Jan 16 14:56:09 [NETCONF] - [13210] Outgoing: ]]>]]> *********************************************************************************** With traceroute command "Output" tag is missing: Jan 16 14:57:13 [NETCONF] - [13210] Incoming: <rpc><command format='text'>traceroute 10.0.0.1</command></rpc> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/22.2R0/junos"> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <rpc-reply> <<<< No output tag Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <traceroute-results xmlns="http://xml.juniper.net/junos/22.2R0/junos-probe-tests"> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <target-host> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 10.0.0.1 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </target-host> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <target-ip> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 10.0.0.1 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </target-ip> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <max-hop-index> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 30 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </max-hop-index> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <packet-size> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 52 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </packet-size> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <hop> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <ttl-value> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 1 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </ttl-value> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <last-ip-address> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 10.0.0.1 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </last-ip-address> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <last-host-name> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: "hostname xxx" Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </last-host-name> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <probe-result date-determined="1705445833"> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <probe-index> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 1 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </probe-index> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <ip-address> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 10.0.0.1 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </ip-address> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <host-name> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: "hostname xxx" Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </host-name> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <icmp-type integer-type-value="3"> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <icmp-unreach/> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </icmp-type> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <icmp-code integer-code-value="3"> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <icmp-unreach-port/> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </icmp-code> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <rtt> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 10719 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </rtt> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <probe-reached/> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </probe-result> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <probe-result date-determined="1705445833"> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <probe-index> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 2 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </probe-index> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <ip-address> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: 10.0.0.1 Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </ip-address> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <host-name> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: "hostname xxx" Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </host-name> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <icmp-type integer-type-value="3"> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <icmp-unreach/> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </icmp-type> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <icmp-code integer-code-value="3"> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: <icmp-unreach-port/> Jan 16 14:57:13 [NETCONF] - [13210] Outgoing: </icmp-code> <cut> As seen in traceoptions , "output" tag is missing for traceroute. Per https://www.juniper.net/documentation/us/en/software/junos/netconf/topics/task/netconf-operational-request-output-format.html "When the client application includes the format="text" or format="ascii" attribute in the request tag, the NETCONF server formats the reply as ASCII text and encloses it in an <output>tag element. The format="text" and format="ascii" attributes produce identical output. There is no "output" tag included for "traceroute". "Traceroute" command does NOT support format=text attribute in XML. This is per design and is a generic limitation. As a workaround , use json or xml format to issue traceroute command.