神码设备命令集.docx
《神码设备命令集.docx》由会员分享,可在线阅读,更多相关《神码设备命令集.docx(27页珍藏版)》请在冰豆网上搜索。
![神码设备命令集.docx](https://file1.bdocx.com/fileroot1/2022-11/17/d163212a-eb78-4caa-ae80-a31fc1dfb4de/d163212a-eb78-4caa-ae80-a31fc1dfb4de1.gif)
神码设备命令集
神州数码设备命令
组网小知识:
1.设备连接:
不同种类型设备的连接用:
直通线
同种或是跨层设备的连接用:
交叉线(路由与PC)
2.注意设备的叠放次序
3.IP地址要先理顺,以便加快速度。
先完成基本配置,全网连通后,继续其它。
交换机还原配置文件:
特权模式下:
setdefault/write/后重启reload
被加入密码后,起动过程,ctrl+b/deletestartup-config/后重启reload
操作系统nos.img
PC,Ip交换机IP
路由还原配置文件:
特权模式下:
deletestartup.config/后重启reboot
4.每个步骤都要测试成功。
切记!
!
!
1、网线制作
TIA/EIA-568B:
1、白橙,2、橙,3、白绿,4、蓝,5、白蓝,6、绿,7、白棕,8、棕
TIA/EIA-568A:
1、白绿,2、绿,3、白橙,4、蓝,5、白蓝,6、橙,7、白棕,8、棕
如何判断用直通线或交叉线:
设备口相同:
交叉线;设备口不同:
直通线.
2、交换机、路由器设备管理(配置管理、文件管理及密码管理等)
Switch
配置设备名称:
DCRS-5650-28(config)#hostnameswx
特权用户密码:
DCRS-5650-28(config)#enablepasswordshenzhou(明文方式)
DCRS-5650-28(config)#enablepassword8shenzhou(密文方式)
Telnet登陆管理:
DCRS-5650-28(config)#telnet-usershenzhoupassword0digital
Router
配置设备名称:
Router_config#hostnameRx
特权用户密码:
Rx_config#enablepassword0shenzhoulevel15(设置最高级别的明文密码)
Rx_config#enablepassword7shenzhoulevel15(设置最高级别的密文密码)
Rx_config#aaaauthenticationenabledefaultenable(设置aaa验证)
Telnet登陆管理:
Rx_config#usernameclientpasswordshenzhou(设置Telnet用户名和密码)
Rx_config#aaaauthenticationlogindefaultlocal(设置本地用户信息进行验证)
Rx_config#aaaauthenticationenabledefaultnone(设置特权用户信息进行验证)
(line命令可以不用)
Rx_config#linevty04(最多允许4个用户登陆)
Rx_config_line#loginauthenticationdefault(Telnet使用默认认证列表)
经过测试,配置路由器时,设置telnet时,需同时设置login,enable验证,否则会出现“验证错误”
经过测试,配置交换机时,用户的建立注意设置级别,否则用户在telnet,web管理登录时,不能进入特权模式或提示用户权限不足。
3、时间设定
#clockset00:
00:
002010.10.16
#date
4、网络子网VLAN划分及应用(跨交换机相同VLAN间通信、私有VLAN、多层交换机VLAN的划分和VLAN间路由、公用端口等)
VLAN的划分:
DCRS-5650-28(config)#vlan100(创建VLAN)
DCRS-5650-28(config-vlan100)#switchportinterfacee0/0/1-3(把E1-3端口加入VLAN)(EXIT/INTERFACErangF0/1-3/SWITCHPORTaccessvlan100)
DCRS-5650-28(config-vlan100)#switchportinterfacee0/0/4;6(把E4、E6端口加入VLAN)
DCRS-5650-28(config)#intvlan100(设置VLAN)
DCRS-5650-28(config-if-vlan100)#ipaddress1.1.1.1255.255.255.0(设置VLAN的IP)
相同VLAN间的通信:
DCRS-5650-28(config-if-vlan100)#inte0/0/1
DCRS-5650-28(config-if-ethernet0/0/1)#switchport trunk encapsulation dot1q(封装)
DCRS-5650-28(config-if-ethernet0/0/1)#switchportmodetrunk(设置接口为中继模式)
DCRS-5650-28(config-if-ethernet0/0/1)#switchporttrunkallowedvlanall
(设置允许通过该端口的所有VLAN)
经测试,在设置跨交换机的vlan间通信时,两交换机所连的端口都需设置中继
私有VLAN:
(用于vlan间的互访,进到vlan中配置)
private-vlan[primary|community|isolated|association](主|团体|隔扇|联合)
switch(Config)#vlan100
switch(Config-Vlan100)#private-vlanprimary(设置主vlan)
switch(Config)#vlan200
switch(Config-Vlan200)#private-vlancommunity(设置群体vlan)
switch(Config)#vlan300
switch(Config-Vlan300)#private-vlancommunity(设置群体vlan)
switch(Config)#vlan400
switch(Config-Vlan400)#private-vlanisolated(设置隔离vlan)
switch(Config)#vlan100
switch(Config-Vlan100)#private-vlanassociation200;300;400(vlan之间的关联)
switch(Config-Vlan100)#switchportinterfaceethernet0/0/1-4
switch(Config-Vlan100)#vlan200
switch(Config-Vlan200)#switchportinterfaceethernet0/0/7-12
switch(Config-Vlan200)#vlan300
switch(Config-Vlan300)#switchportinterfaceethernet0/0/13-18
switch(Config-Vlan300)#vlan400
switch(Config-Vlan400)#switchportinterfaceethernet0/0/19-24
创建私有vlan的时候,先做关联,再添加端口。
因为关联时,会自动把原vlan的
端口移除。
相关命令:
Vlan//创建VLAN,是VID号;
Name//给VLAN命名;
Switchportaccessvlan//处于某个access端口状态,将当前端口加入到指定的vlan中;
Switchporinterface//进入vlan状态,将一个或多个端口添加到vlan中;
Switchportmode{trunk|access}//设置交换机的端口access或trunk模式;
SwitchporttrunkallowedVLANALL//设置trunk端口允许通过所有VLAN;
Switchporttrunknativevlan//设置trunk端口的PVID;
Vlaningressdisable//关闭端口的VLAN入口规则。
5、交换机端口配置(注:
要进到端口中才能配置)
出入带宽限制
bandwidthcontrol*[both|transmit|receive]
限制广播数据包
rate-suppressionbroadcast*
镜像(监控,在全局下)
源:
monitorsession1sourceinter0/0/1[both|rx|tx]
目的:
monitorsession1destinationinter0/0/2
双工模式
speed-duplexforce[10/100-half/full|auto]
MAC绑定
switchport-security
switchport-securitymaximum*(地址最大数)
switchport-securitymac-address00-00-00-00-00-00
swiportlock(锁定端口)
swiportviolationshutdown/protect超出就shutdown
流控
flowcontrol
端口配置网线模式
mdi[across|normal|auto]
设置trunk模式
用于二层与三层,或三层与三层间的传输。
在端口模式下设置:
inte0/0/1
switchmodetrunk干道模式
switchtrunkallowvlanall跨交换机之间相同的VLAN能够互通
交换机端口安全
1、绑定MAC地址与端口绑定:
DCRS-5650-28(config)#inte0/0/2
DCRS-5650-28(config-if-ethernet0/0/2)#switchportport-security(启动端口安全模式)
DCRS-5650-28(config-if-ethernet0/0/2)#switchportport-securitymac-address00-00-00-00-00-01(绑定端口连接的网卡mac地址)
DCRS-5650-28(config-if-ethernet0/0/2)#switchportport-securitylock(锁定安全端口)
2、配置MAC地址表实现绑定和过滤:
DCRS-5650-28A(config)#mac-address-tablestaticaddress00-25-11-8b-7c-6dvlan1interfaceethernet0/0/1(绑定MAC和端口)
DCRS-5650-28A(config)#mac-address-tablestaticaddress00-25-11-8b-81-cdvlan1interfaceethernet0/0/2(绑定MAC和端口)
3、交换机MAC与IP的绑定:
amenable;