手机
当前位置:查字典教程网 >软件教程 >网络通讯 >三层交换机配置实例及说明
三层交换机配置实例及说明
摘要:这个不像路由器那个,那个是showrun出来的,这个就是自己直接写的了。是我在毕业设计中,使用在汇聚层的三层交换机的配置。Enable//进...

这个不像路由器那个,那个是showrun出来的,这个就是自己直接写的了。是我在毕业设计中,使用在汇聚层的三层交换机的配置。

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.8.1

Servicedhcp//提供DHCP服务

iprouting//启用三层交换机上的路由模块

Exit

Vtpmodeserver//定义VTP工作模式为sever模式

Vtpdomaincentervtp//定义VTP域的名称为centervtp

Vlan2namevlan2//定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)

Vlan3namevlan3

Vlan4namevlan4

Vlan5namevlan5

Vlan6namevlan6

Vlan7namevlan7

Vlan8namevlan8

Vlan9namevlan9

Exit

interfacePort-channel1//进入虚拟的以太通道组1

Interfacegigabitethernet0/1//进入模块0上的吉比特以太口1

channel-group1modeon//把这个接口放到快速以太通道组1中

Interfacegigabitethernet0/2//同上channel-group1modeon

port-channelload-balancesrc-dst-ip//定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)

interfacegigabitethernet0/3//进入模块0上的吉比特以太口3

interfacegigabitethernet0/4//同上

interfacegigbitethernet0/5//同上

interfacegigbitethernet0/6//同上

interfacegigbitethernet0/7//进入模块0上的吉比特以太口7

noshutdown

spanning-treevlan6-9cost1000//在生成树中,vlan6-9的开销定义为10000

interfacerangegigabitethernet0/8–10//进入模块0上的吉比特以太口8,9,10

noshutdown

spanning-treeportfast//在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)

interfacegigabitethernet0/11//进入模块0上的吉比特以太口11

interfacegigabitethernet0/12//同上

interfacevlan1//进入vlan1的逻辑接口(不是物理接口,用来给vlan做路由用)

ipaddress172.16.1.7255.255.255.0//配置IP地址和子网掩码

noshutdown

standby1ip172.16.1.9//开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9

standby1priority110preempt//定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式

interfacevlan2//同上

ipaddress172.16.2.252255.255.255.0

noshutdown

standby2ip172.16.2.254

standby2priority110preempt

ipaccess-group101in//在入方向上使用扩展的访问控制列表101

interfacevlan3//同上

ipaddress172.16.3.252255.255.255.0

noshutdown

standby3ip172.16.3.254

standby3priority110preempt

ipaccess-group101in

interfacevlan4//同上

ipaddress172.16.4.252255.255.255.0

noshutdown

standby4ip172.16.4.254

standby4priority110preempt

ipaccess-group101in

interfacevlan5

ipaddress172.16.5.252255.255.255.0

noshutdown

standby5ip172.16.5.254

standby5priority110preempt

ipaccess-group101in

interfacevlan6

ipaddress172.16.6.252255.255.255.0

noshutdown

standby6ip172.16.6.254

standby6priority100preempt

interfacevlan7

ipaddress172.16.7.252255.255.255.0

noshutdown

standby7ip172.16.7.254

standby7priority100preempt

interfacevlan8

ipaddress172.16.8.252255.255.255.0

noshutdown

standby8ip172.16.8.254

standby8priority100preempt

interfacevlan9

ipaddress172.16.9.252255.255.255.0

noshutdown

standby9ip172.16.9.254

standby9priority100preempt

access-list101denyipany172.16.7.00.0.0.255//扩展的访问控制列表101

access-list101permitipanyany

Interfacevlan1//进入vlan1这个逻辑接口

Iphelper-address172.16.8.1//可以转发广播(helper-address的作用就是把广播转化为单播,然后发向172.16.8.1)

Interfacevlan2

Iphelper-address172.16.8.1

Interfacevlan3

iphelper-address172.16.8.1

interfacevlan4

iphelper-address172.16.8.1

interfacevlan5

iphelper-address172.16.8.1

interfacevlan6

iphelper-address172.16.8.1

interfacevlan7

iphelper-address172.16.8.1

interfacevlan9

iphelper-address172.16.8.1

routerrip//启用路由协议RIP

version2//使用的是RIPv2,如果没有这句,则是使用RIPv1

network172.16.0.0//宣告直连的网段

exit

iproute0.0.0.00.0.0.0172.16.9.250//缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器

linecon0

lineaux0

linevty015//telnet线路(路由器只有5个,是0-4)

password12345678//login密码

login

end

copyrunning-configstartup-config保存配置

-----------------------------------------------------------------------------

你配的是cisco3550三层交换机(做汇聚层),我看了一些高校的汇聚层都是光交换机,接入层才用cisco3550,我很想学学,不知你有没有一个完成的实例:从骨干层(双树或者环形)到汇聚层,再到接入层的网络配置,谢谢。

--------------------------------------------------------------------------------

一个Catalyst3550至少要3-5万,如果这个学校有1000个点,你算算需要多少个48口的3550?需要多少人民币呢?所以不现实。而且Catalyst3550是模块化的设备,可以加入光纤模块,同样可以支持光纤。而且配置中已经有gigabitethernet做为上行链路了。

核心层一般都是双树+快速以太通道做为冗余和容错的方式,环行一般用于城域网等,通常是FDDI。因为FDDI的双环结构提供充分的冗余,而且当环断了以后,还可以自己成为小环,提高了容错性。

【三层交换机配置实例及说明】相关文章:

主机和交换机端口位置的有效定位方法

网吧交换机的选购原则以及技术分析

交换机常见故障的一般分类和排障步骤

Cisco交换机4506密码恢复过程

路由故障不求人 实例讲解路由器故障分析

两条思科交换机的设置与技巧

Cisco交换机IOS升级故障排除

思科Cisco交换机VLAN的配置技巧

基础知识:理解网络交换机的原理

寻找交换机口令交换机密码恢复方法介绍

精品推荐
分类导航