神州数码配置命令总结 (已更新)

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

第一部分交换机配置

一、基础配置

1、模式进入

Switch>

Switch>en

Switch#config

Switch(Config)#interface ethernet 0/2

2、配置交换机主机名

命令:hostname <主机名>

3、配置交换机IP地址

Switch(Config)#interface vlan 1

Switch(Config-If-Vlan1)#ip address 10.1.128.251 255.255.255.0

Switch(Config-If-Vlan1)#no shut

4、为交换机设置Telnet授权用户和口令:

登录到Telnet的配置界面,需要输入正确的用户名和口令,否则交换机将拒绝该Telnet用户的访问。该项措施是为了保护交换机免受非授权用户的非法操作。若交换机没有设置授权Telnet用户,则任何用户都无法进入交换机的Telnet配置界面。因此在允许Telnet方式配置管理交换机时,必须在Console的全局配置模式下使用命令username privilege [password (0 | 7) ]为交换机设置Telnet授权用户和口令并使用命令authentication line vty login local打开本地验证方式,其中privilege选项必须存在且为15。

例:Switch>enable

Switch#config

Switch(config)#username test privilege 15 password 0 test

Switch(config)#authentication line vty login local

Switch(Config)#telnet-user test password 0 test

Switch (Config)#telnet-server enable://启动远程服务功能

5、配置允许Telnet管理交换机的地址限制(单独IP或IP地址段)

(1)限制单个IP允许Telnet登录交换机

switch(config)#authentication security ip 192.168.1.2

(2)限制允许IP地址段Telnet登录交换机

switch(config)#access-list 1 permit 192.168.1.0 0.0.0.255

switch(config)#authentication ip access-class 1 in

5、为交换机设置Web授权用户和口令:web-user <用户名>password {0|7} <密码>

例:Switch(Config)#web-user admin password 0 digital

6、设置系统日期和时钟:clock set

7、设置退出特权用户配置模式超时时间

exec timeout //单位为分钟,取值范围为0~300

8、保存配置:write

9、显示系统当前的时钟:Switch#show clock

10、指定登录用户的身份是管理级还是访问级

Enable [level {visitor|admin} [<密码>]]

11、指定登录配置模式的密码:Enable password level {visitor|admin}

12、配置交换机的用户名密码:username admin privilege 15 password 0 admin000

13、配置enable密码为ddd:enable password 0 ddd level 15

14、配置登录时认证:authentication line vty login local

15、设置端口的速率和双工模式(接口配置模式下)

命令:speed-duplex {auto | force10-half | force10-full | force100-half | force100-full | {{force1g-half | force1g-full} [nonegotiate [master | slave]] } }

no speed-duplex

二、单交换机VLAN划分

1、VLAN基本配置

(1)新建VLAN:vlan

(2)命名VLAN:name

(3)为VLAN 分配交换机端口

Switch(Config-If-Vlan1)#switchport interface Ethernet 0/2

(4)设置Trunk 端口允许通过VLAN:

Switch(Config-ethernet0/0/5)#switchport trunk allowed vlan 1;3;5-20

2、划分VLAN:

(1)进入相应端口:Switch(config)#interface Ethernet 0/2

(2)修改模式:Switch(Config-ethernet0/0/5)switchport mode access

(3)划分VLAN:Switch(Config-ethernet0/0/5)#switchport access vlan 4

三、跨交换机VLAN划分(两台交换机作相同操作)

1、新建VLAN

2、划分VLAN

3、修改链路模式

(1)进入相应端口:Switch(config)#interface Ethernet 0/1

(2)修改模式:Switch(config-if)#switchport mode trunk

四、VLAN间主机的通信

1、新建VLAN

2、划分VLAN

3、修改链路模式

(1)进入相应端口:Switch(config)#interface Ethernet 0/1

(2)修改模式:Switch(config-if)#switchport mode trunk

注意:如果是三层交换机,在修改模式先封装802.1协议:

Switch(config-if)#switchport trunk encapsulation dot1q

4、建立VLAN子接口

(1)、进入VLAN接口模式:Switch(config)#interface vlan 2

(2)、设置VLAN子接口地址:Switch(config-if)#ip address 192.168.0.1 255.255.255.0 (3)、打开端口:Switch(config-if)#no shutdown

5、设置各主机IP地址、子网掩码、网关

注意:(1)各主机IP地址应与其所在的VLAN在同一网段。

(2)192.168.0.1/24中的“24”表示子网掩码为3个255。

(3)主机所在的VLAN的子接口地址就是主机的网关。

相关文档
最新文档