[Netconf] NETCONF and interactive CLI's

Mahesh Jethanandani <mjethanandani@gmail.com> Mon, 08 September 2014 21:47 UTC

Return-Path: <mjethanandani@gmail.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2D0E21A03D9 for <netconf@ietfa.amsl.com>; Mon, 8 Sep 2014 14:47:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vbu6cbcUjuwh for <netconf@ietfa.amsl.com>; Mon, 8 Sep 2014 14:47:26 -0700 (PDT)
Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 164751A03CA for <netconf@ietf.org>; Mon, 8 Sep 2014 14:47:26 -0700 (PDT)
Received: by mail-qg0-f46.google.com with SMTP id q107so6285684qgd.5 for <netconf@ietf.org>; Mon, 08 Sep 2014 14:47:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=4z+opQe2lUJHbhl77Ge/1SAa7TK+RY7M5rRpeQsaz+0=; b=LvomAxPo2+CtIBJv91IwnYmXWrHljbOwYkE1kOF/HxEAmuA4yYI2KJmUelThL3Ey3P NHNu1E/JVotZWkTyz7dHqz77xxQOeuXslzBN3vOMnCHq0iuzLyWYRxP4WgEnvfos7kqy CzRfpxTl81ehYCTqC9ZiZwYyj14WOweF+hS3/DsBLPjUmxBbBeAAhMeWcjHfHDtW4CqA j88zqc9WtQDWvynPVwVpObR1VkWyM4IXMHv2EOZkD+6T1sUwUAzQjBBF+T2WLMmeQMrn kas0s4rwIAwdjOr1e4Wj34PHt+L7Z1KLQ9wM3klVhhEdoNSTo6FoeUMo/M7XZ+2i5il8 1liQ==
MIME-Version: 1.0
X-Received: by 10.224.47.130 with SMTP id n2mr13173481qaf.87.1410212845360; Mon, 08 Sep 2014 14:47:25 -0700 (PDT)
Received: by 10.140.19.16 with HTTP; Mon, 8 Sep 2014 14:47:25 -0700 (PDT)
Date: Mon, 08 Sep 2014 14:47:25 -0700
Message-ID: <CAAchPMuqarL9LicAhWisZXSxk9=GYMsuxPVZcmMJ+dRjawzM6Q@mail.gmail.com>
From: Mahesh Jethanandani <mjethanandani@gmail.com>
To: Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="001a1134b004b49dce050294c33d"
Archived-At: http://mailarchive.ietf.org/arch/msg/netconf/b0-ltZMzEB-dVE3k8eqR4b_Bwws
Subject: [Netconf] NETCONF and interactive CLI's
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Sep 2014 21:47:28 -0000

I was asked to fashion a problem statement around how NETCONF deals with
what I call "interactive CLI" models.

That model includes commands that are today issued on a CLI and involve a
command being issued, and a continuous response coming back till such time
it is interrupted either by the CLI or because there is a terminating
condition. In the period that the command is running, the CLI may be
blocked from issuing any other commands.

Commands issued like these are fairly common debug commands issued as part
of testing the configuration on the box and are unlike getting statistics
which are not interactive in nature.

A very common example of this is the ping command. Other examples include
traceroute command. A successful ping would have a response like this.

 > ping google.com
PING google.com (74.125.239.98) 56(84) bytes of data.
64 bytes from nuq05s01-in-f2.1e100.net (74.125.239.98): icmp_req=1 ttl=55
time=4.38 ms
64 bytes from nuq05s01-in-f2.1e100.net (74.125.239.98): icmp_req=2 ttl=55
time=4.26 ms
64 bytes from nuq05s01-in-f2.1e100.net (74.125.239.98): icmp_req=3 ttl=55
time=4.38 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 4.260/4.343/4.389/0.096 ms

Here also the response is split in two parts, one that is interactive
response which spits out one line at a time as the ping reply comes back
and the second which for the lack of a better term a "terminating response"
- a cumulative response of the complete interaction, prompted by the
issuance of a terminating condition i.e. CTRL-C or TTL expiry.

In the case ping fails, there is no interactive response, but there is a
terminating response like in this case.

 > ping pyramid.com
PING pyramid.com (109.228.17.0) 56(84) bytes of data.


--- pyramid.com ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 5999ms

Without getting into specific implementation details, these commands today
would follow a pattern of

<rpc>
...
<rpc/>

<rpc-reply>
....
<rpc-reply/>

<rpc-reply>
....
<rpc-reply/>

<rpc-reply>
....
<rpc-reply/>

<rpc>
CTRL-C for the above NETCONF session
<rpc/>

<rpc-reply>
....
<rpc-reply/>

How does NETCONF deal with such a command? I would not confuse this with
another thread that was talking about "bulk response" because this issue is
more than how to deal with fragments of large responses. It has to do with
the interactive nature that the current NETCONF protocol does not seem to
support. If it does not, what are semantics needed to support these kind of
commands.

-- 
Mahesh Jethanandani
mjethanandani@gmail.com