还剩12页未读,继续阅读
本资源只提供10页预览,全部文档请下载后查看!喜欢就下载吧,查找使用更方便
文本内容:
华为三层交换机配置方法
(1)本文以河南平临高速所使用的华为华三通信的为例,配置前首先要H3C S3600-28P-SI确定型号后缀是还是的支持所有协议,的不支持动态协议,因此SI ELEI SIOSPS SI配置路由时可以使用静态协议和协议,具体配置如下RIP〃进入系统视图H3Csystem-view〃显示当前配置[H3C]display current-configuration〃以下开始配置〃第一步划分并描述VLAN,vlan1description local-S3600vlan2description link-to-wenquanvlan3description link-to-ruzhouvlan4description link-to-xiaotunvlan5description link-to-baofengvlan6description link-to-pingxivlan7description link-to-pingnanvlan8description Uplink-to-Putianvlan9第二步给划网关description link-to-pingxicentre//VLANinterface Vlan-interface2微的差别,但目前的版本已和兼容,下面首先介绍软件的升级方法,然后给VRP
1.1CISCO VRP出配置上的说明
一、软件升级操作VRP升级前用户应了解自己路由器的硬件配置以及相应的引导软件的版本,因为这关bootrom系到是否可以升级以及升级的方法,否则升级失败会导致路由器不能运行在此我们以从升级到为例说明升级的方法VRP
1.0VRP
1.
1.路由器配置电缆一端与机的串口一端与路由器的口连接1PC console.在下建立使用直连线的超级终端,参数如下2win95/98波特率数据位停止位无效验,无流控,终端类型9600,8,1,VT
100.超级终端连机后打开路由器电源,屏幕上会出现引导信息,在出现3Press Ctrl—B toenter Boot Menu.时三秒内按下会提示输入密码Ctrl+b,Please inputBootrom password:默认密码为空,直接回车进入引导菜单在该菜单下选即BootMenu,1,Download application升级软件,之后屏幕提示选择下载波特率,我们一般选择随即出现提示program VRP38400bps,信息Download speedis38400bps.Please changethe terminaPsspeed to38400bps,and selectXMODEMprotocol.Press ENTERkey whenready.此时进入超级终端“属性”,修改波特率为修改后应断开超级终端的连接,再进入连接38400,状态,以使新属性起效,之后屏幕提示Downloading...CCC这表示路由器已进入等待接收文件的状态,我们可以选择超级终端的文件“发送”功能,选定相应的软件文件名,通讯协议选之后超级终端自动发送文件到路由器中,整个传送过VRP Xmodem,程大约耗时分半钟完成后有提示信息出现,系统会将收到的软件写入8VRP Flash覆盖原来的系统,此时整个升级过程完成,系统提示改回超级终端的波特率Memory Restoretheterminals speedto9600bps.Press ENTERkey whenready.修改完后记住进行超级终端的断开和连接操作使新属性起效,之后路由器软件开始启动,用命令将看见相应的版本信息show ver下面是与互通时应注意的地方CISCO
二、在默认链路层封装上的区别主要用于的配置DDN.华为及其以前的版本,在配置时,由于的默认链路层封装格式为而1VRP
1.0CISCO HDLC,华为路由器的默认链路层封装格式为因此为了能互通,需要将路由器的封装格式改为PPP,CISCO格式,即使用命令PPPencapsulation PPP,华为及其以后的版本,增加了封装格式这样,不需要改动的封装2VRP
1.1HDLC CISCO格式,而将华为路由器的封装格式改为封装格式即可,即使用命令HDLC encapsulationhdlc
三、在配置上的区别X.25,华为及其以前的版本在配置时,由于的默认封装格式为它自己的标准1VRP
1.0CISCO X25而华为路由器的封装格式为国际标准因此为了能互通,需要将路由器的封装格式改为IETF,CISCO格式,即使用命令ietfencapsulation x25ietf,华为及其以后的版本,特地增加了与兼容的封装格式这样,不需要改动2VRP
1.1CISCO的封装格式,而将华为路由器的封装格式改为兼容封装格式即可,即使用命令CISCO X25CISCOencapsulation x25cisco
四、在配置帧中继上的区别Frame-Relay,华为及其以前的版本,由于的默认封装格式为公司自己的标准;1VRP
1.0CISCO FRCISCO而华为路由器的封装格式为国际标准另外,由于在帧中继本地管理信息类型的配置上,IETF LMI默认也是使用它自己的格式,而华为路由器使用的是国际标准的格式,因此为了能CISCO Q.933a互通,需要将路由器的封装格式改为将改为格式才能互通,即使用CISCO FRIETF,LMI Q.933a命令encapsulation frame—realy ietfframe—realy Imi—type q933a.华为及其以后的版本,特地增加了与兼容的封装格式,以及的格2VRP
1.1CISCO FRLMI式这样,不需要改动的封装,而只需将华为路由器的封装格式和类型改为CISCO FRLMI CISCO兼容格式即可,即使用命令encapsulation frame—relay ciscoframe—relay Imi-type cisco以上各点,是在华为与互连时应着重注意的,如果用户的链路封装不是CISCO CISCO国际标准而是它自己的格式,而且用户又不愿修改配置,则在华为一端一定要作相应CISCO的改变华为MPLS配置l.mpls lsr-id x.x.x.x指定的LSR ID
2.mpls Idp激活协议并进入视图LDP LDP
3.remote-peer local-ip x.x.x.xlocal-ip remote-ip x.x.x.xremote-ip配置配置必须配置LDP Remote-peer,LDP remote-peer local-ip
4.loop-detect允许进行环路检测
5.hops-count hop-numbe设置环路检测最大跳数,设置环路检测的最大跳数,缺省情况下没有配置环路检测最大跳数
6.path-vectors pv-number设置路径向量的最大值,当环路检测采用路径向量方式时,也需要规定的最大值这样,在以LSP下条件之一时即认为出现了环路,建立失败LSP路径向量记录表中已有本的记录1LSR路径的跳数超过这里设定的最大值
27.mpls Idpenable在接口使能LDP
8.mpls Idptimer{keepalive keepalive-holdtime|hello hello-holdtime}设置接口会话保持参数报文的缺省定时时间为秒,报文的缺省定时时LDP Keepalive60Hello间为秒15在不支持广播报文的链路层协议如帧中继、上,必须要使用命令・ATM mapip{ip address配置属性,以支持广播和组播报[ip-mask]|default|inarp[minutes]}[broadcast]broadcast文的传递★★★★★★★★★★★★★★★★★★★★★★★★★★★****************************************要实现的功能一般需要完成以下步骤BGP/MPLS VPN在、、上配置基本信息;PE CEP建立到的具有能力的逻辑或物理的链路;PE PEIP发布、更新信息VPN的配置包括BGP/MPLS VPN定义BGP/MPLS VPN进入协议地址族视图间路由交换的配置PE-CE间路由交换的配置PE-PE创建并进入实例视图
1.VPNip vpn-instance vpn-instance-name为创建路由和转发表
2.vpn-instanceroute-distinguisher route-distinguisher在与自治系统号相关时,是由一个自治系统号和一个任意的数组成在与RD ASNRD RD地址相关时,是由一个地址和一个任意的数组成IP RDIP有以下格式RD位位用户自定义数,例如16ASN32100:1位地址位用户自定义数,例如32IP16为仓建扩展团体
3.vpn-instance UVPN Targetvpn-target vpn-target-ext-community[import-extcommunity|export-extcommunity|both]限制一个中最大路由数
4.vpn-instancerouting-table limitlimit{warn threshold|simply-alert}将接口与关联
5.vpn-instanceip binding vpn-instance vpn-instance-name在实施接口与的绑定时,需要在接口上先执行命令,再配vpn-instance ip bindingvpn-instance置地址,否则已经配置的地址会因为执行命令而被删除IP IPipbindingvpn-instance请在视图下进行下列配置BGPipv4-family vpn-instance vpn-instance-nameipv4-family vpnv4[unicast]间路由交换的配置PE-CE和间通过静态路由链接的配置
1.PE CEip route-static vpn-instance vpn-instance-name prefixmask[next-hop-address][interface{interface-number}][public|preference preference|blackhole|reject]和间通过交换路由信息的配置
2.PE CEEBGPpeer peer-address as-number as-number间路由交换的配置PE-PE配置自治系统号
1.peer{peer-address|group-name}as-number as-number配置允许内部会话使用任何可操作的连接接口
2.BGP TCPpeer{peer-address|group-name}connect-interface interface-type interface-name配置是否激活对等体组
3.peer{group-name|peer-address}enable配置向对等体组发送缺省路由
4.peer{peer-address|group-name}default-route-advertise配置在发布路由时将自身地址作为下一跳
5.peer{peer-address|group-name}next-hop-local配置传送更新报文时不携带私有自治系统号
6.BGPpeer{peer-address|group-name}public-as-onlydescription linkto wenquaninterfaceVlan-interface3description linkto ruzhouinterfaceVlan-interface4description linkto xiaotuninterfaceVlan-interface5description linkto baofenginterfaceVlan-interface6description linkto pingxiinterfaceVlan-interface7description linkto pingnaninterfaceVlan-interface8description uplinkto putianinterfaceVlan-interface9description linkto pingxicentre〃第三步给指定端口VLANinterface Ethernet1/0/2description linkto wenquanport access vlan2interface Ethernet1/0/3portaccess vlan3interface Ethernet1/0/4description linkto xiaotunportaccess vlan4interface Ethernet1/0/5description linkto baofengportaccess vlan5interface Ethernet1/0/6description linkto pingxiportaccess vlan6interface Ethernet1/0/7description linkto pingnanportaccess vlan7interface Ethernet1/0/8description uplinkto putianportaccess vlan8interface Ethernet1/0/9to Ethernet1/0/24description linkto pingxicentreportaccessvlan9〃第四步配置路由协议〃()用配动态路由1RIPrip05()配静态路由(只用对远network
10.
41.
244.102//2华为三层交换机配置命令分类:默认栏目
2007.
6.207:28作者weiwei2501|评论1|阅读0Configure terminal〃进入全局模式Enable〃进入私有模式〃对密码进行加密service password-encryption〃给三层交换机定义名称hostname Catalyst3550-12T1//enable密码enable password
123456.//enable的加密密码(应该是乱码而不是654321这样)Enable secret654321Ip subnet-zero〃允许使用全0子网(默认都是打开的)Ip name-server
172.
16.
8.
1172.
16.
8.2〃三层交换机名字Catalyst3550-12T1对应的IP地址是
172.
16.
8.1Service dhcp〃提供DHCP服务ip routing〃启用三层交换机上的路由模块ExitVtp modeserver〃定义VTP工作模式为sever模式Vtp domaincentervtp〃定义VTP域的名称为centervtpVian2name vlan2〃定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002Vian3name vlan3Vian4name vlan4Vian5name vlan5Vian6name vlan6Vian7name vlan7Vian8name vlan8Vian9name vlan9Exit〃进入虚拟的以太通道组1Interface gigabitethernet0/1channel-group1〃进入模块0上的吉比特以太口1mode on〃把这个接口放到快速以太通道组1中Interface gigabitethernet0/2port-channel〃同上channel-group1mode onload-balance src-dst-ipinterface Port-channel1〃定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)interface gigabitethernet0/3〃进入模块0上的吉比特以太口3interface gigabitethernet0/4〃同上interface gigbitethernet0/5〃同上interface gigbitethernet0/6〃同上interface gigbitethernet0/7〃进入模块0上的吉比特以太口7no shutdownspanning-tree vlan6~9cost1000〃在生成树中,vlan6-9的开销定义为10000interface rangegigabitethernet0/8-10〃进入模块0上的吉比特以太口8,9,10noshutdownspanning-tree portfast〃在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interface gigabitethernet0/11〃进入模块0上的吉比特以太口11interface gigabitethernet0/12〃同上interface vlan1〃进入vlanl的逻辑接口(不是物理接口,用来给vlan做路由用)ip address
172.
16.
1.
7255.
255.
255.0〃配置IP地址和子网掩码no shutdownstandby1ip
172.
16.
1.9〃开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为
172.
16.
1.9standby1priority110preempt〃定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式interface vlan2〃同上ip address
172.
16.
2.
252255.
255.
255.0no shutdownstandby2priority110preemptip access-group101in〃在入方向上使用扩展的访问控制列表101interface vlan3〃同上ip address
172.
16.
3.
252255.
255.
255.0no shutdownstandby3ip
172.
16.
3.254standby3priority110preemptip access-group101ininterface vlan4〃同上ip address
172.
16.
4.
252255.
255.
255.0no shutdownstandby4ipstandby4priority110preemptip access-group101ininterface vlan5ip address
172.
16.
5.
252255.
255.
255.0no shutdownstandby5ip
172.
16.
5.254standby5priority110preemptip access-group101ininterface vlan6ip address
172.
16.
6.
252255.
255.
255.0no shutdownstandby6ip
172.
16.
6.254standby6priority100preemptinterface vlan7ip address
172.
16.
7.
252255.
255.
255.0no shutdownstandby7ip
172.
16.
7.254standby7priority100preemptinterface vlan8ip address
172.
16.
8.
252255.
255.
255.0no shutdownstandby8ip
172.
16.
8.254standby8priority100preempt interface vlan9ip address
172.
16.
9.
252255.
255.
255.0no shutdownstandby9ip
172.
16.
9.254standby9priority100preemptaccess-list101deny ipany
172.
16.
7.
00.
0.
0.255//扩展的访问控制列表101access-list101permit ipany anyInterface vlan1〃进入vlanl这个逻辑接口Ip helper-address
172.
16.
8.1〃可以转发广播(helper—address的作用就是把广播转化为单播,然后发向
172.
16.
8.1)Interfacevlan2Interface vlanip helper-address
172.
16.
8.1interface vlan4interface vlan5ip helper-address
172.
16.
8.1ip helper-address
172.
16.
8.1interface vlan6interfacevlan7ip helper-address
172.
16.
8.1ip helper-address
172.
16.
8.1router rip〃启用路由协议RIPinterface vlan9version2〃使用的是RIPv2,如果没有这句,则是使用RIPvlnetwork
172.
16.
0.0〃宣告直连的网段exitip route
0.
0.
0.
00.
0.
0.
0172.
16.
9.250〃缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为
172.
16.
9.250这个路由器line con0line aux0line vty015〃telnet线路(路由器只有5个,是0-4)password12345678//login密码loginendcopy running-config startup-config保存配置cisco3550Switch#configure terminalSwitch config ttvtpmode transparentSwitchconfigttvlan10Switch conf ig-vlan#name vlanlOSwitchconfigSexitSwitchconfigSvlan11Switchconfig-vlanname vlanllSwitchconfig-vlanendSwi tchttconfigureterminalSwitchconfigSinterface fastethernetO/9Switchconfig-ifttswitchport modeaccessSwitchconfig-if#switchport accessvlan10Switchconfig-ifttexitSwitchconfigttinterface fastethernet0/10Switchconfig-if#switchport modeaccessSwitchconfig-if#switchport accessvlan10Switchconfig-ifttexitSwitchconfigttinterface fastethernetO/11Switchconfig-ifttswitchport modeaccessSwitchconfig-if#switchport accessvlan11Switchconfig-ifttexitSwitchconfignterface fastethernetO/12Switch config-ifttswitchport modeaccessSwitchconfig-if#switchport accessvlan11Switchconfig-ifttexitSwitchconfigttinterface vlanlOSwitchconfig-ifSip address
192.
168.
0.
1255.
255.
255.0Switchconfig-if#no shutdownSwitchconfig-if#exitSwitchconfigttinterface vlanllSwitch config-if#ip address
192.
168.
1.
1255.
255.
255.0Switchconfig-if#no shutdownSwitchconfig-if#exitSwitchconfig#ip routingSwitch config#ip forward-protocol udpSwitchconfigttintcrvlan10ip helper
172.
16.
11.255〃这个命令又是什么意思?是不是转发整个网段的UDP协议?为什么用到了
172.
16.
11.255这个地址?Switchconfig#exitSwitchconfigttinter vlan11Switchconfig-if#iphelper
172.
16.
10.255〃同上Switchconfig-if#exitSwitch config#ip route
0.
0.
0.
00.
0.
0.0VlanlOSwitch config#ip route
0.
0.
0.
00.
0.
0.0VlanllSwitchconfig#conf tSwitchconfig#access-l ist103permit ip
172.
16.
11.
00.
0.
0.
255172.
16.
10.
00.
0.
0.255Switchconfig#access-list103permit udpany any eq tftpSwitchconfig#access-l1st103permit udpany eqbootpc anySwitchconfig#access-list103permit udpany eqtSwitchconfig#access-list103permit udpany any eq bootpcSwitchconfig#inter vlan10Switchconfig-ifttip directed-broadcast103〃请解释一下这个的具体含义,本人不是太明白,懂一点意思直接广播这个列表?是不是Switchconfig-ifSexitSwitchconfig#access-list permit104ip
172.
16.
10.
00.
0.
0.
255172.
16.
11.
00.
0.
0.255Switchconfig#access-list104permit udpany anyeq bootpcSwitchconfig ttaccess-list104permit udpany anyeq tftpSwitchconfigttaccess-list104permit udpanyeqbootpc anySwitchconfigttaccess-list104permit udpanyeqtSwitchconfigWinter vlan11Switchconfig-if#ip directed-broadcast104〃同上SwitchconfigtiendSwitchttcopy runstar华为三层交换机配置实例一例网络技术阅读评论字号大中小订阅2008-07-2506:08:282430华为三层交换机配置实例一例服务器双网卡,内网其它计算机通过其代理上网1IP:
192.168O1,属于PORT1VLAN1属于PORT2VLAN2属于PORT3VLAN3的机器可以正常上网VLAN1配置的计算机的网关为VLAN2配置的计算机的网关为VLAN3即可实现间互联VLAN如果和的计算机要通过服务器上网VLAN2VLAN31则需在三层交换机上配置默认路由系统视图下iproute-static
0.
0.
0.
00.
0.
0.0然后再在服务器上配置回程路由1进入命令提示符这个时候和中的计算机就可以通过服务器访问了vlan2vlan31internet〜〜华为路由器与CISCO路由器在配置上的差别华为路由器与同档次的路由器在功能特性与配置界面上完全一致,有些方面还根据国内CISCO用户的需求作了很好的改进例如中英文可切换的配置与调试界面,使中文用户再也不用面对着一大堆的英文专业单词而无从下手了另外它的软件升级,远程配置,备份中心,回拨,PPP路由器热备份等,对用户来说均是极有用的功能特性在配置方面,华为路由器以前的软件版本一相当于的与有细VRP
1.0CISCO IOSCISCO。
个人认证
优秀文档
获得点赞 0