If a device implements the IF-MIB [
RFC 2863], then each entry in the "/interfaces/interface" list (see "A YANG Data Model for Interface Management" [
RFC 8343]) in the operational state is typically mapped to one ifEntry as required in [
RFC 8343]. Therefore, the P2P interface over a LAN type should also be fully mapped to one ifEntry by defining the "ifStackTable" ("higher-layer-if" and "lower-layer-if", defined in [
RFC 8343]).
In the ifStackTable, the higher layer of the P2P interface over a LAN type
SHALL be network layer "ipForward" to enable IP routing, and the lower layer of the P2P interface over a LAN type
SHOULD be any link-data layer that can be bound to "ipForward", including "ethernetCsmacd", "ieee8023adLag", "l2vlan", and so on (defined in the iana-if-type YANG module [
IANA-ifTYPE]).
The P2P interface over the LAN type ifStackTable can be defined along the lines of the following example, which complies with [
RFC 8343] and [
RFC 6991]. In the example, "lower-layer-if" takes "ethernetCsmacd", but, in fact, "lower-layer-if" can be any other available link-data layer. See
Appendix A for more examples.
<interface>
<name>isis_int</name>
<type>ianaift:ipForward</type>
</interface>
<interface>
<name>eth1</name>
<type>ianaift:ethernetCsmacd</type>
</interface>
<interface>
<name>p2p</name>
<type>ianaift:p2pOverLan</type>
<higher-layer-if>isis_int</higher-layer-if>
<lower-layer-if>eth1</lower-layer-if>
<enabled>false</enabled>
<admin-status>down</admin-status>
<oper-status>down</oper-status>
<statistics>
<discontinuity-time>
2021-04-01T03:00:00+00:00
</discontinuity-time>
<!-- counters now shown here -->
</statistics>
</interface>
Because multiple IP interfaces can be bound to one physical port, the statistics on the physical port
SHOULD be a complete set that includes statistics of all upper-layer interfaces. Therefore, each P2P interface collects and displays traffic that has been sent to it via higher layers or received from it via lower layers.
The P2P interface can be shut down independently of the underlying interface.
If the P2P interface is administratively up, then the "oper-status" (defined in [
RFC 8343]) of that interface
SHALL fully reflect the state of the underlying interface; if the P2P interface is administratively down, then the "oper-status" of that interface
SHALL be down. Examples can be found in
Appendix A.