Closed mzbroch closed 1 year ago
Proposal for PeerEndpointContext
model implemented in the PR https://github.com/nautobot/nautobot-plugin-bgp-models/pull/33
Similar (IOS XR):
router bgp {{ host.asn }} vrf {{ vrf }}
neighbor-group {{ group }}
address-family ipv4 unicast
route-policy {{ import_policy }} in
multipath
More generally openconfig-bgp
supports the following config levels:
BGP
|
+-> [ global BGP configuration ]
+-> AFI / SAFI global
+-> peer group
+-> [ peer group config ]
+-> AFI / SAFI [ per-AFI overrides ]
+-> neighbor
+-> [ neighbor config ]
+-> [ optional pointer to peer-group ]
+-> AFI / SAFI [ per-AFI overrides ]
where the BGP container itself lives under a network-instance that might be a VRF, e.g.:
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>vrf1</name>
<protocols>
<protocol>
<name>bgp</name>
<identifier>BGP</identifier>
<bgp xmlns="http://openconfig.net/yang/bgp">
<global>
<config xmlns="">
<as>100</as>
<router-id>2.2.2.2</router-id>
</config>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
Current implementation of BGP Plugin models does not allow to link a Peer Endpoint to a specific address family. This results in some limitations, especially around peer customizations or overrides at the address-family level, including enable/disabling specific endpoints under specific Address Families.
In the refactor, I propose
PeerEndpointContext
andPeerGroupContext
models removing this limitation.Use cases solved:
Following, are the example device configurations and sample modeling:
Modelled as following (partial, not all instances but to show general idea about Peer Group Contexts / Peer Endpoint Contexts):
Other valid configuration use cases : Arista LEAF
Arista SPINE