配置交换机交换机的配置命令

配置交换机  时间:2021-09-27  阅读:()

交换机参数设置

十几个人就有一台,没什么配置的 ruijie**>en 进入特权模式 ruijie**#config terminal 进入全局配置模式 ruijie**(config)#hostname switcha 命名交换机 switchA(config)#ip address 192.168.1.2 255.255.255.0 设置交换机IP switchA(config)#vlan 10 建立虚拟局域网 switchA(config)#name sales 命名 switchA(config)#interface f0/1 进入端口视图 switchA(config-if)#switchport ess vlan 10 把端口加入vlan 10 switchA(config-if)#exit 返回上级模式 switchA(config)#vlan 20 switchA(config)#name office switchA(config)#interface f0/16 switchA(config)#switchport ess vlan 20 隔离f0/1 f0/16端口 switchA(config)#interface f0/1 switchA(config)#speed 100 设置端口速度 ……

配置交换机主要配置那几个?

展开全部 端口,有多少台终端要用多少个端口,这是最简单的,然后看你要多大带宽的,现在一般可分为百兆、千兆、万兆三种,你能问这问题一定用不上万兆。

好果是几个终端或十几个终端百兆就够了,网吧用量的就用千兆的了,核心层交换机用万兆的。

在看你需要交换机有什么功能,傻瓜的就知道上面两点就可以了,需要其他功能的就看你需要什么功能了,建议直接找交换机销售人员去配。

交换机的基本配置

cisco交换机配置清除、启动及基本配置 CISCO交换机基本配置 switch>ena 进入特权模式 switch#erase nvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ------------------------------------------------------------------------------------ CISCO交换机基本配置:Console端口连接 用户模式hostname> ; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config;进入全局配置模式 switch(config)#hostname csico ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#write 保存配置设置 switch#copy running-config startup-config 保存配置设置,与write一样 switch#exit ;返回命令 配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时 switch#conf t switch(config)#line con 0 switch(config-line)#exec-timeout 0 --------------------------------------------------------------------------------- 交换机显示命令: switch#write ;保存配置信息 switch#show vtp ;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#show vlan ;查看vlan配置信息 switch#show vlan name vlan2 switch#show interface ;查看端口信息 switch#show int f0/0 ;查看指定端口信息 switch#show int f0/0 status;查看指定端口状态 switch#show interface status switch#dir flash: ;查看闪存 switch#show running-config switch(config)#do show running-config 显示存储在内存中的当前正确配置文件。

show startup-configuration:显示存储在非易失性存储器(NVRAM)的配置文件。

show users:显示所有连接到路由器的用户。

show hosts:显示主机名和地址信息。

switch(config)#do show interface switch(config-if)#do show int f0/21 switch#show arp switch#show mac-address-table ------------------------------------------------------------------------------ 2960交换机上配置,配置IP及网关 switch#conf t switch(config)#interface vlan1 进入vlan 1特殊接口配置模式 switch(config-if)#ip address 192.168.1.1 255.255.255.0 设置交换机的管理IP地址 switch(config)#ip default-gateway 192.168.1.1 设置交换机的网关地址 switch(config)#ip domain-name 设置交换机所连域的域名 switch(config)#no ip domain-name switch#ip name-server 218.87.18.230 设置交换机所连域的域名服务器IP switch#show int vlan 1 查看交换机的VLAN 1特殊接口配置信息 switch#show run 查看交换机的当前运行配置等全部信息 -------------------------------------------------------------------------------- 交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP: switch(config)#vlan 2 switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config)#speed ? 查看speed命令的子命令 switch(config)#speed 100 设置该端口速率为100mb/s (10/auto) switch(config-if)#do show int f0/21 显示21口配置信息 switch(config-if)#shut ;shutdown 关闭当前端口 switch(config-if)#no shut ;no shutdown 开启当前端口 switch(config)#duplex ? 查看duplex的子命令 switch(config)#duplex full 设置该端口为全双工(auto/half) switch(config)#description TO_PC1 这是该端口描述为TO_PC1 switch(config)#interface f0/21 switch(config-if)#switchport ess vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为trunk模式(ess模式) switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继 switch(config)#vtp domain vtpserver ;设置vtp域名相同 switch(config)#vtp password ;设置发vtp密码 switch(config)#vtp server ;设置vtp服务器模式 switch(config)#vtp client ;设置vtp客户机模式 --------------------------------------------------------------------------------------- 交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表: switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址 switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关 switch(config)#ip domain-name 设置域名 switch(config)#ip name-server 192.168.1.18 设置域名服务器 switch(config)#mac-address-table? 查看mac-address-table的子命令 switch(config)#mac-address-table aging-time 100 设置超时时间为100ms switch(config)#mac-address-table permanent f0/3 加入永久地址在f0/3端口 switch(config)#mac-address-table restricted static f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7 switch(config)#end switch#show mac-address-table 查看整个MAC地址表 switch#clear mac-address-table restricted static 清除限制性静态地址 ----------------------------------------------------------------------------------- 交换机端口加入vlan 将多个端口加入到VLAN2 switch(config)#interface range fa 0/17-24 switch(config-if-range)#switchport ess vlan 2 单个端口加入VLAN switch(config)#interface f0/1 switch(config-if-range)#switchport ess vlan 2 -------------------------------------------------------------------------------- 交换机的端口和MAC地址表的设置 2960交换机配置端口属性 switch#conf t switch#interface 0/1 进入第1个端口 switch#description switch-e0/1-pc1 给端口写入注释信息 switch#duplex auto/full/full-flow-control/half 设置端口的工作模式 switch#port secure 启用端口安全性 switch#port secure max-mac-count 1 设置该端口允许对应的MAC地址数(默认132个) switch#sh mac-address-table security 查看端口安全性 2912交换机配置端口属性 switch#conf t 进入全局配置模式 switch#interface 0/1 进入第1个端口 switch#description switch-f0/1-pc1 给端口写入注释信息 switch#duplex auto/full/half 设置端口的工作模式 switch#port security 启用端口安全性 switch#port security max-mac-count 1 设置该端口允许对应的MAC地址数(默认132个) switch#end 返回特权模式 switch#sh port security 查看端口安全性 配置和查看MAC地址表 1924交换机配置MAC地址表 switch#mac-address-table aging-time 600 设置动态地址超时时间 switch#mac-address-table permanent 0000.0cdd.5a4d e0/3 定义永久MAC地址(绑定MAC地址) switch#mac-address-table restricted static 0000.0cdd.aaed e0/6 e0/7 定义受限MAC地址 switch#address-violation disable/ignore/suspend 定义地址安全违规 switch#show mac-address-table 查看上述配置 switch#clear mac-addr restric static 清除受限MAC地址表项 2912交换机配置MAC地址表 switch#mac-address-table aging-time 700 设置动态地址超时时间 switch#mac-address-table static 0000.0cdd.5a4d e0/3 定义永久MAC地址(绑定MAC地址) switch#mac-address-table secure 00d0.f80d.3333 f0/3 vlan 1 定义受限MAC地址 switch#port security action shutdown/trap 定义地址安全违规 switch#show port security 查看上述配置 配置VTP、VLAN、VLAN Trunk和STP 配置VTP switch#conf t switch#vtp server 定义VTP的工作模式 switch#vtp domain cisco 定义VTP的域名 switch#trunk on 启用干道 switch#vtp domain cisco 加入VTP域 switch#vtp client 定义VTP的工作模式 switch#trunk on 启用干道 switch#show trunk b switch#show trunk b allowed-vlans 查看干道信息 配置VLAN switch#vlan 10 dept1 switch#vlan 20 dept2 switch#vlan 30 dept3 switch#vlan 40 dept4 定义所需VLAN switch#show vlan 查看VLAN信息 switch#show vlan switch#show vtp 查看VTP的信息 switch#int e0/1 switch#vlan-membership static 10 switch#int e0/2 switch#vlan-membership static 20 switch#int e0/3 switch#vlan-membership static 30 switch#int e0/4 switch#vlan-membership static 40 把接口划入各自VLAN 配置spanning tree switch#spantree 1 启用生成树协议 switch#sh spantree 1 查看生成树信息 switch#no spantree 1 关闭生成树协议 switch#sh spantree 1 查看生成树信息 交换机上屏蔽个别MAC地址方法 configure terminal interface 0/20 switchport sw mode sw port-sec sw port-sec mac-add [macaddress] sw port-sec max 1 sw port-sec violation restrict

配置交换机一般有哪几种方法 新的交换机一般使用哪种方式?

用CONSOLO口配置,用配置,用网管软件配置 用交换机自带的WEB界面配置,后面三种都需要一定的配置命令和一定的设备支持才能实行 新的当然得用CONSOLO口配置 傻瓜的另当别论

交换机的配置命令

1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable) set enalbepass 3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address mask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问: switch(enable) set interface sc0 mask broadcast-address switch(enable) set interface sc0 vlan switch(enable) set ip route default gateway 4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable 为了查看Cisco邻接设备的CDP通告信息: switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端口速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太网的链路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交换机上设置以太网的链路模式: switch(enable) set port duplex module/number {full|half} 8.在基于IOS的交换机上配置静态VLAN: switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)# interface interface module/number switch(config-if)# switchport mode ess switch(config-if)# switchport ess vlan vlan-num switch(config-if)# end 在基于CLI的交换机上配置静态VLAN: switch(enable) set vlan vlan-num [name name] switch(enable) set vlan vlan-num mod-num/port-list 9. 在基于IOS的交换机上配置VLAN中继线: switch(config)# interface interface mod/port switch(config-if)# switchport mode trunk switch(config-if)# switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于CLI的交换机上配置VLAN中继线: switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 10.在基于IOS的交换机上配置VTP管理域: switch# vlan database switch(vlan)# vtp domain domain-name 在基于CLI的交换机上配置VTP管理域: switch(enable) set vtp [domain domain-name] 11.在基于IOS的交换机上配置VTP 模式: switch# vlan database switch(vlan)# vtp domain domain-name switch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password 在基于CLI的交换机上配置VTP 模式: switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 12. 在基于IOS的交换机上配置VTP版本: switch# vlan database switch(vlan)# vtp v2-mode 在基于CLI的交换机上配置VTP版本: switch(enable) set vtp v2 enable 13. 在基于IOS的交换机上启动VTP剪裁: switch# vlan database switch(vlan)# vtp pruning 在基于CL I 的交换机上启动VTP剪裁: switch(enable) set vtp pruning enable 14.在基于IOS的交换机上配置以太信道: switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道: switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交换机上调整根路径成本: switch(config-if)# spanning-tree [vlan vlan-list] cost cost 在基于CLI的交换机上调整根路径成本: switch(enable) set spantree portcost moudle/port cost switch(enable) set spantree lancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交换机上调整端口ID: switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交换机上调整端口ID: switch(enable) set spantree portpri {mldule/port}priority switch(enable) set spantree lanpri {module/port}priority [vlans] 17. 在基于IOS的交换机上修改STP时钟: switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)# spanning-tree [vlan vlan-list] forward-time seconds switch(config)# spanning-tree [vlan vlan-list] max-age seconds 在基于CLI的交换机上修改STP时钟: switch(enable) set spantree hello interval[vlan] switch(enable) set spantree fwddelay delay [vlan] switch(enable) set spantree maxage agingtiame[vlan] 18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征: switch(config-if)#spanning-tree portfast 在基于CLI的交换机端口上启用或禁用Port Fast 特征: switch(enable) set spantree portfast {module/port}{enable|disable} 19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征: switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交换机端口上启用或禁用UplinkFast 特征: switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on] 20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name cv

GreenCloudVPS$20/年多国机房可选,1核@Ryzen 3950x/1GB内存/30GB NVMe/10Gbps端口月流量2TB

GreencloudVPS此次在四个机房都上线10Gbps大带宽VPS,并且全部采用AMD处理器,其中美国芝加哥机房采用Ryzen 3950x处理器,新加坡、荷兰阿姆斯特丹、美国杰克逊维尔机房采用Ryzen 3960x处理器,全部都是RAID-1 NVMe硬盘、DDR4 2666Mhz内存,GreenCloudVPS本次促销的便宜VPS最低仅需20美元/年,支持支付宝、银联和paypal。Gree...

wordpress外贸企业主题 wordpress经典外贸企业建站主题

WordPress经典外贸企业建站主题,经典配色扁平化简约设计+跨屏自适应移动端设备,特色外贸企业建站功能模块+在线Inquiry询单功能,更有利于Google等英文搜索优化和站点收录。采用标准的HTML5+CSS3语言开发,兼容当下的各种主流浏览器: IE 6+(以及类似360、遨游等基于IE内核的)、Firefox、Google Chrome、Safari、Opera等;同时支持移动终端的常用...

易探云:香港CN2云服务器低至18元/月起,183.60元/年

易探云怎么样?易探云最早是主攻香港云服务器的品牌商家,由于之前香港云服务器性价比高、稳定性不错获得了不少用户的支持。易探云推出大量香港云服务器,采用BGP、CN2线路,机房有香港九龙、香港新界、香港沙田、香港葵湾等,香港1核1G低至18元/月,183.60元/年,老站长建站推荐香港2核4G5M+10G数据盘仅799元/年,性价比超强,关键是延迟全球为50ms左右,适合国内境外外贸行业网站等,如果需...

配置交换机为你推荐
流量分析系统做流量分析的免费软件有吗手机软件开发教程自学软件开发教程oa地址请问中粮的OA系统地址是什么?网络培训系统远程培训具体是什么意思?会议管理平台会议推广用什么软件好app测试项目移动app做响应能力测试具体包括那些?三江学院图书馆三江东校区怎么样?网络布线方案网络布线方法上海第二工业大学地址上海第二工业大学怎么样啊?具体点啊机械毕业设计论坛机械创新设计论坛哪个好
网站服务器租用 www二级域名 域名备案信息查询 新网域名管理 stablehost kdata godaddy续费优惠码 免费网络电视 网盘申请 hnyd 河南服务器 服务器维护方案 刀片式服务器 电信网络测速器 lamp什么意思 云服务是什么意思 服务器防御 shuangcheng 架设代理服务器 海外加速 更多