DELL6224交换机基本配置命令一览
1:配置登录用户,口令等
console>//用户直行模式提示符
console>enable //进入特权模式
console# //特权模式(配置密码后必须输入密码才可进入特 权模式)
console#config //进入全局配置模式 configure
console(config)# //配置模式提示符
console(config)#exit //还有一个命令是end也和exit差不多
console#quit
console>
console(config)#hostname xxx //设置主机名成为xxx这里使用console
console(config)#enable password xxx //设置使能口令为明文显示为xxx,必须不少于8字符远程telnet的时候起作用本地通过console口不需要密码的
console(config)#username zy password 12345678 level 15 //定义交换机的用户名以及对应的权限。
console(config)#line console //进入console口配置视图,这里可以设置通过超级终端访问交换机的一些参数
console(config-line)#enable authentication default //配置访问角色为默认
console(config-line)#exec-timeout<0-65535> minutes // 设置console口自动关闭时间,以分钟为单位
console(config-line)#speed 9660 //设置访问速率,一般9660为默认设置。
console(config-line)#password xxxx //不少于八位的密码用来访问console,与enable password xxx,差不多
console(config-line)#no password //删除password密码
console(config-line)#exit //退出console口配置视图
console(config)#line telnet //进入telnet配置视图
console(config-telnet)#enable authentication default //配置访问角色为默认
console(config-telnet)#exec-timeout<0-65535> minutes // 设置telnet访问闲置自动关闭时间,以分钟为单位
console(config-telnet)#password xxxx //不少于八位的密码用来访问telnet
console(config-telnet)#no password //删除password密码
console(config-telnet)#exit //退出telnet口配置视图
console(config)#line ssh //进入ssh配置视图
console(config-ssh)#enable authentication default //配置访问角色为默认
console(config-ssh)#exec-timeout<0-65535> minutes // 设置ssh访问闲置自动关闭时间,以分钟为单位
console(config-ssh)#password xxxx //不少于八位的密码用来访问ssh
console(config-ssh)#no password //删除password密码
console(config-ssh)#exit //退出ssh口配置视图
2:cisco2960 VLan设置
console> enable //进入特权模式
console#configure //进入配置视图
console(config)#vlan database //进入vlan设置
console(config-vlan)#vlan 2 //创建vlan 2
console(config-vlan)#no vlan 2 v //删除vlan 2
console(config-vlan)#exit //回到特权模式下
console(config)#interface vlan 2 //进入vlan2配置视图
console(config-if-vlan2)#name xxx //为vlan取名字
端口设置命令:
console(config)#interface ethernet 1/g1 //进入网口1,
console(config-if-1/g1)# //接口视图模式
console(config-if-1/g1)#speed 10/100/1000 //定义端口的带宽,只能从这三种模式中做选择。
console(config-if-1/g1)#duplex full/half //定义双工模式
console(config-if-1/g1)#negotiation //启用自动协商速度和双工参数
console(config-if-1/g1)#no negotiation //禁用自动协商速度和双工参数
console(config-if-1/g1)#switchport mode access/trunk/general //定义端口类型,总共有三种类型
console(config-if-1/g1)#switchport access vlan 2 //将端口以access模式加入到vlan 2中
console(config-if-1/g1)#shutdown //关闭当前端口
console(config-if-1/g1)#no shutdown //打开当前端口
console(config)#interface ethernet 1/g24 //进入汇聚千兆口24,共有4个千兆combo口21-24
console(config-if-1/g24)#
console(config-if-1/g24)#duplex auto/full/half //设置端口工作模式为 自适应/全双通/半双通
console(config-if-1/g24)#switchport mode trunk //设置当前端口模式为汇聚口
console(config-if-1/g24)#switchport mode access //设置当前端口模式为接入模式
console(config-if-1/g24)#switchport trunk allowed vlan add/remove 1,2 //将当前汇聚端口加入或移除从vlan1,2通过,vlan修剪,默认为all,全部允许
console(config-if-1/g24)#switchport access vlan 2 //将当前端口以access模式加入到vlan 2中
若21-24号口用作光口的话配置接口就对应1/xg1-1/xg4代表使用光线做10G上联口用:
console(config)#interface ethernet 1/xg1 //进入汇聚万兆口1,共有4个千兆combo口21-24对应四个1/xg1-1/xg4万兆光口
console(config-if-1/xg1)#
console(config-if-1/xg1)#duplex auto/full/half //设置端口工作模式为 自适应/全双通/半双通
console(config-if-1/xg1)#switchport mode trunk //设置当前端口模式为汇聚口
console(config-if-1/xg1)#switchport mode access //设置当前端口模式为接入模式
console(config-if-1/xg1)#switchport trunk allowed vlan add/remove 1,2 //将当前汇聚端口加入或移除从vlan1,2通过,vlan修剪,默认为all,全部允许
console(config-if-1/xg1)#switchport access vlan 2 //将当前端口以access模式加入到vlan 2中
将端口加入vlan
console(config)#interface ethernet 1/g1
console(config-if-1/g1)#switchport mode access
console(config-if-1/g1)#switchport access vlan 2
将多个端口加入到VLAN中
console(config)#interface range ethernet 1/g1-1/g12 //进入1-12这个接口组里配置
console(config-if)#switchport mode access
console(config-if)#switchport access vlan 2
console#show vlan //用于查看配置后结果
3:设置VTP cisco专有的vlan终极协议也成为局域网干道协议,作用是十几台交换机在企业网中,配置VLAN工作量大,可以使用VTP协议,把一台交换机配置成VTP Server, 其余交换机配置成VTP Client,这样他们可以自动学习到server 上的VLAN 信息
4:交换机配置IP地址
console(config)#interface vlan 1 //进入vlan 1
console(config-if-vlan1)#ip address 119.167.223.221 255.255.255.128 //设置交换机的管理ip地址
console(config)#ip default-gateway 119.167.223.254 //设置交换机的默认网关
console(config)#end //退出当前模式
5: 交换机保存设置命令
console#copy running-config startup-config //将当前正在使用中的配置保存到交换机开机需要加载的配置文件里去。
console#copy running-config backup-config //将当前的配置保存在备份配置文件里
6:交换机显示命令
特权模式下:
console#show running-config //显示当前正在使用的配置信息
console#show startup-config //交换机开机是自动加载的 配置文件
console#show vlan //显示vlaner配置信息
console#show interfaces configuration ethernet 1/g1 //显示二层端口状态,可以用来决定此口是否为二层或三层口
console#show ip interface vlan100 //查看交换机vlan100的ip配置信息
console#show version //查看交换机固件版本信息
7:基于端口的mac地址绑定
console#config //进入配置视图模式
console(config)#interface ethernet 1/g1 //进入具体端口视图模式下
console(config-if-1/g1)#switchport port-secruity //配置端口安全模式
console(config-if-1/g1)#switchport port-secruity mac-address MAC(主机的mac地址) //配置该端口要绑定的主机的MAC地址
console(config-if)#no switchport port-secruity mac-address MAC(主机的mac地址) //删除绑定主机的mac地址
8:配置交换机的snmp功能
console(config)#snmp-server community xxx ro //xxx为自定义的共同体名称,并且团体的权限为只读。
console(config)#snmp-server host x.x.x.x(ip地址) xxx(团体名) //设置管理机x.x.x.x,同时允许该管理机以团体明xxx访问。
console(config)#snmp-server host 119.167.223.221 zy //例子
console(config)#snmp-server enable traps //启用snmp服务
9:交换机禁ping配置
console(config)#access-list 110 deny icmp any any //配置访问控制列表(Access Control List,ACL)110指的ICMP对应ping。
console(config)#access-list 110 permit ip any any //运行所有的IP协议的应用
console(config)#int vlan 1
console(config-if-vlan1)#ip access-group 110 in
console(config)#int vlan 2
console(config-if-vlan2)#ip access-group 110 in
console(config)#int vlan 3
console(config-if-vlan3)#ip access-group 110 in
console(config)#interface ethernet 1/g1 //端口禁ping
console(config-if-1/g1)#ip access-group 110 in
.
.
.
10:恢复交换机出厂设置
console#clear config //恢复交换机出厂设置
console#reload //重新启动交换机
11: 端口汇聚
console>enable
console#config
console(config)#interface ethernet 1/g1
console(config-if-1/g1)#speed 1000
console(config-if-1/g1)#duplex full
console(config)#interface ethernet 1/g2
console(config-if-1/g2)#speed 1000
console(config-if-1/g2)#duplex full
console(config-if-1/g2)#exit
console(config)#interface range ethernet 1/g1-1/g2
console(config-if)#channel-group 1 mode on/auto
console(config-if)#switchport mode trunk
console(config-if)#switchport trunk allowed vlan all
console#show etherchannel summary //查看端口汇聚状态。
另外一台交换机的对应汇聚端口务必要和这里两个汇聚口的设置一样。
R1#vlan database
R1(vlan)#vlan 2
R1(vlan)#exit
R1#configure terminal
R1(config)#int range fastethernet 0/1-4
R1(config-int-range)# switchport access vlan 2
R1(config-int-range)# channel-group 1 mode on
R2#vlan database
R2(vlan)#vlan 2
R2(vlan)#exit
R2#configure terminal
R2(config)#int range fastethernet 0/1-4
R2(config-int-range)# switchport access vlan 2
R2(config-int-range)# channel-group 1 mode on
同一个vlan里汇聚,端口使用access状态,多个VLAN之间汇聚端口才需要trunk状态。
推荐系统
番茄花园Ghost Win7 x64 SP1稳定装机版2022年7月(64位) 高速下载
语言:中文版系统大小:3.91GB系统类型:Win7欢迎使用 番茄花园 Ghost Win7 x64 SP1 2022.07 极速装机版 专业装机版具有更安全、更稳定、更人性化等特点。集成最常用的装机软件,集成最全面的硬件驱动,精心挑选的系统维护工具,加上独有人性化的设计。是电脑城、个人、公司快速装机之首选!拥有此系统
番茄花园 Windows 10 极速企业版 版本1903 2022年7月(32位) ISO镜像快速下载
语言:中文版系统大小:3.98GB系统类型:Win10番茄花园 Windows 10 32位极速企业版 v2022年7月 一、系统主要特点: 使用微软Win10正式发布的企业TLSB版制作; 安装过程全自动无人值守,无需输入序列号,全自动设置; 安装完成后使用Administrator账户直接登录系统,无需手动设置账号。 安装过程中自动激活
新萝卜家园电脑城专用系统 Windows10 x86 企业版 版本1507 2022年7月(32位) ISO镜像高速下载
语言:中文版系统大小:3.98GB系统类型:Win10新萝卜家园电脑城专用系统 Windows10 x86企业版 2022年7月 一、系统主要特点: 使用微软Win10正式发布的企业TLSB版制作; 安装过程全自动无人值守,无需输入序列号,全自动设置; 安装完成后使用Administrator账户直接登录系统,无需手动设置账号。 安装过程
笔记本&台式机专用系统 Windows10 企业版 版本1903 2022年7月(32位) ISO镜像快速下载
语言:中文版系统大小:3.98GB系统类型:Win10笔记本台式机专用系统 Windows 10 32位企业版 v2022年7月 一、系统主要特点: 使用微软Win10正式发布的企业TLSB版制作; 安装过程全自动无人值守,无需输入序列号,全自动设置; 安装完成后使用Administrator账户直接登录系统,无需手动设置账号。 安装过
笔记本&台式机专用系统 Windows10 企业版 版本1903 2022年7月(64位) 提供下载
语言:中文版系统大小:3.98GB系统类型:Win10笔记本台式机专用系统 Windows10 64专业版 v2022年7月 一、系统主要特点: 使用微软Win10正式发布的专业版制作; 安装过程全自动无人值守,无需输入序列号,全自动设置; 安装完成后使用Administrator账户直接登录系统,无需手动设置账号。 安装过程中自动
雨林木风 Windows10 x64 企业装机版 版本1903 2022年7月(64位) ISO镜像高速下载
语言:中文版系统大小:3.98GB系统类型:Win10新雨林木风 Windows10 x64 企业装机版 2022年7月 一、系统主要特点: 使用微软Win10正式发布的企业TLSB版制作; 安装过程全自动无人值守,无需输入序列号,全自动设置; 安装完成后使用Administrator账户直接登录系统,无需手动设置账号。 安装过程中自动激活
深度技术 Windows 10 x64 企业版 电脑城装机版 版本1903 2022年7月(64位) 高速下载
语言:中文版系统大小:3.98GB系统类型:Win10深度技术 Windows 10 x64 企业TLSB 电脑城装机版2022年7月 一、系统主要特点: 使用微软Win10正式发布的企业TLSB版制作; 安装过程全自动无人值守,无需输入序列号,全自动设置; 安装完成后使用Administrator账户直接登录系统,无需手动设置账号。 安装过程
电脑公司 装机专用系统Windows10 x64 企业版2022年7月(64位) ISO镜像高速下载
语言:中文版系统大小:3.98GB系统类型:Win10电脑公司 装机专用系统 Windows10 x64 企业TLSB版2022年7月一、系统主要特点: 使用微软Win10正式发布的企业TLSB版制作; 安装过程全自动无人值守,无需输入序列号,全自动设置; 安装完成后使用Administrator账户直接登录系统,无需手动设置账号。 安装过
相关文章
- TP-Link路由器tplogin.cn打不开该如何解决
- TOTOLINK N600R V2路由器设置教程(图文)
- 如何处理电脑蓝屏故障
- 路由器上的指示灯各有什么含义?无线路由器指示灯说明图解
- 春分知识扫盲:春分是什么意思 春分吃什么 春分习俗有哪些
- 百度小度WiFi怎么用?小度WiFi的安装使用方法
- CPU硅脂如何更换?CPU硅脂更换方法
- 小米路由器无法绑定小米账号怎么办?小米路由器帐号绑定不了的解决方法介绍
- PPTV电视不能投屏?乐播投屏支招
- 华硕RT-AX86U值得入手吗?华硕RT-AX86U详细图文评测
- 磊科NR238怎么样
- 联想天逸f31怎么样 联想天逸f31配置评测【图文】
- 路由器重置后无法上网怎么办?无线路由器重置后设置教程
- 单臂路由怎么实现同一交换机不同vlan通信?
热门系统
- 1华硕笔记本&台式机专用系统 GhostWin7 32位正式旗舰版2018年8月(32位)ISO镜像下载
- 2深度技术 Windows 10 x86 企业版 电脑城装机版2018年10月(32位) ISO镜像免费下载
- 3电脑公司 装机专用系统Windows10 x86喜迎国庆 企业版2020年10月(32位) ISO镜像快速下载
- 4雨林木风 Ghost Win7 SP1 装机版 2020年4月(32位) 提供下载
- 5深度技术 Windows 10 x86 企业版 六一节 电脑城装机版 版本1903 2022年6月(32位) ISO镜像免费下载
- 6深度技术 Windows 10 x64 企业版 电脑城装机版2021年1月(64位) 高速下载
- 7新萝卜家园电脑城专用系统 Windows10 x64 企业版2019年10月(64位) ISO镜像免费下载
- 8新萝卜家园 GhostWin7 SP1 最新电脑城极速装机版2018年8月(32位)ISO镜像下载
- 9电脑公司Ghost Win8.1 x32 精选纯净版2022年5月(免激活) ISO镜像高速下载
- 10新萝卜家园Ghost Win8.1 X32 最新纯净版2018年05(自动激活) ISO镜像免费下载
热门文章
- 1迅雷云播“手机看片神器”使用教程(随时随地秒速离线云播放)
- 2Win10怎么设置网络按流量计费 Win10网络设置流量收费教程
- 3微信公众号怎么年审? 微信公众号年审流程及所需材料介绍
- 4win7蓝屏代码7f指什 怎么解决 很严重
- 5二手笔记本电脑价格是多少 二手笔记本电脑价格盘点
- 6安卓手机安装运行win7系统教程 安卓手机装win7系统教程
- 7华硕b460主板装win7系统及bios设置教程 10代CPU安装Win7教程 BIOS设置 U盘启动 完美支持USB驱动
- 8高通骁龙8cx怎么样 高通骁龙8cx处理器详细介绍
- 9Steam提示“需要在线进行更新,请确认您的网络连接正常”怎么办?
- 10aoc一体机电脑win10改win7系统及bios设置
常用系统
- 1新萝卜家园 GhostWin7 SP1 电脑城极速稳定版2019年4月(32位) 最新版ISO镜像下载
- 2电脑公司 装机专用系统Windows10 x86喜迎国庆 企业版2020年10月(32位) ISO镜像快速下载
- 3电脑公司Ghost Win8.1 x32 精选纯净版2020年7月(免激活) ISO镜像高速下载
- 4电脑公司 装机专用系统Windows10 x64 企业版2019年12月(64位) ISO镜像高速下载
- 5电脑公司 装机专用系统Windows10 x64 企业装机版 版本1507 2022年3月(64位) ISO镜像高速下载
- 6新萝卜家园 GhostWin7 SP1 电脑城极速稳定版2020年12月(32位) ISO镜像高速下载
- 7深度技术Ghost Win8.1 x32位 特别纯净版2018年10(免激活) ISO镜像快速下载
- 8笔记本系统Ghost Win8.1 (X64) 全新纯净版2019年10月(永久激活) 提供下载
- 9深度技术 GHOSTXPSP3 电脑城极速装机版 2020年12月 ISO镜像高速下载
- 10电脑公司Ghost Win8.1 X64位 纯净版2021年3月(自动激活) ISO镜像快速下载