交换机的基本配置

一·实验设备 :交换机 Cisco Catalyst 2950-24 一台,带有网卡的工作站 PC 一台,控制台电缆一条,直连线一条。

二·实验步骤:

控制线相连




1. 配置交换机主机名(SwitchA)、设置进入特权模式的密码(S1)、虚拟终端口令(可以设置通过 console 端口连接 设备及 telnet 远程登录时所需要的密码 S2)及超时时间(5 分钟)、禁止名称解析服务。


Switch>en

Switch#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#hostname MLZ

MLZ(config)#enable password s1

MLZ(config)#line vty 0 4

MLZ(config-line)#password s2

MLZ(config-line)#login

MLZ(config-line)#line con 0

MLZ(config-line)#exec-time 5 0

MLZ(config-line)#no ip domain-lookup

2. 配置交换机管理 IP 地址(192.168.1.1)、子网掩码(255.255.255.0)、默认网关(192.168.1.254)。


MLZ(config)#int vlan 1

MLZ(config-if)#ip ad 192.168.1.1 255.255.255.0

MLZ(config-if)#no sh

MLZ(config-if)#

%LINK-5-CHANGED: Interface Vlan1, changed state to up

MLZ(config-if)#exit

MLZ(config)#ip default-gateway 192.168.1.254

MLZ(config)#exit

MLZ#

%SYS-5-CONFIG_I: Configured from console by console

exit

3. 通过 Telnet 方式登录到交换机。

配置主机ip地址:

直通线相连:


在 hostA 上 C:>telnet 192.168.1.1


PC>en

PC>telnet 192.168.1.1

Trying 192.168.1.1 ...Open

User Access Verification

Password:      //输入s2

MLZ>en

Password:      //输入s1

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容