Skip to content

Commit

Permalink
Add bgp-topology model
Browse files Browse the repository at this point in the history
  • Loading branch information
vlopezalvarez committed Jul 23, 2024
1 parent deba157 commit 44cc17c
Show file tree
Hide file tree
Showing 3 changed files with 447 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Yang/Tree/ietf-l3-bgp-topology.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module: ietf-l3-bgp-topology
augment /nw:networks/nw:network/nw:network-types:
+--rw bgp-topology!
augment /nw:networks/nw:network/nw:node/l3t:l3-node-attributes:
+--rw local-as? uint32
+--rw neighbours
+--rw neighbor? inet:ip-address
+--rw description? string
+--rw peer-as? uint32
+--rw address-family* identityref
212 changes: 212 additions & 0 deletions Yang/ietf-l3-bgp-topology.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
module ietf-l3-bgp-topology {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-l3-bgp-topology";
prefix "bgpnt";
import ietf-yang-types {
prefix "yang";
}
import ietf-network {
prefix "nw";
}
import ietf-l3-unicast-topology {
prefix "l3t";
}
import ietf-inet-types {
prefix "inet";
}
organization
"IETF OPSA (Operations and Management Area) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/opsawg/>
WG List: <mailto:[email protected]>
Editor: Oscar Gonzalez de Dios
<mailto:[email protected]>
Editor: Samier Barguil
<mailto:[email protected]>
Editor: Victor Lopez
<mailto:[email protected]>";
description
"This module defines a model for Layer 3 BGP
topologies.
Copyright (c) 2024 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 Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.";

revision 2024-07-23 {
description
"Initial version";
reference
"RFC XXXX: A YANG Data Model for Border Gateway Protocol (BGP) Topology";
}

typedef area-id-type {
type yang:dotted-quad;
description
"Area ID type";
}

identity afi-safi-type {
description
"Base identity type for AFI,SAFI tuples for BGP-4";
reference
"RFC4760: Multi-protocol extensions for BGP-4";
}

identity ipv4-unicast {
base afi-safi-type;
description
"IPv4 unicast (AFI,SAFI = 1,1)";
reference
"RFC4760: Multi-protocol extensions for BGP-4";
}

identity ipv6-unicast {
base afi-safi-type;
description
"IPv6 unicast (AFI,SAFI = 2,1)";
reference
"RFC4760: Multi-protocol extensions for BGP-4";
}

identity ipv4-labeled-unicast {
base afi-safi-type;
description
"Labeled IPv4 unicast (AFI,SAFI = 1,4)";
reference
"RFC 3107: Carrying Label Information in BGP-4.";
}

identity ipv6-labeled-unicast {
base afi-safi-type;
description
"Labeled IPv6 unicast (AFI,SAFI = 2,4)";
reference
"RFC 3107: Carrying Label Information in BGP-4";
}

identity l3vpn-ipv4-unicast {
base afi-safi-type;
description
"Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)";
reference
"RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)";
}

identity l3vpn-ipv6-unicast {
base afi-safi-type;
description
"Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)";
reference
"RFC 4659: BGP-MPLS IP Virtual Private Network (VPN) Extension
for IPv6 VPN";
}
identity l3vpn-ipv4-multicast {
base afi-safi-type;
description
"Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)";
reference
"RFC 6514: BGP Encodings and Procedures for Multicast in MPLS/BGP
IP VPNs.";
}

identity l3vpn-ipv6-multicast {
base afi-safi-type;
description
"Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)";
reference
"RFC 6514: BGP Encodings and Procedures for Multicast in
MPLS/BGP IP VPNs.";
}

identity l2vpn-vpls {
base afi-safi-type;
description
"BGP-signalled VPLS (AFI,SAFI = 25,65)";
reference
"RFC 4761: Virtual Private LAN Service (VPLS) Using BGP for
Auto-Discovery and Signaling.";
}

identity l2vpn-evpn {
base afi-safi-type;
description
"BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)";
reference
"RFC 7432: BGP MPLS-Based Ethernet VPN";
}

grouping bgp-topology-type {
description "Identifies the topology type to be BGP.";
container bgp-topology {
presence "Indicates BGP topology";
description
"The presence of the container node indicates BGP
topology";
}
}

grouping bgp-node-attributes {
description "BGP node scope attributes";
leaf local-as {
type uint32;
description
"Local Autonomous System (AS) number";
}
container neighbours {
description
"Contains node timer attributes";
leaf neighbor {
type inet:ip-address;
description
"Neighbor IP address";
}
leaf description {
type string;
description
"Neighbor description";;
}
leaf peer-as {
type uint32;
description
"Peer autonomous system (AS) number";
}
leaf-list address-family {
type identityref {
base afi-safi-type;
}
description
"Address Family type";
}
}
}

augment "/nw:networks/nw:network/nw:network-types" {
description
"Introduces new network type for L3 Unicast topology";
uses bgp-topology-type;
}

augment "/nw:networks/nw:network/nw:node/l3t:l3-node-attributes" {
when "/nw:networks/nw:network/nw:network-types/bgp:bgp-topology" {
description
"Augmentation parameters apply only for networks with
BGP topology";
}
description
"BGP node-level attributes ";
uses bgp-node-attributes;
}
}
Loading

0 comments on commit 44cc17c

Please sign in to comment.