[Idr] Use of 'not' & 'm' bits in BGP flowspec components of type [op, bitmask] (RFC 5575)

PVLR Pavana Murthy <pvlrpm@gmail.com> Thu, 15 February 2018 14:35 UTC

Return-Path: <pvlrpm@gmail.com>
X-Original-To: idr@ietfa.amsl.com
Delivered-To: idr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0D16412DA13 for <idr@ietfa.amsl.com>; Thu, 15 Feb 2018 06:35:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, HK_RANDOM_ENVFROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 Fj3d7ZgLUOzo for <idr@ietfa.amsl.com>; Thu, 15 Feb 2018 06:35:11 -0800 (PST)
Received: from mail-wr0-x236.google.com (mail-wr0-x236.google.com [IPv6:2a00:1450:400c:c0c::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3D99512DA12 for <idr@ietf.org>; Thu, 15 Feb 2018 06:35:11 -0800 (PST)
Received: by mail-wr0-x236.google.com with SMTP id n7so3573462wrn.5 for <idr@ietf.org>; Thu, 15 Feb 2018 06:35:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=gxZlg0INKJk4RhSyCUcVxh2haGPMdPQt/bdk8V5Vs0M=; b=LGPbY8/Y2/ILtF3iAmvYFKVX5Xuun5g8RkMF0NwZQLa3aZ97gVpHIXd5QnQSMrX5RL VpvVQJ+PgmH489/R1n+nkQSZ7uwdXV0WEHm7jPQk9UHhGq/+tKbAP2rQ1SdLOvRdtzbe 2mG4cqLn1OQ5/qfjhbDvnyiwOxlKIHPj66opL/FjaC8y8CUxWWFCPtXQ1qeE0VlRU1Ca gkb8pxVy6dkAKgBh4YaJiX/9ZKz0MYEn3KTy0fG5hO9j2PIqZCsm7q0dZ3xNRlKxUoTf SOZNguot+FLk6bP/mJljmYIb0TfWg/L0JpYmUPUT5a+DNfC74vokQJzv+Gk5tzXn8t+9 HNpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=gxZlg0INKJk4RhSyCUcVxh2haGPMdPQt/bdk8V5Vs0M=; b=H38N3NlavuVu9Z55lXC9Jr1VlG0s8hSK7HW5E6QRyhsERJhlz1dKCq5wieK+N0j6Mj osST2Yc/VrXSxOrbQZTr9nOhrwHkJa23jdVocaP48mkqrVgeb7pr5SB5HKH8ktNhkBI5 IH4e0GTIyrI/VSBV9g4rjdcVMmVEByPNynivH5sZLGn/bhoGmP89IiGZwvKbL396aoxZ blbS8shqErzapakXpu8ifP5yaCMO4jZ0x+8Qvc47dyALgjzkzKOI+OH4GVHkFzuz73Ej 5vqKbaByNDAyrNq6ydnWPZeJfJnqfPTmwHWLbNpMDOMfDave+/sPw+kZmsxS5QCz0yuC 3AFg==
X-Gm-Message-State: APf1xPCay3ztQR/KcZ18LUfJwWQuGoFCyO4US/6mh/mmamQa0rH0dHO0 kWOdsdk1s9YtKU/Ol9sXxXcbEiPtIISQWr2Rg0xpVw==
X-Google-Smtp-Source: AH8x225f9W8ZCk3H/xUDHf/blz776toJ5RQJ/haHnwGi29xyNTqjlCbFVUy2RwW+CnSkCa5noy8otiNO2X3A9JCmTIs=
X-Received: by 10.223.173.18 with SMTP id p18mr2883960wrc.29.1518705309033; Thu, 15 Feb 2018 06:35:09 -0800 (PST)
MIME-Version: 1.0
Received: by 10.223.195.200 with HTTP; Thu, 15 Feb 2018 06:35:08 -0800 (PST)
From: PVLR Pavana Murthy <pvlrpm@gmail.com>
Date: Thu, 15 Feb 2018 20:05:08 +0530
Message-ID: <CAN-MQG7Z5HrN4aLu4Cy_=29kjW5w0U2Sys5k4L03iA6Z+6A1sQ@mail.gmail.com>
To: idr wg <idr@ietf.org>
Content-Type: multipart/alternative; boundary="f403045cf65076aa8105654122ea"
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/ebkO-mDdnieCBBBTu_2ZPSAaD3g>
Subject: [Idr] Use of 'not' & 'm' bits in BGP flowspec components of type [op, bitmask] (RFC 5575)
X-BeenThere: idr@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Inter-Domain Routing <idr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/idr>, <mailto:idr-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/idr/>
List-Post: <mailto:idr@ietf.org>
List-Help: <mailto:idr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/idr>, <mailto:idr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Feb 2018 14:35:13 -0000

Hello,
   The following is given in the RFC.

  0   1   2   3   4   5   6   7
+---+---+---+---+---+---+---+---+
| e | a |   len | 0 | 0 |not| m |
+---+---+---+---+---+---+---+---+

not - NOT bit. If set, logical negation of operation.

m - Match bit. If set, this is a bitwise match operation
defined as "(data & value) == value"; if unset, (data &
value) evaluates to TRUE if any of the bits in the value
mask are set in the data.


I will try to use all the combinations of 'not' and 'm' bits. Please let me
know if the following my understanding is correct.

I will try to use the mask with SYN, ACK bits of TCP header for this.
[CWR ECE URG ACK PSH RST SYN FIN]
mask = 0x12


   1. not-0, m-0  (data & mask) != 0 i.e. either SYN or ACK bits should
   have been set in TCP header.
   2. not-0, m-1  (data & mask)  == mask i.e. SYN and ACK bits both should
   be set in TCP header.
   3. not-1,m-0   (data & mask) == 0    i.e. both SYN and  ACK bits should
   not  be set in TCP header.
   4. not-1, m-1  (data & mask) != mask i.e. at least one of  SYN or ACK
   bits should not be set in TCP header.


Thanks,
Pavana.