一、交换机的基本配置1.配置 enable 口令、密码和主机名Switch> (用户执行模式提示符)Switch>enable (进入特权模式)Switch# (特权模式提示符)Switch#config terminal (进入配置模式)Switch(config)#enable password cisco (设置 enable password为 cisco)Switch(config)#enable secret cisco1 ( 设 置 enable secret 为 sisco1)Switch(config)#hostname C2950 (设置主机名为C2950)C2950(config)#end (退回到特权模式)C2950#2.配置交换机 IP 地址、默认网关、域名和域名服务器C2950(config)#ip address (设置交换机 IP)C2950(config)#ip default-gateway (设置默认网关)C2950(config)#ip domain-name (设置域名)C2950(config)#ip name-server (设置域名服务器)C2950(config)#end3.配置交换机的端口属性C2950(config )#interface fastethernet0/1 (进入接口 0/1 的配置模式)C2950(config-if)#speed (查看 speed 命令的子命令)C2950(config-if)#speed 100 ( 设置该端口速率为100Mbps) C2950(config-if)#duplex (查看 duplex 命令的子命令)C2950(config-if)#duplex full (设置该端口为全双工)C2950(config-if)#description TO_PC1 (设置该端口描述为TO_PC1)C2950(config-if)#^Z (返回到特权模式,同end)C2950#show interface fastethernet0/1 (查看端口 0/1 的配置结果)C2950#show interface fastethernet0/1 status (查看端口 0/1的状态)4.配置和查看 MAC 地址表C2950(config)#mac-address-table (查看 mac-address-table 的子命令)C2950(config)#mac-address-table aging-time 100 (设置超时时间为 100s)C2950(config)#mac-address-table permanent f0/3 (加入永久地址)C2950(config)#mac-address-table restricted static f0/3 f0/7 (加入静态地址)C2950(config)#endC2950#show mac-address-table (查看整个 MAC 地址表) C2950#clear mac-address-table restricted static (清除限制性地址) 二、配置和管理 VLAN1. VLAN 基础知识VLAN 技术:把物理上直接相连的网络从逻辑上划分为多个子网。每一个VLAN 对应着一个广播域,处于不同 VLAN 上的主机不能直接进行通信,不同VLAN 之间的通信要引入第三层交换技术才可以解决。VLAN 中继(VLAN Trunk)也称为 VLAN 主干,是指在交换机与交换机或交换机与路由器之间连接的情况下,在互相连接的端...