Cisco交换机配置教程
cisco交换机配置实例教程.doc

cisco交换机配置实例教程cisco交换机配置实例教程1、在交换机上启动QOSSwitch(config)#mls qos //在交换机上启动QOS2、分别定义PC1(10.10.1.1)和PC2(10.10.2.1)访问控制列表Switch(config)#access-list 10 permit 10.10.1.0 0.0.0.255 //控制pc1上行流量Switch(config)#access-list 100 permit any 10.10.1.0 0.0.0.255 //控制pc1下行流量Switch(config)#access-list 11 permit 10.10.2.0 0.0.0.255 //控制pc2上行流量Switch(config)#access-list 111 permit any 10.10.2.0 0.0.0.255 //控制pc2下行流量class-map mach-all {name}match access-group 110policy-mapclass二、详细配置过程注:每个接口每个方向只支持一个策略;一个策略可以用于多个接口。
因此所有PC的下载速率的限制都应该定义在同一个策略(在本例子当中为policy-map user-down),而PC不同速率的区分是在Class-map 分别定义。
1、在交换机上启动QOSSwitch(config)#mls qos //在交换机上启动QOS2、分别定义PC1(10.10.1.1)和PC2(10.10.2.1)访问控制列表Switch(config)#access-list 10 permit 10.10.1.0 0.0.0.255 //控制pc1上行流量Switch(config)#access-list 100 permit any 10.10.1.0 0.0.0.255 //控制pc1下行流量Switch(config)#access-list 11 permit 10.10.2.0 0.0.0.255 //控制pc2上行流量Switch(config)#access-list 111 permit any 10.10.2.0 0.0.0.255 //控制pc2下行流量3、定义类,并和上面定义的访问控制列表绑定Switch(config)# class-map user1-up //定义PC1上行的类,并绑定访问列表10Switch(config-cmap)# match access-group 10Switch(config-cmap)# exitSwitch(config)# class-map user2-upSwitch(config-cmap)# match access-group 11 //定义PC2上行的类,并绑定访问列表10Switch(config-cmap)# exitSwitch(config)# class-map user1-downSwitch(config-cmap)# match access-group 100 //定义PC1下行的类,并绑定访问列表100Switch(config-cmap)# exitSwitch(config)# class-map user2-downSwitch(config-cmap)# match access-group 111 //定义PC2下行的类,并绑定访问列表111Switch(config-cmap)# exit4、定义策略,把上面定义的类绑定到该策略Switch(config)# policy-map user1-up //定义PC1上行的速率为1MSwitch(config-pmap)# class user1-upSwitch(config-pmap-c)# trust dscpSwitch(config-pmap-c)# police 1024000 1024000 exceed-action dropSwitch(config)# policy-map user2-up //定义PC2上行的速率为2MSwitch(config-pmap)# class user2-upSwitch(config-pmap-c)# trust dscpSwitch(config-pmap-c)# police 2048000 1024000 exceed-action dropSwitch(config)# policy-map user-downSwitch(config-pmap)# class user1-downSwitch(config-pmap-c)# trust dscpSwitch(config-pmap-c)# police 1024000 1024000 exceed-action dropSwitch(config-pmap-c)# exitSwitch(config-pmap)# class user2-downSwitch(config-pmap-c)# trust dscpSwitch(config-pmap-c)# police 2048000 1024000 exceed-action dropSwitch(config-pmap-c)# exit5、在接口上运用策略Switch(config)# interface f0/1Switch(config-if)# service-policy input user1-upSwitch(config)# interface f0/2Switch(config-if)# service-policy input user2-upSwitch(config)# interface g0/1Switch(config-if)# service-policy input user-down看了cisco交换机配置实例教程还想看:1.思科交换机基本配置实例讲解2.CISCO交换机配置操作学习教程3.思科交换机配置教程详解4.cisco交换机qos配置实例教程5.思科路由器、交换机的基本管理教程6.Cisco 2960交换机的基础安装配置教程Cisco交换机入门配置的方法Cisco交换机入门配置的方法:机型:Cisco 3750想对交换机警醒配置。
思科交换机配置教程

思科交换机配置教程首先,我们需要登录到交换机的控制台界面。
可以通过串口连接,或者通过网络连接,例如通过SSH协议进行连接。
登录后,我们进入到交换机的命令行界面。
接下来,我们需要进行基本的配置。
思科交换机的配置是通过命令行界面进行的,配置的命令是不同的,但是有一些通用的配置信息,我们可以先进行配置。
首先,我们要为交换机设置一个主机名。
可以使用如下命令进行配置:```Switch(config)# hostname Switch1```这样就为交换机设置了一个名字为"Switch1"的主机名。
接下来,我们可以配置交换机的管理IP地址。
可以使用如下命令进行配置:```Switch(config)# interface vlan 1Switch(config-if)# ip address 192.168.1.1 255.255.255.0Switch(config-if)# no shutdown```这样就为交换机的VLAN1接口配置了一个IP地址为192.168.1.1,子网掩码为255.255.255.0,并且启用了这个接口。
除了基本配置信息,我们还需要进行一些其他的配置,例如VLAN的配置。
VLAN是虚拟局域网的意思,可以将交换机的端口划分到不同的VLAN中,实现不同VLAN之间的隔离。
可以使用如下命令进行VLAN的配置:```Switch(config)# vlan 10Switch(config-vlan)# name VLAN10Switch(config-vlan)# exitSwitch(config)# interface fastEthernet 0/1Switch(config-if)# switchport access vlan 10Switch(config-if)# exit```这样就创建了一个编号为10的VLAN,名称为"VLAN10"。
cisco模拟器交换机配置教程

1、进入用户模式,像这样有个大于符号的2、输入enable进入特权模式,像这样有个#号的3、输入configure terminal进入全局配置模式4、在全局配置模式下可以先设置特权密码,输入enablepassword 1235、接下来对vlan1的接口进行配置。
首先进入接口配置模式,输入interface vlan 16、现在开始配置vlan 1 的管理ip 和子网掩码。
输入ipaddress 192.168.1.1 255.255.255.07、将vlan1 设置为活跃状态。
输入no shut8、退出当前模式进入全局配置模式。
输入exit9、接下来是设置远程登录密码。
首先进入line配置模式,输入line vty 0 4(PS:这里VTY(Virtual Type Terminal)是虚拟终端的意思,line vty 0 4表示设置0到4号5个端口为远程登录端口,设置为0 3,0 2,0 1完全是可以的)10、然后设置密码。
输入password jfb11、输入了密码当然要保存!在上一步的基础上输入login12、然后输入end返回特权模式,再输入show running查看我们对交换机的配置情况13、设置正确。
14、现在就是对pc配置ip 和子网掩码(192.168.1.2255.255.255.0)15、连接一根直通双绞线。
16、接下来激动人心的时刻到来了,在命令提示符中输入ping192.168.1.1,是不是通了,如果没有可多试几次!17、更激动人心的时刻是在下面。
输入telnet 192.168.1.118、输入远程登录密码jfb,看看是不是远程登录成功了19、输入enable ,提示输入密码,该密码为特权密码,前面设置的123看看是不是进入特权模式了!20、现在你就可以对交换机进行配置了MY GOD``````。
Cisco思科光纤交换机配置说明.doc

Cisco思科光纤交换机配置说明Cisco思科光纤交换机配置说明的方法1. 初始化信息首次设置,必须通过console进行连接(需要U口转DB9针的接口线,专门卖接口线的有卖大约30元),然后进行初始化设计,以后设定IP后可通过LAN进行登陆具体步骤:(红色字体部分着重注意,需要进行设置,大部分按照默认设置即可,而且设置的部分进入管理工具软件可以更改) ---- System Admin Account Setup ----Enter the password for admin : passwordConfirm the password for admin : password--- Basic System Configuration Dialog ---This setup utility will guide you through the basic configuration of the system. Setup configures only enough connectivity for management of the system.Press Enter at any time to skip any dialog. Use ctrl-c at anytime to skip the remaining dialogs.Would you like to enter the basic configuration dialog (yes/no): y Create another login account (yes/no) [n]:Configure read-only SNMP community string (yes/no) [n]: Configure read-write SNMP community string (yes/no) [n]:Enter the switch name: Pxx-MDS-x (where xx is your pod number and x is the switch number; for example:P01-MDS-1)Continue with Out-of-band (mgmt0) management configuration? (yes/no) [y]:Mgmt0 IPv4 address : 10.0.x.y (where x is your pod number and y is 5 for MDS-1 and 3 for MDS-2)(客户)0.16Mgmt0 IPv4 netmask : 255.255.255.0Configure the default gateway? (yes/no) [y]:IPv4 address of the default gateway : 10.0.x.254 (where x is your pod number)Configure advanced IP options? (yes/no) [n]:Enable the telnet service? (yes/no) [y]:Enable the ssh service? (yes/no) [n]:Configure the ntp server? (yes/no) [n]:Configure default switchport interface state (shut/noshut) [shut]: (注意一下)noshutConfigure default switchport trunk mode (on/off/auto) [on]:Configure default zone policy (permit/deny) [deny]:Enable full zoneset distribution (yes/no) [n]:NOTE:初始设定的配置对新的VSAN起作用,即原始VSAN1无这些配置解决办法:1 zone default-zone permit VSAN2 新建NEW VSAN2 将port转移VSAN2里面。
CISCO交换机配置手册

CISCO交换机配置手册V1.0作者:乖乖猪目录前言 (4)第一章交换机配置基础 (5)1.1配置方式 (5)第二章交换机基本配置 (6)2.1用户认证 (6)2.1.1特权口令 (6)2.1.2VTY口令 (7)2.2设备名称 (7)2.3SNMP网管串 (7)2.4交换机管理IP (7)2.5综合实验 (7)第三章交换机高级配置 (8)3.1VLAN(虚拟局域网) (8)3.1.1简介 (8)3.1.2命令 (46)3.1.3案例一(VTP方式) (49)3.1.4案例二(VTP方式) (50)3.2STP(生成树协议) (53)3.2.1简介 (53)3.2.2命令 (68)3.2.3案例一(PVST/PVST+ / Rapid -PVST+ 常用) (69)3.2.4案例二(MST VLAN数量大使用) (72)3.2.5案例三(STP 不常用) (74)3.3E THER C HANNEL (77)3.3.1简介 (77)3.3.2命令 (80)3.3.3案例一(强制模式) (81)3.3.4案例二(PAGP模式) (83)3.3.5案例三(LACP模式) (85)3.3.6案例四(交换机与服务器) (86)3.3.7案例五(三层模式) (95)3.4963.4.1简介 (96)3.4.2命令 (97)3.4.3案例一 (98)3.4.4案例二 (113)3.4.5案例三 (117)3.5VRRP (121)3.5.1简介 (121)3.5.2命令 (126)3.5.3案例一 (127)3.5.4案例二 (135)3.6DHCP (136)3.6.1简介 (136)3.6.2命令 (143)3.6.3案例一 (143)3.6.4案例二 (145)3.6.5案例三 (146)3.7VACL(不常用) (148)3.7.1简介 (149)3.7.2命令 (149)3.7.3案例 (151)3.8端口限速 (155)3.8.1简介 (155)3.8.2案例一(三层交换机QOS) (155)3.8.3案例二(三层交换机风暴控制) (157)第四章日常维护 (159)4.1密码恢复 (159)4.1.1CatOS交换机密码恢复 (159)4.1.2CATALYST 2900,3500XL的密码恢复 (161)4.1.3CATALYST 2940,2950L的密码恢复 (162)4.1.4CATALYST 2955的密码恢复 (162)4.1.5CATALYST 3550,3560,3750的密码恢复 (164)4.1.6CATALYST 6500密码恢复 (165)4.2ISO备份升级 (174)4.2.1TFTP方式 (174)4.2.2Xmodem方式 (176)4.3端口镜像 (178)4.3.1简介 (178)4.3.2命令 (179)4.3.3案例 (182)4.4交换机堆叠 (190)4.4.1简介 (190)4.4.2命令 (194)4.4.3案例一(3750) (196)第五章专业术语解释 (201)5.1冲突域、广播域 (201)5.2CSMA/CD (202)5.3交换机的几种主要技术参数详解和计算 (203)5.4POE (210)前言本手册是作者多年学习整理汇编而成,主要目的是方便大家设备调试使用。
Cisco交换机一般配置Vlan设置

一、开机1、如是新设备,开机需跳过系统默认配置模式,进入手动配置模式;2、进入用户模式,系统提示符为>,此模式只能查看统计信息,无配置功能;3、用户模式下,输入enable,进入特权模式,系统提示符为;二、一些常用设置1、设置enable密码configenablesecretXXX2、设置主机名confighostnameXXX3、关闭http访问confignohttpserver4、关闭密码明文显示configservicepassword-encryption5、配置consol口密码configlinecon0config-linepasswordXXXconfig-lineloginconfig-lineexit6、关闭telnet访问configlinevty04config-linenopasswordconfig-lineexit7、关闭VLAN1configinterfacevlan1config-ifshutdownconfig-ifexit三、创建VLAN10vlan1设备自动生成,不能更改、删除方法1:vlandatabasevlanvlan10nameXXXvlanapple方法2:nameXXX就是命名Vlanconfigureterminalconfigvlan10config-vlannameXXXconfig-vlanexit四、Vlan配置configureterminalconfig-ifinterfacevlan10------进入Vlan10config-ifipaddress---config-ifnoshutdown------开启端口config-ifdescriptionXXX-----描述名XXX,只支持英文config-ifexit-----退出五、添加Vlan到某个端口configureterminalconfiginterfacerangegigabitEthernet0/16----进入端口16 config-if-rangnoshutdown-------开启端口config-if-rangswitchportmodeaccess--------------将交换机端口转换为ACCESS模式config-if-rangswitchportaccessvlan10--------在16端口允许Vlan10通过config-if-rangexit-------退出六、单独修改某个Vlan网关config-ifinterfacevlan10--进入Vlan10config-ifipaddress------七、创建ACL规则,标准ACLconfigipaccess-listextendedswj ACL规则名config-ext-nacl0.0.0----拒绝vlan30的用户访问vlan10资源八、将ACL应用到vlan10configinterfacevlan10--创建vlan10的SVI接口config-ifipaccess-groupswjin--将扩展ACL应用到vlan10的SVI接口下九、保存copyrun-configurestart-configure。
思科交换机的基本配置

思科交换机的基本配置随着Internet的高速发展,网络规模不断膨胀,对于从事网络专业的学生熟练掌握路由器和交换机的配置已显得十分重要。
接下来是小编为大家收集的思科交换机的基本配置方法,希望能帮到大家。
思科交换机的基本配置的方法一、交换机的基本配置Author:chenchao in ZJNU从本篇文章开始,将连载大概8-9篇自己学习交换与路由的实验报告,但是怕自己能力不行,会出现错误,所以,先载两篇文章,依次为:交换机的基本配置;路由器基本配置。
本篇为交换机的基本配置,使用的仿真软件是Cisco的一款免费软件:Cisco Packet Tracer。
想学习的可以在百度自行下载。
下面开始附上实验过程:实验环境:Cisco 2950交换机1台,Console电缆1根,PC机一台,网线1根。
连接如下图所示:实验步骤:一、交换机的带外配置;1、在用户模式、特权模式、全局模式、接口模式之间转换;Switch>enableSwitch#configure terminalEnter configuration commands, one perline. End with CNTL/Z.Switch(config)#interface FastEthernet 0/1Switch(config-if)#exitSwitch(config)#exitSwitch#%SYS-5-CONFIG_I: Configured from console byconsoleSwitch#exitSwitch con0 is now availablePress RETURN to get started.Switch>2、将交换机的名称改为“student”;Switch(config)#hostname studentstudent(config)#3、为交换机各个模式设置密码“cisco”;特权模式下的密码保护student#enablestudent#configure tEnter configuration commands, one perline. End with CNTL/Z.student(config)#enable password ciscostudent(config)#enable secret cisco1远程登录口令设置student#configure tEnter configuration commands, one perline. End with CNTL/Z.student(config)#line console 0student(config-line)#line vty 0 4student(config-line)#password cisco2student(config-line)#loginstudent(config-line)#student#4、为交换机制定一个IP地址10.10.10.X/24;student#configConfiguring from terminal, memory, ornetwork [terminal]?Enter configuration commands, one perline. End with CNTL/Z.student(config)#interface vlan 1student(config-if)#ip address 10.10.10.1255.0.0.05、开启交换机的Telnet服务功能,建立Telnet用户admin,口令cisco,并制定只能从10.10.10.y/24登录Telnet服务器;student#student#configure tEnter configuration commands, one perline. End with CNTL/Z.student(config)#user admin password 0 ciscostudent(config)#6、查看配置情况;student>enablePassword:student#show running-cBuilding configuration...hostname student!enable secret 5$1$mERr$q.MA2tj.WFptzvbifq/1i.enable password cisco!!username admin password 0 ciscointerface Vlan1ipaddress 10.10.10.1 255.0.0.0!!line con 0!line vty 0 4password cisco2loginline vty 5 15login!!End二、交换机的端口配置:1、配置接口的描述、关闭借口、启动接口、配置接口的速度为100Mbps、配置接口工作模式为全双工、配置接口的流程控制;student#configure terminalEnter configuration commands, one perline. End with CNTL/Z.student(config)#interface FastEthernet0/1student(config-if)#shutdown%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to administratively down%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to downstudent(config-if)#student(config-if)#exitstudent(config)#interface FastEthernet0/1student(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to up%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to upstudent(config-if)#speed 100student(config-if)#duplex full%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to down%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to downstudent(config-if)#2、配置接口FastEthernet0/10为Access口;student#student#configure terminalEnter configuration commands, one perline. End with CNTL/Z.student(config)#interface FastEthernet0/10student(config-if)#switchport mode accessstudent(config-if)#3、配置接口FastEthernet0/12为Trunk口;student#student#configure tEnter configuration commands, one perline. End with CNTL/Z.student(config)#interface fastethernet0/12student(config-if)#switchport mode Trunkstudent(config-if)#end4、查看配置情况;!interface FastEthernet0/1duplex fullspeed100!!interface FastEthernet0/9!interface FastEthernet0/10switchport mode access!interface FastEthernet0/11!interface FastEthernet0/12switchport mode trunk!student#show running-cBuilding configuration...Current configuration : 1275 bytes!version 12.1no service timestamps log datetime msecno service timestamps debug datetime msec no service password-encryption!hostname student!enable secret 5$1$mERr$q.MA2tj.WFptzvbifq/1i. enable password cisco!!username admin password 0 cisco!!duplex fullspeed 100!interface FastEthernet0/2 !interface FastEthernet0/3 !interface FastEthernet0/4 !interface FastEthernet0/5 !interface FastEthernet0/6 !interface FastEthernet0/7 !interface FastEthernet0/8 !interface FastEthernet0/9 !interface FastEthernet0/10 switchport mode access !interface FastEthernet0/11 !interface FastEthernet0/12 switchport mode trunk!interface FastEthernet0/13 !!interface FastEthernet0/15!interface FastEthernet0/16!interface FastEthernet0/17!interface FastEthernet0/18!interface FastEthernet0/19!interface FastEthernet0/20!interface FastEthernet0/21!interface FastEthernet0/22!interface FastEthernet0/23!interface FastEthernet0/24!interface GigabitEthernet1/1 !interface GigabitEthernet1/2 !interface Vlan1ipaddress 10.10.10.1 255.0.0.0 !!line con 0!line vty 0 4password cisco2loginline vty 5 15login!!end看了“思科交换机的基本配置”还想看:。
CISCO交换机基本配置和使用概述

CISCO交换机基本配置和使用概述CISCO交换机是一种常用的网络设备,用于构建局域网(Local Area Network,LAN)。
它可以通过物理线路的连接,将多台计算机或其他网络设备连接到同一个网络中,实现数据的传输和共享。
CISCO交换机的基本配置包括IP地址的配置、VLAN的配置、端口配置、安全性配置等。
接下来,我们将对这些配置进行详细说明。
首先,IP地址的配置是CISCO交换机的基本操作之一。
通过配置IP地址,我们可以对交换机进行管理和监控。
具体的配置步骤如下:1. 进入交换机的配置模式。
在命令行界面输入"enable"命令,进入特权模式。
2. 进入全局配置模式。
在特权模式下输入"configure terminal"命令,进入全局配置模式。
3. 配置交换机的IP地址。
在全局配置模式下输入"interfacevlan 1"命令,进入虚拟局域网1的接口配置模式。
然后输入"ip address 192.168.1.1 255.255.255.0"命令,配置交换机的IP地址和子网掩码。
4. 保存配置并退出。
在接口配置模式下输入"exit"命令,返回到全局配置模式。
然后输入"exit"命令,返回到特权模式。
最后输入"copy running-config startup-config"命令,保存配置到闪存中。
其次,VLAN的配置是CISCO交换机的关键配置之一。
通过配置VLAN,我们可以将交换机的端口划分为不同的虚拟局域网,实现数据的隔离和安全。
1. 进入交换机的配置模式。
同样,在特权模式下输入"configure terminal"命令,进入全局配置模式。
2. 创建VLAN。
在全局配置模式下输入"vlan 10"命令,创建一个编号为10的VLAN。
思科Cisco交换机配置手册配置教程

配置接口特性这一章详细说明交换机上的接口和描述怎么配置他们。
这章有以下这些内容:●理解接口类型●使用接口命令●配置二层接口●监控和维护第二层接口●配置第三从接口注意:需要完整的有关该章的语法和应用信息,请参考Catalyst 3550 Multilayer Switch Command Reference和Cisco IOS Interface Command Referencefor Release 12.1.理解接口类型这个部分描述了不同的接口类型,以及其它章节所包括的详细配置这些接口的一些参考内容。
其他章节描述了物理接口特性的配置过程。
这部分包括:•基于端口的VLAN (Port-Based VLANs)•交换端口(Switch Ports)•以太网通道端口组(EtherChannel Port Groups)•交换虚拟接口(Switch Virtual Interfaces)•被路由端口(Routed Ports)•连接接口(Connecting Interfaces)基于端口的VLAN (Port-based Vlans)一个Vlan是一个按功能、组、或者应用被逻辑分段的交换网络,并不考虑使用者的物理位置。
要更多关于Vlan的信息请看“Configuring VLANS”。
一个端口上接受到的包被发往属于同一个Vlan的接收端口。
没有一个第三层的设备路由Vlan间的流量,不同Vlan的网络设备无法通讯。
为了配置普通范围(Normal-range) Vlan(Vlan IDs 1-1005),使用命令:config-vlan模式(global) vlan vlan-id或vlan-configuration模式(exec) vlan database针对Vlan ID 1-1005的vlan-configration模式被保存在vlan数据库中。
为配置扩展范围(extended-range) Vlans (Vlan ID 1006-4094),你必须使用config-vlan模式,并把VTP的模式设为transparent透明模式。
思科交换机简单配置(通用教程)

• 双工模式: Switch(config-if)#duplex ? auto Enable AUTO duplex configuration full Force full duplex operation half Force half-duplex operation
Switch(config-if)#duplex auto Switch(config-if)# • 端口描述 Switch(config-if)#description vlan 10 trunk Switch(config-if)#
配置ip地址的命令格式: ip address {ip-address} {netmask}
测试常用端口类型Acce来自s / trunk将此端口设置为vlan10 的access口 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)# 将此端口设置为vlan10 的trunk口 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk allowed vlan 10
Vlan设置
• Vlan设置范围:1---4094 • 在全局模式下配置vlan Switch#conf t Switch(config)#vlan 10 Switch(config-vlan)#name vlan10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#name vlan20 Vlan名称可以自行定义
如何正确进行思科交换机配置

如何正确进行思科交换机配置如何正确进行思科交换机配置当前很多的思科交换机的用户对于思科交换机的具体配置方法并不是多么清楚了解。
以下就是店铺分享正确进行思科交换机配置的方法,希望对大家有帮助!一般有两种方法:1、控制台端口(Console):可以直接对交换机进行Cisco交换机配置。
2、远程登录(Telnet):通过TELNET程序对已经设置了IP的交换机进行远程配置,一般等控制台端口配置好交换机的IP后才可以进行。
除了以上的两种方法外,其实还有两种方法:1、WEB的配置方式,此方法只能是Cisco交换机配置的一般设置。
2、硬件自带的应用程序,专用的程序,一般很少用。
建立控制台连接到交换机,一般交换机自带一根Console线,一端连接到交换机的Comsole口,一端连接到电脑的串行口。
打开超级终端,一般就可以连接到交换机。
具体的参数设置如下,这样就可以连接到交换机了。
连接到交换机后,如果是第一次启动会要执行初始化操作,一般是设置交换机的名称,密码等一般的信息。
由于交换机已经初始化,如果要进行初始化操作,那就要进入特权EXEC模式。
在命令提示符号下输入:setup,就会启动初始化操作。
刚才讲到了特权EXEC模式,这理就要讲一下觉换机的几种模式,不同的模式可以执行不同的操作命令,首先来说两种基本的模式。
一般为了安全考虑,CISCO将操作会话分为两个不同的访问级别:用户EXEC级别和特权EXEC级别。
用户EXEC级别只能使用有限的命令,且交换机显示Switch>提示符,不能进行Cisco交换机配置。
看例子,处于用户EXEC级别下的状态:AITG_FrontekCoreSW>。
特权EXEC级别下交换机显示Switch#提示符,能对交换机进行各种配置。
看例子,处于特权EXEC级别下的'状态:输入en,进入特权EXEC级别,接着输入密码,进入特权EXEC级别。
看看,提示符变了,用户在用户EXEC级别输入enable(或en),然后输入密码,就可以进入特权EXEC级别,在交换机提示符下输入“?”,可以列出相应模式下交换机所支持的所有命令。
思科交换机实用配置步骤详解

1. 交换机支持的命令:交换机基本状态:switch: ;ROM 状态,路由器是rommon>hostname> ; 用户模式hostname# ; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 接口状态交换机口令设置:switch>enable ; 进入特权模式switch#config terminal ; 进入全局配置模式switch(config)#hostname ; 设置交换机的主机名switch(config)#enable secret xxx ; 设置特权加密口令switch(config)#enable password xxa ; 设置特权非密口令switch(config)#line console 0 ; 进入控制台口switch(config-line)#line vty 0 4 ; 进入虚拟终端switch(config-line)#login ; 允许登录switch(config-line)#password xx ; 设置登录口令xxswitch#exit ; 返回命令精选文库vla n switch#vla n database ;switch(vla n)#vla n 2 ;switch(vla n)#no via n 2 ;switch(co nfig)# int fO/1 ;进入VLAN设置建VLAN 2删vlan 2进入端口 1switch(co nfig-if)#switch portaccess vla n 2 ;switch(co nfig-if)#switch port mode trunk ;switch(co nfig-if)#switch port trunk allowed vla n 1switch(c on fig-if)#switch port trunk encap dot1q ;switch(co nfig)#vt p domai n ;switch(c on fig)#vt p p assword ;switch(c on fig)#vt p mode server ;switch(co nfig)#vt p mode clie nt ;交换机设置IP地址:switch(co nfig)#i nterface vla n 1 ;switch(c on fig-if)# ip address ;switch(c on fig)# ip default-gateway ;当前端口加入vlan 2设置为干线设置发vtp域名设置发vtp密码设置发vtp模式设置发vtp模式进入vlan 1设置IP地址设置默认网关,2;设置允许的设置vlan中继交换机VLAN设置:精选文库switch#dir flash:; 查看闪存交换机显示命令:switch#write ; 保存配置信息switch#show vtp ; 查看vtp配置信息switch#show run ; 查看当前配置信息switch#show via n ; 查看vian配置信息switch#show in terface ; 查看端口信息switch#show int fO/0 ; 查看指定端口信息2.路由器支持的命令:路由器显示命令:router#show run ; 显示配置信息router#show in terface ; 显示接口信息router#show ip route ; 显示路由信息router#showcd p nei ; 显示邻居信息router#reload ;重新起动路由器口令设置:router>e nable ; 进入特权模式router#c onfig term inal ; 进入全局配置模式router(c on fig)#host name ; 设置交换机的主机名router(c on fig)#e nable secret xxx ; 设置特权加密口令router(c on fig)#e nable p assword xxb ; 设置特权非密口令router(c on fig)#li ne con sole 0 ; 进入控制台口router(c on fig-li ne)#li ne vty 0 4 ; 进入虚拟终端router(c on fig-li ne)#logi n ; 要求口令验证router(c on fig-li ne)# password xx ; 设置登录口令xxrouter(c on fig)#(Ctrl+z); 返回特权模式router#exit ; 返回命令路由器配置:router(c on fig)#i nt sO/0 ; 进入Serail接口router(c on fig-if)# no shutdow n ; 激活当前接口router(co nfig-if)#clock rate 64000 ; 设置同步时钟router(c on fig-if)# ip address ; 设置IP地址router(c on fig-if)#i p address sec ond ; 设置第二个IP router(co nfig-if)#i nt f0/0.1 ; 进入子接口router(c on fig-subif.1)# ip address ; 设置子接口IProuter(c on fig-subif.1)#e neap sulati on dotlq ; 绑定vian中继协议router(c on fig)#c on fig-register 0x2142 ; 跳过配置文件router(c on fig)#c on fig-register 0x2102 ; 正常使用配置文件router#reload ; 重新引导路由器文件操作:router#c opy runnin g-c onfig start up-config ; 保存配置router#c opy runnin g-c onfig tftp ; 保存配置到tftprouter#c opy start up-config tftp ; 开机配置存到tftprouter#c opy tftp flash:; 下传文件到flashrouter#c opy tftp start up-config; 下载配置文件ROM状态:Ctrl+Break ; 进入ROM监控状态rommon>confreg 0x2142 ; 跳过配置文件rommon>confreg 0x2102 ; 恢复配置文件rommon> reset ;重新引导rommon>copy xmodem: flash:;从con sole传输文件rommo n>IP_ADDRESS=10.65.1.2 ; 设置路由器IPrommo n>IP_SUBNET_MASK=255.255.0.0 ; 设置路由器掩码rommon> TFT P_SERVER=10.65.1.1 ; 指定TFTP服务器IP rommo n>TFT P_FILE=c2600.bin ; 指定下载的文件rommon>tftpdnld ; 从tftp 下载rommon> dir flash:; 查看闪存内容rommon>boot ; 弓丨导IOS。
Cisco(思科)交换机常用配置

…………………………………………………………………Cisco交换机相关设置…………………………………………………………………一、常用设置SW 〉用户模式SW 〉enable 进入特权模式SW # 特权模式SW # config terminal 进入全局配置模式SW(config)# 全局配置模式SW(config)# enable password 123 设置特权非加密密码为123 SW(config)# enable secret 123 设置特权加密密码为123 SW # show running-config (或sh run )查看当前配置SW # wr 保存当前配置SW(config)#no ip domain lookup 关闭域名查找SW(config)# hostname huarun 将交换机名改为huarun SW # reload 重启交换机二、端口配置1,基本配置(以端口1为例)SW(config)# interface fastethernet 0/1 进入交换机1端口(百兆)SW(config-if) # speed 10/100/auto 速率为10M/100M/自动SW(config-if) # duplex full/half/auto 模式为全双工/半双工/自动SW(config-if) # description caiwu 对端口描述SW(config-if) # end 退出端口配置SW# sh interface fastethernet 0/1 查看端口1的配置情况2,端口与主机MAC地址绑定(以端口1为例)SW(config)# interface fastethernet 0/1SW(config-if)# switchport mode accessSW(config-if)# switchport port-securitySW(config-if)# switchport port-security maximum 1SW(config-if)# switchport port-security mac-address mac地址3,端口镜像(端口1为目的端口——即监听端口;端口2和端口3为源端口——即被监听端口)SW(config)# interface fastethernet 0/1SW(config-if)# port monitor fastethernet 0/2SW(config-if)# port monitor fastethernet 0/34,端口汇聚(又叫做端口聚合)(以交换机的1口和2口为例)SW(config)# interface fastethernet 0/1SW(config-if)# switchport mode trunk(如果有多个vlan,需要配置,没有的话就不用了)SW(config-if)# speed 100SW(config-if)# duplex fullSW(config-if)# channel-group 1 mode onSW(config)# interface fastethernet 0/2SW(config-if)# switchport mode trunkSW(config-if)# speed 100SW(config-if)# duplex fullSW(config-if)# channel-group 1 mode on或者SW(config)#interface range fastethernet 0/1 -2SW(config-range-if)# speed 100SW(config-range-if)# duplex fullSW(config-range-if)# channel-group 1 mode on三、HSRP配置(hot standby router protocol)以华润地产为例:2台3750交换机,就一个vlan——默认的vlan1,路由器接2台3750交换机(做HSRP),每台3750都与内网汇聚交换机(huawei)相连接。
cisco3560思科交换机常用配置教程与实例

1.1路由器的几个操作模式Router>//用户模式Router>enable//用户模式敲入enable进入特权模式Router#configure terminal//特权模式敲入configure terminal进入全局配置模式Router(config)#interface ethernet 0//配置模式敲入interface+接口类型+接口编号,进入接口配置模式(如:interface serial 0 或是interface serial 0/1 ,interface fast1/1,接口编号是多少具体要看是哪个型号的设备)Router (config)#interface range fa 0/2 – 5//利用range可以一次操作多个端口Router(config-if)#exit //从接口模式退出到配置模式Router(config)#exit//从配置模式退出到特权模式注意:任何时候按Ctrl-z或是end都会退出到特权模式1.2命名主机名Router(config)#hostname 主机名//路由默认主机名为Router,交换机为switch如:Router(config)#hostname Wisdom//设置主机名是WisdomWisdom(config)#1.3给路由器设置时间Wisdom(config)#clock set 23:46:50 sep 4 2006Wisdom#show clock//用show clock 命令查看时间1.8.利用TELNET来管理网络首先通CONSOLE口控制R1,控制R1后通过TELNET到R2,R3,对R2,R3进行管理.在R1上实验:R1#telnet 12.1.1.2//从R1 TELNET到R2R2>按<Ctrl-Shift-6>x 切换回R1R1#telnet 13.1.1.3//从R1 TELNET到R3R3>按<Ctrl-Shift-6>x 切换回R1R1#show sessions//在R1上查看打开了多少个TELNET的会话Conn Host Address Byte Idle Conn Name1 12.1.1.2 12.1.1.2 0 0 12.1.1.2* 2 13.1.1.3 13.1.1.3 0 0 13.1.1.3R1#resume 2//重新连接到R3R3>按<Ctrl-Shift-6>x 切换回R1R1#R1#disconnect 1//从R1是主动断开到R2的连接(断开一个TELNET的会话)在R2上实验:R2#show users//在R2上查看有谁登录到路由器Line User Host(s) Idle Location* 0 con 0 idle 00:00:002 vty 0 idle 00:01:52 12.1.1.1R2#clear line 2//发现有人TELNET过来,把他清除R2#show usersLine User Host(s) Idle Location* 0 con 0 idle 00:00:00注意:Show session和show user的区别Disconnect 和Clear line的区别Ctrl+shift+6 x 和resume1.9 PING、TraceRoute、Debug、Sysloga.使用PING命令R1#ping 12.1.1.2如果ping的结果是!!!!!则表明网络正常.如果ping的结果是…..则表明网络不通.如果ping的结果是U.U.U则表明下一跳不可达.b.使用traceroute命令, 在网络层上追踪源到目的地址所经过的路由器.(或是数据包经过的路径)例:R2#traceroute 33.1.1.3Tracing the route to 33.1.1.31 12.1.1.1 4 msec 4 msec 4 msec2 13.1.1.34 msec 4 msec *//从以上可以看出从R2 到达33.1.1.3经过了12.1.1.1和13.1.1.3两个路由器例:………………………………………………………………………………………………………………….3.3使用串口管理交换机。
CISCO交换机配置操作学习教程(2024)

通过命令`interface <端口类型> <端口号 >`进入端口配置模式。
设置端口属性
可设置端口的速率、双工模式、流控等属性 。
2024/1/27
启用/禁用端口
通过命令`no shutdown`或`shutdown`启用 或禁用端口。
14
VLAN概念及划分方法
2024/1/27
01
20
04
路由配置与IP地址规划
2024/1/27
21
静态路由配置方法
配置静态路由基本命令
使用`ip route`命令配置静态路由 ,指定目标网络和下一跳地址或 出口接口。
静态路由的优缺点
优点是配置简单、占用资源少; 缺点是缺乏灵活性,当网络拓扑 发生变化时需要手动更新路由表 。
静态路由适用场景
适用于小型、稳定的网络环境, 或者作为动态路由协议的补充, 用于特定路由的精确控制。
02 进入全局配置模式
在特权EXEC模式下输入 `configure terminal`命令,进 入全局配置模式,此时可以对 交换机进行各种配置。
03
配置主机名
在全局配置模式下输入 `hostname <hostname>`命令 ,为交换机配置主机名,方便识 别和管理。
04
配置接口
在全局配置模式下输入 `interface <interface-type> <interface-number>`命令,进 入接口配置模式,然后可以对该 接口进行各种配置,如设置IP地 址、启用/禁用接口等。
防止DoS攻击
通过限制特定流量的速率或数量,防 止DoS攻击对交换机造成影响。
配置思科交换机

交换机集群可以提高网络的性能和可管理性,同时简化网络管 理和配置。
THANKS FOR WATCHING
感谢您的观看
配置登录验证方式
在全局配置模式下输入 "login authentication < 用户名>"命令配置登录验 证方式。
02 VLAN配置
创建VLAN
总结词
在思科交换机上创建VLAN,需要进入特权执行模式,并使用`vlan`命令。
详细描述
首先,通过控制台或SSH连接到交换机,然后输入`enable`进入特权执行模式。接下来,使用`vlan`命令创建 VLAN,并为其分配一个ID。例如,要创建一个ID为10的VLAN,可以输入`vlan 10`。
配置思科交换机
目 录
• 交换机基本配置 • VLAN配置 • 交换机安全配置 • 交换机高级配置
01 交换机基本配置
登录交换机
连接交换机
通过控制台线或Telnet 连接到交换机。
登录提示
进入特权模式
在登录提示符下输入用 户名和密码进行登录。
输入"enable"命令进入 特权模式。
配置模式
在特权模式下输入 "configure terminal" 命令进入配置模式。
配置VLAN间通信
总结词
为了实现VLAN之间的通信,需要配置 VLAN间路由和三层交换。
VS
详细描述
在配置了VLAN间路由之后,还需要启用三 层交换来允许VLAN之间的通信。使用`ip routing`命令启用IP路由,然后使用 `interface vlan`命令进入VLAN接口配置模 式。在每个VLAN接口上配置IP地址和其他 相关的网络参数,以便在该VLAN之间进行 通信。例如,要为VLAN 10配置IP地址为 192.168.10.1的IP地址,可以输入 `interface vlan 10`,然后`ip address 192.168.10.1 255.255.255.0`。
Cisco交换机配置教程

C i s c o交换机配置教程 IMB standardization office【IMB 5AB- IMBK 08- IMB 2C】C i s c o交换机配置教程Cisco交换机在网络届处于绝对领先地位,高端冗余设备(如:冗余超级引擎,冗余负载均衡电源,冗余风扇,冗余系统时钟,冗余上连,冗余的交换背板),高背板带宽,高多层交换速率等都为企业网络系统的高速稳定运行提供良好解决方案。
这就是为什么大型企业都选择Cisco交换机做核心层和分布层等主要网络设备。
被过滤广告Cisco分为高中低端交换机,分别面向不同层次。
但是多数Cisco交换机都基于Cisco自家的IOS(InternetOperatingSystem)系统。
所以设置都是大同小异。
让我们从零开始,一步一步教大家学会用Cisco交换机。
第一步:利用电脑超级终端与交换机建立连接可进行网络管理的交换机上有一个“Console”端口,它是专门用于对交换机进行配置和管理的。
可以通过Console端口连接和配置交换机。
用Cisco自带的Console线,RJ-45端接入Cisco交换机Console口,Com口端接入电脑Com1或Com2口,必须注意的是要记清楚接入的是那个Com口。
按照步骤开启超级终端:开始-程序-附件-通讯-超级终端(图2)(图2)点击文件-新建连接(图3)(图3)?输入超级终端名称,选择数据线所连端口(注意选择Com口时候要对应Console线接入电脑的Com口):图4?(图4)确定-点击还原为默认值(图5)(图5)?确定后开启交换机此时交换机开始载入IOS,可以从载入IOS界面上看到诸如IOS版本号,交换机型号,内存大小等数据当屏幕显示PressRETURNtogetstarted的时候按回车就能直接进入交换机第二步:学习交换机的一些初级命令首先我们要知道Cisco配置界面分两种,一种是基于CLI(Command-lineInterface命令行界面),一种是基于IOS(InternetworkOpertingSystem互联网操作系统)。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
C i s c o交换机配置教程 The latest revision on November 22, 2020
Cisco交换机配置教程
Cisco交换机在网络届处于绝对领先地位,高端冗余设备(如:冗余超级引擎,冗余负载均衡电源,冗余风扇,冗余系统时钟,冗余上连,冗余的交换背板),高背板带宽,高多层交换速率等都为企业网络系统的高速稳定运行提供良好解决方案。
这就是为什么大型企业都选择Cisco交换机做核心层和分布层等主要网络设备。
被过滤广告Cisco分为高中低端交换机,分别面向不同层次。
但是多数Cisco交换机都基于Cisco自家的IOS( Internet Operating System )系统。
所以设置都是大同小异。
让我们从零开始,一步一步教大家学会用Cisco交换机。
第一步:利用电脑超级终端与交换机建立连接
可进行网络管理的交换机上有一个“Console”端口,它是专门用于对交换机进行配置和管理的。
可以通过Console端口连接和配置交换机。
用Cisco自带的Console线,RJ-45端接入Cisco交换机Console口,Com口端接入电脑Com1或Com2口,必须注意的是要记清楚接入的是那个Com口。
按照步骤开启超级终端:开始-程序-附件-通讯-超级终端(图2)
(图2)点击文件-新建连接(图3)
(图3)
输入超级终端名称,选择数据线所连端口(注意选择Com口时候要对应Console线接入电脑的Com口):图4
(图4)
确定-点击还原为默认值(图5)
(图5)
确定后开启交换机
此时交换机开始载入IOS,可以从载入IOS界面上看到诸如IOS版本号,交换机型号,内存大小等数据
当屏幕显示Press RETURN to get started的时候按回车就能直接进入交换机
第二步:学习交换机的一些初级命令
首先我们要知道Cisco配置界面分两种,一种是基于CLI(Command-line Interface 命令行界面),一种是基于IOS(Internetwork Operting System 互联网操作系统)。
暂时我们先探讨基于IOS的Cisco交换机。
基于IOS的交换机有三种模式,“>”用户模式,“#”特权模式,“(CONFIG)#”全局模式,在用户模式输入enable进入特权模式,在特权模式下输入disable回到用户模式,在特权模式下输入configure terminal进入全局模式。
在特权模式下输入disable回到特权模式下。
刚进入交换机的时候,我们处于用户模式,如:switch>。
在用户模式我们可以查询交换机配置以及一些简单测试命令。
在用户模式输入号可以查询可以运行的命令。
出现命令过多不能全部显示可以用Enter键逐行显示,空格键整页翻动。
对于一个默认未配置的交换机来说,我们必须对一些命名,密码和远程连接等进行设置,这样可以方便以后维护。
hostname [hostname] /*设置交换机名如:switch(config)#hostname switch
ip address [ip address ][netmask] /*设置IP地址如:switch(config)#ip address
ip default-gateway [ip address] /*设置交换机的缺省网关如:
switch(config)#ip default-gateway
enable password level [1-15] [password] /*设置密码如:
switch(config)#enable password ll 1 cisco
需要注意的是在设计拓扑图的时候要对相关交换机设定容易管理人员识别的交换机名称,设置的密码是区分大小写的。
level 1 代表登陆密码 ll 15 代表全局模式。
在完成一些基本设置后,可以用Show命令查看交换机的信息:
show version /*查看系统硬件的配置,软件版本号等。
show running-config /*查看当前正在运行的配置信息
show interfaces /*查看所有端口的配置信息
show interfaces [端口号] /*查看具体某个端口号的配置信息
show interfaces status /*查看所有端口的状态信息
show interfaces [端口号] switchport /*显示二层端口的状态,可以用来决定此口是否为二层或三层口
show ip /*查看交换机的IP信息。