Files
H3ConuMS-v2/关闭OLT端口.md
T
v6ole dfa8fa62a8 ```
feat(api): 添加OLT端口管理和设备发现功能

- 在check.py中更新discover_olt方法,使用scan_and_discover替代check_olt_devices
- 在olt.py中添加get_olt_ports和toggle_olt_port接口,支持获取和控制OLT端口状态
- 添加TogglePortRequest模型用于端口操作请求验证
- 更新SSHService类,新增get_olt_ports和toggle_olt_port方法
- 优化CheckService中的MAC地址索引逻辑,支持模型信息更新
```
2026-04-04 22:13:22 +08:00

54 lines
2.4 KiB
Markdown

1. 查看所有接口简要状态`
`,olt输出示例如下:“Olt1/0/1”就是OLT的端口名称,“UP”表示当前端口是开启的状态;“DOWN”表示当前端口是关闭的状态;
```
<8OLT>display interface brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
InLoop0 UP UP(s) --
Loop100 UP UP(s) 172.16.0.72
NULL0 UP UP(s) --
REG0 UP -- --
Vlan100 UP UP 172.16.3.29
Vlan2000 UP UP 172.21.35.254 WIFI-user
Vlan3000 UP UP 172.31.35.254 PC-user
Vlan4094 UP UP 172.17.36.254 AP-Manage
Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
GE1/0/9 DOWN auto A A 1
GE1/0/10 DOWN auto A A 1
GE1/0/11 DOWN auto A A 1
GE1/0/12 DOWN auto A A 1
GE1/0/13 DOWN auto A A 1
GE1/0/14 DOWN auto A A 1
GE1/0/15 DOWN auto A A 1
GE1/0/16 UP 1G(a) F(a) T 100 TO-DH-BLCWXZHL-2F-3610
Olt1/0/1 UP -- -- T 1
Olt1/0/2 UP -- -- T 1
Olt1/0/3 UP -- -- T 1
Olt1/0/4 DOWN -- -- T 1
Olt1/0/5 UP -- -- T 1
Olt1/0/6 DOWN -- -- T 1
Olt1/0/7 UP -- -- T 1
Olt1/0/8 DOWN -- -- T 1
Onu1/0/1:1 DOWN -- -- T 1
Onu1/0/1:2 DOWN -- -- T 1
Onu1/0/1:3 DOWN -- -- T 1
Onu1/0/1:4 DOWN -- -- T 1
Onu1/0/1:5 DOWN -- -- T 1
Onu1/0/1:6 UP -- -- T 1
Onu1/0/1:7 UP -- -- T 1
Onu1/0/1:8 DOWN -- -- T 1
```
2. 进入系统视图`system-view`
3. 进入端口视图`interface Olt1/0/1`
4. 关闭端口`shutdown`& 开启端口`undo shutdown`
5. 退出`quit`