CN101827038B - Distributed equipment and method for forwarding message in distributed equipment - Google Patents

Distributed equipment and method for forwarding message in distributed equipment Download PDF

Info

Publication number
CN101827038B
CN101827038B CN 201010180370 CN201010180370A CN101827038B CN 101827038 B CN101827038 B CN 101827038B CN 201010180370 CN201010180370 CN 201010180370 CN 201010180370 A CN201010180370 A CN 201010180370A CN 101827038 B CN101827038 B CN 101827038B
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
packet
type
ro
network
board
Prior art date
Application number
CN 201010180370
Other languages
Chinese (zh)
Other versions
CN101827038A (en )
Inventor
赵昌峰
Original Assignee
杭州华三通信技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Grant date

Links

Abstract

本发明公开了一种分布式设备和分布式设备中报文转发的方法。 The present invention discloses a method of distributed devices and distributed packet forwarding devices. 在分布式设备的第一类接口板存储内网路由和默认路由,第二类接口板上存储包括外网路由在内的路由,当第一类接口板接收到内网侧发送的报文时,查找第一类接口板上存储的路由,如果查找结果为报文与默认匹配,则根据默认路由将所述报文向第二类接口板转发,由第二类接口板根据存储的外网路由将报文向外网转发,从而可以实现在第一类接口板上没有对应的外网路由时仍然对报文进行正常转发。 In the first type of distributed network interface board within the storage device and the default route, the second network interface board comprises an external memory including a route, when the first type of interface board receiving the message sent by the network side when , the routing interface board type stored in the first, if the result is to find the default packet, the router forwards the second type of interface board according to a default routing the packet according to the second external network interface board type stored the routing forwarding packets to the external network, the external network can be realized without a corresponding still packets forwarded by the interface board is in the first category.

Description

分布式设备和分布式设备中报文转发的方法 Distributed devices and distributed devices packet forwarding method of

技术领域 FIELD

[0001] 本发明涉及通信领域,尤其涉及ー种分布式设备和分布式设备中报文转发的方法。 [0001] The present invention relates to the field of communications, particularly to a method and apparatus ー A distributed distributed packet forwarding device relates.

背景技术 Background technique

[0002] 分布式设备中包括多个接ロ板,不同接ロ板可以支持相同或者不同的路由规格。 [0002] The apparatus comprises a distributed plurality of contact plates ro, ro different access plate may support the same or different route specifications. 在图1所示的网络中,分布式设备Switch A作为内网的网关,通过多条路径接入到Internet,所有内网访问Internet的流量都经过Switch A上进行转发,因此Switch A上 In the network shown in FIG. 1, Switch A distributed devices within the network as the gateway, access through multiple paths to the Internet, all network traffic to the Internet have been forwarded on Switch A, so the A-Switch

需要支持大容量的路由。 The need to support large-capacity routing.

[0003] 现有技术中,分布式设备中的各接ロ板上的路由需要同步,即完全一致,否则会造成路由错误。 [0003] prior art, distributed devices connected to each board ro routes need to be synchronized, that is exactly the same, otherwise it will cause routing error. 例如分布式设备中采用不同规格的接ロ板吋,由于低规格接ロ板的路由容量小,高规格接ロ板的路由容量大,当分布式设备需要存储的路由超过低规格接ロ板的路由容量时,会造成低规格接ロ板上无法存储全部的路由表,当报文通过低规格接ロ板进行报文转发时由于没有对应的路由则会导致报文被丢弃。 Such as distributed devices with different specifications of the contact plate ro inches, due to the small size low-capacity routing ro contact plate, then high-capacity routing ro plate, when the device needs to store the distributed routing over low gauge plate contact ro routing capabilities, will cause low contact ro board specifications can not store all of the routing table, the packet size by a low ro contact plate because no packets will result in a corresponding routing forwarding packets are discarded. 因此,整个设备的规格由低规格接ロ板决定。 Accordingly, the entire apparatus size specifications of a low contact plate ro decision.

[0004] 为了避免由于低规格接ロ板路由容量小而导致的报文丢弃问题,在图1所示的组网中,现有技术在Switch A内完全配置高规格接ロ板,但是这种SwitchA成本较高,不利于用户使用。 [0004] In order to avoid problems due to discarding packets of low size ro contact plate caused by routing a small capacity, the network shown in Figure 1, the prior art high-fully configured ro contact plate in Switch A, but this SwitchA high cost, is not conducive to users.

发明内容 SUMMARY

[0005] 本发明提供了ー种分布式设备和分布式设备中报文转发的方法,实现分布式设备中同时存在高规格和低规格接ロ板时,保证低规格接ロ板正常转发报文。 [0005] The present invention provides methods and devices distributed ー A distributed packet forwarding devices, the present apparatus implementing distributed while high specifications and access specifications ro lower plate, ensure low size ro contact plate normal packet forwarding .

[0006] 本发明提供了ー种分布式设备中报文转发的方法,所述分布式设备中包括第一类接ロ板和第二类接ロ板,所述分布式设备作为内网的网关与外网连接,所述第一类接ロ板上存储内网路由和默认路由,所述第二类接ロ板上存储的路由包括外网路由,该方法进ー步包括: [0006] The present invention provides a method ー A distributed message forwarding device, said apparatus comprising a first distributed connection type ro ro contact plate and the second plate type, the distributed network as gateway device external network connection, the first type of access by the storage grid ro inner panel and a default route, then the second type stored routing ro board includes an outer routes, the method proceeds ー further comprising:

[0007] 当所述分布式设备通过第一类接ロ板接收到内网侧发送的报文时,查找所述第一类接ロ板上存储的路由; [0007] When the distributed type apparatus via a first plate connected ro received message sent by the network side, the first type of routing lookup contact board ro stored;

[0008] 如果查找结果为所述报文与所述默认路由匹配,根据所述默认路由将所述报文向所述第二类接ロ板转发,由所述第二类接ロ板根据存储的外网路由将所述报文向外网转发; [0008] If the search result is that the packet matching the default route, the packet forwarding route to the second type of contact plate according to the default ro, ro by the second contact plate according to the stored type the external network packet forwarded by the external network;

[0009] 如果查找结果为所述报文与所述内网路由匹配,根据所述内网路由转发所述报文。 [0009] If the search result is that the packets inside the network and by the matching, according to the internal network of the packet by the forwarding.

[0010] 根据所述默认路由将所述报文向所述第二类接ロ板转发包括: [0010] The default route the packet to the access to the second type of plate ro forwarding comprises:

[0011] 封装所述报文并根据默认路由以组播形式向板间链路转发所述报文;或者 [0011] The encapsulated packet and forward the multicast packet to form between the link plate according to a default routing; or

[0012] 根据所述默认路由以单播形式向对应的所述第二类接ロ板发送所述报文。 [0012] The default route the packet according to the transmission type corresponding to the second contact plate ro unicast. [0013] 所述封装所述报文包括下述一种或者多种: [0013] The encapsulating the packet comprises one or more of the following:

[0014] 封装组播标识字段和哈希字段,由所述第二类接口板根据所述组播标识字段和哈希字段的值确定是否处理所述报文; [0014] encapsulated multicast hash field and an identification field, determining whether to process said message by said second type boards based on the multicast identification field value and the hash field;

[0015] 为所述报文封装源MAC地址,由所述第二类接口板根据所述源MAC地址获知所述报文的发送方接口板,进而判断是否处理所述报文; [0015] to the MAC address of the source packet encapsulated by said second type of interface board is informed of the message sender interface board according to the source MAC address, and then determine whether to process said message;

[0016] 为所述报文封装类型字段,由所述第二类接口板根据所述类型字段的值确定是否向其他接口板转发所述报文。 [0016] The encapsulation of the packet type field to determine whether to forward the packet to another interface plate from said second type of interface board according to the value of the type field.

[0017] 所述哈希字段的值具体为: [0017] a hash value of the specific field as follows:

[0018] 所述报文的源地址、源端口、目的地址或目的端口中的一种或多种通过哈希运算得到的值;或者匹配到默认路由的报文计数;或者所述报文的源地址或源地址中的特定部分;由所述第二类接口板通过同一路由转发具有相同哈希字段的值的报文。 [0018] The packet source address, source port, destination address, or objects in one or more of the ports is obtained by calculating a hash value; default route to either match count of packets; or the packet or a particular portion of the source address in the source address; by the second type of interface board forwarding packets having the same hash value field by the same route.

[0019] 所述第二类接口板根据存储的外网路由将所述报文向外网转发包括: [0019] According to the second type of external interface board is forwarded by the NAS message to the external network comprises:

[0020] 所述第二类接口板在本地查找与所述报文对应的出接口; [0020] The second type of interface board to find the packet corresponding to the local interface;

[0021 ] 如果存在多条等价路由,所述第二类接口板根据所述报文中携带的哈希值选择其中一条路由转发所述报文。 [0021] If multiple equal-cost routes exist, interface board according to the second type of the packet hash value carried in the selected one of the packet forwarding route.

[0022] 所述第二类接口板根据存储的外网路由将所述报文向外网转发包括: [0022] According to the second type of external interface board is forwarded by the NAS message to the external network comprises:

[0023] 所述第二类接口板在本地查找与所述报文对应的出接口; [0023] The second type of interface board to find the packet corresponding to the local interface;

[0024] 如果查找到所述出接口属于自身,所述第二类接口板通过所述出接口转发所述报文; [0024] If the search itself belongs to the outgoing interface, the second type of the interface card through a forwarding said packet;

[0025] 否则,所述第二类接口板丢弃所述报文,或者向所述出接口所属的接口板转发所述报文。 [0025] Otherwise, the second type of interface board discarding the packet, or forward the packet to the interface belongs to an interface board.

[0026] 根据所述默认路由将所述报文向所述第二类接口板转发之后,还包括: [0026] The following said default routing the packet to said second type of interface board forwarding, further comprising:

[0027] 所述第一类接口板向主控板申请所述报文的外网路由; [0027] The first type of interface board application of the packet from the external network to the master plate;

[0028] 所述第一类接口板根据存储的内网路由和申请得到的外网路由进行报文转发。 [0028] The first type of packets forwarded by the interface board according to the external network obtained by the NAS and the application.

[0029] 所述第一类接口板向主控板申请所述报文的外网路由包括: [0029] The first interface board of the application of the external network comprises a packet to the master plate by:

[0030] 所述第一类接口板记录向所述第二类接口板转发的报文的目的地址,通过计数器统计记录的报文的目的地址的数量,并通过定时器统计向所述主控板申请外网路由的时间间隔; [0030] The first interface board of the recording destination address to forward to the second type of packet interface board, by the number of destination addresses of the packet counter statistics records and statistics to the master timer by application of the outer panel by the network time interval;

[0031] 当所述计数器的计数达到最大值、且所述时间间隔大于预设较小值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由;或者当所述时间间隔达到预设较大值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由。 [0031] When the count of the counter reaches the maximum value, and the time interval is greater than a preset lower value, transmitted to the main control board recording of the packet destination address, the request packet outer by the network; or when the time interval reaches a predetermined large value, transmitted to the main control board of the recording destination address of the packet, the request packet from the external network.

[0032] 当所述分布式设备中存在正常工作的所述第二类接口板时,所述第一类接口板上即配置所述默认路由;或者在所述第一类接口板上的路由数量超过阈值时配置默认路由。 [0032] When the normal operation of the present apparatus in the distributed second class interface plate, i.e. the first type of interface board configuring the default route; or routing of the first type of interface board configure a default route exceeds a threshold number.

[0033] 本发明提供一种分布式设备,作为内网的网关与外网连接,所述分布式设备包括第一类接口板和第二类接口板;所述第一类接口板上存储内网路由和默认路由,所述第二类接口板上存储的路由包括外网路由, [0033] The present invention provides a distributed device, a network gateway connected to the external network, the distributed type apparatus comprises a first interface board and the second type of interface board; the first interface board within the storage class routes and default route, the stored route interface board comprises a second type of external network,

[0034] 所述第一类接口板,用于存储内网路由和默认路由,在接收到内网侧发送的报文时,查找本地存储的路由;如果查找结果为所述报文与所述默认路由匹配,根据所述默认路由将所述报文向所述第二类接ロ板转发;如果查找结果为所述报文与所述内网路由匹配,根据所述内网路由转发所述报文; [0034] The first type of interface board, and for the default route by the storage grid, upon receiving the message sent by the network side, the routing locally stored; if the result is to find the packet default route match, the packet forwarding route to the second type of contact plate according to the ro default; if the packet is a search result of the matching by the inner network, said inner network by the repeater according to the message;

[0035] 所述第二类接ロ板,用于存储包括外网路由在内的路由,井向外围转发所述第一类接ロ板发送的报文。 [0035] ro contact plate of the second type, for storing comprises an outer routes including the route, the message sent to the peripheral wells of the first type of forwarding ro contact plate.

[0036] 所述第一类接ロ板包括: [0036] The first type ro contact plate comprising:

[0037] 封装单元,用于封装所述报文; [0037] The encapsulation unit for encapsulating the packet;

[0038] 转发单元,用于根据所述默认路由以组播形式向板间链路转发所述封装単元封装后的报文;或者根据所述默认路由以单播形式向对应的所述第二类接ロ板发送所述报文。 [0038] The forwarding unit configured to forward the encapsulated multicast packet form after radiolabeling element package according to the link plate between said default routing; or according to the default route unicast corresponding to the second class contact plate ro transmitting said message.

[0039] 所述封装単元还用于:为所述报文封装组播标识字段和哈希字段,和/或为所述报文封装源MAC地址,和/或为所述报文封装类型字段; [0039] The package for radiolabeling element further: said encapsulated multicast packet identification field and a hash field, and / or encapsulated packet to the source MAC address, and / or for the encapsulation of the packet type field ;

[0040] 所述第二类接ロ板还用于:根据所述组播标识字段和哈希字段的值确定是否处理所述报文;和/或根据所述源MAC地址获知所述报文的发送方接ロ板,进而判断是否处理所述报文;和/或根据所述类型字段的值确定是否需要向其他接ロ板转发所述报文。 [0040] The second type of contact sheet is further configured ro: determining whether to process the packet according to the multicast identification field value and the hash field; and / or known in the packet according to the source MAC address ro sender contact plate, and then determine whether to process the packet; and / or whether to forward the packet to the other contact plate ro value of the field is determined according to the type.

[0041] 所述哈希字段的值具体为: [0041] a hash value of the specific field as follows:

[0042] 所述报文的源地址、源端ロ、目的地址或目的端ロ中的ー种或多种通过哈希运算得到的值;或者 [0042] source address of the packet, the source ro, ro destination address or the destination ー or more values ​​obtained by hashing; or

[0043] 匹配到默认路由的报文计数;或者 [0043] The default route to match count of packets; or

[0044] 所述报文的源地址或源地址中的特定部分。 [0044] a specific portion of the source or source address of the packet is.

[0045] 所述第二类接ロ板包括: [0045] ro contact plate of the second type comprising:

[0046] 查找单元,用于在本地查找与所述报文对应的出接ロ; [0046] The searching unit configured to search the message corresponding to the local access ro;

[0047] 转发单元,与所述查找单元连接,用于当所述查找単元的查找结果为存在多条等价路由吋,根据所述报文中携帯的哈希值选择其中一条路由转发所述报文。 [0047] The forwarding unit, connected to the search unit, for, when the search results to find that there radiolabeling membered inch equal-cost routes, select a route to forward the packet in accordance with a hash value in the carrying Bands message.

[0048] 所述第二类接ロ板还用于: [0048] The second type of contact ro plate further configured to:

[0049] 在本地查找与所述报文对应的出接ロ; [0049] ro connected in a local packet to find the corresponding output;

[0050] 如果查找到所述出接ロ属于自身,通过所述出接ロ转发所述报文; [0050] If an access to the lookup itself belongs ro, ro through which the connection to forward the packet;

[0051 ] 否则,丢弃所述报文,或者向所述出接ロ所属的接ロ板转发所述报文。 [0051] Otherwise, the packet is discarded, or the connection to the contact plate ro ro forwarding the packet belongs.

[0052] 所述第一类接ロ板还包括: [0052] The first type ro contact plate further comprises:

[0053] 申请单元,用于向主控板申请所述报文的外网路由; [0053] The application unit configured to apply to the control board of the packet from the external network;

[0054] 转发单元,用于根据存储的内网路由和申请得到的外网路由进行报文转发。 [0054] The forwarding unit for forwarding packets from the external network according to the NAS and the application obtained from.

[0055] 所述第一类接ロ板还包括: [0055] The first type ro contact plate further comprises:

[0056] 记录单元,用于记录向所述第二类接ロ板转发的报文的目的地址; [0056] The recording unit for recording said second type of connection to the destination address plate ro forwarding packets;

[0057] 统计单元,与所述记录单元连接,用于统计所述记录单元记录的报文的目的地址的数量; [0057] Statistics unit connected to the recording unit, the number of destination addresses for the packet statistics of the recording unit;

[0058] 计时单元,用于统计向所述主控板申请外网路由的时间间隔; [0058] The timing unit, for counting by the application of external network time interval to the main control board;

[0059] 所述申请単元还用于:当所述统计単元统计的数量达到最大值、且所述时间间隔大于预设较小值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由;或者当所述时间间隔达到预设较大值吋,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由。 [0059] The radiolabeling application element further configured to: when the number of the statistical maximum radiolabeling membered statistics, and the time interval is greater than a predetermined small value, recording of the message sent to the main control board destination address, the application of the packet from the external network; or when the time interval reaches the predetermined large value inch, to transmit the recording destination address of said main control board of the packet, the request packet outside routes.

[0060] 与现有技术相比,本发明至少具有以下优点:[0061] 本发明中,在分布式设备的第一类接口板存储内网路由和默认路由,第二类接口板上存储包括外网路由在内的路由,当第一类接口板接收到内网侧发送的报文时,查找第一类接口板上存储的路由,如果查找结果为报文与默认匹配,则根据默认路由将所述报文向第二类接口板转发,由第二类接口板根据存储的外网路由将报文向外网转发,从而可以实现在第一类接口板上没有对应的外网路由时仍然对报文进行正常转发。 [0060] Compared with the prior art, the present invention has at least the following advantages: [0061] In the present invention, the first type of interface board within the storage device and a distributed network default route, the second interface board comprising a memory routing the external network including, when the first type of interface board receiving the message sent when the network side, the routing of a first storage class interface board, if the result is to find the default matching the packets, according to the default route the second type of packet forwarding to the interface board, the forwarded packets to the external network outside the network according to the second type stored by the interface board, which can not achieve a corresponding external network interface board in a first category when the still normal for packet forwarding.

附图说明 BRIEF DESCRIPTION

[0062] 图1是现有技术中一种网关不意图; [0062] FIG. 1 is a prior art A gateway is not intended;

[0063] 图2是本发明提供的分布式设备中报文转发的方法的流程示意图; [0063] FIG. 2 is a flow chart of a packet forwarding method of the present invention to provide a distributed device in;

[0064] 图3是本发明应用场景提供的分布式设备中报文转发的方法的流程示意图; [0064] FIG. 3 is a flow chart of a packet forwarding method of a distributed application scenario according to the present invention, apparatus provided;

[0065] 图4是本发明应用场景中封装后的报文格式示意图; [0065] FIG. 4 is a schematic diagram of the packet format according to the present invention is encapsulated in an application scenario;

[0066] 图5是本发明应用场景中低规格接口板是以组播形式向高性能接口板发送报文的流程示意图; [0066] FIG. 5 is a low application scenario of the present invention is compliant interface board in the form of a schematic flow diagram of multicast packets sent to high-performance interface board;

[0067] 图6是本发明应用场景中低规格接口板也可以单播形式向高规格接口板发送报文的流程示意图; [0067] FIG. 6 is a schematic flow diagram of an application scenario according to the present invention, the interface plate may be low gauge unicast packets sent to the high-standard interface board;

[0068] 图7是本发明提供的分布式设备中第一类接口板的结构示意图; [0068] FIG. 7 is a schematic view of apparatus according to the present invention provides a distributed first class interface board;

[0069] 图8是本发明提供的分布式设备中第二类接口板的结构示意图; [0069] FIG. 8 is a schematic view of apparatus according to the present invention provides distributed in the second type of interface board;

[0070] 图9是本发明提供的分布式设备中第一类接口板的另一结构示意图。 [0070] FIG. 9 is a schematic structural diagram of another apparatus according to the present invention provides a distributed first class interface board.

具体实施方式 detailed description

[0071] 本发明的核心思想是:分布式设备上的低规格接口板上只存储内网路由,外网路由通过高规格接口板存储,或者低规格接口板上优先存储内网路由,在具有剩余存储空间时低规格接口板上同时存储外网路由;低规格接口板直接处理内网报文,对于需要向外网发送的报文,若本板上没有存储对应的外网路由,则通过默认路由发送到高规格接口板,由高规格接口板向外网转发。 [0071] The core idea of ​​the present invention are: low specifications on the interface board apparatus only stores the distributed network by the external network interface board by high-memory, or a low priority in the storage size by a network interface board, having when the remaining storage space simultaneously storing low gauge interface board from the external network; low interface board specifications directly processing network packets, packets need to be transmitted to the external network, if the present panel is not stored in the corresponding foreign network, through the default routed to the high-standard interface board, high-forwarded by the outside network interface board.

[0072] 本发明提供一种分布式设备中报文转发的方法,所述分布式设备中包括第一类接口板和第二类接口板,所述分布式设备作为内网的网关与外网连接,所述第一类接口板上存储内网路由和默认路由,所述第二类接口板上存储的路由包括外网路由,如图2所示,该方法进一步包括: [0072] The present invention provides a method of distributed message forwarding device, said apparatus comprising a first distributed class interface class interface board and a second board, the distributed network as the gateway device and the external network connecting the first inner panel storage class interface and a default route network, the second type routing board comprising external memory interface from the network, as shown in FIG 2, the method further comprising shown:

[0073] 步骤201,当所述分布式设备通过第一类接口板接收到内网侧发送的报文时,查找所述第一类接口板上存储的路由;如果查找结果为所述报文与所述默认路由匹配,执行步骤202 ;如果查找结果为所述报文与所述内网路由匹配,执行步骤203 ; [0073] Step 201, when the device receives a message distributed within the network side a first type transmitted by the interface board, the first type of the routing of the interface board memory; if the packet is a search result matching the default route, step 202 is performed; if the result is to find the inner packet by a matching network, step 203 is performed;

[0074] 步骤202,根据所述默认路由将所述报文向所述第二类接口板转发,由所述第二类接口板根据存储的外网路由将所述报文向外网转发; [0074] Step 202, according to the default route to forward the packet to the second interface board type, forwarded by the second type of network interface board according to the external memory by the packets to the external network;

[0075] 步骤203,根据所述内网路由转发所述报文。 [0075] Step 203, according to the internal network of the packet by the forwarding.

[0076] 需要说明的是,其中的第一类接口板和第二类接口板可以分别是但不局限于低规格接口板和高规格接口板,即路由容量低和路由容量高的接口板。 [0076] Incidentally, wherein the first type and the second type of interface board interface board may respectively be low but is not limited size and high-standard interface board interface board, i.e. a low and high capacity routing the routing capacity of the interface board. 例如,第一类接口板和第二类接口板也可以为相同规格的接口板,通过第二类接口板与外网连接,第一类接口板只与内网连接。 For example, the first type and the second type of interface board interface board may be the same size as the interface board, is connected via a second external network interface board type, a first plate type is connected only to the interface network. [0077] 下面结合具体应用场景详细介绍本发明提供的分布式设备中报文转发的方法。 [0077] The following detailed description with reference to specific application scenario according to the present invention provides a method of distributed devices in packet forwarding.

[0078] 本发明应用场景中,第一类接ロ板和第二类接ロ板分别以低规格接ロ板和高规格接ロ板为例,在路由混插模式下,接外网侧的单板使用高规格接ロ板,接内网侧的接ロ板使用低规格接ロ板,在高规格接ロ板上下发全部路由,在低规格接ロ板上下发内网的路由和默认路由(当低规格接ロ板具有足够剩余存储空间时低规格接ロ板也可以存储外网路由),默认路由的下一跳指向出端ロSuper Interface (超级接ロ)。 [0078] The application scenario of the present invention, the first type and the second type of contact plate ro ro contact plates are respectively connected to a low size ro ro contact plate and high-standard board, for example, mixed into the routing mode, then the external network side using high-board access panel ro, ro contact plate connected to the network using a low side connected ro specification plate, the high-contact plate issued ro all routes, in a low contact ro specifications issued by the network board and default routing (ro when the low contact plate having a size sufficient remaining storage space size low ro contact plate may also be stored outside the network), the next hop default route points to an end of the ro super Interface (super connected ro). 内网访问内网的报文,可以在低规格接ロ板上正常转发,内网访问外网的报文,在低规格接ロ板上匹配到默认路由后,发送到Super Interface,通过板间转发链路由高规格接ロ板转发。 Packets in the network to access the network, can be connected to the lower plate size ro forwarded packet network access network and access specifications in the low ro default route to the match plate, to send Super Interface, through inter-plate forwarding link from high-grade ro contact plate forward.

[0079] 其中,外网路由为路由器学习到的外部网络的路由,具体的,用户可以根据实际情况指定具有特定路由前缀、出接ロ、下一跳或出接ロ所在接ロ板等特征的路由为外网路由。 [0079] wherein the external network router to learn routes to the external network, a particular user may specify a specific route according to the actual case of a prefix, the access ro, or the next hop access ro ro where the contact plate features routing outer routes. 内网路由为只在网络内部转发的路由,也称为本地路由。 By the network to the internal network only forwarding route, also called a local routing.

[0080] 分布式设备首先需要在低规格接ロ板上下发默认路由,该默认路由的下发可以包括两种方式: [0080] First, a distributed device specifications require low access panel issued ro default route, the default route of the hair may comprise two ways:

[0081] ー是当分布式设备上具有正常工作的高规格接ロ板时,立即在低规格接ロ板上下发默认路由; High standard [0081] ー when the device has to work on a distributed access plate ro, ro access specification immediately lower plate issued default route;

[0082] 另ー种方式是分布式设备判断低规格接ロ板上存储的路由容量达到阈值时,分布式设备低规格接ロ板上下发默认路由。 [0082] Another embodiment is a distributed species ー apparatus determines contact ro low gauge board memory routing capacity threshold is reached, then distributed device low gauge plate issued ro default route. 这种方式下,低规格接ロ板上在有足够的存储空间时可以同时存储外网路由与内网路由,当路由容量达到阈值时,例如没有多余空间存储内网路由时,分布式设备在低规格接ロ板上下发默认路由,并设置内网路由的优先级高于外网路由,在后续需要存储内网路由时,使用内网路由替换已经存储的外网路由,默认路由不可替换。 When this mode, low gauge connected ro plate if there is sufficient storage space can store both the outer web from the excess space of the memory and the network routes, when the routing capacity reaches a threshold value, for example no, the distributed device ro low contact board specifications issued default route, and is provided by the network within the network takes priority over by the storage required in the subsequent network by using the network by the external network has been replaced by the stored default routes are not replaced.

[0083] 以下以低规格接ロ板上仅存储内网路由和默认路由、高规格接ロ板上存储有外网路由为例进行说明,如图3所示,该方法包括以下步骤: [0083] In the following only low specifications in the memory access board ro routes and default routes, high-access storage ro outer panel by a network will be described as an example, shown in Figure 3, the method comprising the steps of:

[0084] 步骤301,分布式设备通过低规格接ロ板接收到内网侧发送的报文,查找该低规格接ロ板上存储的路由;如果查找结果为报文与默认路由匹配,执行步骤302 ;如果查找结果为报文与内网路由匹配,执行步骤303。 [0084] Step 301, distributed by a low apparatus specifications ro contact plate receives a message sent by the network side, then find the low specification ro board memory routing; if the result is to find the default routing packets matching step 302; if the result is to find the packets and by the matching network, step 303 is performed.

[0085] 具体的,低规格接ロ板上配置的默认路由与向外网转发的报文对应,当低规格接ロ板接收到内网侧发送的报文后,根据报文是否具有特定标识判断是否与默认路由匹配,该特定标识可以灵活配置,例如为特定前綴。 [0085] Specifically, low gauge connected ro board configured default route to the external network corresponding to the packet forwarding when bonding low specification ro board receives packets sent by the network side, according to the packet having a particular identifier determining whether the default route matches the specific identification can be flexibly configured, for example, a specific prefix. 如果报文具有该特定前缀,低规格接ロ板判断该报文的目的地为外网设备,否则该报文的目的地为内网设备。 If the message has a specific prefix, then lower specification ro plate on which the packet is destined for the external network device, otherwise the packet is destined for the network device.

[0086] 步骤302,低规格接ロ板为报文加封装后发送到Super Interface。 [0086] Step 302, then lower specification ro plate to transmit the packets after the Super Interface Encapsulation.

[0087] 具体的,低规格接ロ板在报文前再增加ー个以太封装,封装后的报文格式如图4所示,包括新增报文头字段和原始报文字段,原始报文字段中包括原始目的MAC、原始源MAC和原始内容,新增报文头字段中包括新增目的MAC、新增源MAC和类型字段。 [0087] Specifically, low gauge plate before contact ro packets ー add more Ethernet encapsulation, the encapsulated packet format shown in Figure 4, it comprises a new header field and a message field of the original, the original message MAC field including the original object, and the original source MAC original content, the new message including new object header field MAC, MAC source and type of the new field.

[0088] 其中,MAC为系统为每个槽位的接ロ板分配的接ロ板标识。 [0088] wherein, MAC is the system for each access slot allocated contact plates ro ro identification plate.

[0089] 新增目的MAC:新增封装的目的MAC,可以包括一个或者多个字节,通常为6个字节,例如第一个字节为01,标明为组播;第二个字节为HASH值,用于在存储等价路由时由高规格接ロ板进行路由选择;后面4个字节填写原始报文的目的IP。 [0089] Add purposes MAC: the MAC new encapsulated object, may include one or more bytes, usually 6 bytes, the first byte is for example 01, is designated as a multicast; second byte HASH value is used when the storage access from high-grade equivalent routes for routing ro plate; the next four bytes of the original IP packet to fill in the object.

[0090] 新增源MAC:为发送此报文的源接ロ板的标识。 [0090] Add source MAC: the packet transmission source access ro identification plate. [0091] 类型字段:用于指定此报文的属性,这里设置第一个Bit为非环回位,如果非环回位置1,表明此报文不应该再进行跨板转发,以此防止出现环路。 [0091] Type field: this is used to specify the attribute of packets is provided where the first non-loopback Bit position, if the position of the non-loopback 1, this indicates that the packet should not be forwarded further cross-plate, thereby preventing the occurrence loop.

[0092] 原始报文:为原来需要转发的报文。 [0092] original message: the message to be forwarded to the original.

[0093] 需要说明的是,低规格接口板为报文加封装时可以封装上述的一种或多种信息,例如封装组播标识字段和哈希字段,由高规格接口板根据组播标识字段和哈希字段的值确定是否处理该报文;还可以同时或者单独封装源MAC地址,由高规格接口板根据源MAC地址获知报文的发送方接口板,进而判断是否处理报文;还可以同时或者单独封装类型字段,由高规格接口板根据该类型字段的值确定是否需要向其他接口板转发所述报文。 [0093] Incidentally, the interface board is low gauge packet encapsulation may add one or more of the above-described package information, e.g. encapsulated multicast identifier field and a hash field, a high-interface board according to the multicast identifier field and hash value field determines whether the packet process; may also be simultaneously or separately packaged source MAC address, interface board is known from high-grade source MAC address packet sender packet interface board, and then determine whether to process the packet; can simultaneously or individually packaged type field, interface board is determined by high-field type according to the value of the need to forward the packet to another interface board.

[0094] 步骤303,高规格接口板从板间链路接收到低规格接口板发送的报文,将报文向外围转发或者丢弃报文。 [0094] Step 303, the interface board receives the high-links between the plates from the lower to the packet interface board specifications sent the packet to the peripheral forward or discard the packet.

[0095] 具体的,Super Interface连接板间链路,低规格接口板以组播形式向高规格接口板发送报文后,可以有多个高规格接口板接收到低规格接口板发送的报文。 [0095] Specifically, the link between the Super Interface web, after low-compliant interface board to send packets to a high standard in multicast interface board, there may be a plurality of interface boards high-low gauge receives a packet sent by the interface board . 以其中一个高规格接口板为例, 接收到报文后,高规格接口板首先判断是否处理该报文,此时有多种判断方式,例如仅根据组播标识判断需要处理报文;或者根据报文中携带的源MAC地址获知报文的发送方接口板,根据本地存储的转发策略有选择的转发发送方接口板发送的报文。 Wherein a high-order interface board, for example, after receiving the message, the interface board high specification process determines whether the first packet, when determining a variety of ways, for example only need to process packets according to the multicast identifier determination; or according to packet source MAC address carried in the packet sender know the interface board, forwarding packets according to locally stored policy for selectively forwarding the sender interface board.

[0096] 判断需要对报文进行处理后,高规格接口板查找与报文对应的路由。 After [0096] Analyzing the need to process packets, to find high-interface board corresponding to the packet routing. 例如,高规格接口板接收所有目的MAC为组播的报文,根据目的MAC后4字节查找转发表,若有路由匹配,且此路由有出接口在本板,则继续处理,否则丢弃报文或者向其他接口板转发。 For example, a high interface board to receive all multicast destination MAC address and looks up a forwarding table according to the destination MAC 4 bytes, if the matching route, and this route has an interface board present, then processing continues, otherwise the packet is discarded or forward them to other packet interface board.

[0097] 此处需要说明的是,当存在等价路由时,高规格接口板需要进一步根据报文中携带的HASH值选择路由转发报文。 [0097] Note that here, when there is an equivalent routes, a high interface board needs to forward the packet routing HASH value carried in the packet. 例如,当存在等价路由时,高规格接口板可以至少支持以下三种转发模式:逐流转发:按数据流进行等价转发(同一数据流内的报文根据同一路由转发),在这种模式下,HSAH字段填写数据流的源地址、源端口、目的地址,目的端口中的一种或多种通过HASH得到的值;逐包转发:HSAH字段填写匹配到默认路由的报文计数(即将一定计数内的报文根据同一路由转发),值从O到255,达到255后再从O开始计数。 For example, when there is an equivalent routes, high specification interface board may support at least three forward modes: by flow forwarding: be forwarded along the data stream equivalent (within the same message in the same data stream according to routing forwarding), in which mode, HSAH fill in the source address field of the data stream, source port, destination address, an end ports or by more HASH values ​​obtained; by packet forwarding: HSAH default route matched to fill in the field count of packets (coming count within a certain packet forwarding according to the same route), the value from O to 255, to 255 and then starts counting from O. 源聚合转发:以源地址部分特征作为等价转发条件(同一源地址的报文根据同一路由转发),HSAH字段填写源IP中的一个字节的值,这里默认为最后一个字节的值。 Source forwarding polymerization: wherein the source address portion as a forwarding equivalent conditions (same source address of the packet according to the same routing and forwarding), HSAH fill out a field in the IP source byte value, where a default value of the last byte. 例如,若匹配的路由为等价路由(等价条数为n,分别是第O条,第I条…第η-1条路由),处理如下:将HSAH字段对η取余,得到的数字m,即转发按第m条路由转发,若此路由出接口在本板则转发,否则丢弃。 For example, if the matching route is equivalent routes (equivalent number of bars n, respectively O article, the first article of the I ... routes η-1), processing is as follows: the number of fields HSAH modulo [eta], obtained m, i.e., the m-th route forwarding according to the forwarding or discarding, if this forwarding the outgoing interface in this plate.

[0098] 需要特别指出的是,本发明应用场景中为了提高报文转发性能,减少高规格接口板的报文处理负担,配置低规格接口板可以按需向主控板申请外网路由,即在低规格接口板有空间可以存储更多路由时,可以由低规格接口板向主控板申请外网路由,提高报文转发性能。 [0098] Of particular note is the application scenario of the present invention in order to improve the performance of packet forwarding, packet processing burden reducing high-interface board, the interface board can be arranged low gauge demand application from the external network to the master board, i.e., at low space standard interface card can store more routing may apply to the external network by the specification of a low MPU interface board, to improve the packet forwarding performance.

[0099] 具体如下: [0099] as follows:

[0100] 1,在低规格接口板配置计数器CT和定时器T1、T2,同时设置每次处理路由最大值MP,和两次向高规格接口板转发报文的时间间隔的较小值和较大值。 [0100] 1, the interface board arranged in the lower size counter CT and timers T1, T2, and set a maximum value for each treatment route the MP, the smaller the interface board, and to a high standard for packet forwarding than two time intervals and great value.

[0101] 其中,CT、T1、T2的初始值为O ;T1记录两次申请最小间隔,在系统开始工作或向高规格接口板转发报文时重新初始化,默认为5秒;T2记录两次申请最大间隔,在系统开始工作或向高规格接口板转发报文时重新初始化,默认为15秒;ΜΡ默认为100。 [0101] wherein, initial CT, T1, T2 value O; T1 recorded twice the minimum interval of the application, when the system is re-initialized to work or forward packets to the interface board high standard, default is 5 seconds; T2 recorded twice apply the maximum interval, re-initialized when the system starts to work or to forward messages to a high standard interface board, the default is 15 seconds; ΜΡ default is 100. 需要说明的是,上述数值仅作为本应用场景中为了实现发明效果的ー种具体实现举例,对于依据本发明思想进行改变得到的其他具体方式同样属于本发明保护范围。 Incidentally, the above-mentioned value only as the present application scenario ー species embodied in order to achieve the effect of the invention of example, to changes in other specific forms obtained according to the spirit of the present invention also within the scope of the present invention.

[0102] 2,低性能接ロ板接收的报文匹配到默认路由吋,将此报文按步骤301-303转发,同时若CT小于MP,则记录此报文目的地址,将此目的地址加入记录链表,记录连表中已经有的不重复记录,CT加一。 [0102] 2, then the low performance ro plate matches the received packet to the default route inches, this packet forwarding step by step 301-303, but if the MP is less than CT, then the packet destination address, the destination address of this recording was added record list, records in the table have some do not even duplicate records, CT plus one.

[0103] 3,若低性能接ロ板存储的路由没有达到设定的阀值,则做如下处理: [0103] 3, if the low-performance storage plate contact ro route does not reach the set threshold, then treated as follows:

[0104] 当记录链表中地址达到MP且Tl超时后,将记录的地址信息向主控板发送,申请外网路由;或者,当T2超时后,若记录链表不为空,则将记录的地址信息向主控板发送,申请外网路由。 [0104] When the recording address of the linked list MP and Tl reaches a timeout, the recorded address information is sent to the control board, the application of external network; or when T2 times out, when the recording list is not empty, then the record address information to the main control board, the application of external network.

[0105] 主控板处理接收到接ロ板发来的信息后,对每个地址做如下处理:查找路由表,若找到最长匹配的路由,则加入匹配链表,相同的路由不重复加入;若找不到路由或找到的路由为默认路由则不处理。 After the [0105] main control board receives the information sent by the access ro plate, a process to make for each address: searching the routing table, the route if the longest match is found, the matching list is added, the route will not be repeated addition of the same; If not find a route or find a route for the default route is not processed. 主控板将这些路由下发到低性能接ロ板。 The MPU issued to the low performance of these routes ro contact plate. 这样当低性能接ロ板匹配到对应的外网路由时,可以通过正常跨板转发,发送到高性能接ロ板处理,减小了部分高性能接ロ板处理的工作。 So that when the low performance ro contact plate corresponding to the matching network to the outside by, can be forwarded by a normal cross-plate, then sent to the high-performance board ro treatment reduced the contact work portion ro-performance processing board. 具体的,当低性能接ロ板上配置有内网路由、外网路由和默认路由后,若低性能接ロ板接收的报文既匹配到外网路由又匹配到默认路由,则优先根据外网路由进行报文转发。 Specifically, when the low performance ro contact plate is disposed within the network by the external network and the default route, when a low performance connection plate ro received message matches both the outer and the matching network to the default route, the priority in accordance with the outer by the network for packet forwarding.

[0106] 需要说明的是,在低性能接ロ板存储有外网路由且达到设定的阈值时,如果需要存储新的内外路由,则使用新增加的内外路由替换外网路由。 [0106] Incidentally, when the low performance ro contact plate is stored by the network and outer reaches a set threshold, if the need to store the new internal and external routing, use the newly added routing inside and outside the outer replaced by a network.

[0107] 本发明应用场景步骤301-303中,低规格接ロ板是以组播形式向高性能接ロ板发送报文,转发流程如图5所示。 Application scenario Step [0107] The present invention 301-303, low gauge plate is then ro multicast packets to form a high-performance transmission ro contact plate, forwarding process as shown in FIG. 需要说明的是,低规格接ロ板也可以单播形式向高规格接ロ板发送报文,转发流程如图6所示。 Incidentally, low gauge plate may be connected ro unicast plate connected to the high-ro transmission packet forwarding process as shown in FIG. 此时,低规格接ロ板以单播形式向高规格接ロ板发送报文,接收到报文的高规格接ロ板查找路由,如果本板没有对应出接ロ,则向其他临近高规格接ロ板转发报文。 In this case, low-specification ro plate connected to the high-unicast contact plate ro sending packets, packets received high-ro contact plate to the routing, if this plate is not corresponding to the access ro, the other adjacent to the high- ro access panel forward packets. 例如图6中,设备存在两块高性能接ロ板,低性能接ロ板并不知道路由到底从哪块接ロ板转发出去,以单播形式将报文先转发到B,在B上查找路由发现出接ロ为A,然后再从B转发到A。 In FIG. 6, for example, the presence of two high-performance devices connected ro plate, then the low performance ro forwarding route in the end plate does not know from which board ro pick out in unicast packets are forwarded to the B, B in the lookup an access route discovery ro to A, and then transferred from B to A.

[0108] 通过采用本发明提供的方法,在分布式设备的第一类接ロ板存储内网路由和默认路由,第二类接ロ板上存储包括外网路由在内的路由,当第一类接ロ板接收到内网侧发送的报文吋,查找第一类接ロ板上存储的路由,如果查找结果为报文与默认匹配,则根据默认路由将所述报文向第二类接ロ板转发,由第二类接ロ板根据存储的外网路由将报文向外网转发,从而可以实现在第一类接ロ板上没有对应的外网路由时仍然对报文进行正常转发。 [0108] By using the method of the present invention provides, in a first type of distributed devices connected to the storage plate ro routes and default routes, the second memory access includes an outer plate ro routes including the route, when the first ro class contact plate received message sent by the network side within inches, then looks for the first type routing ro onboard memory, and if the result is to find the default matching the packets, according to a default routing the packet to the second category ro forwarded contact plate, the second plate type contact ro forwarded by the packet to the external network outside the network according to the stored, thereby enabling the first type contact an outer web plate ro still does not correspond to the normal time packets forwarding.

[0109] 本发明提供ー种分布式设备,作为内网的网关与外网连接,所述分布式设备包括第一类接ロ板和第二类接ロ板;第一类接ロ板和第二类接ロ板的数量可以根据实际需要设置,所述第一类接ロ板上存储内网路由和默认路由,所述第二类接ロ板上存储的路由包括外网路由, [0109] The present invention provides ー species distributed devices connected to the network as the gateway to the external network, the distributed type apparatus comprises a first plate and a second type of access ro ro contact plate; a first type and the second contact plate ro number type II ro contact plate is provided according to actual needs, the first type of access by the storage grid ro inner panel and a default route, then the second type stored routing ro board includes an outer routes,

[0110] 所述第一类接ロ板,用于存储内网路由和默认路由,在接收到内网侧发送的报文时,查找本地存储的路由;如果查找结果为所述报文与所述默认路由匹配,根据所述默认路由将所述报文向所述第二类接ロ板转发;如果查找结果为所述报文与所述内网路由匹配,根据所述内网路由转发所述报文; [0110] The first type ro contact plate for the network and stored within the default route, upon receiving the message sent by the network side, the routing locally stored; if the result is to find the message and said matching default route, according to the default route the packet to the second plate type contact ro forwarding; if the packet is a search result of the matching by the inner network, said inner network according to the forwarding said packet;

[0111] 所述第二类接ロ板,用于存储包括外网路由在内的路由,井向外围转发所述第一类接口板发送的报文。 [0111] ro contact plate of the second type, for storing comprises an outer routes including routing, packet forwarding well transmitted to the first type of peripheral interface board.

[0112] 具体的,如图7所示,所述第一类接口板包括: [0112] Specifically, as shown in FIG. 7, the first type of interface board comprising:

[0113] 封装单元11,用于封装所述报文;具体用于为所述报文封装组播标识字段和哈希字段,和/或为所述报文封装源MAC地址,和/或为所述报文封装类型字段;所述哈希字段的值具体为:所述报文的源地址、源端口、目的地址或目的端口中的一种或多种通过哈希运算得到的值;或者匹配到默认路由的报文计数;或者所述报文的源地址或源地址中的特定部分; [0113] 11 encapsulation unit for encapsulating the packet; specifically for said encapsulated multicast packet identification field and a hash field, and / or encapsulated packet to the source MAC address, and / or to the packet encapsulation type field; hash value of the specific field are: the source address of the packet, a source port a destination port or destination address or a value obtained by hashing more; or default route to match count of packets; or a specific part of the source or source address of the packet;

[0114] 转发单元12,用于根据所述默认路由以组播形式向板间链路转发所述封装单元封装后的报文;或者根据所述默认路由以单播形式向对应的所述第二类接口板发送所述报文。 [0114] forwarding unit 12, for routing packets in multicast forwarding the package to the package units according to the default link between the plates; or according to the default route unicast corresponding to the first Type II interface board to send the message.

[0115] 所述第二类接口板还用于:根据所述组播标识字段和哈希字段的值确定是否处理所述报文;和/或根据所述源MAC地址获知所述报文的发送方接口板,进而判断是否处理所述报文;和/或根据所述类型字段的值确定是否需要向其他接口板转发所述报文。 [0115] The second type of interface board is further configured to: determine whether to process the packet according to the multicast identification field value and the hash field; and / or according to the source MAC address of the packet is known sender interface board, and then determine whether to process the packet; and / or determine whether to forward them to other packet interface board according to the value of the type field.

[0116] 如图8所示,所述第二类接口板包括: [0116] As shown, the second type of interface board 8 comprising:

[0117] 查找单元21,用于在本地查找与所述报文对应的出接口; [0117] searching unit 21, for finding the packet corresponding to the local interface;

[0118] 转发单元22,与所述查找单元21连接,用于当所述查找单元21的查找结果为存在多条等价路由时,根据所述报文中携带的哈希值选择其中一条路由转发所述报文。 [0118] forwarding unit 22 connected to the lookup unit 21 is configured to find the search results when the unit 21 is equivalent to the presence of multiple routes, select one route from a hash value carried in the packet forwarding the message.

[0119] 所述第二类接口板还用于:在本地查找与所述报文对应的出接口;如果查找到所述出接口属于自身,通过所述出接口转发所述报文;否则,丢弃所述报文,或者向所述出接口所属的接口板转发所述报文。 [0119] The second type of interface board is further configured to: find the corresponding message to the local outgoing interface; if the interface belongs to the find itself, by the egress interface of the packet; otherwise, discarding the packet, or forward the packet to the interface belongs to an interface board.

[0120] 如图9所示,所述第一类接口板还包括: [0120] As shown, the first type of interface board 9 further comprising:

[0121] 申请单元13,用于向主控板申请所述报文的外网路由; [0121] The application unit 13, used for applying the packet from the external network to the master plate;

[0122] 转发单元12还用于根据存储的内网路由和申请得到的外网路由进行报文转发。 [0122] for forwarding unit 12 forwards the packet according to the external network for the NAS obtained from and to apply.

[0123] 所述第一类接口板还包括: [0123] The first type of interface board further comprises:

[0124] 记录单元14,用于记录向所述第二类接口板转发的报文的目的地址; [0124] The recording unit 14 for recording the destination address to forward the second packet-based interface board;

[0125] 统计单元15,与所述记录单元14连接,用于统计所述记录单元14记录的报文的目的地址的数量; [0125] Statistics unit 15 is connected to the recording unit 14, the number of destination addresses for the packet 14 recorded in the recording unit statistics;

[0126] 计时单元16,用于统计向所述主控板申请外网路由的时间间隔; [0126] timing unit 16, a network for statistical application outside a time interval to the main control board;

[0127] 所述申请单元13还用于:当所述统计单元15统计的数量达到最大值、且所述时间间隔大于预设较小值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由;或者当所述时间间隔达到预设较大值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由。 [0127] The application unit 13 is further configured to: when the number of the counting unit 15 reaches the maximum count and the time interval is greater than a predetermined small value, the main control board sends a record to the message the destination address of the text, the application of the packet from the external network; or when the time interval reaches a predetermined large value, transmitted to the main control board of the recording destination address of the packet, the request packet outside the network by text.

[0128] 通过采用本发明提供的设备,在分布式设备的第一类接口板存储内网路由和默认路由,第二类接口板上存储包括外网路由在内的路由,当第一类接口板接收到内网侧发送的报文时,查找第一类接口板上存储的路由,如果查找结果为报文与默认匹配,则根据默认路由将所述报文向第二类接口板转发,由第二类接口板根据存储的外网路由将报文向外网转发,从而可以实现在第一类接口板上没有对应的外网路由时仍然对报文进行正常转发。 [0128] By using the apparatus provided by the present invention, the first type of interface board within the storage device and a distributed network default route, the second network interface board comprises an external memory including a route, when the first class interface when the board receives packets sent by the network side, the routing of a first type storage interface board, if the result is to find the default packet, the router forwards the second type of interface board according to a default routing the packet, the external memory is forwarded by the network interface card of the second type of packets to the external network, the external network can be realized without a corresponding interface board remains in a first class of packets forwarded by the time.

[0129] 通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。 [0129] By the above described embodiments, those skilled in the art may clearly understand that the present invention may be implemented by software plus a necessary universal hardware platform, also be implemented by hardware, but the former is in many cases more good embodiments. 基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。 Based on such understanding, the technical solutions of the present invention in essence or the part contributing to the prior art may be embodied in a software product, which computer software product is stored in a storage medium and includes several instructions to enable a a computer device (may be a personal computer, a server, or network device) to execute the methods according to embodiments of the present invention.

[0130] 本领域技术人员可以理解附图只是一个优选实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。 [0130] It will be appreciated to those skilled in the drawings is only a preferred embodiment of the schematic embodiment, the modules or processes in the accompanying drawings are not necessarily embodiments of the present invention it is necessary.

[0131] 本领域技术人员可以理解实施例中的装置中的模块可以按照实施例描述进行分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。 [0131] Those skilled in the art will be appreciated apparatus embodiment that the modules can be distributed to the embodiment of the device according to the embodiment may be performed according to the present embodiment which are different from one case or more devices. 上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。 Modules of the embodiments may be combined into one module, or split into multiple submodules.

[0132] 上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。 Embodiment [0132] The present invention No. merely for description, the embodiments do not represent the merits embodiment.

[0133] 以上公开的仅为本发明的几个具体实施例,但是,本发明并非局限于此,任何本领域的技术人员能思之的变化都应落入本发明的保护范围。 Only a few [0133] above disclosed specific embodiments of the present invention, however, the present invention is not limited thereto, anyone skilled in the art can think of variations shall fall within the scope of the present invention.

Claims (11)

  1. 1.一种分布式设备中报文转发的方法,所述分布式设备中包括第一类接口板和第二类接口板,所述分布式设备作为内网的网关与外网连接,其特征在于,所述第一类接口板上存储内网路由和默认路由,所述第二类接口板上存储的路由包括外网路由,该方法进一步包括: 当所述分布式设备通过第一类接口板接收到内网侧发送的报文时,查找所述第一类接口板上存储的路由; 如果查找结果为所述报文与所述默认路由匹配,封装所述报文,根据默认路由以组播形式向所述第二类接口板转发所述报文,并记录向所述第二类接口板转发的报文的目的地址,其中,所述报文携带哈希字段;第二类接口板在本地查找与所述报文对应的出接口,当存在N条等价路由时,所述第二类接口板将所述哈希字段对N取余,得到余数M,若第M条路由的出接口在所述第二类接口板上 A method in a distributed message forwarding device, said apparatus comprising a first distributed class interface class interface board and a second board, the distributed network as the gateway device connected to the external network, characterized in wherein the first inner panel storage class interface and a default route network, said stored routing interface board comprises a second type of external network, the method further comprising: when the first device through the distributed class interface when the board receives packets sent by the network side, the routing of the interface board memory to find a first class; if the packet is a search result and match the default route, encapsulating the packet according to the default route multicast forwarding to the second form of the class interface board of the packet, the destination address and forwards the record to an interface board of the second type packet, wherein the packet carries a hash field; second interfaces Finding the local board to the packet corresponding to the interfaces, when there are N number of equivalent routes, the second type of interface board for the hash field modulo N to obtain a remainder M, when the first route M an interface board in the interface of the second type 则所述第二类接口板根据存储的外网路由,按照第M条路由向外网转发报文; 如果查找结果为所述报文与所述内网路由匹配,根据所述内网路由转发所述报文; 当所述第一类接口板有空间可以存储更多路由时,向主控板发送记录的所述报文的目的地址,申请所述报文的外网路由;主控板根据所述报文的目的地址查找路由表,若找到最长匹配的路由,则加入匹配链表,相同的路由不重复加入,并将匹配链表中的外网路由下发到所述第一类接口板;若找不到路由或找到的路由为默认路由,则不处理;所述第一类接口板根据存储的内网路由和申请得到的外网路由进行报文转发。 The interface board according to the second type stored in the external network, in accordance with the M-path to forward packets from the external network; if the packet is a search result of the matching by the inner network, said inner network according to the forwarding the packet; when the first space-based interface card can store more routing, sending to the master recording destination address of the message board, the application of the packet from the external network; MPU searching the routing table according to the destination address of the packet, if the longest matching route is found, the matching list is added, the route will not be repeated addition of the same, and the list of matching external network to be delivered by the said first class interface plate; route if no route is found, or a default route, no treatment; the first type of packets forwarded by the interface board according to the external network obtained by the NAS and the application.
  2. 2.如权利要求1所述的方法,其特征在于,所述封装所述报文包括下述一种或者多种: 封装组播标识字段,由所述第二类接口板根据所述组播标识字段和哈希字段的值确定是否处理所述报文; 为所述报文封装源MAC地址.,由所述第二类接口板根据所述源MAC地址获知所述报文的发送方接口板,进而判断是否处理所述报文; 为所述报文封装类型字段,由所述第二类接口板根据所述类型字段的值确定是否向其他接口板转发所述报文。 2. The method according to claim 1, wherein said encapsulating the packet comprises one or more of: encapsulating a multicast identifier field, by the second type according to the multicast interface board and hash value field identification field to determine whether to process the packet;., by the second known type of the packet interface board sender interface the packet encapsulated according to the source MAC address of the source MAC address plate, and then determine whether to process the packet; packet encapsulation type of the field is determined by said second type of interface board according to the value of the type field whether to forward the packet to another interface board.
  3. 3.如权利要求1所述的方法,其特征在于,所述哈希字段的值具体为: 所述报文的源地址、源端口、目的地址或目的端口中的一种或多种通过哈希运算得到的值;或者匹配到默认路由的报文计数;或者所述报文的源地址或源地址中的特定部分;由所述第二类接口板通过同一路由转发具有相同哈希字段的值的报文。 3. The method according to claim 1, wherein the hash value of the field is specifically: the packet's source address, source port, destination port or destination address of one or more through Ha calculating a value obtained Greek; or a default route to match count of packets; or a specific part of the source or source address of the packet; the interface board of the second type with the same hash fields forwarded through the same route packet value.
  4. 4.如权利要求1所述的方法,其特征在于,所述第二类接口板在本地查找与所述报文对应的出接口,包括: 如果查找到所述出接口不属于自身,所述第二类接口板丢弃所述报文,或者向所述出接口所属的接口板转发所述报文。 4. The method according to claim 1, wherein said second plate to find the class interface corresponding to the packet a local outgoing interface, comprising: if the outgoing interface to find itself does not belong, the the second type of interface board is discarded packet, or forward the packet to the interface belongs to an interface board.
  5. 5.如权利要求1所述的方法,其特征在于,所述第一类接口板向主控板申请所述报文的外网路由包括: 所述第一类接口板通过计数器统计记录的报文的目的地址的数量,并通过定时器统计向所述主控板申请外网路由的时间间隔; 当所述计数器的计数达到最大值、且所述时间间隔大于预设较小值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由;或者当所述时间间隔达到预设较大值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由。 5. The method according to claim 1, wherein said first type of said application packet interface board network from the outside to the main control board comprises: the first type of packet interface board through statistical records counters number of destination addresses of text, and apply the external network time interval by a timer to the control board statistics; when the count of the counter reaches the maximum value, and the time interval is greater than the preset lower value, to said main control board of the recording destination address of the transmitted packet, the request packet from the external network; or a preset higher value, the main control board to send the recording when the time interval reaches the said packet destination address, the application of the packet from the external network.
  6. 6.如权利要求1-5中任一项所述的方法,其特征在干,当所述分布式设备中存在正常工作的所述第二类接ロ板时,所述第一类接ロ板上即配置所述默认路由;或者在所述第一类接ロ板上的路由数量超过阈值时配置默认路由。 6. A method as claimed in any one of the preceding claims, characterized in that the dry, when the normal operation of the present apparatus in the second category distributed ro contact plate, the first type of access ro i.e. configuring the default route board; or configure a default route in the first type of connection board ro routing number exceeds a threshold value.
  7. 7.ー种分布式设备,作为内网的网关与外网连接,其特征在于,所述分布式设备包括第一类接ロ板和第二类接ロ板;所述第一类接ロ板上存储内网路由和默认路由,所述第二类接ロ板上存储的路由包括外网路由, 所述第一类接ロ板,用于存储内网路由和默认路由,在接收到内网侧发送的报文时,查找本地存储的路由;所述第一类接ロ板包括:封装単元、转发单元和记录单元,所述封装单元,用于当查找结果为所述报文与所述默认路由匹配时,封装所述报文;所述转发単元,用于当查找结果为所述报文与所述默认路由匹配时,根据所述默认路由以组播形式向所述第ニ类接ロ板转发所述报文,其中,所述报文携带哈希字段;所述记录単元,用于记录向所述第二类接ロ板转发的报文的目的地址;如果查找结果为所述报文与所述内网路由匹配,根据所述内网 7. A distributed ー devices within the network as the gateway is connected to the external network, wherein the distributed type apparatus comprises a first plate and a second type of access ro ro contact plate; the first plate type contact ro on the storage of routing and default route, then the route stored in said second board ro category includes the external network, the first type of access ro panels, for the storage of network and default routes in the network is received when the transmission side of the packet, the routing locally stored; ro the first type of contact plate comprising: a package radiolabeling element, the forwarding unit and the recording unit, the packaging unit for, when the search results to the packet and default route matches, the encapsulated packet; radiolabeling the forwarding element, for, when the search results to the packet when matching the default route, according to the default route protocol packets connected to the first Ni-based ro plate forward the packet, wherein the packet carries a hash field; radiolabeling the recording element for recording the second type to said contact plate ro forwarding destination address of the packet; if the search result is said inner packet and the matching network, according to the network 路由转发所述报文;所述第一类接ロ板还包括申请单元,所述申请単元,用于当所述第一类接ロ板有空间可以存储更多路由时,向主控板发送记录的所述报文的目的地址,申请所述报文的外网路由,以请求主控板根据所述报文的目的地址查找路由表,当找到最长匹配的路由时, 加入匹配链表,相同的路由不重复加入,并将匹配链表中的外网路由下发到所述第一类接ロ板;当找不到路由或找到的路由为默认路由时,不做处理;所述转发単元还用于,根据存储的内网路由和申请得到的外网路由进行报文转发; 所述第二类接ロ板,用于存储包括外网路由在内的路由,并在本地查找与所述报文对应的出接ロ,当存在N条等价路由时,将所述哈希字段对N取余,得到余数M,若第Μ条路由的出接ロ在所述第二类接ロ板上,则根据存储的外网路由,按照第Μ条路由向 Forwarding the routing packet; ro the first type of contact plate further comprises application means, said application radiolabeling element, for when the first plate type contact ro space can store more routing, sending to the master plate destination address of the packet is recorded, said message request from the external network to request the MPU routing table to the destination address of the packet, when the route to find the longest match, the matching list is added, Add the same route will not be repeated, and the outer matching network from the list of the first type delivered to the contact plate ro; route when the route can not be found or when the default route is found, no treatment; radiolabeling the forwarding element is also used, in accordance with the network NAS outer obtained by application and be forwarded by the packet; the second type of contact ro panels, comprising an outer storage for routing routes including, in said local and find then the corresponding message ro, when there are N number of equivalent routes, the hash field of the modulo N to obtain a remainder M, if the route from the first access Μ ro ro contact plate of the second type on the external network in accordance with the stored, according to a first route to an Μ 外网转发所述报文。 Forwarding the message to external networks.
  8. 8.如权利要求7所述的分布式设备,其特征在干, 所述封装単元还用于:为所述报文封装组播标识字段,和/或为所述报文封装源MAC地址,和/或为所述报文封装类型字段; 所述第二类接ロ板还用于:根据所述组播标识字段和哈希字段的值确定是否处理所述报文;和/或根据所述源MAC地址获知所述报文的发送方接ロ板,进而判断是否处理所述报文;和/或根据所述类型字段的值确定是否需要向其他接ロ板转发所述报文。 8. The distributed device according to claim 7, characterized in that the dry, the package element further for radiolabeling: encapsulated multicast packet to the identifier field, and / or encapsulated packet to the source MAC address, and / or encapsulation of the packet type field; ro contact plate of the second type is further configured to: determine whether to process the packet according to the multicast identification field value and the hash field; and / or in accordance with the said learned source MAC address of the packet sender ro contact plate, and then determine whether to process the packet; and / or whether to forward the packet to the other contact plate ro value of the field is determined according to the type.
  9. 9.如权利要求7所述的分布式设备,其特征在于,所述哈希字段的值具体为: 所述报文的源地址、源端ロ、目的地址或目的端ロ中的一种或多种通过哈希运算得到的值;或者匹配到默认路由的报文计数;或者所述报文的源地址或源地址中的特定部分。 9. The distributed device according to claim 7, wherein the hash value of the particular field: one of said packet source address, source ro, ro destination or destination address or plurality of values ​​obtained by hashing; or a default route to match count of packets; or a specific part of the source or source address in the packet.
  10. 10.如权利要求9所述的分布式设备,其特征在于,所述第二类接ロ板还用于: 如果查找到所述出接ロ不属于自身,丢弃所述报文,或者向所述出接ロ所属的接ロ板转发所述报文。 10. The distributed device according to claim 9, wherein said second type of contact ro board further configured to: if an access to the lookup ro itself not discard the packet, or to the a contact plate connected to said ro ro forwarding the packet belongs.
  11. 11.如权利要求7所述的分布式设备,其特征在于,所述第一类接ロ板还包括: 统计单元,与所述记录单元连接,用于统计所述记录单元记录的报文的目的地址的数量; 计时单元,用于统计向所述主控板申请外网路由的时间间隔; 所述申请单元还用于:当所述统计单元统计的数量达到最大值、且所述时间间隔大于预设较小值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由;或者当所述时间间隔达到预设较大值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由。 11. The distributed device according to claim 7, wherein said first plate further ro contact type comprising: a counting unit, connected with the recording unit for recording the message statistics unit recorded number of destination addresses; timing unit, for counting by a network application for the outer time interval to the main control board; the application unit is further configured to: when the counting unit reaches the maximum count number, and the time interval is greater than a predetermined small value, transmitted to the main control board of the recording destination address of the packet, the request packet from the external network; or when the time interval reaches a predetermined large value, to said main control board of the destination address of the packet transmission records, the application of the packet from the external network. . .
CN 201010180370 2010-05-24 2010-05-24 Distributed equipment and method for forwarding message in distributed equipment CN101827038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010180370 CN101827038B (en) 2010-05-24 2010-05-24 Distributed equipment and method for forwarding message in distributed equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010180370 CN101827038B (en) 2010-05-24 2010-05-24 Distributed equipment and method for forwarding message in distributed equipment

Publications (2)

Publication Number Publication Date
CN101827038A true CN101827038A (en) 2010-09-08
CN101827038B true CN101827038B (en) 2013-12-11

Family

ID=42690755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010180370 CN101827038B (en) 2010-05-24 2010-05-24 Distributed equipment and method for forwarding message in distributed equipment

Country Status (1)

Country Link
CN (1) CN101827038B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143072B (en) * 2011-03-21 2013-12-04 北京华为数字技术有限公司 Method for fluid control configuration and network equipment
CN102571610A (en) * 2012-03-02 2012-07-11 杭州华三通信技术有限公司 Packet forwarding method and edge equipment
CN102739526B (en) * 2012-06-13 2015-02-25 烽火通信科技股份有限公司 Realization method of efficient distributed routing list realizing method
CN104954249B (en) * 2014-03-27 2018-09-21 华为技术有限公司 One kind of message forwarding method, system and apparatus
CN104601428A (en) * 2014-12-23 2015-05-06 广州亦云信息技术有限公司 Communication method of virtual machines

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610215A (en) 2009-07-21 2009-12-23 杭州华三通信技术有限公司 Route forwarding method and gateway equipment
CN101699789A (en) 2009-09-25 2010-04-28 江苏华丽网络工程有限公司 Design method of Ethernet device stack system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1878130A (en) * 2005-06-08 2006-12-13 华为技术有限公司 Data forwarding method
CN100479465C (en) * 2005-06-10 2009-04-15 杭州华三通信技术有限公司 Method of implementing link aggregation of network equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610215A (en) 2009-07-21 2009-12-23 杭州华三通信技术有限公司 Route forwarding method and gateway equipment
CN101699789A (en) 2009-09-25 2010-04-28 江苏华丽网络工程有限公司 Design method of Ethernet device stack system

Also Published As

Publication number Publication date Type
CN101827038A (en) 2010-09-08 application

Similar Documents

Publication Publication Date Title
US8369347B2 (en) Fiber channel over Ethernet and fiber channel switching based on Ethernet switch fabrics
US20110044339A1 (en) Server-side load balancing using parent-child link aggregation groups
US20090092137A1 (en) Virtualized application acceleration infrastructure
US20130003549A1 (en) Resilient Hashing for Load Balancing of Traffic Flows
US20090135728A1 (en) User datagram protocol traceroute probe extension
US8351352B1 (en) Methods and apparatus for RBridge hop-by-hop compression and frame aggregation
US20070280258A1 (en) Method and apparatus for performing link aggregation
US20140241345A1 (en) Source routing with fabric switches in an ethernet fabric network
US20120189009A1 (en) Methods and apparatus related to route selection within a network
US20140098669A1 (en) Method and apparatus for accelerating forwarding in software-defined networks
US20090252170A1 (en) Method and device of link aggregation and method and system for transceiving mac frames
CN103227757A (en) Message forwarding method and equipment
US20140269319A1 (en) Network per-flow rate limiting
US20100215045A1 (en) Method and Apparatus for Direct Frame Switching Using Frame Contained Destination Information
US20140198793A1 (en) Traffic forwarding in a point multi-point link aggregation using a link selector data table
CN101719877A (en) Message forwarding device, network equipment and method
US20120201138A1 (en) Quality of service in a heterogeneous network
US20120163376A1 (en) Methods and apparatus to route fibre channel frames using reduced forwarding state on an fcoe-to-fc gateway
US20100074098A1 (en) Method and device for protecting ethernet tree services
CN103166874A (en) Message forwarding method and device
CN103763146A (en) Soft defined network controller and transmission information generating method of soft defined network controller
US20130107709A1 (en) Distributed Chassis Architecture Having Integrated Service Appliances
CN103888386A (en) Extensible virtual local area network message transmission method, device and system
CN101729425A (en) Method and equipment for flow sending in VRRP networking
US20120158930A1 (en) Methods and apparatus for managing next hop identifiers in a distributed switch fabric system

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model
CP03