思科交换机简单配置通用教程课件.ppt_第1页
思科交换机简单配置通用教程课件.ppt_第2页
思科交换机简单配置通用教程课件.ppt_第3页
思科交换机简单配置通用教程课件.ppt_第4页
思科交换机简单配置通用教程课件.ppt_第5页
已阅读5页,还剩27页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

思科交换机基本配置,研发七部,思科交换机基本介绍,交换机型号Catalyst2960系列交换机Catalyst3560系列交换机Catalyst3750系列交换机Catalyst4500系列交换机Catalyst4948系列交换机Catalyst6500系列交换机,3560系列交换机,三层交换机支持PoE(PoweroverEthernet)设备支持IPv6汇聚层交换机中型企业,Catalyst-3560G-24TS技术参数转发带宽:32Gbps每秒分组数:38.7Mpps支持的mac地址:12000支持的路由:11000千兆以太网SFP:410/100/1000端口:24不支持PoE,思科交换机测试中常用配置,交换机配置模式,用户模式Switch特权模式SwitchenableSwitch#全局模式Switch#configureterminalSwitch(config)#每次进入交换机时,首先会进入到用户模式下,在此模式下不能对交换机进行修改、甚至有些信息都无法查看,为了更进一步的对交换机进行操作,我们必须进入到特权模式或全局模式,而从用户模式下只能进入特权模式,再从特权模式进入全局模式,也就是说之中不能跨级。,更改主机名SwitchenSwitch#conftSwitch(config)#hostname12341234(config)#更改特权密码1234(config)#enablepassword1231234(config)#1234(config)#enablesecret2341234(config)#,查看全局配置Switch#showrunning-config保存当前配置Switch#copyrunning-configstartup-config恢复出厂默认Switch#erasestartup-configSwitch#reload,明文密码和密文密码Password1234#showrunning-confighostname1234enablepassword123Secret1234#showrunning-confighostname1234enablesecret5$1$CCFV$0DTd3rSPZNycrVDjn1rKv/(MD5加密的字符串)enablepassword123当明文和密文同时存在时,密文优先级高。,端口配置,全局模式下进入端口后,可以对端口进行配置。Switch#conftSwitch(config)#interfacegigabitEthernet0/1Switch(config-if)#批量修改端口range命令端口速率:Switch(config-if)#speed?10Force10Mbpsoperation100Force100Mbpsoperation1000Force1000MbpsoperationautoEnableAUTOspeedconfigurationSwitch(config-if)#speedautoSwitch(config-if)#,双工模式:Switch(config-if)#duplex?autoEnableAUTOduplexconfigurationfullForcefullduplexoperationhalfForcehalf-duplexoperationSwitch(config-if)#duplexautoSwitch(config-if)#端口描述Switch(config-if)#descriptionvlan10trunkSwitch(config-if)#,Vlan设置,Vlan设置范围:1-4094在全局模式下配置vlanSwitch#conftSwitch(config)#vlan10Switch(config-vlan)#namevlan10Switch(config-vlan)#vlan20Switch(config-vlan)#namevlan20Vlan名称可以自行定义Switch#showvlan查看vlan配置信息,vlan10配置192.168.10.1/24的ip地址Switch#conftSwitch(config)#vlan10Switch(config-vlan)#namevlan10Switch(config-vlan)#exitSwitch(config)#interfacevlan10Switch(config-if)#ipaddress192.168.10.1255.255.255.0Switch(config-if)#endSwitch#copyrunning-configstartup-config配置ip地址的命令格式:ipaddressip-addressnetmask,测试常用端口类型Access/trunk将此端口设置为vlan10的access口Switch(config-if)#switchportmodeaccessSwitch(config-if)#switchportaccessvlan10Switch(config-if)#将此端口设置为vlan10的trunk口Switch(config-if)#switchporttrunkencapsulationdot1qSwitch(config-if)#switchportmodetrunkSwitch(config-if)#switchporttrunkallowedvlan10,当一个端口允许多个vlan通过时,trunkallowedvlan中要添加各条vlan信息Switch(config-if)#switchporttrunkencapsulationdot1qSwitch(config-if)#switchportmodetrunkSwitch(config-if)#switchporttrunkallowedvlanallSwitch(config-if)#switchporttrunkallowedvlan10,50,60Switch(config-if)#switchporttrunkallowedvlanadd20(remove删除)Switch(config-if)#switchporttrunkallowedvlanadd30Switch(config-if)#switchporttrunkallowedvlanadd40Switch(config-if)#switchporttrunknativevlan1Switch(config-if)#noshutdownSwitch(config-if)#endSwitch#copyrunning-configstartup-config此端口为vlan10vlan20vlan30vlan40的trunk口,defaultvlan1经过此端口时不会带上标签。,光端口配置Switch(config)#interfacegigabitEthernet0/25Switch(config-if)#switchportmodeaccessSwitch(config-if)#switchportaccessvlan10Switch(config-if)#noshutdownSwitch(config-if)#endSwitch#copyrunning-configstartup-config注意:由于思科的交换机只自动识别自己品牌的光模块,所以如果用其他品牌的光模块,需在配置模式下输入一下两条命令,开启兼容性。serviceunsupported-transceivernoerrdisabledetectcausegbic-invalid命令输入完成后保存设置重启设备,17,可编辑,端口镜像配置,Cisco3560G配置全局配置下:Switch(config)#monitorsession1destinationinterfacegigabitEthernet0/1Switch(config)#monitorsession1sourceinterfacegigabitEthernet0/2bothSwitch(config)#monitorsession1sourceinterfacegigabitEthernet0/3bothmonitorsession1建立一个端口镜像组Destination监控端口Source镜像端口,DHCP配置,配置一个dhcp给vlan10内的主机分配地址Switch(config)#servicedhcpSwitch(config)#ipdhcppoolvlan10Switch(dhcp-config)#network192.168.10.0255.255.255.0Switch(dhcp-config)#default-router192.168.10.1Switch(dhcp-config)#dns-server192.168.10.2Switch(dhcp-config)#lease32020(天/小时/分钟)(缺省为1天)Switch(dhcp-config)#exitSwitch(config)#ipdhcpexcluded-address192.168.10.1192.168.10.19Switch(config)#ipdhcpexcluded-address排除某些地址,禁止被动态分配DHCP设置是针对全局的,不是定义在某个接口上的。DHCP调试命令Switch(config)#noservicedhcp关闭dhcp服务Switch#showipdhcpbinding查看dhcp分配情况,思科作DHCPserver给AP分地址在server中设置Option43、Option60字段信息。Switch(config)#ipdhcppoolvlan20Switch(dhcp-config)#network192.168.1.0255.255.255.0Switch(dhcp-config)#default-router192.168.1.1Switch(dhcp-config)#option43hex01060104c0a801e4Switch(dhcp-config)#option60hexxxxxxxxxxxxx(AC回的offer包中的信息)Switch(dhcp-config)#lease1Switch(dhcp-config)#endSwitch#copyrunning-configstartup-config,DHCPrelay配置,DHCPrelay功能可以汇聚处于不同广播域的客户端的DHCP请求,转发给DHCP服务器,并发送DHCP服务器的响应给各个客户端,也就是起到了DHCP报文在各个网段的转发功能。Cisco的设备需要启用iphelper-address命令,来实现此功能。配置了iphelper-address命令之后的交换机在中继DHCP请求时的工作过程如下:(1)DHCP客户端发送请求,由于没有IP地址,所以自己的源IP地址为0.0.0.0,而且也不知道目的DHCP服务器的地址,所以广播255.255.255.255。该数据报文中还包括源mac地址和目的mac地址(全F)。(2)当交换机接收到该数据包的时候,它就用自己的接口地址来取代源地址0.0.0.0,并且用iphelper-address命令置顶的地址来取代目的地址255.255.255.255。(3)当DHCP服务器接收到交换机转发过来的DHCP请求包时,它会做出响应,并且由交换机把数据包转发回客户端。,DHCPrelay配置Switch(config)#vlan100Switch(config-vlan)#namevlan100Switch(config-vlan)#intvlan100Switch(config-if)#iphelper-address192.168.1.228Switch(config-if)#exitSwitch(config)#servicedhcpSwitch(config)#ipdhcprelayinformationtrust-allSwitch(config)#endSwitch#copyrunning-configstartup-config,DHCPrelay功能测试实例:AClan端口开启dhcpserverdhcpserver1:192.168.20.10-192.168.20.100/24的地址,网关为192.168.20.1。dhcpserver2:192.168.30.10-192.168.30.100/24的地址,网关为192.168.30.1。AClan端口地址为192.168.1.228正确配置交换机和AC使AP获得相应地址并上线。,AClan,3560G,AP1,AP2,Vlan30,Vlan20,Vlan10,Cisco3560G配置interfaceGigabitEthernet0/1interfaceVlan10switchportaccessvlan10ipaddress192.168.1.1255.255.255.0switchportmodeaccess!interfaceGigabitEthernet0/2interfaceVlan20switchportaccessvlan20ipaddress192.168.20.1255.255.255.0switchportmodeaccessiphelper-address192.168.1.228!interfaceGigabitEthernet0/3interfaceVlan30switchportaccessvlan30ipaddress192.168.30.1255.255.255.0switchportmodeaccessiphelper-address192.168.1.228iproutingservicedhcpipdhcprelayinformationtrust-all,AC配置瘦AP端口地址:192.168.1.228255.255.255.0瘦AP端口DHCP:dhcpserver1:192.168.20.10-192.168.20.100/24的地址,网关为192.168.20.1。dhcpserver2:192.168.30.10-192.168.30.100/24的地址,网关为192.168.30.1。静态路由:目的地址0.0.0.0子网掩码0.0.0.0下一跳192.168.1.1,静态路由设置,Switch(config)#iprouting(全局路由)思科默认不开启Switch(config)#iproute192.168.2.0255.255.255.0192.168.1.1(静态路由格式:目的地址子网掩码下一跳)静态路由测试实例,AP通过dhcp方式上线,集中转发正常广播SSIDAC开启2个虚接口,STA连接vif1,Vif1属于vlan1地址192.168.10.1/24,vif2属于vlan2地址192.168.20.1/243560G1端口与AC的vif2相连,地址为192.168.20.2/243560G2端口与PC相连,地址为192.168.30.1/24PC的地址为192.168.30.1/24网关为192.168.30.1测试要求:STA正常获得地址并且与PC通信。,Cisco3560G配置interfaceVlan20ipaddress192.168.20.2255.255.255.0interfaceVlan30ipaddress192.168.30.1255.255.255.0iproute192.168.10.0255.255.255.0192.168.20.1iproutinginterfaceGigabitEthernet0/1switchportaccessvlan20switchportmodeaccessinterfaceGigabitEthernet0/2switchportaccessvlan30switchportmodeaccess,AC开启2个虚接口vif1、vif2,vif1开启dhcpserver功能,给STA分配地址,同时将vif1的地址设置为网关。同时配置静态路由目的地址192.168.30.0子网掩码255.255.255.0下一跳:192.168.20.2,测试实例,三层漫游在三层交换机上划分三个VLAN,VLAN10VLAN20VLAN30,其管理地址分别为192.168.10.1,192.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论