2024年5月5日发(作者:)

交换机基本配置上机

实验一、交换机的基本配置

一、实验目的:熟悉配置环境,学会交换机的基本配置方法。

3.命令:

SwitchA>enable

Password:

SwitchA#config terminal

Enter configuration commands, one per line. End with

CNTL/Z. SwitchA(config)#hostname switchA

2005-02-20 16:59:05 @5-CONFIG:Configured from outband

switchA(config)#enable secret 5 s1

2005-02-20 16:59:24 @5-CONFIG:Configured from outband

% ERROR: The secret you entered is not a valid encrypted

secret.

To enter an UNENCRYPTED secret, do not specify type 5

encryption. When you properly enter an UNENCRYPTED secret,

it will be encrypted. switchA(config)#

SwitchA(config)#line vty

2005-02-20 16:55:29 @5-CONFIG:Configured from outband

SwitchA(config-line)#exec-timeout 1000

2005-02-20 16:55:47 @5-CONFIG:Configured from outband

SwitchA(config-line)#exit

2005-02-20 16:55:55 @5-CONFIG:Configured from outband

SwitchA(config)#

switchA#config terminal

Enter configuration commands, one per line. End with

CNTL/Z. switchA(config)#no ip domain-lookup

2005-02-20 17:02:54 @5-CONFIG:Configured from outband

switchA(config)#int fa 0/1

2005-02-20 17:03:47 @5-CONFIG:Configured from outband

switchA(config-if)#speed 100

2005-02-20 17:04:00 @5-CONFIG:Configured from outband

switchA(config-if)#duplex full

2005-02-20 17:04:09 @5-CONFIG:Configured from outband

switchA(config-if)#

switchA(config)#int vlan 1

2005-02-20 17:18:16 @5-CONFIG:Configured from outband

switchA(config-if)#ip address 192.168.1.1 255.255.255.0

2005-02-20 17:18:42 @5-CONFIG:Configured from outband

switchA(config-if)#

switchA(config)#ip default-gateway 192.168.1.254

2005-02-20 17:21:44 @5-CONFIG:Configured from outband

switchA(config)#

switchA#show running-config

System software version : 1.61(2) Build Aug 31 2005 Release

Current configuration : 453 bytes

!

version 1.0

!

enable services web-server

hostname switchA

vlan 1

!

vlan 2

!

enable secret level 15 5 $2,1u_;C3&-8U0H !

interface fastEthernet 0/1

speed 100

duplex full

!

interface vlan 1

no shutdown

ip address 192.168.1.1 255.255.255.0

!

interface vlan 2

!

ip default-gateway 192.168.1.254

snmp-server community public ro

line vty

exec-timeout 1000

!

line console 0

exec-timeout 30

!

end

switchA#

switchA#show interface vlan

% Incomplete command.

switchA#show interface vlan 1

Interface : Vlan 1

Description :

AdminStatus : up

OperStatus : down

Hardware : -

Mtu : 1500

LastChange : 0d:0h:0m:0s

ARP Timeout : 3600 sec PhysAddress

ManagementStatus:Enabled

: 00d0.f8db.b176

Primary Internet address: 192.168.1.1/24 Broadcast address :

255.255.255.255

switchA#

switchA#show interface fa 0/1

Interface : FastEthernet100BaseTX 0/1 Description :

AdminStatus : up

OperStatus : down

Hardware : 10/100BaseTX

Mtu : 1500

LastChange : 0d:0h:0m:0s AdminDuplex : Full

OperDuplex : Unknown AdminSpeed : 100

OperSpeed : Unknown FlowControlAdminStatus : Off

FlowControlOperStatus : Off

Priority : 0

Broadcast

switchA#

switchA#show mac-address-table

Vlan MAC Address Type Interface

---------- -------------------- -------- -------------------

switchA#

switchA#show version

System description : Red-Giant Gigabit Intelligent

Switch(S2126G) By

Ruijie Network

System uptime : 0d:3h:44m:25s

System hardware version : 3.3

System software version : 1.61(2) Build Aug 31 2005 Release

System BOOT version : RG-S2126G-BOOT 03-02-02

System CTRL version : RG-S2126G-CTRL 03-08-02

blocked :DISABLE Unknown multicast

blocked :DISABLE Unknown unicast blocked :DISABLE

Running Switching Image : Layer2

switchA#

show clock

System clock : 2005-02-20 17:31:58 Sunday

switchA#show config

Using 181 out of 6291456 bytes

!

version 1.0

!

enable services web-server

hostname S2126-2

vlan 1

!

enable secret level 15 5 $2;C,tZ[30H.Y*T

!

snmp-server community public ro

end

switchA#