RTGWG F. Zheng Internet-Draft B. Wu Intended status: Standards Track Huawei Expires: February 25, 2019 R. Wilton Cisco Systems X. Ding August 24, 2018 YANG Data Model for ARP draft-ietf-rtgwg-arp-yang-model-01 Abstract This document defines a YANG data model for the management of the Address Resolution Protocol (ARP). It extends the basic ARP functionality contained in the ietf-ip YANG data model, defined in RFC 8344, to provide management of optional ARP features and statistics. The YANG data model in this document conforms to the Network Management Datastore Architecture defined in RFC 8342. 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 February 25, 2019. 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 Zheng, et al. Expires February 25, 2019 [Page 1] Internet-Draft ARP YANG model August 2018 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 4 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 3. Design of the Data Model . . . . . . . . . . . . . . . . . . 4 3.1. ARP dynamic learning . . . . . . . . . . . . . . . . . . 4 3.2. proxy ARP . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3. gratuitous ARP . . . . . . . . . . . . . . . . . . . . . 5 3.4. ietf-arp Module . . . . . . . . . . . . . . . . . . . . . 5 4. ARP YANG Module . . . . . . . . . . . . . . . . . . . . . . . 6 5. Data Model Examples . . . . . . . . . . . . . . . . . . . . . 12 5.1. Static ARP Entries . . . . . . . . . . . . . . . . . . . 12 5.2. ARP Dynamic Learning . . . . . . . . . . . . . . . . . . 13 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 7. Security Considerations . . . . . . . . . . . . . . . . . . . 14 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 15 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 9.1. Normative References . . . . . . . . . . . . . . . . . . 15 9.2. Informative References . . . . . . . . . . . . . . . . . 16 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16 1. Introduction This document defines a YANG [RFC7950] data model for the Address Resolution Protocol [RFC0826] implementation and identification of some common properties within a device. Devices have common properties that need to be configured and monitored in a standard way. This document is intended to present universal ARP protocol configuration and many vendors can implement it. The data model convers configuration of system parameters of ARP, such as static ARP entries, timeout for dynamic ARP entries, interface ARP, proxy ARP, and so on. It also provides information about running state of ARP implementations. The YANG modules in this document conform to the Network Management Datastore Architecture (NMDA) [RFC8342]. Editorial Note: (To be removed by RFC Editor) Zheng, et al. Expires February 25, 2019 [Page 2] Internet-Draft ARP YANG model August 2018 This draft contains many placeholder values that need to be replaced with finalized values at the time of publication. Please apply the following replacements o "XXXX" --> the assigned RFC value for this draft both in this draft and in the YANG models under the revision statement. o Revision date in model, in the format 2018-08-01 needs to get updated with the date the draft gets approved. The date also needs to get reflected on the line with . 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] [RFC8174] when, and only when, they appear in all capitals, as shown here. The following terms are defined in [RFC8342] and are not redefined here: o client o server o configuration data o system state o state data o intended configuration o running configuration datastore o operational state datastore The following terms are defined in [RFC7950] and are not redefined here: o augment o data model o data node Zheng, et al. Expires February 25, 2019 [Page 3] Internet-Draft ARP YANG model August 2018 The terminology for describing YANG data models is found in [RFC7950]. 1.2. Tree Diagrams Tree diagrams used in this document follow the notation defined in [RFC8340] 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. Data model "ietf-ip" [RFC8344] covers the address mapping functionality. However, this functionality is strictly dependent on IPv4 networks, and many ARP related functionalities are missing, e.g. device global ARP entries and control, configuration related to dynamic ARP learning, proxy ARP, gratuitous ARP, etc. 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 dynamic ARP learning, proxy ARP, gratuitous ARP. There are two kind of ARP configurations: global ARP configuration, which is across all interfaces on the device, and per interface ARP configuration. 3.1. ARP dynamic learning ARP caching is the method of storing network addresses and the associated data-link addresses in memory for a period of time as the addresses are learned. This minimizes the use of valuable network resources to broadcast for the same address each time a datagram is sent. Zheng, et al. Expires February 25, 2019 [Page 4] Internet-Draft ARP YANG model August 2018 There are static ARP cache entries and dynamic ARP cache entries. Static entries are manually configured and kept in the cache table on a permanent basis. Dynamic entries are added by vendor software, kept for a period of time, and then removed. We can specify how long an entry remains in the ARP cache. If we specify a timeout of 0 seconds, entries are never cleared from the ARP cache. 3.2. proxy ARP Proxy ARP [RFC1027] can be configured to enable the switch to respond to ARP queries for network addresses by offering its own Ethernet media access control (MAC) address. With proxy ARP enabled, the switch captures and routes traffic to the intended destination. 3.3. gratuitous ARP Gratuitous ARP requests help detect duplicate IP addresses. A gratuitous ARP is a broadcast request for a router's own IP address. If a router or switch sends an ARP request for its own IP address and no ARP replies are received, the router- or switch-assigned IP address is not being used by other nodes. However, if a router or switch sends an ARP request for its own IP address and an ARP reply is received, the router- or switch-assigned IP address is already being used by another node. 3.4. ietf-arp Module This module has one top level container, ARP, which consists of two second level containers, which are used for static entries configuration and global parameters control. Zheng, et al. Expires February 25, 2019 [Page 5] Internet-Draft ARP YANG model August 2018 module: ietf-arp +--rw arp +--rw dynamic-learning? boolean +--rw proxy-arp? boolean +--rw global-static-entries {global-static-entries}? +--rw static-entry* [ip-address] +--rw ip-address inet:ipv4-address-no-zone +--rw mac-address yang:mac-address augment /if:interfaces/if:interface: +--rw arp +--rw expiry-time? uint32 +--rw learn-disable? boolean +--rw proxy | +--rw mode? enumeration +--rw probe | +--rw interval? uint8 | +--rw times? uint8 | +--rw unicast? boolean +--rw gratuitous | +--rw enable? boolean | +--rw interval? uint32 | +--rw drop? boolean +--ro statistics +--ro in-requests-pkts? yang:counter32 +--ro in-replies-pkts? yang:counter32 +--ro in-gratuitous-pkts? yang:counter32 +--ro out-requests-pkts? yang:counter32 +--ro out-replies-pkts? yang:counter32 +--ro out-gratuitous-pkts? yang:counter32 augment /if:interfaces/if:interface/ip:ipv4/ip:neighbor: +--ro remaining-expiry-time? uint32 4. ARP YANG Module This section presents the ARP YANG module defined in this document. This module imports definitions from Common YANG Data Types [RFC6991], A YANG Data Model for Interface Management [RFC8343], and A YANG Data Model for IP Management [RFC8344]. file "ietf-arp@2018-08-01.yang" module ietf-arp { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-arp"; prefix arp; import ietf-inet-types { Zheng, et al. Expires February 25, 2019 [Page 6] Internet-Draft ARP YANG model August 2018 prefix inet; reference "RFC 6991: Common YANG Data Types"; } import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types"; } import ietf-interfaces { prefix if; reference "RFC 8343: A Yang Data Model for Interface Management"; } import ietf-ip { prefix ip; reference "RFC 8344: A Yang Data Model for IP Management"; } organization "IETF Routing Area Working Group (rtgwg)"; contact "WG Web: WG List: Editor: Xiaojian Ding wjswsl@163.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. Copyright (c) 2016 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-08-01 { description Zheng, et al. Expires February 25, 2019 [Page 7] Internet-Draft ARP YANG model August 2018 "Init revision"; reference "RFC XXXX: A Yang Data Model for ARP"; } feature global-static-entries { 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."; leaf dynamic-learning { type boolean; default "true"; description "Controls the default dynamic ARP learning behavior on all interfaces on the device: true - dynamic learning is enabled on all interfaces by default, false - dynamic learning is disabled on all interfaces by default"; } leaf proxy-arp { type boolean; default "true"; description "Controls the default proxy ARP behavior on all interfaces on the device: true - proxy ARP is enabled on interfaces by default, false - proxy APR is disabled on interfaces by default"; } container global-static-entries { if-feature "global-static-entries"; 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 Zheng, et al. Expires February 25, 2019 [Page 8] Internet-Draft ARP YANG model August 2018 "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."; } } } } augment "/if:interfaces/if:interface" { description "Augment interfaces with ARP configuration and state."; container arp { description "Dynamic ARP related configuration and state"; leaf expiry-time { type uint32 { range "60..86400"; } units "seconds"; description "Aging time of a dynamic ARP entry."; } leaf learn-disable { type boolean; default "false"; description "Whether dynamic ARP learning is disabled on an interface: If the value is True, dynamic ARP learning is disabled. If the value is False, dynamic ARP learning is enabled."; } container proxy { description "Configuration parameters for proxy ARP"; leaf mode { type enumeration { enum DISABLE { description "The system should not respond to ARP requests that do not specify an IP address configured on the local subinterface as the target address."; } enum REMOTE_ONLY { description "The system responds to ARP requests only when the Zheng, et al. Expires February 25, 2019 [Page 9] Internet-Draft ARP YANG model August 2018 sender and target IP addresses are in different subnets."; } enum ALL { description "The system responds to ARP requests where the sender and target IP addresses are in different subnets, as well as those where they are in the same subnet."; } } default "DISABLE"; description "When set to a value other than DISABLE, the local system should respond to ARP requests that are for target addresses other than those that are configured on the local subinterface using its own MAC address as the target hardware address. If the REMOTE_ONLY value is specified, replies are only sent when the target address falls outside the locally configured subnets on the interface, whereas with the ALL value, all requests, regardless of their target address are replied to."; reference "RFC1027: Using ARP to Implement Transparent Subnet Gateways"; } } 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 { Zheng, et al. Expires February 25, 2019 [Page 10] Internet-Draft ARP YANG model August 2018 type boolean; default "false"; description "Send unicast ARP aging probe messages for a dynamic ARP entry."; } } container gratuitous-arp { description "Configure gratuitous ARP."; leaf 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 yang:counter32; description "Total ARP requests received"; } leaf in-replies-pkts { type yang:counter32; description "Total ARP replies received"; } Zheng, et al. Expires February 25, 2019 [Page 11] Internet-Draft ARP YANG model August 2018 leaf in-gratuitous-pkts { type yang:counter32; description "Total gratuitous ARP received"; } leaf out-requests-pkts { type yang:counter32; description "Total ARP requests sent"; } leaf out-replies-pkts { type yang:counter32; description "Total ARP replies sent"; } leaf out-gratuitous-pkts { type yang:counter32; 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 expiry time query on interfaces."; leaf remaining-expiry-time { type uint32; config false; description "Remaining expiry time of a dynamic ARP entry. "; } } } 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 Zheng, et al. Expires February 25, 2019 [Page 12] Internet-Draft ARP YANG model August 2018 Requirement: Enable static ARP entry global configuration (not rely on interface). 10.2.2.3 00e0-fc01-0000 Requirement: Enable static ARP entry configuration on interface (defined in draft [I-D.ietf-netmod-rfc7277bis]). 10.2.2.3 00e0-fc01-0000 GE1/0/1 5.2. ARP Dynamic Learning Requirement: Enable ARP dynamic learning configuration. GE1/0/1 1200 false false 5 3 false false 60 false Zheng, et al. Expires February 25, 2019 [Page 13] Internet-Draft ARP YANG model August 2018 6. IANA Considerations This document registers a URI in theIETF XML registry [RFC3688]. Following the format in [RFC3688], the following registration is requested to be made: URI: urn:ietf:params:xml:ns:yang:ietf-arp Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace. This document registers a YANG module in the YANG Module Names registry [RFC7950]. Name: ietf-arp Namespace: urn:ietf:params:xml:ns:yang: ietf-arp Prefix: arp Reference: RFC XXXX 7. 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) [RFC8341] provides the means to restrict access for particular users to a pre-configured subset of all available protocol operations and content. 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. These are the subtrees and data nodes and their sensitivity/ vulnerability: arp/dynamic-learning: This leaf is used to enable ARP dynamic learning on all interfaces.ARP dynamic learning could allow an attacker to inject spoofed traffic into the network, e.g. denial- of- service attack. arp/proxy-arp and arp/proxy:These leaves are used to enable ARP proxy on interface. They could allow traffic to be mis-configured (denial-of- service attack). Zheng, et al. Expires February 25, 2019 [Page 14] Internet-Draft ARP YANG model August 2018 arp/global-static-entries/static-entry: This list specifies ARP static entries configured on the device. By modifying this information, an attacker can cause a node to either ignore messages destined to it or accept messages it would otherwise ignore. /arp/gratuitous-arp:This leaf is used to enable sending gratuitous ARP packet on an interface.This configuration could allow an attacker to inject spoofed traffic into the network, e.g. man-in- the-middle attack. 8. Acknowledgments The authors wish to thank Alex Campbell and Reshad Rahman, Qin Wu, Tom Petch, many others for their helpful comments. 9. References 9.1. Normative References [RFC0826] Plummer, D., "An 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, . [RFC1027] Carl-Mitchell, S. and J. Quarterman, "Using ARP to implement transparent subnet gateways", RFC 1027, DOI 10.17487/RFC1027, October 1987, . [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004, . [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10.17487/RFC6991, July 2013, . [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016, . Zheng, et al. Expires February 25, 2019 [Page 15] Internet-Draft ARP YANG model August 2018 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, . [RFC8343] Bjorklund, M., "A YANG Data Model for Interface Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, . [RFC8344] Bjorklund, M., "A YANG Data Model for IP Management", RFC 8344, DOI 10.17487/RFC8344, March 2018, . 9.2. Informative References [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "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, . [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, . [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487/RFC8341, March 2018, . Authors' Addresses Feng Zheng Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China Email: habby.zheng@huawei.com Zheng, et al. Expires February 25, 2019 [Page 16] Internet-Draft ARP YANG model August 2018 Bo Wu Huawei Email: lana.wubo@huawei.com Robert Wilton Cisco Systems Email: rwilton@cisco.com Xiaojian Ding Email: wjswsl@163.com Zheng, et al. Expires February 25, 2019 [Page 17]