当前位置: 首页 > 工具软件 > Open Sonic > 使用案例 >

2021-09-14 SONiC 系统管理30 基于OpenConfig的端口管理

姜弘新
2023-12-01

SONiC 系统管理30

基于OpenConfig的端口管理

前面有写到SONiC YANG是对配置数据库的YANG描述,和OpenConfig定义的开源YANG模型不同。实际上SONiC对于设备的物理接口和管理接口的管理支持OpenConfig标准的YANG模型。
OpenConfig定义的物理接口YANG模型如下,实际OpenConfig还定义了很多设备管理的其它功能、接口管理只是其中很少一部分:

odule: openconfig-interfaces

    +--rw interfaces
       +--rw interface* [name]
          +--rw name                   -> ../config/name
          +--rw config
          |  +--rw name?            string
          |  +--rw type             identityref
          |  +--rw mtu?             uint16
          |  +--rw description?     string
          |  +--rw enabled?         boolean
          +--ro state
          |  +--ro name?            string
          |  +--ro type             identityref
          |  +--ro mtu?             uint16
          |  +--ro description?     string
          |  +--ro enabled?         boolean
          |  +--ro ifindex?         uint32
          |  +--ro admin-status     enumeration
          |  +--ro oper-status      enumeration
          |  +--ro oc-intf-ext:rate-interval?         uint32
          |  +--ro counters
          |  |  +--ro in-octets?             oc-yang:counter64
          |  |  +--ro in-pkts?               oc-yang:counter64
          |  |  +--ro in-unicast-pkts?       oc-yang:counter64
          |  |  +--ro in-broadcast-pkts?     oc-yang:counter64
          |  |  +--ro in-multicast-pkts?     oc-yang:counter64
          |  |  +--ro in-discards?           oc-yang:counter64
          |  |  +--ro in-errors?             oc-yang:counter64
          |  |  +--ro out-octets?            oc-yang:counter64
          |  |  +--ro out-pkts?              oc-yang:counter64
          |  |  +--ro out-unicast-pkts?      oc-yang:counter64
          |  |  +--ro out-broadcast-pkts?    oc-yang:counter64
          |  |  +--ro out-multicast-pkts?    oc-yang:counter64
          |  |  +--ro out-discards?          oc-yang:counter64
          |  |  +--ro out-errors?            oc-yang:counter64
          |  |  +--ro oc-intf-ext:in-octets-per-second?    decimal64
          |  |  +--ro oc-intf-ext:in-pkts-per-second?      decimal64
          |  |  +--ro oc-intf-ext:in-bits-per-second?      decimal64
          |  |  +--ro oc-intf-ext:in-utilization?          oc-types:percentage
          |  |  +--ro oc-intf-ext:out-octets-per-second?   decimal64
          |  |  +--ro oc-intf-ext:out-pkts-per-second?     decimal64
          |  |  +--ro oc-intf-ext:out-bits-per-second?     decimal64
          |  |  +--ro oc-intf-ext:out-utilization?         oc-types:percentage
          +--rw subinterfaces
          |  +--rw subinterface* [index]
          |     +--rw index           -> ../config/index
          |     +--rw oc-ip:ipv4
          |     |  +--rw oc-ip:addresses
          |     |  |  +--rw oc-ip:address* [ip]
          |     |  |     +--rw oc-ip:ip        -> ../config/ip
          |     |  |     +--rw oc-ip:config
          |     |  |     |  +--rw oc-ip:ip?              oc-inet:ipv4-address
          |     |  |     |  +--rw oc-ip:prefix-length?   uint8
          |     |  |     +--ro oc-ip:state
          |     |  |     |  +--ro oc-ip:ip?              oc-inet:ipv4-address
          |     |  |     |  +--ro oc-ip:prefix-length?   uint8
          |     +--rw oc-ip:ipv6
          |        +--rw oc-ip:addresses
          |        |  +--rw oc-ip:address* [ip]
          |        |     +--rw oc-ip:ip        -> ../config/ip
          |        |     +--rw oc-ip:config
          |        |     |  +--rw oc-ip:ip?              oc-inet:ipv6-address
          |        |     |  +--rw oc-ip:prefix-length    uint8
          |        |     +--ro oc-ip:state
          |        |     |  +--ro oc-ip:ip?              oc-inet:ipv6-address
          |        |     |  +--ro oc-ip:prefix-length    uint8
          +--rw oc-eth:ethernet
          |  +--rw oc-eth:config
          |  |  +--rw oc-eth:auto-negotiate?        boolean
          |  |  +--rw oc-eth:port-speed?            identityref
          |  +--ro oc-eth:state
          |  |  +--rw oc-eth:auto-negotiate?        boolean
          |  |  +--ro oc-eth:port-speed?               identityref


 类似资料: