OCNI BGP
- openconfig-bgp-common-multiprotocol.yang
- openconfig-bgp-common.yang
- openconfig-bgp-global.yang
- openconfig-bgp-peer-group.yang
- openconfig-bgp-types.yang
- openconfig-bgp-common-structure.yang
- openconfig-bgp-errors.yang
- openconfig-bgp-neighbor.yang
- openconfig-bgp-policy.yang
- openconfig-bgp.yang
Configuring an AS Number and Router ID
Configuring an AS Number and Router ID
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: BGP Global – AS number/Router-id
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
feature bgp
router bgp 100
router-id 1.1.1.1
Querying an AS Number and Router ID
Querying an AS Number and Router ID
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global/>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting a BGP Routing Instance
Deleting a BGP Routing Instance
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global xc:operation="delete"/>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Command
The CLI command is equivalent to the payload example displayed in the pane on the right.
no router bgp 100
Configuring Route-Selection (Bestpath) Options
Configuring Route-Selection (Bestpath) Options
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.9</router-id>
</config>
<route-selection-options>
<config>
<always-compare-med>true</always-compare-med>
<ignore-as-path-length>true</ignore-as-path-length>
<external-compare-router-id>true</external-compare-router-id>
</config>
</route-selection-options>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Route-selection-options: – ignore-as-path-length
- external-compare-router-id
- always-compare-med
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
feature bgp
router bgp 100
router-id 1.1.1.9
bestpath as-path ignore
bestpath compare-routerid
bestpath always-compare-med
Querying Route-Selection (Bestpath) Options
Querying Route-Selection (Bestpath) Options
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get-config>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<route-selection-options/>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:6c2f68e6-4ab2-4280-a942-70d681b6e7fd">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<route-selection-options>
<config>
<always-compare-med>true</always-compare-med>
<external-compare-router-id>true</external-compare-router-id>
<ignore-as-path-length>true</ignore-as-path-length>
</config>
</route-selection-options>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting Route-Selection (Bestpath) Options
Deleting Route-Selection Options (Bestpath)
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.9</router-id>
</config>
<route-selection-options xc:operation="delete">
<config>
<always-compare-med>true</always-compare-med>
<ignore-as-path-length>true</ignore-as-path-length>
<external-compare-router-id>true</external-compare-router-id>
</config>
</route-selection-options>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
no bestpath as-path ignore
no bestpath compare-routerid
no bestpath always-compare-med
Configuring a Peer Group
Configuring a Peer Group
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
<peer-groups>
<peer-group xc:operation="merge">
<peer-group-name>PG1</peer-group-name>
<config>
<peer-as>330</peer-as>
<auth-password>cisco</auth-password>
<send-community>STANDARD</send-community>
<description>oc-bgp-peer</description>
<peer-group-name>PG1</peer-group-name>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</config>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Peer-group
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
router bgp 100
router-id 1.1.1.1
template peer PG1
remote-as 330
description oc-bgp-peer
password 3 9125d59c18a9b015
address-family ipv4 unicast
send-community
Querying a Peer Group
Querying a Peer Group
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:327d11fb-4bf5-4494-b859-9fbb7a6a81f4">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>bgp</name>
<bgp>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
</config>
</afi-safi>
</afi-safis>
<as-path-options>
<config>
<allow-own-as>0</allow-own-as>
</config>
</as-path-options>
<logging-options>
<config>
<log-neighbor-state-changes>false</log-neighbor-state-changes>
</config>
</logging-options>
<config>
<auth-password>****015</auth-password>
<description>oc-bgp-peer</description>
<peer-as>330</peer-as>
<send-community>STANDARD</send-community>
<peer-group-name>PG1</peer-group-name>
</config>
<timers>
<config>
<hold-time>180</hold-time>
<keepalive-interval>60</keepalive-interval>
</config>
</timers>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting a Peer Group
Deleting a Peer Group
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
<peer-groups>
<peer-group xc:operation="delete">
<peer-group-name>PG1</peer-group-name>
<config>
<peer-as>330</peer-as>
<auth-password>cisco</auth-password>
<send-community>STANDARD</send-community>
<description>oc-bgp-peer</description>
<peer-group-name>PG1</peer-group-name>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</config>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
no template peer PG1
Configuring the Minimum Advertisement Interval
Configuring the Minimum Advertisement Interval
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<config>
<peer-group-name>PG1</peer-group-name>
<peer-as>330</peer-as>
</config>
<timers>
<config>
<minimum-advertisement-interval xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="delete">81</minimum-advertisement-interval>
</config>
</timers>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Peer-group – Minimum advertisement interval
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
router bgp 100
router-id 1.1.1.1
template peer PG1
remote-as 330
address-family ipv4 unicast
advertisement-interval 81
Querying the Minimum Advertisement Interval
Querying the Minimum Advertisement Interval
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<timers/>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:d7014762-b047-41b2-8668-7363cd72184f">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>bgp</name>
<bgp>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<timers>
<config>
<hold-time>180</hold-time>
<keepalive-interval>60</keepalive-interval>
<minimum-advertisement-interval>81</minimum-advertisement-interval>
</config>
</timers>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting the Minimum Advertisement Interval
Deleting the Minimum Advertisement Interval
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<config>
<peer-as>330</peer-as>
<peer-group-name>PG1</peer-group-name>
</config>
<timers>
<config>
<minimum-advertisement-interval xc:operation=“delete”>81</minimum-advertisement-interval>
</config>
</timers>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</config>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
no advertisement-interval 81
Configuring the Import and Export Policies for a Peer Group
Configuring the Import and Export Policies for a Peer Group
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<config>
<peer-group-name>PG1</peer-group-name>
<peer-as>330</peer-as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</config>
<apply-policy xc:operation="merge">
<config>
<import-policy>route-map1</import-policy>
<export-policy>route-map2</export-policy>
</config>
</apply-policy>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Path:
- /network-instance/network-instance/protocols/protocol/bgp/peer-groups/peer-group[]/afi-safis/afi-safi[]/apply-policy/config/export-policy
- /network-instance/network-instance/protocols/protocol/bgp/peer-groups/peer-group[]/afi-safis/afi-safi[]/apply-policy/config/import-policy
Container: Peer-group – Import & Export policy
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
router bgp 100
router-id 1.1.1.1
template peer PG1
remote-as 330
address-family ipv4 unicast
route-map route-map1 in
route-map route-map2 out
Querying the Import and Export Policies of a Peer Group
Querying the Import and Export Policies of a Peer Group
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
<apply-policy/>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9df3946a-e7b8-4883-ba07-d1f834260f96">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>bgp</name>
<bgp>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<apply-policy>
<config>
<export-policy>route-map2</export-policy>
<import-policy>route-map1</import-policy>
</config>
</apply-policy>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting the Import and Export Policies Under a Peer Group
Deleting the Import and Export Policies Under a Peer Group
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
<peer-groups>
<peer-group>
<peer-group-name>PG1</peer-group-name>
<config>
<peer-group-name>PG1</peer-group-name>
<peer-as>330</peer-as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</config>
<apply-policy>
<config>
<import-policy xc:operation="delete">route-map1</import-policy>
<export-policy xc:operation="delete">route-map2</export-policy>
</config>
</apply-policy>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Commands
no route-map route-map1 in
no route-map route-map2 out
Configuring a Peer Group Under a Neighbor
Configuring a Peer Group Under a Neighbor
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
<neighbors>
<neighbor xc:operation="merge">
<neighbor-address>20.1.1.1</neighbor-address>
<config>
<peer-as>200</peer-as>
<description>nx-oc-bgp</description>
<peer-group>PG1</peer-group>
<auth-password>cisco</auth-password>
<neighbor-address>20.1.1.1</neighbor-address>
</config>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Neighbor – Peer-group, peer-as, description, and password
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
router bgp 100
router-id 1.1.1.1
neighbor 20.1.1.1
inherit peer PG1
remote-as 200
description nx-oc-bgp
password 3 9125d59c18a9b015
Querying a Neighbor
Querying a Neighbor
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<neighbors>
<neighbor>
<neighbor-address>20.1.1.1</neighbor-address>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:6413983b-a383-4cc7-878b-3d6e8d553581">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>bgp</name>
<bgp>
<neighbors>
<neighbor>
<neighbor-address>20.1.1.1</neighbor-address>
<logging-options>
<config>
<log-neighbor-state-changes>false</log-neighbor-state-changes>
</config>
</logging-options>
<config>
<auth-password>****015</auth-password>
<description>nx-oc-bgp</description>
<peer-as>200</peer-as>
<neighbor-address>20.1.1.1</neighbor-address>
<peer-group>PG1</peer-group>
</config>
<timers>
<config>
<hold-time>180</hold-time>
<keepalive-interval>60</keepalive-interval>
</config>
</timers>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting a Neighbor
Deleting a Neighbor
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
</global>
<neighbors>
<neighbor xc:operation="delete">
<neighbor-address>20.1.1.1</neighbor-address>
<config>
<peer-as>200</peer-as>
<description>nx-oc-bgp</description>
<peer-group>PG1</peer-group>
<auth-password>cisco</auth-password>
<neighbor-address>20.1.1.1</neighbor-address>
</config>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
no neighbor 20.1.1.1
Configuring an Address Family with Maximum Paths and Route Distance
Configuring an Address Family with Maximum Paths and Route Distance
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global xc:operation="merge">
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
<default-route-distance>
<config>
<external-route-distance>40</external-route-distance>
<internal-route-distance>40</internal-route-distance>
</config>
</default-route-distance>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</config>
<use-multiple-paths>
<ebgp>
<config>
<maximum-paths>10</maximum-paths>
</config>
</ebgp>
</use-multiple-paths>
</afi-safi>
</afi-safis>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Global – AFI-SAFI, maximum-paths, and route-distance
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
router bgp 100
router-id 1.1.1.1
address-family ipv4 unicast
maximum-paths 10
distance 40 40 220
Querying an Address Family with Maximum Paths and Route Distance
Querying an Address Family with Maximum Paths and Route Distance
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global/>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:761ac929-fef9-4c01-b93a-4e12ed59c189">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<use-multiple-paths>
<ebgp>
<config>
<maximum-paths>10</maximum-paths>
</config>
</ebgp>
<ibgp>
<config>
<maximum-paths>1</maximum-paths>
</config>
</ibgp>
</use-multiple-paths>
<route-selection-options>
<config>
<advertise-inactive-routes>true</advertise-inactive-routes>
</config>
</route-selection-options>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
</config>
</afi-safi>
</afi-safis>
<use-multiple-paths>
<ebgp>
<config>
<maximum-paths>10</maximum-paths>
</config>
</ebgp>
<ibgp>
<config>
<maximum-paths>1</maximum-paths>
</config>
</ibgp>
</use-multiple-paths>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
<default-route-distance>
<config>
<external-route-distance>40</external-route-distance>
<internal-route-distance>40</internal-route-distance>
</config>
</default-route-distance>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting the Configured Maximum Paths and Route Distance
Deleting the Configured Maximum Paths and Route Distance
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
<default-route-distance>
<config>
<external-route-distance xc:operation="delete">40</external-route-distance>
<internal-route-distance xc:operation="delete">40</internal-route-distance>
</config>
</default-route-distance>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</config>
<use-multiple-paths>
<ebgp>
<config>
<maximum-paths xc:operation="delete">10</maximum-paths>
</config>
</ebgp>
</use-multiple-paths>
</afi-safi>
</afi-safis>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Commands
no maximum-paths 10
no distance 40 40
Configuring the Redistribution of OSPF Routes
Configuring the Redistribution of OSPF Routes
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<table-connections>
<table-connection xc:operation="merge">
<src-protocol>OSPF</src-protocol>
<dst-protocol>BGP</dst-protocol>
<address-family>IPV4_UNICAST</address-family>
<config>
<import-policy>policy1</import-policy>
</config>
</table-connection>
</table-connections>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Table-connections [redistribution] – src-protocol, dst-protocol, address-family & import-policy
Type: Config Data
Pre-requisite:
- Routing instances for both OSPF and BGP should be created
- address-family ipv4 unicast should be enabled
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
router bgp 100
router-id 1.1.1.1
address-family ipv4 unicast
redistribute ospf 10 route-map policy1
Querying the Redistribution of OSPF Routes
Querying the Redistribution of OSPF Routes
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<table-connections/>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:713dd26a-5491-40f5-9955-19cfea0c5cc2">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<table-connections>
<table-connection>
<address-family>IPV4_UNICAST</address-family>
<config>
<address-family>IPV4_UNICAST</address-family>
<import-policy>policy1</import-policy>
<dst-protocol>BGP</dst-protocol>
<src-protocol>OSPF</src-protocol>
</config>
<dst-protocol>BGP</dst-protocol>
<src-protocol>OSPF</src-protocol>
</table-connection>
</table-connections>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting the Redistribution of OSPF Routes
Deleting the Redistribution of OSPF Routes
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<table-connections>
<table-connection>
<src-protocol>OSPF</src-protocol>
<dst-protocol>BGP</dst-protocol>
<address-family>IPV4_UNICAST</address-family>
<config>
<import-policy xc:operation="delete">policy1</import-policy>
</config>
</table-connection>
</table-connections>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>bgp</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.1.1.1</router-id>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name>IPV4_UNICAST</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
no redistribute ospf 10 route-map policy1
Configuring a VRF and Route Distinguisher
Configuring a VRF and Route Distinguisher
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
<name>vrf1</name>
<config>
<route-distinguisher>100:1</route-distinguisher>
</config>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Network-instances – name and route-distinguisher
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
vrf context vrf1
rd 100:1
Querying a VRF
Querying a VRF
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>vrf1</name>
</network-instance>
</network-instances>
</filter>
</get-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:cf79f690-919e-4ff2-b17c-cc8cea04b9fd">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>vrf1</name>
<config>
<enabled>true</enabled>
<name>vrf1</name>
<route-distinguisher>100:1</route-distinguisher>
<type>L3VRF</type>
</config>
<protocols>
<protocol>
<config>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:STATIC</identifier>
<name>DEFAULT</name>
</config>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:STATIC</identifier>
<name>DEFAULT</name>
</protocol>
</protocols>
</network-instance>
</network-instances>
</data>
</rpc-reply>
CLI Output |
---|
|
Deleting a VRF
Deleting a VRF
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
<name>vrf1</name>
</network-instance>
</network-instances>
</config>
</edit-config>
</rpc>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
CLI Commands
The CLI commands are equivalent to the payload example displayed in the pane on the right.
no vrf context vrf1