module ietf-arp {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-arp";
prefix arp;
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: Feng Zheng
habby.zheng@huawei.com
Editor: Bo Wu
lana.wubo@huawei.com
Editor: Robert Wilton
rwilton@cisco.com
Editor: Xiaojian Ding
wjswsl@163.com";
description
"Address Resolution Protocol (ARP) management, which includes
static ARP configuration, dynamic ARP learning, ARP entry query,
and packet statistics collection.
Copyright (c) 2018 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 2019-02-21 {
description
"Init revision";
reference "RFC XXXX: A Yang Data Model for ARP";
}
container arp {
description
"Address Resolution Protocol (ARP)";
leaf dynamic-learning {
type boolean;
default "true";
description
"Controls the default ARP learning behavior on all
interfaces on the device, unless explicit overridden by
the per-interface dynamic-learning leaf:
true - dynamic learning is enabled on all interfaces by
default,
false - dynamic learning is disabled on all interfaces by
default";
reference "RFC826: An Ethernet Address Resolution Protocol";
}
}
augment "/if:interfaces/if:interface/ip:ipv4" {
description
"Augment interfaces with ARP configuration and state.";
container arp {
description
"Address Resolution Protocol (ARP) related configuration
and state";
leaf expiry-time {
type uint32 {
range "30..86400";
}
units "seconds";
description
"Aging time of a received dynamic ARP entry before it is
removed from the cache.";
}
leaf dynamic-learning {
type boolean;
description
"Controls whether dynamic ARP learning is enabled on the
interface. If not configured, it defaults to the behavior
specified in the per-device /arp/dynamic-learning leaf.
true - dynamic learning is enabled
false - dynamic learning is disabled";
}
container proxy-arp {
description
"Configuration parameters for proxy ARP";
leaf mode {
type enumeration {
enum disabled {
description
"The system only responds to ARP requests that
specify a target address configured on the local
interface.";
}
enum remote-only {
description
"The system responds to ARP requests only when the
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 "disabled";
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 gratuitous-arp {
description "Configure gratuitous ARP.";
reference "RFC5227: IPv4 Address Conflict Detection";
leaf enable {
type boolean;
description
"Enable or disable sending gratuitous ARP packet on the
interface. The default behaviour is device specific";
}
leaf interval {
type uint32 {
range "1..86400";
}
units "seconds";
description
"The interval, in seconds, between sending gratuitous ARP
packet on the interface.";
}
}
container statistics {
config false;
description
"ARP per-interface packet statistics
For all ARP counters, discontinuities in the value can
occur at re-initialization of the management system and at
other times as indicated by the value of
'discontinuity-time'.";
leaf discontinuity-time {
type yang:date-and-time;
description
"The time on the most recent occasion at which any one or
more of this interface's ARP counters suffered a
discontinuity. If no such discontinuities have occurred
since the last re-initialization of the local management
subsystem, then this node contains the time the local
management subsystem re-initialized itself.";
}
leaf in-requests-pkts {
type yang:counter32;
description
"The number of ARP request packets received on this
interface.";
}
leaf in-replies-pkts {
type yang:counter32;
description
"The number of ARP reply packets received on this
interface.";
}
leaf in-gratuitous-pkts {
type yang:counter32;
description
"The number of gratuitous ARP packets received on this
interface.";
}
leaf out-requests-pkts {
type yang:counter32;
description
"The number of ARP request packets sent on this interface.";
}
leaf out-replies-pkts {
type yang:counter32;
description
"The number of ARP reply packets sent on this interface.";
}
leaf out-gratuitous-pkts {
type yang:counter32;
description
"The number of gratuitous ARP packets sent on this
interface.";
}
}
}
}
augment "/if:interfaces/if:interface/ip:ipv4/ip:neighbor" {
description
"Augment IPv4 neighbor list with ARP expiry time.";
leaf remaining-expiry-time {
type uint32;
units "seconds";
config false;
description
"The number of seconds until the dynamic ARP entry expires and is
removed from the ARP cache";
}
}
}