跳转到内容
Ask AI

IPSG

此内容尚不支持你的语言。

This chapter provides examples on how to use Netconf to manage IPSG configurations on AsterNOS devices.

Request example to get all IPSG configurations via get-config with subtree filter.

<filter type="subtree">
<top>
<ipsg/>
</top>
</filter>

Response example

<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<top>
<ipsg xmlns="http://asterfusion.com/ns/yang/asternos-ipsg">
<interfaces>
<interface>
<name>Ethernet1</name>
<ip-type>v6</ip-type>
<enable>true</enable>
</interface>
<interface>
<name>Vlan100</name>
<ip-type>v6</ip-type>
<enable>true</enable>
<trusted-interfaces>Ethernet2</trusted-interfaces>
<trusted-interfaces>Ethernet3</trusted-interfaces>
</interface>
<interface>
<name>Ethernet1</name>
<ip-type>v4</ip-type>
<enable>true</enable>
</interface>
<interface>
<name>Vlan100</name>
<ip-type>v4</ip-type>
<enable>true</enable>
<trusted-interfaces>Ethernet3</trusted-interfaces>
<trusted-interfaces>Ethernet2</trusted-interfaces>
</interface>
</interfaces>
</ipsg>
</top>
</data>

Request example to set IPSG configuration of interface to enabled via edit-config.

<config>
<top>
<ipsg>
<interfaces>
<interface>
<name>Ethernet1</name>
<ip-type>v4</ip-type>
<enable>true</enable>
</interface>
<interface>
<name>Vlan100</name>
<ip-type>v4</ip-type>
<enable>true</enable>
<trusted-interfaces>Ethernet2</trusted-interfaces>
<trusted-interfaces>Ethernet3</trusted-interfaces>
</interface>
<interface>
<name>Ethernet1</name>
<ip-type>v6</ip-type>
<enable>true</enable>
</interface>
<interface>
<name>Vlan100</name>
<ip-type>v6</ip-type>
<enable>true</enable>
<trusted-interfaces>Ethernet2</trusted-interfaces>
<trusted-interfaces>Ethernet3</trusted-interfaces>
</interface>
</interfaces>
</ipsg>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b40b1881-532f-44e9-9db5-27ad280454b2">
<ok/>
</rpc-reply>

Request example to set IPSG configuration of interface to trust-enabled via edit-config.

<config>
<top>
<ipsg>
<interfaces>
<interface>
<name>Ethernet1</name>
<ip-type>v6</ip-type>
<trust-enable>true</trust-enable>
</interface>
<interface>
<name>Ethernet1</name>
<ip-type>v4</ip-type>
<trust-enable>true</trust-enable>
</interface>
</interfaces>
</ipsg>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:98421788-dd19-4dfa-a6cd-651a5a14fe6c">
<ok/>
</rpc-reply>

Request example to delete IPSG configuration of interface via edit-config.

<config>
<top>
<ipsg>
<interfaces>
<interface operation="delete">
<name>Ethernet1</name>
<ip-type>v4</ip-type>
</interface>
<interface operation="delete">
<name>Ethernet1</name>
<ip-type>v6</ip-type>
</interface>
</interfaces>
</ipsg>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:d76fc07a-6f40-442c-8748-543754dac541">
<ok/>
</rpc-reply>