1、查看当前VLAN信息show vlan brief
root@sonic:/home/adminadmin# show vlan brief
+-----------+--------------+------------+----------------+-----------------------+-------------------+
| VLAN ID | IP Address | Ports | Port Tagging | DHCP Helper Address | Port Admin/Oper |
+===========+==============+============+================+=======================+===================+
| 10 | | Ethernet53 | untagged | | up/down |
| | | Ethernet54 | untagged | | up/down |
+-----------+--------------+------------+----------------+-----------------------+-------------------+
2、查看端口信息show interfaces status | grep QSFP
root@sonic:/home/adminadmin# show interfaces status | grep QSFP
Ethernet49 77,78,79,80 100G 9194 rs 100GE1/0/49 routed up up QSFP28 or later N/A
Ethernet50 85,86,87,88 100G 9194 rs 100GE1/0/50 routed up up QSFP28 or later N/A
Ethernet51 93,94,95,96 100G 9194 rs 100GE1/0/51 routed up up QSFP28 or later N/A
Ethernet52 97,98,99,100 100G 9194 rs 100GE1/0/52 routed up up QSFP28 or later N/A
3、创建VLAN or 删除VLAN
config vlan add 11
config vlan del 11
4、给端口添加VLAN信息
config vlan member add 11 Ethernet50 -u
(如果是蛇形打流的话,TC-->49-->50-->51-->52-->TC)
需要把50,51两个端口配成一个VLAN,49,52两个端口配成一个VLAN。
5、保存配置信息
config save
6、应用当前信息
config reload
5、删除端口VLAN信息,同理,删除之后,需要再次保存配置信息
config vlan member del 11 Ethernet50
6、sonic下,设备端口配置信息,都是通过JSON文件来保存的,也可以通过修改JSON文件的方式来配置端口
JSON文件路径:/etc/sonic/config_db.json
7、查看端口流量计数
show interfaces counters | grep U
清空计数
sonic-clear counters
8、查看模块信息
show interfaces transceiver eeprom -d
Ethernet52: SFP EEPROM detected
Application Advertisement: N/A
Connector: MPOx12
Encoding: 64B66B
Extended Identifier: Power Class 4(3.5W max), CDR present in Rx Tx
Extended RateSelect Compliance: Unknown
Identifier: QSFP28 or later
Length Cable Assembly(m): 50
Nominal Bit Rate(100Mbs): 255
Specification compliance:
Extended Specification compliance: 100GBASE-SR4 or 25GBASE-SR
Vendor Date Code(YYYY-MM-DD Lot): 2020-07-14
Vendor Name: INNOLIGHT
Vendor OUI: 44-7c-7f
Vendor PN: TR-FC85S-N00
Vendor Rev: 1A
Vendor SN: INKBB3231083
ChannelMonitorValues:
RX1Power: 0.0732dBm
RX2Power: -0.7227dBm
RX3Power: -1.2627dBm
RX4Power: -0.8381dBm
TX1Bias: 7.596mA
TX2Bias: 7.596mA
TX3Bias: 7.596mA
TX4Bias: 7.596mA
ChannelThresholdValues:
RxPowerHighAlarm : 5.4dBm
RxPowerHighWarning: 2.4dBm
RxPowerLowAlarm : -13.2975dBm
RxPowerLowWarning : -10.3012dBm
TxBiasHighAlarm : 14.996mA
TxBiasHighWarning : 12.998mA
TxBiasLowAlarm : 3.002mA
TxBiasLowWarning : 4.0mA
ModuleMonitorValues:
Temperature: 33.0977C
Vcc: 3.2609Volts
ModuleThresholdValues:
TempHighAlarm : 80.0C
TempHighWarning: 70.0C
TempLowAlarm : -10.0C
TempLowWarning : 0.0C
VccHighAlarm : 3.5Volts
VccHighWarning : 3.465Volts
VccLowAlarm : 3.1Volts
VccLowWarning : 3.135Volts
标签:sonic,dBm,VLAN,up,mA,config,端口配置 From: https://www.cnblogs.com/path602/p/16890202.html