资源预览内容
第1页 / 共13页
第2页 / 共13页
第3页 / 共13页
第4页 / 共13页
第5页 / 共13页
第6页 / 共13页
第7页 / 共13页
第8页 / 共13页
第9页 / 共13页
第10页 / 共13页
亲,该文档总共13页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
思科、华为等四大厂商的交换机基础配置命令全收录* 01*思科交换机基本配置命令01 进入特权模式enableswitchenableswitch#02 进入全局配置模式configure terminalswitchenableswitch#configure terminalswitch(conf)#03 交换机命名hostname aptech2950以aptech2950为例switchenableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#04 配置使能口令enable password cisco以cisco为例switchenableswitch # c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco05 配置使能密码enable secret ciscolab以cicsolab为例switchenableswitch # c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enble secret ciscolab06 创建多个VLANswitchenable (进入特权模式)switch#vlan data (进入VLAN配置模式)switch(vlan)#vlan 10 name IT (划分VLAN 10,名称为IT)switch(vlan)#vlan 20 name HR (划分VLAN20,名称为HR)switch(vlan)#vlan 30 name FIN (划分VLAN30,名称为FIN)switch(vlan)#vlan 40 name LOG (划分VLAN40,名称为LOG)switch(vlan)#exit07 设置VLAN 1switchenableswitch # configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0配置交换机端口IP和子网掩码aptech2950(conf-if)#no shutaptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址08 进入交换机某一个端口interface fastehernet 0/17以17为例switchenableswitch # configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#09 查看命令showswitchenableswitch# show version查看系统中的所有版本信息show interface vlan 1查看交换机有关IP协议的配置信息show running-configure查看交换机当前起作用的配置信息show interface fastethernet 0/1查看交换机1接口具体配置和统计信息show mac-address-table查看MAC地址表show mac-address-table aging-time查看MAC地址表自动老化时间10 交换机恢复出厂默认命令switchenableswitch # erase startup-configureswitch # reload11 双工模式设置switch enableswitch # c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#duplex full/half/auto有 full、half、auto三个选项12 cdp相关命令switch enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备13 交换机telnet远程登录设置switchenableswitch # configure terminalswitch(conf)#hostname aptech-2950aptech2950(conf)#enable password ciscoaptech2950(conf)#interface fastethernet 0/1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0aptech2950(conf-it)#no shutaptech2950(conf-if)#exitaptech2950(conf)line vty 0 4 设置0-4个用户可以telnet远程登录aptech2950(conf-line)#password edge 以edge为远程登录的用户密码主机设置:IP 192.168.1.2 主机的IP必须和交换机端口的地址在同一个网络段metmask 255.255.255.0gate-way 192.168.1.1 网关地址是交换机端口地址运行:telent 192.168.1.1进入telnet远程登录界面password:edgeaptech2950enpassword:ciscoaptech#0*2*华为交换机基础配置命令01 常用命令视图02 创建VLAN /用户视图,一般display命令查看信息比较多。system-view /准备进入系统视图。Huaweivlan 100 /创建vlan 100。Huawei-vlan100quit /退回系统视图。03 将端口加入到vlan中Huawei interface GigabitEthernet2/0/1 /(10G光口) Huawei- GigabitEthernet2/0/1 port link-type access /定义端口传输模式 Huawei- GigabitEthernet2/0/1 port default vlan 100 /将端口加入vlan100 Huawei- GigabitEthernet2/0/1 quit /回到接口视图 Huawei interface GigabitEthernet1/0/0 /进入1号插槽上的第一个千兆网口接口视图中。0代表1号口 Huawei- GigabitEthernet1/0/0 port link-type access /定义端口传输模式 Huawei- GigabitEthernet2/0/1 port default vlan 10 /将这个端口加入到vlan10中 Huawei- GigabitEthernet2/0/1 quit 04 将多个端口加入到VLAN中system-view Huaweivlan 10 Huawei-vlan10port GigabitEthernet 1/0/0 to 1/0/29 /将0到29号口加入到vlan10中 Huawei-vlan10quit05 交换机配置IP地址Huawei interface Vlanif100 / 进入vlan100接口视图与vlan 100命令进入的地方不同 Huawei-Vlanif100 ip address 192.168.1.1 255.255.255.0 / 定义vlan100管理IP三层 交换网关路由 Huawei-Vlanif100 quit /返回视图06 配置默认网关Huaweiip route-static 0.0.0.0 0.0.0.0 192.168.1.254 /配置默认网关。07 交换机保存设置和重置命令save /保存配置信息 reset saved-configuration /重置交换机的配置 reboot /重新启动交换机08 交换机常用的显示命令用户视图模式下:display current-configuration /显示现在交换机正在运行的配置明细 display device /显示各设备状态 display interface xxx /显示个端口状态,用?可以查看后边跟的选项 display version /查看交换机固件版本信息 display vlan xxx / 查看vlan的配置信息0*3*H3C交换机的基本配置01 基本配置 /用户直行模式提示符,用户视图 system-view /进入系统视图 H3C sysname xxx /设置主机名成为xxx这里使用修改特权用户密码02 用户配置system-viewH3Csuper password H3C /设置用户分级密码H3Cundo superpassword /删除用户分级密码H3Clocaluser bigheap 1234561 /Web网管用户设置,1为管理级用户H3Cundo localuser bigheap /删除Web网管用户H3Cuser-interface aux 0 /只支持0H3C-Auxidle-timeout 250 /设置超时为2分50秒,若为0则表示不超时,默认为5分钟H3C-Auxundoidle-timeout /恢复默认值H3Cuser-interface vty 0 /只支持0和1H3C-vtyidle-timeout 250 /设置超时为2分50秒,若为0则表示不超时,默认为5分钟H3C-vtyundoidle-timeout /恢复默认值H3C-vtyset authentication password123456 /设置telnet密码,必须设置H3C-vtyundo set authentication password /取消密码H3Cdisplayusers /显示用户H3Cdisplayuser-interface /用户界面状态03 vlan配置H3Cvlan 2 /
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号