SEP
This section describes the data model of SEP and provides examples of XML packets.
Currently, the controller cannot deliver SEP.
Data Model
The data model file matching SEP is huawei-sep.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-sep:sep/segments/segment/id |
Indicates the ID of a SEP segment. |
The value is an integer in the range from 1 to 1024. |
N/A |
/huawei-sep:sep/segments/segment/block-port/type/middle/middle |
Indicates whether the interface in the middle of the SEP segment is configured as a blocked interface. |
The value is of the Boolean type:
|
N/A |
/huawei-sep:sep/segments/segment/block-port/type/optimal/optimal |
Indicates whether the interface with the highest priority is configured as a blocked interface. |
The value is of the Boolean type:
|
N/A |
/huawei-sep:sep/segments/segment/block-port/type/hop/id |
Indicates that the interface with the specified hop count from the primary edge interface is configured as the blocked interface. |
The value is an integer in the range from 1 to 128. If the value is set to 1, the primary edge interface is blocked. If the value is set to 2, the neighboring interface of the primary edge interface is blocked. The hop count increases by steps of 1 in the downstream direction of the primary edge interface. |
N/A |
/huawei-sep:sep/segments/segment/block-port/type/sysname-interface/sysname |
Indicates the name of the device where the interface to be blocked resides. |
The value is a string of 1 to 20 characters. |
N/A |
/huawei-sep:sep/segments/segment/block-port/type/sysname-interface/interface-name |
Indicates the interface to be blocked. |
The value is a string of 1 to 63 characters. |
N/A |
/huawei-sep:sep/segments/segment/control-vlan |
Indicates the ID of the control VLAN in a SEP segment. |
The value is an integer in the range from 1 to 1024. |
N/A |
/huawei-sep:sep/segments/segment/preempt-delay-time |
Indicates the preemption delay. |
The value is an integer in the range from 15 to 600. |
N/A |
/huawei-sep:sep/segments/segment/protected-instances/protected-instance |
Indicates protected instances in a SEP segment. |
The format is x..y. x indicates the first instance ID, and y indicates the last instance ID. The value of both x and y is a string of 1 to 4094 characters. The value of y must be greater than or equal to that of x. Each device supports a maximum of 65 instances. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-sep:sep/segments/segment/id |
Indicates the ID of the SEP segment to which an Ethernet interface is added. |
The value is an integer in the range from 1 to 1024. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-sep:sep/segments/segment/edge-role/type/primary/primary |
Indicates whether the interface is configured as a primary edge interface. |
The value is of the Boolean type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-sep:sep/segments/segment/edge-role/type/no-neighbor-primary/no-neighbor-primary |
Indicates whether the edge interface is configured as a no-neighbor primary edge interface. |
The value is of the Boolean type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-sep:sep/segments/segment/edge-role/type/secondary/secondary |
Indicates whether the interface is configured as a secondary edge interface. |
The value is of the Boolean type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-sep:sep/segments/segment/edge-role/type/no-neighbor-secondary/no-neighbor-secondary |
Indicates whether the edge interface is configured as a no-neighbor secondary edge interface. |
The value is of the Boolean type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-sep:sep/segments/segment/priority |
Indicates the priority of an Ethernet interface in a specified SEP segment. |
The value is an integer in the range from 1 to 128. The default value is 64. |
N/A |
Configuring a SEP Instance
This section provides a sample of configuring a SEP instance.
Operation |
XPATH |
---|---|
Config |
/huawei-sep:sep/segments/segment |
/ietf-interfaces:interfaces/interface/huawei-sep:sep/segments/segment |
Data Requirements
Item |
Data |
Description |
---|---|---|
Global ID of a SEP segment |
101 |
- |
ID of the control VLAN in a SEP segment |
25 |
- |
Whether the interface with the highest priority is configured as a blocked interface |
true |
- |
Preemption delay |
20 |
- |
Protected instances in a SEP segment |
20..30 |
Configure protected instances 20 to 30 in a SEP segment, including protected instances 20 and 30. |
Name of an Ethernet interface |
GigabitEthernet1/0/5 |
- |
Whether STP is disabled on the Ethernet interface |
false |
- |
Link type of the Ethernet interface |
hybrid |
- |
ID of the SEP segment to which the Ethernet interface is added |
10 |
- |
Whether the interface is configured as a primary edge interface |
true |
- |
Priority of an Ethernet interface in a specified SEP segment |
20 |
- |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11"> <edit-config> <target> <running/> </target> <config> <huawei-sep:sep xmlns:huawei-sep="urn:huawei:yang:huawei-sep"> <huawei-sep:segments> <huawei-sep:segment> <huawei-sep:id>101</huawei-sep:id> <huawei-sep:block-port> <huawei-sep:optimal>true</huawei-sep:optimal> </huawei-sep:block-port> <huawei-sep:control-vlan>25</huawei-sep:control-vlan> <huawei-sep:preempt-delay-time>20</huawei-sep:preempt-delay-time> <huawei-sep:protected-instances> <huawei-sep:protected-instance>20..30</huawei-sep:protected-instance> </huawei-sep:protected-instances> </huawei-sep:segment> </huawei-sep:segments> </huawei-sep:sep> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <if:interface> <if:name>GigabitEthernet1/0/5</if:name> <if:type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</if:type> <huawei-stp:stp xmlns:huawei-stp="urn:huawei:params:xml:ns:yang:huawei-stp"> <huawei-stp:enable>false</huawei-stp:enable> </huawei-stp:stp> <huawei-vlan:vlan xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan"> <huawei-vlan:port-link-type>hybrid</huawei-vlan:port-link-type> </huawei-vlan:vlan> <huawei-sep:sep xmlns:huawei-sep="urn:huawei:yang:huawei-sep"> <huawei-sep:segments> <huawei-sep:segment> <huawei-sep:id>10</huawei-sep:id> <huawei-sep:edge-role> <huawei-sep:primary>true</huawei-sep:primary> </huawei-sep:edge-role> <huawei-sep:priority>20</huawei-sep:priority> </huawei-sep:segment> </huawei-sep:segments> </huawei-sep:sep> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Deletion Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11"> <edit-config> <target> <running/> </target> <config> <huawei-sep:sep xmlns:huawei-sep="urn:huawei:yang:huawei-sep"> <huawei-sep:segments nc:operation="delete" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <huawei-sep:segment> <huawei-sep:id>101</huawei-sep:id> <huawei-sep:block-port> <huawei-sep:optimal>true</huawei-sep:optimal> </huawei-sep:block-port> <huawei-sep:control-vlan>25</huawei-sep:control-vlan> <huawei-sep:preempt-delay-time>20</huawei-sep:preempt-delay-time> <huawei-sep:protected-instances> <huawei-sep:protected-instance>20..30</huawei-sep:protected-instance> </huawei-sep:protected-instances> </huawei-sep:segment> </huawei-sep:segments> </huawei-sep:sep> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" nc:operation="delete" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <if:interface> <if:name>GigabitEthernet1/0/5</if:name> <if:type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</if:type> <huawei-stp:stp xmlns:huawei-stp="urn:huawei:params:xml:ns:yang:huawei-stp"> <huawei-stp:enable>false</huawei-stp:enable> </huawei-stp:stp> <huawei-vlan:vlan xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan"> <huawei-vlan:port-link-type>hybrid</huawei-vlan:port-link-type> </huawei-vlan:vlan> <huawei-sep:sep xmlns:huawei-sep="urn:huawei:yang:huawei-sep"> <huawei-sep:segments> <huawei-sep:segment> <huawei-sep:id>10</huawei-sep:id> <huawei-sep:edge-role> <huawei-sep:primary>true</huawei-sep:primary> </huawei-sep:edge-role> <huawei-sep:priority>20</huawei-sep:priority> </huawei-sep:segment> </huawei-sep:segments> </huawei-sep:sep> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Response Example
# Sample of successful response.
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11"> <ok/> </rpc-reply>
# Sample of failed response.
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-app-tag>1</error-app-tag> <error-path/> <error-message> The device does not have a primary edge interface.</error-message> </rpc-error> </rpc-reply>