telnet远程管理

1:telnet远程管理

1.1 问题

在企业中为方便网络管理员对Cisco设备的配置,一般需事先在Cisco交换机及路由器上开启远程管理的服务,借助网络通过telnet方式远程访问。

1.2 方案

网络管理员通过telnet方式远程管理S1、R1、S2,网络拓扑如图-1所示

图-1

1.3 步骤

实现此案例需要按照如下步骤进行。

步骤一:Telnet远程访问思科交换机、路由器

1)配置交换机S1的管理IP

copytextpop-up

  1. S1(config)#interface vlan 1
  2. S1(config-if)#ip address 192.168.1.100 255.255.255.0 //交换机管理IP
  3. S1(config-if)#no shutdown

S1(config)#interface vlan 1

S1(config-if)#ip address 192.168.1.100 255.255.255.0    //交换机管理IP

S1(config-if)#no shutdown

2)开启S1的telnet远程管理服务

copytextpop-up

  1. S1(config)#line vty 0 4
  2. S1(config-line)#password 123 //远程管理的密码
  3. S1(config-line)#login

S1(config)#line vty 0 4

S1(config-line)#password 123      //远程管理的密码

S1(config-line)#login

3)配置用户模式进入特权模式的密码(明文或密文之一)

copytextpop-up

  1. S1(config)#enable password 456

S1(config)#enable password 456

4)按图-1所示的IP配置PC1的IP地址,PC1通过telnet方式远程管理S1

copytextpop-up

  1. PC>telnet 192.168.1.100
  2. Trying 192.168.1.100 ...Open
  3. User Access Verification
  4. Password: //输入远程管理密码123
  5. S1>en
  6. S1>enable
  7. Password: //输入用户模式进入特模式密码456
  8. S1# //通过telnet方式登录到S1的特权模式

PC>telnet 192.168.1.100

Trying 192.168.1.100 ...Open

User Access Verification

Password:                   //输入远程管理密码123      

S1>en

S1>enable

Password:                  //输入用户模式进入特模式密码456

S1#                         //通过telnet方式登录到S1的特权模式

步骤二:PC1远程管理R1

1)配置路由器R1的接口IP

copytextpop-up

  1. R1(config)#interface fastEthernet 0/0
  2. R1(config-if)#ip address 192.168.1.254 255.255.255.0
  3. R1(config-if)#no shutdown
  4. R1(config-if)#exit
  5. R1(config)#interface fastEthernet 0/1
  6. R1(config-if)#ip address 192.168.2.254 255.255.255.0
  7. R1(config-if)#no shutdown

R1(config)#interface fastEthernet 0/0

R1(config-if)#ip address 192.168.1.254 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#interface fastEthernet 0/1

R1(config-if)#ip address 192.168.2.254 255.255.255.0

R1(config-if)#no shutdown

2)开启R1的telnet远程管理服务

copytextpop-up

  1. R1(config)#line vty 0 4
  2. R1(config-line)#password 123 //远程管理的密码
  3. R1(config-line)#login

R1(config)#line vty 0 4

R1(config-line)#password 123      //远程管理的密码

R1(config-line)#login

3)配置用户模式进入特权模式的密码(明文或密文之一)

copytextpop-up

  1. R1(config)#enable password 456

R1(config)#enable password 456

4)PC1通过telnet方式远程管理R1

copytextpop-up

  1. PC>telnet 192.168.1.254
  2. Trying 192.168.1.254 ...Open
  3. User Access Verification
  4. Password: //输入远程管理密码123
  5. R1>en
  6. R1>enable
  7. Password: //输入用户进入特模式密码456
  8. R1# //通过telnet方式登录到R1的特权模式

PC>telnet 192.168.1.254

Trying 192.168.1.254 ...Open

User Access Verification

Password:                   //输入远程管理密码123      

R1>en

R1>enable

Password:                  //输入用户进入特模式密码456

R1#                         //通过telnet方式登录到R1的特权模式

步骤三:PC1远程管理S2

1)配置交换机S2的管理IP

copytextpop-up

  1. S2(config)#interface vlan 1
  2. S2(config-if)#ip address 192.168.2.100 255.255.255.0 //交换机管理IP
  3. S2(config-if)#no shutdown
  4. S2(config-if)#exit
  5. S2(config)#ip default-gateway 192.168.2.254 //不同网段主机远程管理需给交换机配置网关地址

S2(config)#interface vlan 1

S2(config-if)#ip address 192.168.2.100 255.255.255.0    //交换机管理IP

S2(config-if)#no shutdown

S2(config-if)#exit

S2(config)#ip default-gateway 192.168.2.254 //不同网段主机远程管理需给交换机配置网关地址

2)开启S2的telnet远程管理服务

copytextpop-up

  1. S2(config)#line vty 0 4
  2. S2(config-line)#password 123 //远程管理的密码
  3. S2(config-line)#login

S2(config)#line vty 0 4

S2(config-line)#password 123      //远程管理的密码

S2(config-line)#login

3)配置用户模式进入特权模式的密码(明文或密文之一)

copytextpop-up

  1. S2(config)#enable password 456

S2(config)#enable password 456

4)PC1通过telnet方式远程管理S2

copytextpop-up

  1. PC>telnet 192.168.2.100
  2. Trying 192.168.2.100 ...Open
  3. User Access Verification
  4. Password: //输入远程管理密码123
  5. S2>en
  6. S2>enable
  7. Password: //输入用户模式进入特模式密码456
  8. S2# //通过telnet方式登录到S2的特权模式

 

猜你喜欢

转载自blog.csdn.net/rio520/article/details/81148344