Portchannels
This Chapter provides examples on how to configure and manage Portchannels using NETCONF.
Create Portchannel
Section titled “Create Portchannel”Request example to create a Portchannel via edit-config
<config><top> <portchannels> <portchannel operation="create"> <name>PortChannel0104</name> <mode>lacp</mode> <commit>true</commit> <lacp> <system-priority>6666</system-priority> <fallback>true</fallback> <fast-rate>true</fast-rate> <system-id>12:34:56:ab:cd:ef</system-id> </lacp> <members> <member> <port>Ethernet30</port> </member> <member> <port>Ethernet31</port> <lacp-port-priority>22222</lacp-port-priority> </member> </members> </portchannel> </portchannels></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:684c78ff-5b3b-4462-b760-3a6855510664"> <ok/></rpc-reply>Get Portchannel
Section titled “Get Portchannel”Request example to retrieve the current Portchannel configuration via get-config
<filter type="subtree"> <top> <portchannels/> </top></filter><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:8b1442fa-bb3f-4558-9435-61a9534271b6"> <data> <top> <portchannels xmlns="http://asterfusion.com/ns/yang/asternos-portchannels"> <portchannel> <name>PortChannel0104</name> <mode>lacp</mode> <commit>true</commit> <lacp> <system-priority>6666</system-priority> <fallback>true</fallback> <fast-rate>true</fast-rate> <system-id>12:34:56:ab:cd:ef</system-id> </lacp> <members> <member> <port>Ethernet30</port> </member> <member> <port>Ethernet31</port> <lacp-port-priority>22222</lacp-port-priority> </member> </members> </portchannel> </portchannels> </top> </data></rpc-reply>Delete Portchannel
Section titled “Delete Portchannel”Request example to delete a specific Portchannel via edit-config
<config><top> <portchannels> <portchannel operation="delete"> <name>PortChannel0104</name> </portchannel> </portchannels></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:cd3e7082-eee3-46c7-8935-94038c9cfe10"> <ok/></rpc-reply>Delete All Portchannels
Section titled “Delete All Portchannels”Request example to delete all Portchannels via edit-config
<config><top> <portchannels operation="delete"/></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:979723dc-7d82-4801-a8c7-010c99d8f152"> <ok/></rpc-reply>