Delete BGP Neighbor
In this use case, you delete a BGP neighbor using YANG models.
-
Using standard YANG tools, get the configuration using the NETCONF <get-config> operation in YANG format. <get-config> <source> <running/> </source> <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <bgp xmlns="http://openconfig.net/yang/bgp"> </get-config> router bgp 1000 bgp confederation peers 65002 ! bgp confederation identifier 102 bgp router-id 1.1.1.1 bgp graceful-restart restart-time 30 bgp graceful-restart stalepath-time 30 bgp graceful-restart address-family ipv4 unicast distance bgp 200 20 200 maximum-paths ebgp 30 maximum-paths ibgp 30 ! address-family ipv4 multicast distance bgp 200 20 200 maximum-paths ebgp 30 maximum-paths ibgp 30 ! address-family ipv6 unicast distance bgp 200 20 200 maximum-paths ebgp 30 maximum-paths ibgp 30 ! address-family ipv6 multicast distance bgp 200 20 200 maximum-paths ebgp 30 maximum-paths ibgp 30 ! !router bgp 1000 bgp confederation peers 65002 ! bgp confederation identifier 102 bgp router-id 1.1.1.1 bgp graceful-restart restart-time 30 bgp graceful-restart stalepath-time 30 bgp graceful-restart address-family ipv4 unicast distance bgp 200 20 200 maximum-paths ebgp 30 maximum-paths ibgp 30 ! address-family ipv4 multicast distance bgp 200 20 200 maximum-paths ebgp 30 maximum-paths ibgp 30 ! address-family ipv6 unicast distance bgp 200 20 200 maximum-paths ebgp 30 maximum-paths ibgp 30 ! address-family ipv6 multicast distance bgp 200 20 200 maximum-paths ebgp 30 maximum-paths ibgp 30 ! !
-
Change the configuration <edit-config> operation. <edit-config> <target> <candidate/> </target> <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <bgp xmlns="http://openconfig.net/yang/bgp"> <global> <config> <as xc:operation="delete">1000</as> </config> </global> </bgp> </config> </edit-config>
-
Send the <edit-config> request through NETCONF SSH to the router.
-
Verify that the configuration changes is successful and the BGP neighbor is deleted.
Note |
|