1. 程式人生 > 其它 >Cisco-配置telnet和enable密碼

Cisco-配置telnet和enable密碼

Cisco-單臂路由+telnet實驗案例

背景說明:這是某司一部分網路拓撲,出於通訊的考慮,各部門的計算機需要進行劃分廣播域。通過交換機對各部門劃分VLAN,核心路由器由網路管理員通過console線,配置單臂路由實現各部門的通訊。同時配置telnet實現網路管理員對核心路由的遠端管理,配置特權(enable)密碼對路由器進行裝置安全加固。

IP地址介面規劃表

本端裝置 介面 IP地址或介面模式 對端裝置 介面 IP地址或介面模式
RT1 Fa0/0 192.168.1.1/24 PC0 Fa0 192.168.1.,2/24
RT1 Se1/0 202.0.0.1/30 RT2 Se1/0 202.0.0.2/30
RT1 Fa0/1 Switch0 F0/1 Trunk
RT1 Fa0/1.2 192.168.20.1/24 Switch0 F0/1 Trunk
RT1 Fa0/1.2 192.168.30.1/24 Switch0 F0/1 Trunk
RT1 Fa0/1.2 192.168.40.1/24 Switch0 F0/1 Trunk
Switch0 Fa0/2 Access(VLAN 20) PC2 Fa0 192.168.20.10/24
Switch0 Fa0/3 Access(VLAN 30) PC3 Fa0 192.168.30.10/24
Switch0 Fa0/4 Access(VLAN 40) PC4 Fa0 192.168.40.10/24

專案實施:

一、配置各介面IP地址或所屬VLAN

#交換機Switch0的配置

Switch#enable
Switch#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
!
Switch(config)#hostname Switch0
!
Switch0(config)#vlan 20
Switch0(config-vlan)#vlan 30
Switch0(config-vlan)#vlan 40
!
Switch0(config)#interface fastEthernet 0/1
Switch0(config-if)#switchport mode trunk
Switch0(config-if)#switchport trunk allowed vlan 20,30,40
!
Switch0(config)#interface fastEthernet 0/2
Switch0(config-if)#switchport mode access 
Switch0(config-if)#switchport access vlan 20
!
Switch0(config)#interface fastEthernet 0/3
Switch0(config-if)#switchport mode access
Switch0(config-if)#switchport access vlan 30
!
Switch0(config)#interface fastEthernet 0/4
Switch0(config-if)#switchport mode access
Switch0(config-if)#switchport access vlan 40

#路由器RT1的配置

Router>enable
Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
!
Router(config)#hostname RT1
!
RT1(config)#int fastEthernet 0/0
RT1(config-if)#ip address 192.168.1.1 255.255.255.0
RT1(config-if)#no shutdown
!
RT1(config)#int fastEthernet 0/1
RT1(config-if)#no shutdown
!
RT1(config)#int serial 1/0
RT1(config-if)#ip address 202.0.0.1 255.255.255.0
RT1(config-if)#no shutdown

#路由器RT2的配置

Router>enable
Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
!
Router(config)#hostname RT2
!
RT2(config)#int serial 1/0
RT2(config-if)#ip address 202.0.0.2 255.255.255.0
RT2(config-if)#no shutdown

二、單臂路由的配置

RT1(config)#int fastEthernet 0/1.2
RT1(config-subif)#encapsulation dot1Q 20                #配置埠封裝型別為dot1Q,pvid為20
RT1(config-subif)#ip address 192.168.20.1 255.255.255.0
!
RT1(config)#int fastEthernet 0/1.3
RT1(config-subif)#encapsulation dot1Q 30                #配置埠封裝型別為dot1Q,pvid為30
RT1(config-subif)#ip address 192.168.30.1 255.255.255.0
!
RT1(config)#int fastEthernet 0/1.4
RT1(config-subif)#encapsulation dot1Q 40                #配置埠封裝型別為dot1Q,pvid為40
RT1(config-subif)#ip address 192.168.40.1 255.255.255.0

三、配置console和特權模式的密碼

RT1(config)#line console 0
RT1(config-line)#password cisco@console
RT1(config-line)#login
!
RT1(config)#enable password cisco@enable

四、配置telnet

RT1(config)#line vty 0 4                #配置虛擬終端(0-4),同時允許5個虛擬連線
RT1(config-line)#password cisco@telnet
RT1(config-line)#login

專案驗證

單臂路由專案驗證:

console和enable的密碼登入的驗證:

telnet的驗證: