码迷,mamicode.com
首页 > 其他好文 > 详细

2在交换机上配置

时间:2016-09-21 23:41:42      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:交换机   管理员   双绞线   实验设备   实验目的   

实验 在交换机上配置 Telnet

【实验名称】

在交换机上配置 Telnet

【实验目的】

学习如何在交换机上启用 Telent,实现通过 Telnet 远程访问交换机。

【背景描述】

企业园区网覆盖范围较大时,交换机会分别放置在不同的地点,如果每次配置交换机

都需要在交换机所在地点现场配置,管理员的工作量会很大。此时可以在交换机上进行

Telnet 配置,这样再需要配置交换机时,管理员可以远程以 Telnet 方式登录配置。

【需求分析】

需要掌握如何配置交换机的密码,以及如何配置 Telnet,掌握以 Telnet 的方式远程访

问交换机的方法。

【实验拓扑】

图 2-2 实验拓扑图

【实验设备】

二层交换机 1 台

三层交换机 1 台

【预备知识】

交换机的基本配置方法

【实验原理】

在两台交换机上配置VLAN 1的 IP 地址, 用双绞线将两台交换机的F0/1端口连接起来,

分别配置 Telnet,然后就可以实现在每台交换机以 Telnet 的方式登录另一台交换机。

【实验步骤】

第一步:在两台交换机上配置主机名、管理 IP  地址

S3760(config)#hostname L3-SW

!配置 3 层交换机的主机名

L3-SW(config)#interface vlan 1

!配置 3 层交换机的管理 IP 地址

L3-SW(config-if)#ip address 192.168.1.1 255.255.255.0

L3-SW(config-if)#no shutdown

L3-SW(config-if)#end

S2126G (config)#hostname L2-SW

!配置 2 层交换机的主机名

L2-SW(config)#interface vlan 1

!配置 2 层交换机的管理 IP 地址

L2-SW(config-if)#ip address 192.168.1.2 255.255.255.0

L2-SW(config-if)#no shutdown

L2-SW(config-if)#end

第二步:在三层交换机上配置 Telnet

L3-SW(config)#enable password 0 star

!配置 enable 的密码

L3-SW(config)#line vty 0 4

!进入线程配置模式

L3-SW(config-line)#password 0 star

!配置 Telnet 的密码

L3-SW(config-line)#login

!启用 Telnet 的用户名密码验证

L3-SW(config-line)#exit

第三步:在二层交换机上配置 Telnet

L2-SW(config)#enable secret level 1 0 star

!配置 Telnet 的密码,即 level 1 的密码

L2-SW(config)#enable secret 0 star

!配置 enable 密码,默认是 level 15 的密码

第四步:使用 Telnet  远程登录

可以在 3 层交换机 L3-SW 上以 Telnet 的方式登录 2 层交换机 L2-SW,进行验证:

L3-SW#telnet 192.168.1.2

Trying 192.168.1.2, 23...

User Access Verification

Password:

!提示输入 Telnet 密码,输入设置的密码 star

L2-SW>enable

Password:

!提示输入 enable 密码,输入设置的密码 star

L2-SW#

!现在已经进入了二层交换机 L2-SW,可以正常的进行配置

L2-SW#

L2-SW#exit

!使用 exit 命令退出 Telnet 登录

L3-SW#

可以在 2 层交换机 L2-SW 上以 Telnet 的方式登录 3 层交换机 L3-SW,进行验证:

L2-SW#telnet 192.168.1.1

Trying 192.168.1.1 ... Open

User Access Verification

Password:

!提示输入 Telnet 密码,输入设置的密码 star

L3-SW>en

Password:

!提示输入 enable 密码,输入设置的密码 star

L3-SW#

L3-SW#exit

[Connection to 192.168.1.1 closed by foreign host]

!使用 exit 命令退出 Telnet 登录

L2-SW#

【备注事项】

如果没有配置 enable 的密码,将不能登录到交换机进行配置,可以进入用户模式,但

无法进入特权模式,二层交换机此时的提示信息为“% No password set” ,三层交换

机此时的提示信息为“Password required, but none set” 。

【参考配置】

L3-SW#show running-config

Building configuration...

Current configuration : 1359 bytes

!

version RGNOS 10.2.00(2), Release(27932)(Thu Dec 13 10:31:41 CST 2007

-ngcf32)

hostname L3-SW

!

vlan 1

!

no service password-encryption

!

enable password star

!

!

interface FastEthernet 0/1

!

interface FastEthernet 0/2

!

interface FastEthernet 0/3

!

interface FastEthernet 0/4

!

interface FastEthernet 0/5

!

interface FastEthernet 0/6

!

interface FastEthernet 0/7

!

interface FastEthernet 0/8

!

interface FastEthernet 0/9

!

interface FastEthernet 0/10

!

interface FastEthernet 0/11

!

interface FastEthernet 0/12

!

interface FastEthernet 0/13

!

interface FastEthernet 0/14

!

interface FastEthernet 0/15

!

interface FastEthernet 0/16

!

interface FastEthernet 0/17

!

interface FastEthernet 0/18

!

interface FastEthernet 0/19

!

interface FastEthernet 0/20

!

interface FastEthernet 0/21

!

interface FastEthernet 0/22

!

interface FastEthernet 0/23

!

interface FastEthernet 0/24

!

interface GigabitEthernet 0/25

!

interface GigabitEthernet 0/26

!

interface GigabitEthernet 0/27

!

interface GigabitEthernet 0/28

!

interface VLAN 1

ip address 192.168.1.1 255.255.255.0

!

!

line con 0

line vty 0 4

login

password star

!

!

end

L2-SW#show running-config

System software version : 1.66(8) Build Dec 22 2006 Rel

Building configuration...

Current configuration : 380 bytes

!

version 1.0

!

hostname L2-SW

vlan 1

!

!

enable secret level 1 5 $2H.Y*T73C,tZ[V/4D+S(\W&QG1X)sv‘

enable secret level 15 5 $2,1u_;C3&-8U0<D4‘.tj9=GQ+/7R:>H

!

interface fastEthernet 0/1

!

interface vlan 1

no shutdown

ip address 192.168.1.2 255.255.255.0

!

!

end

技术分享

本文出自 “12035317” 博客,请务必保留此出处http://12045317.blog.51cto.com/12035317/1855004

2在交换机上配置

标签:交换机   管理员   双绞线   实验设备   实验目的   

原文地址:http://12045317.blog.51cto.com/12035317/1855004

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!