| 模式 | 命令 |
|---|---|
| IOS | Switch(config)# hostname hostname |
| CLI (CatOS) | Switch(enable) set system name name-string |
| 模式 | 命令 |
|---|---|
| IOS | Switch(config)# enable password level 1 password |
| CLI | Switch(enable) set passwordSwitch(enable) set enablepass |
| 模式 | 命令序列 |
|---|---|
| IOS |
Switch(config)# interface vlan 1 Switch(config-if)# ip address ip-address netmask Switch(config-if)# ip default-gateway ip-address |
| CLI |
Switch(enable) set interface sc0 ip-address netmask broadcast-address Switch(enable) set interface sc0 vlan Switch(enable) set ip route default gateway |
| 操作 | IOS 命令 | CLI 命令 |
|---|---|---|
| 啟用/關閉接口 CDP | cdp enable / no cdp enable | set cdp {enable|disable} module/port |
| 查看接口 CDP 狀態 | show cdp interface [type module/port] | — |
| 查看鄰居摘要 | show cdp neighbors [type module/port] [detail] | show cdp neighbors [module/port] [vlan|duplex|capabilities|detail] |
write memory 或 copy running-config startup-config 保存。lldp run / lldp transmit/receive)。