实验目的读者可以掌握如下技能:,我来为大家科普一下关于华为交换机基本配置 交换机基本配置?下面希望有你要的答案,我们一起来看看吧!

华为交换机基本配置 交换机基本配置

华为交换机基本配置 交换机基本配置

实验目的

读者可以掌握如下技能:

熟悉交换机的基本配置

步骤

(1)步骤1:配置主机名

Switch>enable

Switch#confterminal

Enterconfiguration commands, one per line.End with CNTL/Z.

Switch(config)#hostnameS1

(2)步骤2:配置密码

S1(config)#enable secret cisco

S1(config)#line vty 0 15

S1(config-line)#password cisco

S1(config-line)#login

(3)步骤3:接口基本配置默认时交换机的以太网接口是开启的。对于交换机的以太网口可以配置其双工模式、速率等。

S1(config)#interface f0/1

switch(config-if)#duplex {full | half | auto }

//duplex 用来配置接口的双工模式,full——全双工、half——半双工、auto——自动检测双工的模式

switch(config-if)#speed{ 10 | 100 | 1000 | auto }

//speed命令用来配置交换机的接口速度,10——10M、100——100M、1000——1000M、auto

——自动检测接口速度。

(4)配置管理地址 交换机也允许被telnet,这时需要在交换机上配置一个IP地址,这个地址是在VLAN接口上配置的。如下:

S1(config)#intvlan 1

S1(config-if)#ipaddress 172.16.0.1 255.255.0.0

S1(config-if)#noshutdown

S1(config)#ipdefault-gateway 172.16.0.254

//以上在VLAN 1接口上配置了管理地址,接在VLAN 1上的计算机可以直接进行telnet该地址。为了其他网段的计算机也可以telnet交换机,我们在交换机上配置了缺省网关。

(5)保存配置

S1#copyrunning-config startup-config

Destination filename[startup-config]?

Building configuration...

[OK]

,