思科三层交换机配置实例_第1页
思科三层交换机配置实例_第2页
思科三层交换机配置实例_第3页
思科三层交换机配置实例_第4页
全文预览已结束

下载本文档

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

文档简介

1、思科三层交换机配置实例Enable/进入特权模式Configureterminal/进入全局模式servicepassword-encryption/对密码进行加密hostnameCatalyst3550-12T1/给三层交换机定义名称enablepassword123456./enable密码Enablesecret654321/enable的加密密码(应该是乱码而不是654321这样)Ipsubnet-zero/允许使用全0子网(默认都是打开的)Ipname-server172.16.8.1172.16.8.2/三层交换机名字Catalyst3550-12T1对应的IP地址是172.16.

2、8.1Servicedhcp/提供DHCP服务iprouting/启用三层交换机上的路由模块ExitVtpmodeserver/定义VTP工作模式为sever模式Vtpdomaincentervtp/定义VTP域的名称为centervtpVian2namevlan2定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan3namevlan3Vlan4namevlan4Vlan5namevlan5Vlan6namevlan6Vlan7namevlan7Vlan8namevlan8Vlan9namevlan9ExitinterfacePort-channel1/

3、进入虚拟的以太通道组1switchporttrunkencapsulationdot1q/给这个接口的trunk封装为802.1Q的帧格式switchportmodetrunk定义这个接口的工作模式为trunkswitchporttrunkallowedvlanall/在这个trunk上允许所有的vlan通过Interfacegigabitethernet0/1/进入模块0上的吉比特以太口1switchporttrunkencapsulationdotlq/给这个接口的trunk封装为802.1Q的帧格式switchportmodetrunk/定义这个接口的工作模式为trunkswitchpo

4、rttrunkallowedvlanall/在这个trunk上允许所有的vlan通过channel-group1modeon/把这个接口放到快速以太通道组1中Interfacegigabitethernet0/2/同上switchporttrunkencapsulationdotlqswitchportmodetrunkswitchporttrunkallowedvlanallchannel-group1modeonport-channelload-balancesrc-dst-ip/定义快速以太通道组的负载均衡方式(依*源和目的IP的方式)interfacegigabitethernet0/

5、3/进入模块0上的吉比特以太口3switchporttrunkencapsulationdotlq/给trunk封装为802.1Qswitchportmodetrunk/定义这个接口的工作模式为trunkswitchporttrunkallowedvlanall/允许所有vlan信息通过interfacegigabitethernet0/4/同上switchporttrunkencapsulationdotlqswitchportmodetrunkswitchporttrunkallowedvlanallinterfacegigbitethernet0/5/同上switchporttrunke

6、ncapsulationdotlqswitchportmodetrunkswitchporttrunkallowedvlanallinterfacegigbitethernet0/6/同上switchporttrunkencapsulationdotlqswitchportmodetrunkswitchprottrunkallowedvlanallinterfacegigbitethernet0/7/进入模块0上的吉比特以太口7Switchportmodeaccess/定义这个接口的工作模式为访问模式switchportaccessvlan9定义这个接口可以访问哪个vlan(实际就是分配这个接

7、口到vlan)noshutdownspanning-treevlan6-9cost1000在生成树中,vlan6-9的开销定义为10000interfacerangegigabitethernet0/8-10进入模块0上的吉比特以太口8,9,10switchportmodeaccess/定义这些接口的工作模式为访问模式switchportaccessvlan8/把这些接口都分配到vlan8中noshutdownspanning-treeportfast在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interfacegigabitethe

8、rnet0/11/进入模块0上的吉比特以太口11switchporttrunkencapsulationdotlq/给这个接口封装为802.1Qswitchportmodetrunk/定义这个接口的工作模式为trunkswitchporttrunkallowedvlanall/允许所有vlan信息通过interfacegigabitethernet0/12/同上switchporttrunkencapsulationdotlqswitchportmodetrunkswitchporttrunkallowedvlanallinterfacevlan1/进入vlan1的逻辑接口(不是物理接口,用来

9、给vlan做路由用)ipaddress172.16.1.7255.255.255.0/配置IP地址和子网掩码noshutdownstandby1ip172.16.1.9开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9standby1priority110preempt/定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式interfacevlan2/同上ipaddress172.16.2.252255.255.255.0noshutdownstandby2ip172.16.2.254standby2priority110

10、preemptipaccess-group101in/在入方向上使用扩展的访问控制列表101interfacevlan3/同上ipaddress172.16.3.252255.255.255.0noshutdownstandby3ip172.16.3.254standby3priority110preemptipaccess-group101ininterfacevlan4/同上ipaddress172.16.4.252255.255.255.0noshutdownstandby4ip172.16.4.254standby4priority110preemptipaccess-group101

11、ininterfacevlan5ipaddress172.16.5.252255.255.255.0noshutdownstandby5ip172.16.5.254standby5priority110preemptipaccess-group101ininterfacevlan6ipaddress172.16.6.252255.255.255.0noshutdownstandby6ip172.16.6.254standby6priority100preemptinterfacevlan7ipaddress172.16.7.252255.255.255.0noshutdownstandby7i

12、p172.16.7.254standby7priority100preemptinterfacevlan8ipaddress172.16.8.252255.255.255.0noshutdownstandby8ip172.16.8.254standby8priority100preemptinterfacevlan9ipaddress172.16.9.252255.255.255.0noshutdownstandby9ip172.16.9.254standby9priority100preemptaccess-list101denyipany172.16.7.00.0.0.255/扩展的访问控

13、制列表101access-list101permitipanyanyInterfacevlan1/进入vlan1这个逻辑接口Iphelper-address172.16.8.1可以转发广播(helperaddress的作用就是把广播转化为单播,然后发向172.16.8.1)Interfacevlan2Iphelper-address172.16.8.1Interfacevlan3iphelper-address172.16.8.1interfacevlan4iphelper-address172.16.8.1interfacevlan5iphelper-address172.16.8.1interfacevlan6iphelper-address172.16.8.1interfacevlan7iphelper-address172.16.8.1interfacevlan9iphelper-address172.16.8.1routerrip/启用路由协议RIPversion2使用的是RIPv2,如果没有这句,则是使用RIPvlnetwork172.16.

温馨提示

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

评论

0/150

提交评论