RTGWG X. Ding
Internet-Draft F. Zheng
Intended status: Standards Track Huawei
Expires: September 1, 2018 R. Wilton
Cisco Systems
February 28, 2018

YANG Data Model for ARP
draft-ding-rtgwg-arp-yang-model-01

Abstract

This document defines a specification of one YANG module and one submodule. Together they form the Address Resolution Protocol (ARP) data model that performs as a guideline for configuring ARP capabilities on a system. It is intended these modules be used by service providers who manipulate devices from different vendors in a standard way.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on September 1, 2018.

Copyright Notice

Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

This document defines a YANG [RFC6020] data model for Address Resolution Protocol [RFC826] implementation and identification of some common properties within a device containing a Network Configuration Protocol (NETCONF) server. Devices that are managed by NETCONF and perhaps other mechanisms have common properties that need to be configured and monitored in a standard way.

This document contains a specification of the following YANG modules:

These YANG modules cover configuration of system parameters of ARP, such as static ARP entries, timeout for dynamic ARP entries, interface ARP, proxy ARP, and so on. They also provide information about running state of ARP implementations.

1.1. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119].

The following terms are defined in [RFC6241] and are not redefined here:

1.2. Tree Diagrams

A simplified graphical representation of the data model is presented in Section 3.

2. Problem Statement

This document defines a YANG [RFC7950] configuration data model that may be used to configure the ARP feature running on a system. YANG model can be used with network management protocols such as NETCONF [RFC6241] to install, manipulate, and delete the configuration of network devices.

The data model makes use of the YANG "feature" construct which allows implementations to support only those ARP features that lie within their capabilities. It is intended this model be used by service providers who manipulate devices from different vendors in a standard way.

This model can be used to configure the ARP applications for discovering the link layer address associated with a given Internet layer address.

3. Design of the Data Model

This data model intends to describe the processing that a protocol finds the hardware address, also known as Media Access Control (MAC) address, of a host from its known IP address. These tasks include, but are not limited to, adding a static entry in the ARP cache, configuring ARP cache entry timeout, and clearing dynamic entries from the ARP cache.

The ARP data model consists of one YANG module and one submodule. The first module, "ietf-arp", defines the generic abilities of ARP configurations. Its submodule, "ietf-arp-dynamic-learning", augments the "ietf-interfaces" [I-D.ietf-netmod-rfc7223bis] and "ietf-ip" [I-D.ietf-netmod-rfc7277bis] modules with additional data specification to ARP confifuration on interfaces.

3.1. ietf-arp Module

This module has one top level container, ARP, which consists of two second level containers. Each of these second level containers describes a particular category of ARP handling, such as defining static mapping between an IP address (32-bit address) and a Media Access Control (MAC) address (48-bit address).

module: ietf-arp
    +--rw arp
       +--rw global-static-table {global-static-table}?
       |  +--rw static-entry* [ip-address]
       |     +--rw ip-address     inet:ipv4-address-no-zone
       |     +--rw mac-address    yang:mac-address
       +--ro statistics
          +--ro in-requests-pkts?      uint64
          +--ro in-replies-pkts?       uint64
          +--ro in-gratuitous-pkts?    uint64
          +--ro out-requests-pkts?     uint64
          +--ro out-replies-pkts?      uint64
          +--ro out-gratuitous-pkts?   uint64
          +--ro in-drops?              uint64
          +--ro in-total?              uint64
          +--ro out-total?             uint64
          +--ro all-dynamic-pkts?      uint64
          +--ro all-static-pkts?       uint64   

3.2. ietf-arp-dynamic-learning Submodule

submodule: ietf-arp-dynamic-learning (belongs-to ietf-arp)
  augment /if:interfaces/if:interface:
    +--rw arp-dynamic-learning
       +--rw expire-time?     uint32
       +--rw learn-disable?   boolean
       +--rw proxy-enable?    boolean
       +--rw if-limit* [vlan-id]
       |  +--rw vlan-id            uint16
       |  +--rw limit-number       uint32
       |  +--rw threshold-value?   uint32
       +--rw probe
       |  +--rw interval?   uint8
       |  +--rw times?      uint8
       |  +--rw unicast?    boolean
       +--rw gratuitous
       |  +--rw gratuitous-enable?   boolean
       |  +--rw interval?            uint32
       |  +--rw drop?                boolean
       +--ro statistics
          +--ro in-requests-pkts?      uint64
          +--ro in-replies-pkts?       uint64
          +--ro in-gratuitous-pkts?    uint64
          +--ro out-requests-pkts?     uint64
          +--ro out-replies-pkts?      uint64
          +--ro out-gratuitous-pkts?   uint64
  augment /if:interfaces/if:interface/ip:ipv4/ip:neighbor:
    +--ro remaining-expire-time?   uint32

4. ARP YANG Module

This section presents the ARP YANG module defined in this document. This YANG module imports typedefs from [RFC6991].

<CODE BEGINS> file "ietf-arp@2018-01-27.yang"
module ietf-arp {
  namespace "urn:ietf:params:xml:ns:yang:ietf-arp";
  prefix arp;

  import ietf-inet-types {
    prefix inet;
  }
  import ietf-yang-types {
    prefix yang;
  }

  organization
    "IETF Routing Area Working Group (rtgwg)";
  contact
    "WG Web: <http://tools.ietf.org/wg/rtgwg/>
     WG List: <mailto: rtgwg@ietf.org>
     Editor: Xiaojian Ding
         dingxiaojian1@huawei.com
     Editor: Feng Zheng
         habby.zheng@huawei.com
     Editor: Robert Wilton
         rwilton@cisco.com";
  description
    "Address Resolution Protocol (ARP) management, which includes
     static ARP configuration, dynamic ARP learning, ARP entry query,
     and packet statistics collection.";

  revision 2017-10-18 {
    description
      "Init revision";
    reference "RFC XXX: ARP (Address Resolution Protocol) YANG data model.";
  }

  feature global-static-table {
    description
      "This feature indicates that the device allows static entries
       to be configured globally.";
  }

  container arp {
    description
      "Address Resolution Protocol (ARP) management, which includes
        static ARP configuration, dynamic ARP learning, ARP entry
        query, and packet statistics collection.";
    container global-static-table {
      if-feature "global-static-table";
      description
        "Set a global static ARP entry, which is independent of the interface.";
      list static-entry {
        key "ip-address";
        description
          "List of ARP static entries that can be configured globally.";
        leaf ip-address {
          type inet:ipv4-address-no-zone;
          description
            "IP address, in dotted decimal notation.";
        }
        leaf mac-address {
          type yang:mac-address;
          mandatory true;
          description
            "MAC address in the format of H-H-H, in which H is
                        a hexadecimal number of 1 to 4 bits.";
        }
      }
    }
    container statistics {
      config false;
      description
        "List of ARP packet statistics.";
      leaf in-requests-pkts {
        type uint64;
        description
          "Total ARP requests received";
      }
      leaf in-replies-pkts {
        type uint64;
        description
          "Total ARP replies received";
      }
      leaf in-gratuitous-pkts {
        type uint64;
        description
          "Total gratuitous ARP received";
      }
      leaf out-requests-pkts {
        type uint64;
        description
          "Total ARP requests sent";
      }
      leaf out-replies-pkts {
        type uint64;
        description
          "Total ARP replies sent";
      }
      leaf out-gratuitous-pkts {
        type uint64;
        description
          "Total gratuitous ARP sent";
      }
      leaf in-drops {
        type uint64 {
          range "0..4294967294";
        }
        description
          "Number of ARP packets discarded.";
      }
      leaf in-total {
        type uint64 {
          range "0..4294967294";
        }
        description
          "Total number of ARP received packets.";
      }
      leaf out-total {
        type uint64 {
          range "0..4294967294";
        }
        description
          "Total number of ARP sent packets.";
      }
      leaf all-dynamic-pkts {
        type uint64 {
          range "0..4294967294";
        }
        description
          "Number of dynamic ARP packets count.";
      }
      leaf all-static-pkts {
        type uint64 {
          range "0..4294967294";
        }
        description
          "Number of static ARP packets count.";
      }
    }
  }
}
<CODE ENDS>

4.1. ARP Dynamic Learning Submodule

 <CODE BEGINS> file "ietf-arp-dynaminc-learning@2018-01-27.yang"
 submodule ietf-arp-dynamic-learning {
  yang-version 1.1;
  belongs-to ietf-arp {
    prefix arp;
  }

  import ietf-interfaces {
    prefix if;
    description
      "A Network Management Datastore Architecture (NMDA)
       compatible version of the ietf-interfaces module
       is required.";
  }
  import ietf-ip {
    prefix ip;
    description
      "A Network Management Datastore Architecture (NMDA)
       compatible version of the ietf-ip module is
       required.";
  }

  organization
    "IETF Routing Area Working Group (rtgwg)";
  contact
    "WG Web: <http://tools.ietf.org/wg/rtgwg/>
     WG List: <mailto: rtgwg@ietf.org>
     Editor: Xiaojian Ding
         dingxiaojian1@huawei.com
     Editor: Feng Zheng
         habby.zheng@huawei.com
     Editor: Robert Wilton
         rwilton@cisco.com";
  description
    "This YANG module augments 'ietf-if' and  'ietf-ip'
     modules with parameters for ARP configuration on interfaces.
     The model fully conforms to the Network Management
     Datastore Architecture (NMDA).
     
     Copyright (c) 2017 IETF Trust and the persons
     identified as authors of the code.  All rights reserved.
     
     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).
     
     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

  revision 2018-01-27 {
    description
      "Initial revision.";
    reference "RFC XXX: ARP (Address Resolution Protocol) YANG data model";
  }

  augment "/if:interfaces/if:interface" {
    description
      "Augment interface configuration with parameters of ARP.";
    container arp-dynamic-learning {
      description
        "Support for ARP configuration on interfaces.";
      leaf expire-time {
        type uint32 {
          range "60..86400";
        }
        units "second";
        description
          "Aging time of a dynamic ARP entry.";
      }
      leaf learn-disable {
        type boolean;
        default "false";
        description
          "Whether dynamic ARP learning is disabled. If the value
           is True, dynamic ARP learning is disabled. If the value
           is False, dynamic ARP learning is enabled.";
      }
      leaf proxy-enable {
        type boolean;
        default "false";
        description
          "Enable proxy ARP.";
      }
      list if-limit {
        key "vlan-id";
        description
          "Maximum number of dynamic ARP entries that an
           interface can learn. If the number of ARP entries that
           an interface can learn changes and the number of the
           learned ARP entries exceeds the changed value, the
           interface cannot learn additional ARP entries. The
           system prompts you to delete the excess ARP entries.";
        leaf vlan-id {
          type uint16 {
            range "0..4094";
          }
          description
            "ID of the VLAN where ARP learning is restricted.
             This parameter can be set only on Layer 2 interfaces
             and sub-interfaces. Ethernet, GE, VE, and Eth-Trunk
             interfaces can be both Layer 3 and Layer 2
             interfaces. When they work in Layer 3 mode, they
             cannot have VLANs configured. When they work in Layer
             2 mode, they must have VLANs configured. Ethernet,
             GE, and Eth-Trunk sub-interfaces can be both common
             and QinQ sub-interfaces. ";
        }
        leaf limit-number {
          type uint32 {
            range "1..65536";
          }
          mandatory true;
          description
            "Maximum number of dynamic ARP entries that an
             interface can learn.";
        }
        leaf threshold-value {
          type uint32 {
            range "60..100";
          }
          must "not(not(../limit-number))" {
            description
              "Upper boundary must be higher than lower boundary.";
          }
          description
            "Alarm-Threshold for Maximum number of ARP entries
             that an interface can learn.";
        }
      }
      container probe {
        description
          "Common configuration parameters for all ARP probe.";
        leaf interval {
          type uint8 {
            range "1..5";
          }
          units "second";
          description
            "Interval for detecting dynamic ARP entries.";
        }
        leaf times {
          type uint8 {
            range "0..10";
          }
          description
            "Number of aging probe attempts for a dynamic ARP entry.
             If a device does not receive an ARP reply message after
             the number of aging probe attempts reaches a specified
             number,thedynamic ARP entry is deleted.";
        }
        leaf unicast {
          type boolean;
          default "false";
          description
            "Send unicast ARP aging probe messages for a dynamic ARP
             entry.";
        }
      }
      container gratuitous {
        description
          "Configure gratuitous ARP.";
        leaf gratuitous-enable {
          type boolean;
          default "false";
          description
            "Enable or disable sending gratuitous-arp packet on
             interface.";
        }
        leaf interval {
          type uint32 {
            range "1..86400";
          }
          units "second";
          description
            "The interval of sending gratuitous-arp packet on the
             interface.";
        }
        leaf drop {
          type boolean;
          default "false";
          description
            "Drop the receipt of gratuitous ARP packets on the interface.";
        }
      }
      container statistics {
        config false;
        description
          "IP ARP Statistics information on interfaces";
        leaf in-requests-pkts {
          type uint64;
          description
            "Total ARP requests received";
        }
        leaf in-replies-pkts {
          type uint64;
          description
            "Total ARP replies received";
        }
        leaf in-gratuitous-pkts {
          type uint64;
          description
            "Total gratuitous ARP received";
        }
        leaf out-requests-pkts {
          type uint64;
          description
            "Total ARP requests sent";
        }
        leaf out-replies-pkts {
          type uint64;
          description
            "Total ARP replies sent";
        }
        leaf out-gratuitous-pkts {
          type uint64;
          description
            "Total gratuitous ARP sent";
        }
      }
    }
  }
  augment "/if:interfaces/if:interface/ip:ipv4/ip:neighbor" {
    description
      "Augment neighbor list with parameters of ARP,
       eg., support for remaining expire time query on interfaces.";
    leaf remaining-expire-time {
      type uint32;
      config false;
      description
        "Remaining expire time of a dynamic ARP entry. ";
    }
  }
}
<CODE ENDS> 

5. Data Model Examples

This section presents a simple but complete example of configuring static ARP entries and dynamic learning, based on the YANG modules specified in Section 4.

5.1. Static ARP Entries

  
Requirement:
Enable static ARP entry global configuration (not rely on interface).
   <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
      <arp xmlns="urn:ietf:params:xml:ns:yang:ietf-arp">
         <static-tables>      
    <ip-address> 10.2.2.3 </ip-address>
    <mac-address> 00e0-fc01-0000 </mac-address>
     </static-tables>
      </arp>
 
      
  
Requirement:
Enable static ARP entry configuration on interface (defined in 
draft [I-D.ietf-netmod-rfc7277bis]).
   <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
      <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
         <neighbor>
        <vrf-name> __public__ </vrf-name> 
    <ip-address> 10.2.2.3 </ip-address>
    <mac-address> 00e0-fc01-0000 </mac-address>
    <if-name> GE1/0/1 </if-name>
     </neighbor>
      </ipv4>
  
      

5.2. ARP Dynamic Learning

  
Requirement:
Enable ARP dynamic learning configuration.

   <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
      <arp-dynamic-learning xmlns="urn:ietf:params:xml:ns:yang:ietf-arp-dynamic-learning">
         <if-name> GE1/0/1 </if-name> 
         <expire-time>1200</expire-time>
      <learn-disable>false</learn-disable>
         <proxy-enable>false</proxy-enable>
      <arp-if-limits>
         <vlan-id>3</vlan-id>
         <limit-number>65535</limit-number>
         <threshold-value>80</threshold-value>
         </arp-if-limits>
   <probe>
   <interval>5</interval>
   <times>3</times>
   <unicast>false</unicast>
   </probe>
   <gratuitous>
   <gratuitous-enable>false<gratuitous-enable>
   <interval>60</interval>
   <drop>false</drop>
            <gratuitous>
      </arp-dynamic-learning>
 
           

6. Security Considerations

The YANG module defined in this document is designed to be accessed via YANG based management protocols, such as NETCONF [RFC6241] and RESTCONF [RFC8040]. Both of these protocols have mandatory-to- implement secure transport layers (e.g., SSH, TLS) with mutual authentication.

The NETCONF access control model (NACM) [RFC6536] provides the means to restrict access for particular users to a pre-configured subset of all available protocol operations and content.

These are the subtrees and data nodes and their sensitivity/vulnerability:

There are a number of data nodes defined in this YANG module that are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations (e.g., edit-config) to these data nodes without proper protection can have a negative effect on network operations.

7. Acknowledgments

The authors wish to thank Alex Campbell and Reshad Rahman, Qin Wu, many others for their helpful comments.

8. References

8.1. Normative References

[I-D.ietf-netmod-rfc7223bis] Bjorklund, M., "A YANG Data Model for Interface Management", Internet-Draft draft-ietf-netmod-rfc7223bis-03, January 2018.
[I-D.ietf-netmod-rfc7277bis] Bjorklund, M., "A YANG Data Model for IP Management", Internet-Draft draft-ietf-netmod-rfc7277bis-03, January 2018.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010.
[RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, DOI 10.17487/RFC6991, July 2013.
[RFC7950] Bjorklund, M., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016.

8.2. Informative References

[RFC0826] Plummer, D., "Ethernet Address Resolution Protocol: Or Converting Network Protocol Addresses to 48.bit Ethernet Address for Transmission on Ethernet Hardware", STD 37, RFC 826, DOI 10.17487/RFC0826, November 1982.
[RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J. and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011.
[RFC8040] Bierman, A., Bjorklund, M. and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017.

Authors' Addresses

Xiaojian Ding Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China EMail: dingxiaojian1@huawei.com
Feng Zheng Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China EMail: habby.zheng@huawei.com
Robert Wilton Cisco Systems EMail: rwilton@cisco.com