telnet方式连接交换机

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

设置主机名

Switch> 用户模式

Switch# 特权模式

student1(config)# 配置模式全局模式

1.设置主机名

Switch>enable

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname student1

student1(config)#

2.配置管理IP地址

student1(config)#interface vlan 1

student1(config-if)#ip address 192.168.168.2 255.255.255.0 student1(config-if)#ip default-gateway 192.168.168.1

若要取消管理IP地址,可执行no ip address

3.配置使能密码(密码在配置文件中以密文形式保存)

student1(config)#enable secret cisco

student1>enable

Password: 输入cisco

student1#

4. 设置DNS服务器

为了使交换机能解析域名,需要为交换机指定DNS服务器

启用DNS服务

student1(config)#ip domain-lookup

指定DNS服务器地址

student1(config)#ip name-server 61.128.128.68

5.启用与禁用HTTP服务

对于运行IOS操作系统的交换机,启用HTTP服务后还可利用Web界面来管理交换机。在浏览器中键入http://交换机管理IP地址,此时将弹出用户对话框,用户名可不指定,然后在密码输入框输入进入特权模式的密码,之后就可进行交换机的管理页面。交换机的WEB配置界面功能较弱且安全性较差,在实际应用中,主要还是命令行来配置,

student1(config)#ip http server

student1(config)# no ip http server

查看交换机信息

1、查看IOS版本

student1#show version

2、查看配置信息

显示当前正在运行的配置

show running-config

显示保存在NVRAM中的启动配置

show startup-config

3、查看端口信息

Show interface type mod/port

Type代表端口类型,通常有Ethernet(以太网端口,通信速率为10Mbps)、FastEthernet(快速以太网端口,通信速率为100Mbps)、GigabitEthernet(吉比特以太网端口,通信速率为1000Mbps,如千兆光纤端口)、TenGigabitEthernet(万兆以太网端口)。这些端口类型通常可简约表达为e、fa、gi 、tengi

4、查看交换机的MAC

Telnet连接

Switch>enab

Switch>enable

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#enable secret cisco

Switch(config)#line vty 0 4

Switch(config-line)#password 1234

Switch(config-line)#login

Switch(config-line)#exit

Switch(config)#line console 0

Switch(config-line)#password 123456

Switch(config-line)#login

Switch(config-line)#exit

Switch(config)#interface vlan 1

Switch(config-if)#ip address 192.168.1.1 255.255.255.0

Switch(config-if)#no shut

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

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

Switch(config-if)#exit

Switch(config)#write

^

% Invalid input detected at '^' marker.

Switch(config)#exit

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

Switch#write

Building configuration...

[OK]

第二章交换机的Telnet远程登陆配置

实验目标:

掌握Telnet方式配置交换机的方法

技术原理:

l 配置交换机的管理IP地址(计算机的IP地址和交换机的IP地址在一个网段)

l 为交换机配置用户名和登陆口令:

a、交换机和路由器中有很多密码,设置这些密码可以有效的提高设备的安全性

b、switch(config)#enable password/secret xxx 进入特权模式的密码

c、switch(config-line)# 可以设置console口和vty远程登陆密码

switch(config)#enable password/secret 1234

switch(config)#line console 0

switch(config-line)#password cisco

switch(config-line)#login

switch(config)#line vty 0 4

switch(config-line)#password 1234

相关文档
最新文档