BGP POLICY MAP
Packages:
- openconfig-routing-policy.yang
- openconfig-bgp-policy.yang
Creating a Standard Community Set with a Name (oc_commset1b) and Member (65000:100)
Creating a Standard Community Set with a Name (oc_commset1b) and Member (65000:100)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset1b</community-set-name>
<config>
<community-set-name>oc_commset1b</community-set-name>
<community-member xc:operation="create">65000:100</community-member>
</config>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Standard BGP community list
Type: Config Data
Note: The community member is in aa:nn format.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
ip community-list standard oc_commset1b_std seq 5 permit 65000:100
Creating a Standard Community Set with a Name (oc_commset2b) and Member (65000:200)
Creating a Standard Community Set with a Name (oc_commset2b) and Member (65000:200)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset2b</community-set-name>
<config>
<community-set-name>oc_commset2b</community-set-name>
<community-member xc:operation="merge">65000:200</community-member>
</config>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<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 examples displayed in the pane on the right.
ip community-list standard oc_commset2b_std seq 15 permit 65000:200
Deleting a Standard Community Set with a Name (oc_commset1b) and Member (65000:100)
Deleting a Standard Community Set with a Name (oc_commset1b) and Member (65000:100)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset1b</community-set-name>
<config>
<community-set-name>oc_commset1b</community-set-name>
<community-member xc:operation="delete">65000:100</community-member>
</config>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Note: If the community member does not exist, an error is returned.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
no ip community-list standard oc_commset1b_std seq 5 permit 65000:100
Removing a Standard Community Set with a Name (oc_commset1b) and Member (65000:200)
Removing a Standard Community Set with a Name (oc_commset1b) and Member (65000:200)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset1b</community-set-name>
<config>
<community-set-name>oc_commset1b</community-set-name>
<community-member xc:operation="remove">65000:200</community-member>
</config>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Reponse:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Note: If the community member does not exist, this operation is silently ignored.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
no ip community-list standard oc_commset1b_std seq 5 permit 65000:200
Querying the Running Config (RPM) and an IP Community List
Querying the Running Config (RPM) and an IP Community List
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set/>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</filter>
</get>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<data>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset1b/community-set-name>
<config>
<community-member>65000:100</community-member>
<community-set-name>oc_commset1b</community-set-name>
</config>
<state>
<community-member>65000:100</community-member>
<community-set-name>oc_commset1b</community-set-name>
</state>
</community-set>
<community-set>
<community-set-name>oc_commset2b</community-set-name>
<config>
<community-member>65000:200</community-member>
<community-set-name>oc_commset2b</community-set-name>
</config>
<state>
<community-member>65000:200</community-member>
<community-set-name>oc_commset2b</community-set-name>
</state>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</data>
</rpc-reply>
Type: State Data
CLI Commands
show running-config rpm
show ip community-list
Creating an Expanded Community Set with a Name (oc_commset1a) and a Member in Regular Expression (501)
Creating an Expanded Community Set with a Name (oc_commset1a) and a Member in Regular Expression (_501_)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset1a</community-set-name>
<config>
<community-set-name>oc_commset1a</community-set-name>
<community-member xc:operation="create">_501_</community-member>
</config>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: Expanded BGP community list
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
ip community-list expanded oc_commset1a_exp seq 5 permit "_501_"
Merging an Expanded Community Set with a Name (oc_commset2a) and Member (502)
Merging an Expanded Community Set with a Name (oc_commset2a) and Member (_502_)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset2a</community-set-name>
<config>
<community-set-name>oc_commset2a</community-set-name>
<community-member xc:operation="merge">_502_</community-member>
</config>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<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 examples displayed in the pane on the right.
ip community-list expanded oc_commset2a_exp seq 5 permit "_502_"
Deleting an Expanded Community Set with a Name oc_commset1a and Member (501)
Deleting an Expanded Community Set with a Name oc_commset1a and Member (_501_)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset1a</community-set-name>
<config>
<community-set-name>oc_commset1a</community-set-name>
<community-member xc:operation="delete">_501_</community-member>
</config>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Note: If the community member does not exist, an error is returned.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
no ip community-list expanded oc_commset1a_exp seq 5 permit "_501_"
Removing an Expanded Community Set with a Name (oc_commset2a) and Member (502)
Removing an Expanded Community Set with a Name (oc_commset2a) and Member (_502_)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset2a</community-set-name>
<config>
<community-set-name>oc_commset2a</community-set-name>
<community-member xc:operation="remove">_502_</community-member>
</config>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Note: If the community member does not exist, this operation is silently ignored.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
no ip community-list expanded oc_commset1a_exp seq 5 permit "_501_"
Querying an Expanded Community Set
Querying an Expanded Community Set
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set/>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</filter>
</get>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<data>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<community-sets>
<community-set>
<community-set-name>oc_commset1a</community-set-name>
<config>
<community-member>_501_</community-member>
<community-set-name>oc_commset1a</community-set-name>
</config>
<state>
<community-member>_501_</community-member>
<community-set-name>oc_commset1a</community-set-name>
</state>
</community-set>
<community-set>
<community-set-name>oc_commset2a</community-set-name>
<config>
<community-member>_502_</community-member>
<community-set-name>oc_commset2a</community-set-name>
</config>
<state>
<community-member>_502_</community-member>
<community-set-name>oc_commset2a</community-set-name>
</state>
</community-set>
</community-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</data>
</rpc-reply>
Type: State Data:
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
show running-config rpm
show ip community-list
Creating an As-Path Set with a Name (oc_aspath1a) and Member (65000:10)
Creating an As-Path Set with a Name (oc_aspath1a) and Member (65000:10)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<as-path-sets>
<as-path-set>
<as-path-set-name>oc_aspath1a</as-path-set-name>
<config>
<as-path-set-name>oc_aspath1a</as-path-set-name>
<as-path-set-member xc:operation="create">65000:10</as-path-set-member>
</config>
</as-path-set>
</as-path-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: AS-path attribute for BGP under route-map
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
ip as-path access-list oc_aspath1a seq 5 permit "65000:10"
Merging an As-Path Set with a Name (oc_aspath1a) and Member (65000:20)
Merging an As-Path Set with a Name (oc_aspath1a) and Member (65000:20)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<as-path-sets>
<as-path-set>
<as-path-set-name>oc_aspath1a</as-path-set-name>
<config>
<as-path-set-name>oc_aspath1a</as-path-set-name>
<as-path-set-member xc:operation="merge">65000:20</as-path-set-member>
</config>
</as-path-set>
</as-path-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<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 examples displayed in the pane on the right.
ip as-path access-list oc_aspath1a seq 10 permit "65000:20"
Removing an As-Path Set with a Name (oc_aspath1a) and Member (65000:20)
Removing an As-Path Set with a Name (oc_aspath1a) and Member (65000:20)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<as-path-sets>
<as-path-set>
<as-path-set-name>oc_aspath1a</as-path-set-name>
<config>
<as-path-set-name>oc_aspath1a</as-path-set-name>
<as-path-set-member xc:operation="remove">65000:20</as-path-set-member>
</config>
</as-path-set>
</as-path-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Note: If the community member does not exist, an error is returned.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
no ip as-path access-list oc_aspath1a seq 10 permit "65000:20"
Deleting an As-Path Set with a Name (oc_aspath1a)
Deleting an As-Path Set with a Name (oc_aspath1a)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<as-path-sets>
<as-path-set xc:operation="delete">
<as-path-set-name xc:operation="delete">oc_aspath1a</as-path-set-name>
<config>
<as-path-set-name xc:operation="delete">oc_aspath1a</as-path-set-name>
</config>
</as-path-set>
</as-path-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Note: If the community member does not exist, this operation is silently ignored.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
no ip as-path access-list oc_aspath1a
Querying an As-Path Set
Querying an As-Path Set
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get>
<filter>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
<as-path-sets/>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</filter>
</get>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<data>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<defined-sets>
<bgp-defined-sets>
<as-path-sets>
<as-path-set>
<as-path-set-name>oc_aspath1a</as-path-set-name>
<config>
<as-path-set-member>65000:20</as-path-set-member>
<as-path-set-member>65000:10</as-path-set-member>
<as-path-set-name>oc_aspath1a</as-path-set-name>
</config>
<state>
<as-path-set-member>65000:20</as-path-set-member>
<as-path-set-member>65000:10</as-path-set-member>
<as-path-set-name>oc_aspath1a</as-path-set-name>
</state>
</as-path-set>
</as-path-sets>
</bgp-defined-sets>
</defined-sets>
</routing-policy>
</data>
</rpc-reply>
Type: State Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
show running-config rpm
show ip as-path-access-list
Creating a Set-Community Action with the ADD Option
Creating a Set-Community Action with the ADD Option
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>oc_stmt1</name>
<config>
<name>oc_stmt1</name>
</config>
<statements>
<statement>
<name>1</name>
<config>
<name>1</name>
</config>
<actions>
<bgp-actions>
<set-community>
<config>
<method>INLINE</method>
<options>ADD</options>
</config>
<inline>
<config>
<communities>65000:10</communities>
</config>
</inline>
</set-community>
</bgp-actions>
</actions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Container: community attribute for BGP under route-map
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
route-map oc_stmt1 permit 1
set community 65000:10 additive
Creating a Set-Community Action with the REMOVE Option
Creating a Set-Community Action with the REMOVE Option
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>oc_stmt1</name>
<config>
<name>oc_stmt1</name>
</config>
<statements>
<statement>
<name>1</name>
<config>
<name>1</name>
</config>
<actions>
<bgp-actions>
<set-community>
<config>
<method>INLINE</method>
<options>REMOVE</options>
</config>
<inline>
<config>
<communities>65000:10</communities>
</config>
</inline>
</set-community>
</bgp-actions>
</actions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<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 examples displayed in the pane on the right.
ip community-list standard oc_stmt1_1_rmdel seq 1 permit 65000:10
route-map oc_stmt1 permit 1
set comm-list oc_stmt1_1_rmdel delete
Creating a Set-Community Action with the REPLACE Option
Creating a Set Community with the REPLACE Option
Response:
<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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>oc_stmt1</name>
<config>
<name>oc_stmt1</name>
</config>
<statements>
<statement>
<name>1</name>
<config>
<name>1</name>
</config>
<actions>
<bgp-actions>
<set-community>
<config>
<method>INLINE</method>
<options>REPLACE</options>
</config>
<inline>
<config>
<communities>65000:20</communities>
</config>
</inline>
</set-community>
</bgp-actions>
</actions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<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 examples displayed in the pane on the right.
route-map oc_stmt1 permit 1
set community 65000:20
Querying a Set-Community
Querying a Set-Community
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get>
<filter>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>tcpol1</name>
<statements>
<statement>
<name>1</name>
<actions>
<bgp-actions xmlns="http://openconfig.net/yang/bgp-policy"/>
</actions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</filter>
</get>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>tcpol1</name>
<statements>
<statement>
<name>1</name>
<actions>
<bgp-actions>
<set-community>
<config>
<method>INLINE</method>
<options>REMOVE</options>
</config>
<inline>
<config>
<communities>123:123</communities>
</config>
<state>
<communities>123:123</communities>
</state>
</inline>
<state>
<method>INLINE</method>
<options>REMOVE</options>
</state>
</set-community>
</bgp-actions>
</actions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</data>
</rpc-reply>
Type: State Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
show running-config rpm
show ip community-list tcpol1
Configuring Data for BGP-Specific Actions
Configuring Data for BGP-Specific Actions
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>oc_stmt1</name>
<statements>
<statement>
<name>1</name>
<actions>
<bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
<config>
<set-route-origin>EGP</set-route-origin>
<set-local-pref>1223</set-local-pref>
<set-next-hop>1.2.3.4</set-next-hop>
<set-med>1</set-med>
</config>
</bgp-actions>
</actions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Deviations
- /bgp-actions/set-community/reference/config/community-set-ref is not supported
- /bgp-actions/set-community/reference/state/community-set-ref is not supported
Container: BGP route-map config parameters
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
route-map oc_stmt1 permit 1
set metric 1
set origin egp
set local-preference 1223
set ip next-hop 1.2.3.4
Configure Optional Match Parameters for Route Maps
Configure Optional Match Parameters for Route Maps
Request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>ocplcy</name>
<statements>
<statement>
<name>2</name>
<conditions>
<bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
<config>
<med-eq>12</med-eq>
<next-hop-in>1.2.3.4</next-hop-in>
<route-type>INTERNAL</route-type>
</config>
</bgp-conditions>
</conditions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Deviations
- /bgp-conditions/config/origin-eq is not supported
- /bgp-conditions/config/afi-safi-in is not supported
- /bgp-conditions/config/local-pref-eq is not supported
Container: BGP route-map config parameters
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
ip prefix-list IPV4_PFX_LIST_OPENCONFIG_ocplcy_2 seq 5 permit 1.2.3.4/32
route-map ocplcy permit 2
match ip next-hop prefix-list IPV4_PFX_LIST_OPENCONFIG_ocplcy_2
match metric 12
match route-type internal
Query Match Parameters
Query Match Parameters
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get>
<filter>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>ocplcy</name>
<statements>
<statement>
<name>2</name>
<conditions>
<bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
<state/>
</bgp-conditions>
</conditions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</filter>
</get>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>ocplcy</name>
<statements>
<statement>
<name>2</name>
<conditions>
<bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
<state>
<med-eq>12</med-eq>
<next-hop-in>1.2.3.4</next-hop-in>
<route-type>INTERNAL</route-type>
</state>
</bgp-conditions>
</conditions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</data>
</rpc-reply>
Deviations
- /bgp-conditions/state/origin-eq is not supported
- /bgp-conditions/state/afi-safi-in is not supported
- /bgp-conditions/state/local-pref-eq is not supported
Type: State Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
show running-config rpm
show ip community-list ocplcy
Matches Against One Community Lists (Create the Community List with the ip community-list Command)
Matches Against One Community Lists (Create the Community List with the ip community-list Command)
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">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>ocplcy1</name>
<statements>
<statement>
<name>1</name>
<conditions>
<bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
<match-community-set>
<config>
<community-set>oc_comset</community-set>
</config>
</match-community-set>
</bgp-conditions>
</conditions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</config>
</edit-config>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
Deviations
- /bgp-conditions/match-community-set/config/match-set-options is not supported
Container: Match community set
Type: Config Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
ip community-list standard oc_comset_std seq 5 permit 1123:1
route-map ocplcy1 permit 1
match community oc_comset_std
Querying a Route-Map Matched Community List
Querying a Route-Map Matched Community List
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get>
<filter>
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>ocplcy1</name>
<statements>
<statement>
<name>1</name>
<conditions>
<bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
<match-community-set>
<state/>
</match-community-set>
</bgp-conditions>
</conditions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</filter>
</get>
</rpc>
Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
<policy-definitions>
<policy-definition>
<name>ocplcy1</name>
<statements>
<statement>
<name>1</name>
<conditions>
<bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
<match-community-set>
<state>
<community-set>oc_comset</community-set>
</state>
</match-community-set>
</bgp-conditions>
</conditions>
</statement>
</statements>
</policy-definition>
</policy-definitions>
</routing-policy>
</data>
</rpc-reply>
Deviations
- /bgp-conditions/match-community-set/state/match-set-options is not supported
Type: State Data
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
show running-config rpm
show ip community-list ocplcy1