跳转到内容

Interfaces

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

Interface module provides a way to configure and manage network interfaces on AsterNOS devices. It supports various types of interfaces, including:

  • Ethernet, physical interfaces that connect to other network devices.
  • PortChannel, logical interfaces that aggregate multiple physical interfaces into a single logical interface.
  • Vlanif, virtual interfaces that are associated with a VLAN.
  • Sub-Ethernet, sub-interfaces that are created on top of a physical Ethernet interface.
  • Sub-PortChannel, sub-interfaces that are created on top of a PortChannel interface.
  • Loopback, virtual interfaces that are used for testing and troubleshooting.

For each type of interface, it has specific configuration options and parameters.

Ethernet interface and Loopback0 can’t be deleted, other types of interfaces can be created and deleted.

Before creating PortChannel Interface , user should create PortChannel in asternos-portchannels module.

Before creating Sub-Ethernet or Sub-PortChannel Interface, user should make sure the parent interface exists.

Before creating Vlanif Interface, user should create VLAN in asternos-vlans module.

hint{type=“warning”} NOTE: Use get rather than get-config to retrieve both configuration and operational data.

Request example to retrieve both configuration and operational data for a single interface via rpc get.

<filter type="subtree">
<top>
<interfaces>
<interface>
<name>Ethernet22</name>
</interface>
</interfaces>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:732b6696-ff9e-40dc-a1ef-39d24a51816a">
<data>
<top>
<interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<interface>
<name>Ethernet22</name>
<admin-status>true</admin-status>
<interface-mode>none</interface-mode>
<oper-status>true</oper-status>
<mtu>9216</mtu>
<statistics>
<in-octets>0</in-octets>
<in-unicast-pkts>0</in-unicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-multicast-pkts>0</in-multicast-pkts>
<in-discards>0</in-discards>
<in-errors>0</in-errors>
<in-ipv4-pkts>0</in-ipv4-pkts>
<in-ipv4-octets>0</in-ipv4-octets>
<in-ipv6-pkts>0</in-ipv6-pkts>
<in-ipv6-octets>0</in-ipv6-octets>
<out-octets>1880976</out-octets>
<out-unicast-pkts>0</out-unicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-multicast-pkts>6769</out-multicast-pkts>
<out-discards>0</out-discards>
<out-errors>0</out-errors>
<out-ipv4-octets>0</out-ipv4-octets>
<out-ipv6-octets>536</out-ipv6-octets>
</statistics>
<ethernet-config xmlns="http://asterfusion.com/ns/yang/asternos-ports">
<auto-negotiate>true</auto-negotiate>
<port-speed>SPEED_25G</port-speed>
<lanes>21</lanes>
<index>21</index>
<alias>Y22</alias>
</ethernet-config>
<transceiver xmlns="http://asterfusion.com/ns/yang/asternos-transceiver">
<lpmode>false</lpmode>
<presence>false</presence>
<eeprom>
<dom/>
</eeprom>
</transceiver>
</interface>
</interfaces>
</top>
</data>
</rpc-reply>

Request example to get interface counters via rpc show-counters-interface

<show-counters-interface>
<name>Ethernet1</name>
<all>true</all>
<json>true</json>
</show-counters-interface>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a64fa98e-2f0e-427f-8112-44d3d460c182">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">{
"Ethernet1": {
"RX_BPS": "0.00 B/s",
"RX_DRP": "0",
"RX_ERR": "0",
"RX_OK": "0",
"RX_OVR": "0",
"RX_PPS": "0.00/s",
"RX_UTIL": "0.00%",
"STATE": "U",
"TRIM": "N/A",
"TX_BPS": "148.00 B/s",
"TX_DRP": "0",
"TX_ERR": "0",
"TX_OK": "7,038",
"TX_OVR": "0",
"TX_PPS": "0.50/s",
"TX_UTIL": "0.00%"
}
}
</data>
</rpc-reply>

Request example to get all interface counters in table format via rpc show-counters-interface

<show-counters-interface>
<all>true</all>
</show-counters-interface>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:0f6559af-da46-47b5-8779-9f29e409068f">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
IFACE STATE RX_OK RX_BPS RX_PPS RX_UTIL RX_ERR RX_DRP RX_OVR TX_OK TX_BPS TX_PPS TX_UTIL TX_ERR TX_DRP TX_OVR TRIM
---------- ------- ------- -------- -------- --------- -------- -------- -------- ------- ---------- -------- --------- -------- -------- -------- ------
Ethernet1 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet2 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet3 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet4 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet5 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet6 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet7 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet8 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet9 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 148.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet10 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet11 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet12 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet13 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet14 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet15 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet16 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet17 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet18 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet19 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet20 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet21 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet22 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet23 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet24 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet25 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet26 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet27 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet28 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet29 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet30 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet31 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet32 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet33 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet34 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet35 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet36 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet37 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet38 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet39 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet40 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet41 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet42 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet43 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet44 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet45 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet46 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet47 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet48 U 0 0.00 B/s 0.00/s 0.00% 0 0 0 8,108 149.00 B/s 0.50/s 0.00% 0 0 0 N/A
Ethernet49 D 0 0.00 B/s 0.00/s 0.00% 0 0 0 0 0.00 B/s 0.00/s 0.00% 0 0 0 N/A
Ethernet53 D 0 0.00 B/s 0.00/s 0.00% 0 0 0 0 0.00 B/s 0.00/s 0.00% 0 0 0 N/A
Ethernet57 D 0 0.00 B/s 0.00/s 0.00% 0 0 0 0 0.00 B/s 0.00/s 0.00% 0 0 0 N/A
Ethernet61 D 0 0.00 B/s 0.00/s 0.00% 0 0 0 0 0.00 B/s 0.00/s 0.00% 0 0 0 N/A
Ethernet65 D 0 0.00 B/s 0.00/s 0.00% 0 0 0 0 0.00 B/s 0.00/s 0.00% 0 0 0 N/A
Ethernet69 D 0 0.00 B/s 0.00/s 0.00% 0 0 0 0 0.00 B/s 0.00/s 0.00% 0 0 0 N/A
Ethernet73 D 0 0.00 B/s 0.00/s 0.00% 0 0 0 0 0.00 B/s 0.00/s 0.00% 0 0 0 N/A
Ethernet77 D 0 0.00 B/s 0.00/s 0.00% 0 0 0 0 0.00 B/s 0.00/s 0.00% 0 0 0 N/A
</data>
</rpc-reply>

Request example to clear all interfaces counters on device via rpc clear-counters-interface

<clear-counters-interface/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:d5fba0e0-32ad-4b5b-a188-6637efe2337b">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">Cleared counters</data>
</rpc-reply>

Create L3 Interface and Configure L3 Interface Attributes

Section titled “Create L3 Interface and Configure L3 Interface Attributes”

Request example to create L3 interfaces and configure L3 interface attributes

<config><top>
<interfaces operation="merge">
<interface>
<name>Ethernet11</name>
<interface-mode>routed</interface-mode>
<mac-address>00:00:00:00:00:01</mac-address>
<mtu>1500</mtu>
<ipv4>
<address>
<ip-prefix>10.0.0.1/24</ip-prefix>
</address>
</ipv4>
</interface>
<interface>
<name>Ethernet12</name>
<interface-mode>routed</interface-mode>
<mac-address>00:00:00:00:00:02</mac-address>
<mtu>8192</mtu>
<ipv6>
<address>
<ip-prefix>2000::1/64</ip-prefix>
</address>
<address>
<ip-prefix>3000::1/64</ip-prefix>
</address>
</ipv6>
</interface>
<interface>
<name>Loopback1</name>
<ipv4>
<address>
<ip-prefix>60.0.0.1/24</ip-prefix>
</address>
</ipv4>
</interface>
</interfaces>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:e2450f35-4d62-4cd3-8860-579a84792681">
<ok/>
</rpc-reply>

hint{type=“warning”} NOTE: We recommend to configure device via edit-config where is possible.

This RPC give a capability to configure multiple physical ports in a time in a different way than edit-config.

Request example to configure port-group

<config-port-group>
<interfaces>1,3-10</interfaces>
<admin-status>false</admin-status>
<ethernet-config>
<auto-negotiate>false</auto-negotiate>
<port-speed>SPEED_1G</port-speed>
<fec>none</fec>
</ethernet-config>
</config-port-group>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:6327e50b-026e-4824-9183-a004c8c630c0">
<ok/>
</rpc-reply>

NOTE: It’s recommended to configure device via edit-config where is possible.

Please create portchannels and vlans before calling config-lag-group

This RPC give a capability to configure multiple Portchannels in a time in a different way than edit-config.

request example to configure-lag-group

<config-lag-group>
<lags>1-4</lags>
<vlan-group-config>
<vlan-ranges>1,3-10</vlan-ranges>
<tagging-mode>tagged</tagging-mode>
</vlan-group-config>
</config-lag-group>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bbee64c4-e5e4-4800-b9fd-7a7e9e55e095">
<ok/>
</rpc-reply>

This RPC can have clear vlan membership on given physical port. If the port has been added to any vlan, will be removed from vlan after this RPC called.

Request example to clear vlan membership via rpc clear-vlan-membership

<clear-vlan-membership>
<interface>Ethernet1</interface>
</clear-vlan-membership>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:899ffe4b-c837-41ea-8e9f-181c2db39f47">
<ok/>
</rpc-reply>

This RPC can have clear router interface on given physical port. If the port has been configured as L3 interface, will be changed to L2 mode after this RPC called.

Reqeust example to clear router interface via rpc clear-router-interface

<clear-router-interface>
<interface>Ethernet11</interface>
</clear-router-interface>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4758a538-5c4b-44a3-a259-b7e1d500d415">
<ok/>
</rpc-reply>

This RPC shows detailed information of all interface ips in a table format.

Request example to show ip interface via rpc show-ip-interface

<show-ip-interface/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ccb4faeb-0964-4fcb-9527-465709fed801">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP
----------- -------- ------------------- ------------ -------------- -------------
Loopback0 10.1.0.1/32 up/up N/A N/A
</data>
</rpc-reply>

This RPC shows detailed information of all interface ipv6 in a table format.

Request example to show ipv6 interface via rpc show-ipv6-interface

<show-ipv6-interface/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2bb8992e-bc30-476a-ad47-f4d7113be8e0">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
Interface Master IPv6 address/mask Admin/Oper BGP Neighbor Neighbor IP
----------- -------- ------------------- ------------ -------------- -------------
Ethernet11 200::1/24 up/up N/A N/A
</data>
</rpc-reply>

This RPC shows detailed information of all interface urpf in a table format.

Request example to show interface urpf via rpc show-interface-urpf

<show-interface-urpf/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f994b98f-d5b4-49b6-a5df-8e5fd1d569ba">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
Interfaces Status
------------ --------
Ethernet11 strict
Ethernet14 loose
</data>
</rpc-reply>

This RPC shows detailed information of all interface error down status in a table format.

Request example to show interface error down status via rpc show-interface-errdown

<show-interface-errdown/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7f6ed84a-ebd8-42dc-83b0-73f62b62b19c">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<errdown-info>
<interface>Ethernet1</interface>
<state>up</state>
</errdown-info>
<errdown-info>
<interface>Ethernet2</interface>
<state>up</state>
</errdown-info>
<errdown-info>
<interface>Ethernet3</interface>
<state>up</state>
</errdown-info>
<errdown-info>
<interface>Ethernet4</interface>
<state>up</state>
</errdown-info>
<!-- more -->
<errdown-info>
<interface>Ethernet73</interface>
<state>up</state>
</errdown-info>
<errdown-info>
<interface>Ethernet77</interface>
<state>up</state>
</errdown-info>
</data>
</rpc-reply>

This RPC shows detailed information of all interface port info in a CLI format.

Request example to show interface port info via rpc show-interface-port

<show-interface-port>
<interface>Ethernet11</interface>
</show-interface-port>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5c8da3e6-574e-4886-82ba-e949ec34535f">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
Ethernet11 is up, line protocol is up
Hardware is Eth
Interface index is 11
Description:
Mode of IPV4 address assignment: not-set
Mode of IPV6 address assignment: not-set
IP MTU 1500 bytes
LineSpeed 25.0G
Input statistics:
0 packets, 0 octets
0 Multicasts, 0 Broadcasts, 0 Unicasts
0 error, 0 discarded
0 ipv4Packets, 0 ipv4Octets
0 ipv6Packets, 0 ipv6Octets
Output statistics:
2348 packets, 650,848 octets
2,348 Multicasts, 0 Broadcasts, 0 Unicasts
0 error, 0 discarded
0 ipv4Octets, 1,996 ipv6Octets
</data>
</rpc-reply>

This RPC shows a summary of all sub-interfaces in a table format.

Request example to show sub-interface summary via rpc show-sub-interface

<show-sub-interface/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:44e74fc3-aeb0-4787-bf7f-327bc3d8a030">
<data xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
Sub port interface Speed MTU Vlan Admin Type
-------------------- ------- ----- ------ ------- --------------------
Po0013.6 25G 9216 6 up 802.1q-encapsulation
</data>
</rpc-reply>