华为三层交换机配置方法及命令

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

合同设计华为三层交换机配置方法(1)本文以河南平临高速所使用的华为华三通信的H3CS3600-28P-SI为例,配置前首先要确定型号后缀是SI还是EI,EI的支持所有协议,SI的不支持OSPS动态协议,因此SI配置路由时可以使用静态协议和RIP协议,具体配置如下:H3Csystem-view//进入系统视图[H3C]displaycurrent-configuration//显示当前配置//以下开始配置//第一步:划分VLAN,并描述vlan1descriptionlocal-S3600vlan2descriptionlink-to-wenquanvlan3descriptionlink-to-ruzhouvlan4descriptionlink-to-xiaotunvlan5descriptionlink-to-baofengvlan6descriptionlink-to-pingxivlan7descriptionlink-to-pingnanvlan8descriptionUplink-to-Putianvlan9descriptionlink-to-pingxicentre合同设计//第二步:给VLAN划网关interfaceVlan-interface2descriptionlinktowenquanipaddress10.41.77.41255.255.255.192interfaceVlan-interface3descriptionlinktoruzhouipaddress10.41.77.105255.255.255.192interfaceVlan-interface4descriptionlinktoxiaotunipaddress10.41.77.169255.255.255.192interfaceVlan-interface5descriptionlinktobaofengipaddress10.41.77.233255.255.255.192interfaceVlan-interface6descriptionlinktopingxiipaddress10.41.78.41255.255.255.192interfaceVlan-interface7descriptionlinktopingnanipaddress10.41.78.105255.255.255.192interfaceVlan-interface8descriptionuplinktoputianipaddress10.41.244.102255.255.255.252interfaceVlan-interface9descriptionlinktopingxicentreipaddress10.41.80.233255.255.255.192//第三步:给VLAN指定端口interfaceEthernet1/0/2descriptionlinktowenquanportaccessvlan2合同设计interfaceEthernet1/0/3descriptionlinktoruzhouportaccessvlan3interfaceEthernet1/0/4descriptionlinktoxiaotunportaccessvlan4interfaceEthernet1/0/5descriptionlinktobaofengportaccessvlan5interfaceEthernet1/0/6descriptionlinktopingxiportaccessvlan6interfaceEthernet1/0/7descriptionlinktopingnanportaccessvlan7interfaceEthernet1/0/8descriptionuplinktoputianportaccessvlan8interfaceEthernet1/0/9toEthernet1/0/24descriptionlinktopingxicentreportaccessvlan9//第四步:配置路由协议//(1)用RIP配动态路由ripnetwork10.41.77.41network10.41.77.105network10.41.77.169network10.41.77.233network10.41.78.41network10.41.78.105合同设计network10.41.80.233network10.41.244.102//(2)配静态路由(只用对远华为三层交换机配置命令分类:默认栏目2007.6.207:28作者:weiwei2501|评论:1|阅读:0Enable//进入私有模式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.1Servicedhcp//提供DHCP服务iprouting//启用三层交换机上的路由模块ExitVtpmodeserver//定义VTP工作模式为sever模式Vtpdomaincentervtp//定义VTP域的名称为centervtpVlan2namevlan2//定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan3namevlan3Vlan4namevlan4Vlan5namevlan5Vlan6namevlan6Vlan7namevlan7Vlan8namevlan8Vlan9namevlan9ExitinterfacePort-channel1//进入虚拟的以太通道组1合同设计Interfacegigabitethernet0/1//进入模块0上的吉比特以太口1channel-group1modeon//把这个接口放到快速以太通道组1中Interfacegigabitethernet0/2//同上channel-group1modeonport-channelload-balancesrc-dst-ip//定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)interfacegigabitethernet0/3//进入模块0上的吉比特以太口3interfacegigabitethernet0/4//同上interfacegigbitethernet0/5//同上interfacegigbitethernet0/6//同上interfacegigbitethernet0/7//进入模块0上的吉比特以太口7noshutdownspanning-treevlan6-9cost1000//在生成树中,vlan6-9的开销定义为10000interfacerangegigabitethernet0/8–10//进入模块0上的吉比特以太口8,9,10noshutdownspanning-treeportfast//在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interfacegigabitethernet0/11//进入模块0上的吉比特以太口11interfacegigabitethernet0/12//同上interfacevlan1//进入vlan1的逻辑接口(不是物理接口,用来给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.254standby2priority110preemptipaccess-group101in//在入方向上使用扩展的访问控制列表101interfacevlan3//同上ipaddress172.16.3.252255.255.255.0合同设计noshutdownstandby3ip172.16.3.254standby3priority110preemptipaccess-group101ininterfacevlan4//同上ipaddress172.16.4.252255.255.255.0noshutdownstandby4ip172.16.4.254standby4priority110preemptipaccess-group101ininterfacevlan5ipaddress172.16.5.252255.255.255.0noshutdownstandby5ip172.16.5.254standby5priority110preemptipaccess-group101ininterfacevlan6ipaddress172.16.6.252255.255.255.0noshutdownstandby6ip172.16.6.254standby6priority100preemptinterfacevlan7ipaddress172.16.7.252255.255.255.0noshutdownstandby7ip172.16.7.254standby7priority100preemptinterfacevlan8ipaddress172.16.8.252255.255.255.0noshutdownstandby8ip172.16.8.254standby8priority100preemptinterfacevlan9合同设计ipaddress172.16.9.252255.255.255.0noshutdownstandby9ip172.16.9.254standby9priority100preemptaccess-list101denyipany172.16.7.00.0.0.255//扩展的访问控制列表101access-list101permitipanyanyInterfacevlan1//进入vlan1这个逻辑接口Iphelper-address172.16.8.1//可以转发广播(helper-address的作用就是把广播转化为单播,然后发向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,如果没有这句,则是使用RIPv1network172.16.0.0//宣告

1 / 14
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功