分类 网络基础 下的文章

在思科交换机上,可以使用以下命令查看接口简报:

  • 查看接口简要状态[__LINK_ICON]:使用 show interfaces status 命令,可查看接口的简要状态,包括端口名称、连接状态、所属VLAN、双工模式、速率和接口类型等信息。例如:

plaintext

Switch# show interfaces status
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 auto auto 10/100BaseTX
Fa0/2 notconnect 1 auto auto 10/100BaseTX
 

  • 查看接口IP地址及状态[__LINK_ICON]:使用 show ip interface brief 命令,能快速查看所有接口的IP地址及状态,方便检查IP配置情况。输出结果会显示接口名称、IP地址、状态和协议状态等。例如:

plaintext

Switch# show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/1 192.168.1.1 YES manual up up
FastEthernet0/2 unassigned YES unset down down
 

  • 查看接口描述信息[__LINK_ICON]:若想查看接口描述信息,可使用 show interfaces description 命令,有助于快速了解每个接口的用途。示例如下:

plaintext

Switch# show interfaces description
Interface Status Protocol Description
FastEthernet0/1 up up Connect to Server
FastEthernet0/2 up up Connect to Router
 

  • 查看接口流量状态[__LINK_ICON]:使用 show interfaces usage 命令,可查看接口的带宽状态,了解接口的流量使用情况。

在思科交换机上,可以通过以下命令查看Trunk接口的情况:

  • 查看所有Trunk接口详细信息[__LINK_ICON]:使用 show interfaces trunk 命令,可查看所有Trunk接口的详细信息,包括端口编号、Trunk协议工作模式、封装类型、状态、默认本地VLAN ID、允许通过的VLAN列表以及当前活动的VLAN列表等。例如:

plaintext

Switch# show interfaces trunk
Port Mode Encapsulation Status Native VLAN
Fa0/1 on 802.1q trunking 1
Port Fa0/1
Allowed VLANs: 1-10,20
Active VLANs: 1,5,10
 

  • 查看特定接口的Trunk配置[__LINK_ICON]:若要查看某个特定接口的Trunk配置,可使用 show running - config interface  命令。例如查看接口 FastEthernet0/1 的配置,命令为 show running - config interface FastEthernet0/1 ,输出内容会显示该接口是否启用Trunk模式以及允许通过的VLAN列表等信息。
  • 查看接口的详细模式[__LINK_ICON]:使用 show interfaces <接口> switchport 命令,可查看特定接口的详细模式信息,能确认接口是处于Access还是Trunk模式,以及相关的VLAN配置等。例如 show interfaces GigabitEthernet0/1 switchport ,可查看 GigabitEthernet0/1 接口的相关信息。