Brocade Network OS NETCONF Operations Guide v4.1.1 User Manual

Page 318

Advertising
background image

286

Network OS NETCONF Operations Guide

53-1003231-02

VLAN configuration and management

21

a. In the <name> element, specify the port name in [rbridge-id/]slot/port format.

b. In the <shutdown> element, include the delete operation in the element opening tag to

enable the interface port.

c. Include the <switchport>/<basic> elements to configure the port as a Layer 2 interface.

The following example configures 10-Gigabit Ethernet port 1/0/1 as a Layer 2 switch port.

<?xml version="1.0" encoding="UTF-8"?>

<rpc message-id="1911" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<edit-config>

<target>

<running/>

</target>

<config>

<interface xmlns="urn:brocade.com:mgmt:brocade-interface">

<tengigabitethernet xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<name>1/0/1</name>

<switchport-basic><basic/></switchport-basic>

</tengigabitethernet>

</interface>

</config>

</edit-config>

</rpc>

<rpc-reply message-id="1911" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<ok/>

</rpc-reply>

4. Issue another <edit-config> RPC to configure the <interface> node in the

urn:brocade.com:mgmt:brocade-interface namespace.

5. Under the <interface> node, specify the same interface type element you specified in

step 2

(<gigabitethernet>, <tengigabitethernet>, <fortygigabitethernet>, or
<hundredgigabitethernet>).

6. Under the <gigabitethernet>, <tengigabitethernet>, <fortygigabitethernet>, or

<hundredgigabitethernet> node element, include the following elements:

a. In the <name> element, specify the same port name you specified in

step 3

.

b. Include the <switchport>/<mode> hierarchy of node elements. Under the <mode>

element, specify the <vlan-mode> element as “trunk” to specify trunk mode.

c. Include the <trunk>/<allowed> node elements containing further XML elements that

define which VLAN interfaces are allowed to transmit and receive through the DCB
interface.

The following example XML fragment allows VLAN 30 to transmit and receive through the
DCB interface:

<trunk>

<allowed>

<vlan>

<add>30</add>

</vlan>

</allowed>

</trunk

The following XML fragment allows all VLANs to transmit and receive through the DCB
interface.

Advertising