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

配置交换机  时间: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

v5server:香港+美国机房,优质CN2网络云服务器,7折优惠,低至35元/月

v5net当前对香港和美国机房的走优质BGP+CN2网络的云服务器进行7折终身优惠促销,每个客户进线使用优惠码一次,额外有不限使用次数的终身9折优惠一枚!V5.NET Server提供的都是高端网络线路的机器,特别优化接驳全世界骨干网络,适合远程办公、跨境贸易、网站建设等用途。 官方网站:https://v5.net/cloud.html 7折优惠码:new,仅限新客户,每人仅限使用一次 9...

Vultr VPS韩国首尔机房速度和综合性能参数测试

Vultr 商家有新增韩国首尔机房,这个是继日本、新加坡之后的第三个亚洲机房。不过可以大概率知道肯定不是直连中国机房的,因为早期的日本机房有过直连后来取消的。今天准备体验看看VULTR VPS主机商的韩国首尔机房的云服务器的速度和性能。1、全球节点PING速度测试这里先通过PING测试工具看看全球几十个节点的PING速度。看到好像移动速度还不错。2、路由去程测试测试看看VULTR韩国首尔机房的节点...

云如故枣庄高防(49元)大内存2H2G49元8H8G109元

云如故是一家成立于2018年的国内企业IDC服务商,由山东云如故网络科技有限公司运营,IDC ICP ISP CDN VPN IRCS等证件齐全!合法运营销售,主要从事自营高防独立服务器、物理机、VPS、云服务器,虚拟主机等产品销售,适合高防稳定等需求的用户,可用于建站、游戏、商城、steam、APP、小程序、软件、资料存储等等各种个人及企业级用途。机房可封UDP 海外 支持策略定制 双层硬件(傲...

配置交换机为你推荐
云之秘境幻想世界之云之密境攻略科达视频会议科达视频会议系统是否支持指挥调度?数据库系统概论数据库系统概论(王珊)第四版这本好不好?对后续学习oracle作用大不大?宾馆客房管理系统宾馆客房管理系统哪家好?无线监控方案无线监控系统的设计方案及技术要求ibm磁盘阵列ibmds5020磁盘阵列怎么恢复出厂设置或者格式化例外招聘银行校园招聘和合同制柜员有什么区别?会议管理平台会议推广用什么软件好香港大陆香港和大陆有什么不同wap地带APN,CMNET,CMWAP代表什么?
绍兴服务器租用 网站域名备案 老域名全部失效请记好新域名 唯品秀 星星海 256m内存 网络星期一 外国域名 directadmin 免费名片模板 realvnc qq数据库下载 web服务器架设 圣诞促销 国外代理服务器地址 美国免费空间 免费智能解析 如何安装服务器系统 免费网页申请 江苏双线服务器 更多