admin管理员组

文章数量:1532657

2024年6月1日发(作者:)

交换机的端口配置

1、 交换机端口类型

在以太局域网交换机上,尽管从外表上看,好像很多端口都是一样的,但实际上,它们的类

型和用途、特性都是不一样的。

交换机以太网接口类型主要包括:

1) Ethernet以太网接口:支持最高10Mbps的接入速率。

2) Fast Ethernet快速以太网接口:支持最高100Mbps的接入速率。

3) Gigabit Ethernet千兆以太网接口:支持最高1000Mbps的接入速率。

4) Ten Gigabit Ethernet万兆以太网接口:支持最高10Gbps的接入速率。

2、 选择要配置的交换机端口

1) 选择单个交换机端口

命令:Switch(config)#interface FastEthernet 0/1

2) 选择多个端口

多个连续的:Switch(config)#interface range FastEthernet0/1-23

多个不连续的:Switch(config)#interface range FastEthernet0/1,0/2,0/3

3、 交换机标识端口

给交换机端口加上文本描述,用来说明该端口用来作什么网络连接

命令:Switch(config-if)#description link to center

例如描述端口1连接PC1:Switch(config-if)#description link to PC1

4、 设置端口速度

指定交换机端口速度

命令:Switch(config-if)#speed 10

5、 设置交换机端口的双工模式

模式:全双工(Full)和半双工(Half)

命令:Switch(config-if)#duplex full

6、 启用和关闭交换机端口

命令:Switch(config)#interface FastEthernet0/1

Switch(config-if)#shutdown

Switch(config-if)#no shutdown

7、 查看交换机状态

命令:Switch#show running-config

8、 查看端口状态:

命令:Switch#show interface fastethernet 0/1

9、 查看交换机的MAC地址表

命令:Switch#show mac-address-table

Mac Address Table

-------------------------------------------

Vlan Mac Address Type Ports

---- ----------- -------- -----

10、配置端口安全(MAC地址与端口绑定)

命令:Switch(config)#interface fastethernet 0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport port-security

Switch(config-if)#switchport port-security mac-address 4

本文标签: 端口交换机用来描述