CN101827038A - 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
CN101827038A
CN101827038A CN 201010180370 CN201010180370A CN101827038A CN 101827038 A CN101827038 A CN 101827038A CN 201010180370 CN201010180370 CN 201010180370 CN 201010180370 A CN201010180370 A CN 201010180370A CN 101827038 A CN101827038 A CN 101827038A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
packet
interface board
type
interface
network
Prior art date
Application number
CN 201010180370
Other languages
Chinese (zh)
Other versions
CN101827038B (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

Links

Abstract

The invention discloses distributed equipment and a method for forwarding a message in the distributed equipment. The method comprises the following steps of: storing a local area network route and a default route on an interface board of a first type of the distributed equipment; storing routes comprising a network route on an interface board of a second type; when the interface board of the first type receives a message sent by a local area network side, searching the route stored on the interface board of the first type, if a search result is that the message is matched with the default route, forwarding the message to the interface board of the second type according to the default route and forwarding the message to the network by the interface board of the second type according to the stored network route, thereby being capable of realizing the normal forwarding of the message when a corresponding network route does not exist on the interface board of the first type.

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 distributed a distributed packet forwarding devices.

背景技术 Background technique

[0002] 分布式设备中包括多个接口板,不同接口板可以支持相同或者不同的路由规格。 [0002] The apparatus comprises a distributed plurality of interface boards, interface boards can be different or the same support different routing 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, each routing interface board distributed devices need to be synchronized, that is exactly the same, otherwise it will cause routing error. 例如分布式设备中采用不同规格的接口板时,由于低规格接口板的路由容量小,高规格接口板的路由容量大,当分布式设备需要存储的路由超过低规格接口板的路由容量时,会造成低规格接口板上无法存储全部的路由表,当报文通过低规格接口板进行报文转发时由于没有对应的路由则会导致报文被丢弃。 When using a distributed device, for example, different specifications of the interface board, due to the small size low-capacity routing interface board, high-capacity routing interface boards large, when the device needs to store the distributed routing than routing capacity low specification interface board, cause low interface board specifications can not store all of the routing table, the packet size by a low interface board without the right will result in the routing of packets dropped packet forwarding. 因此,整个设备的规格由低规格接口板决定。 Thus, the entire device is determined by the specifications of the low interface board specifications.

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

发明内容 SUMMARY

[0005] 本发明提供了一种分布式设备和分布式设备中报文转发的方法,实现分布式设备中同时存在高规格和低规格接口板时,保证低规格接口板正常转发报文。 [0005] The present invention provides a method of distributed devices and distributed message forwarding device, a distributed device to achieve the presence of high and low standard specifications while interface board, the interface board specifications to ensure low normal packet forwarding.

[0006] 本发明提供了一种分布式设备中报文转发的方法,所述分布式设备中包括第一类接口板和第二类接口板,所述分布式设备作为内网的网关与外网连接,所述第一类接口板上存储内网路由和默认路由,所述第二类接口板上存储的路由包括外网路由,该方法进一步包括: [0006] 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 outer network connection, the first type of interface to the on-board storage of routing and default route, the stored route interface board comprises a second type of external network, the method further comprising:

[0007] 当所述分布式设备通过第一类接口板接收到内网侧发送的报文时,查找所述第一类接口板上存储的路由; [0007] When the distributed device receives a message sent by the network side of the interface board when the first type, the first type of the routing of the interface board memory;

[0008] 如果查找结果为所述报文与所述默认路由匹配,根据所述默认路由将所述报文向所述第二类接口板转发,由所述第二类接口板根据存储的外网路由将所述报文向外网转发; [0008] If the search result is that the packet matching the default route, the default route in accordance with the second type of message to the interface board forwarding, by the second storage class interface The outer plate forwarding the network packet from 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 forwarding to the second type of interface board comprising:

[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 transmitting the unicast default route corresponding to the second type of the packet interface board. [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 based on the default interface board; if the packet is a search result of the matching by the inner network, said inner network according to the packet by the forwarding Wen;

[0035] 所述第二类接口板,用于存储包括外网路由在内的路由,并向外围转发所述第一类接口板发送的报文。 [0035] The second type of interface board, for storing comprises an outer routes including the route and forward the first packet peripheral interface board type of transmission.

[0036] 所述第一类接口板包括: [0036] The first type of interface board comprising:

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

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

[0039] 所述封装单元还用于:为所述报文封装组播标识字段和哈希字段,和/或为所述报文封装源MAC地址,和/或为所述报文封装类型字段; [0039] The encapsulating unit is further configured: to the 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 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.

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

[0042] 所述报文的源地址、源端口、目的地址或目的端口中的一种或多种通过哈希运算得到的值;或者 [0042] The packet source address, source port, destination port or destination address of one kind or more of the value 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] The second type of interface board comprising:

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

[0047] 转发单元,与所述查找单元连接,用于当所述查找单元的查找结果为存在多条等价路由时,根据所述报文中携带的哈希值选择其中一条路由转发所述报文。 [0047] The forwarding unit connected to the searching unit, the searching unit for, when the search result when there are multiple equal-cost routes, based on a hash value carried in the packet forwarding route selected as one of the message.

[0048] 所述第二类接口板还用于: [0048] The second type of interface board is further configured to:

[0049] 在本地查找与所述报文对应的出接口; [0049] Finding the packet corresponding to a local interface;

[0050] 如果查找到所述出接口属于自身,通过所述出接口转发所述报文; [0051 ] 否则,丢弃所述报文,或者向所述出接口所属的接口板转发所述报文。 [0050] If the search itself belongs to the outgoing interface, through which to forward the packet out of the interface; [0051] Otherwise, discarding the packet, or forward the packet to the interface belongs to an interface board .

[0052] 所述第一类接口板还包括: [0052] The first type of interface board 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 of interface board further comprises:

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

[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 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, 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 a predetermined large value, transmitted to the main control board of the recording destination address of the packet, the request packet outside routes.

[0060] 与现有技术相比,本发明至少具有以下优点: [0060] Compared with the prior art, the present invention has at least the following advantages:

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

附图说明 BRIEF DESCRIPTION

[0062] 图1是现有技术中一种网关示意图; [0062] FIG. 1 is a prior art schematic diagram of one gateway;

[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 interface board interface board interface board specifications respectively low and high-standard interface board, for example, mixed into the routing mode, then the external network side boards high Specifications Interface boards, interface boards connected to the network side using a low standard interface board, made all the routes in the high-interface board, at a low standard interface board and default routes sent within the network (when the low standard interface board having sufficient remaining when the low-specification storage interface board may also be stored outside the network), the next hop address is the default port of super routing Interface (super Interface). 内网访问内网的报文, 可以在低规格接口板上正常转发,内网访问外网的报文,在低规格接口板上匹配到默认路由后,发送到Super Interface,通过板间转发链路由高规格接口板转发。 After packets in the network to access the network, may be forwarded normally low interface board specifications, network access packet external network interface board to match the specifications in the low default route, it transmits to the Super Interface, by forwarding chain between the plates routing a high standard interface board forwards.

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

[0080] 分布式设备首先需要在低规格接口板上下发默认路由,该默认路由的下发可以包括两种方式: [0080] First, a distributed device requires interface board specifications at low loads the default route, the default route hair may comprise two ways:

[0081] 一是当分布式设备上具有正常工作的高规格接口板时,立即在低规格接口板上下发默认路由; [0081] First, when the interface board having a high-work on a distributed device, the interface board immediately issued a default route in low specification;

[0082] 另一种方式是分布式设备判断低规格接口板上存储的路由容量达到阈值时,分布式设备低规格接口板上下发默认路由。 [0082] Another embodiment is a distributed routing device determines a low-capacity storage interface board specifications threshold is reached, distributed generation equipment at low default route interface board specifications. 这种方式下,低规格接口板上在有足够的存储空间时可以同时存储外网路由与内网路由,当路由容量达到阈值时,例如没有多余空间存储内网路由时,分布式设备在低规格接口板上下发默认路由,并设置内网路由的优先级高于外网路由,在后续需要存储内网路由时,使用内网路由替换已经存储的外网路由,默认路由不可替换。 In this way, low gauge interface board if there is sufficient storage space can be stored simultaneously by the outer and the inner network from the network, when the routing capacity reaches a threshold value, for example, no extra storage space within the network, the distributed devices at low default route specifications issued under the interface board, and is provided by the network within the network of higher priority than the outer, outside the storage required in the subsequent network by the network when the network used by the replacement has been stored by the default route can not be replaced.

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

[0084] 步骤301,分布式设备通过低规格接口板接收到内网侧发送的报文,查找该低规格接口板上存储的路由;如果查找结果为报文与默认路由匹配,执行步骤302 ;如果查找结果为报文与内网路由匹配,执行步骤303。 [0084] Step 301, the distributed device receives via the interface board into low gauge packets sent by the network side, the route to find a low interface board specifications stored; if the result is to find the default routing packets match, step 302 is performed; If the search results with the message within the matching network 303, step.

[0085] 具体的,低规格接口板上配置的默认路由与向外网转发的报文对应,当低规格接口板接收到内网侧发送的报文后,根据报文是否具有特定标识判断是否与默认路由匹配, 该特定标识可以灵活配置,例如为特定前缀。 [0085] Specifically, the low default routing configuration specifications corresponding to the packet interface board and the external network is forwarded, the interface board when low gauge receives a message sent by the network side, according to whether a particular packet is determined whether identification default route matches the specific identification can be flexibly configured, for example, a specific prefix. 如果报文具有该特定前缀,低规格接口板判断该报文的目的地为外网设备,否则该报文的目的地为内网设备。 If the message has a specific prefix, low gauge interface board 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, after the low interface board specifications Encapsulation packet sent to the Super Interface.

[0087] 具体的,低规格接口板在报文前再增加一个以太封装,封装后的报文格式如图4 所示,包括新增报文头字段和原始报文字段,原始报文字段中包括原始目的MAC、原始源MAC和原始内容,新增报文头字段中包括新增目的MAC、新增源MAC和类型字段。 [0087] In particular, the low interface board specifications prior to add an Ethernet packet encapsulated, the encapsulated packet format shown in Figure 4, comprises a new header field and a message field of the original, the original message field MAC includes an original object, the original content and the original source MAC, the new message including new object header field MAC, MAC source and type of the new field.

[0088] 其中,MAC为系统为每个槽位的接口板分配的接口板标识。 [0088] wherein, MAC system each interface board to interface board slot identifier allocated.

[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 for routing by the interface board when high-route storage equivalence; the next four bytes of the original IP packet to fill in the object.

[0090] 新增源MAC :为发送此报文的源接口板的标识。 [0090] Add source MAC: to transmit this identifier as the source interface board. [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字段填写匹配到默认路由的报文计数(即将一定计数内的报文根据同一路由转发),值从0到255,达到255后再从0开始计数。 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 0 to 255, to 255 and then starts counting from zero. 源聚合转发:以源地址部分特征作为等价转发条件(同一源地址的报文根据同一路由转发),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,分别是第0条,第1条…第n-1条路由),处理如下:将HSAH字段对η取余,得到的数字m,即转发按第m条路由转发,若此路由出接口在本板则转发,否则丢弃。 For example, if the matching route is equivalent routes (equivalent number of bars n, respectively, 0, Article 1 ... n-1 first route), processing is as follows: The modulo η HSAH field of digital 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,同时设置每次处理路由最大值ΜΡ,和两次向高规格接口板转发报文的时间间隔的较小值和较大值。 [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 ΜΡ, a smaller value to a high standard and the interface board to forward packets than two time intervals and great value.

[0101] 其中,CT、T1、T2的初始值为0 ;T1记录两次申请最小间隔,在系统开始工作或向高规格接口板转发报文时重新初始化,默认为5秒;T2记录两次申请最大间隔,在系统开始工作或向高规格接口板转发报文时重新初始化,默认为15秒;MP默认为100。 [0101] wherein, initial CT, T1, T2 value of 0; 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, began working in the system or re-initialization packet forwarding to a high standard interface board, the default is 15 seconds; MP 100 by default. 需要说明的是,上述数值仅作为本应用场景中为了实现发明效果的一种具体实现举例,对于依据本发明思想进行改变得到的其他具体方式同样属于本发明保护范围。 Incidentally, the above-mentioned value only as the present application scenario in order to achieve the effect of a specific implementation of the invention, for 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, when the low performance of the interface board receives a packet matches the default route, the packet will follow the steps 301-303 to forward, while if the MP is less than CT, then the packet destination address, the destination address of this recording record added lists, records and some do not even have a table duplicate records, CT plus one.

[0103] 3,若低性能接口板存储的路由没有达到设定的阀值,则做如下处理: [0103] 3, if the interface board memory routing low performance 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 interface board, to make a process 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. 主控板将这些路由下发到低性能接口板。 It will be sent to the MPU interface boards such low performance routing. 这样当低性能接口板匹配到对应的外网路由时,可以通过正常跨板转发,发送到高性能接口板处理,减小了部分高性能接口板处理的工作。 The interface board so that when the low performance matched to the outer network by a corresponding, can be forwarded by a normal cross-board, high-performance interface board to send process, reducing the working portion of the high-performance interface board processing. 具体的,当低性能接口板上配置有内网路由、外网路由和默认路由后,若低性能接口板接收的报文既匹配到外网路由又匹配到默认路由,则优先根据外网路由进行报文转发。 Specifically, when the low performance network interface board are disposed within the outer and the default route by the network, if the low performance of the interface board receives the packet matches both the outer and the matching network to the default route, according to the priority of the outer web packet forwarding.

[0106] 需要说明的是,在低性能接口板存储有外网路由且达到设定的阈值时,如果需要存储新的内外路由,则使用新增加的内外路由替换外网路由。 [0106] Incidentally, in the low performance network interface card is stored by the outer time and 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, is in the form of low gauge multicast packets sent to the interface board performance interface board, forwarding process as shown in FIG. 需要说明的是,低规格接口板也可以单播形式向高规格接口板发送报文,转发流程如图6所示。 Incidentally, the interface board may be low gauge unicast packets to send high-interface board, the forwarding process shown in Figure 6. 此时,低规格接口板以单播形式向高规格接口板发送报文,接收到报文的高规格接口板查找路由,如果本板没有对应出接口,则向其他临近高规格接口板转发报文。 In this case, the low interface board specifications unicast packets sent to high-interface board, the received packets to the routing high-interface board, if the board is not present corresponds to an interface to forward packets to the other nearby high-interface board Wen. 例如图6中,设备存在两块高性能接口板,低性能接口板并不知道路由到底从哪块接口板转发出去,以单播形式将报文先转发到B,在B上查找路由发现出接口为A, 然后再从B转发到A。 In FIG. 6, for example, the presence of two high-performance device interface board, the low performance of the interface board does not know the routing in the end piece of the interface board from the forward out unicast packets to forward to B, B to search for routes in the discovery interface A, and then transferred from B to A.

[0108] 通过采用本发明提供的方法,在分布式设备的第一类接口板存储内网路由和默认路由,第二类接口板上存储包括外网路由在内的路由,当第一类接口板接收到内网侧发送的报文时,查找第一类接口板上存储的路由,如果查找结果为报文与默认匹配,则根据默认路由将所述报文向第二类接口板转发,由第二类接口板根据存储的外网路由将报文向外网转发,从而可以实现在第一类接口板上没有对应的外网路由时仍然对报文进行正常转发。 [0108] By using the method provided by the 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.

[0109] 本发明提供一种分布式设备,作为内网的网关与外网连接,所述分布式设备包括第一类接口板和第二类接口板;第一类接口板和第二类接口板的数量可以根据实际需要设置,所述第一类接口板上存储内网路由和默认路由,所述第二类接口板上存储的路由包括外网路由, [0109] The present invention provides a distributed device, a gateway and the external network is connected to the network, the distributed type apparatus comprises a first interface board and the second type of interface board; the first type and second type interfaces interface board the number of plates may be provided according to actual needs, the first type of the interface board storage of routing and default route, the stored route interface board comprises a second type of external network,

[0110] 所述第一类接口板,用于存储内网路由和默认路由,在接收到内网侧发送的报文时,查找本地存储的路由;如果查找结果为所述报文与所述默认路由匹配,根据所述默认路由将所述报文向所述第二类接口板转发;如果查找结果为所述报文与所述内网路由匹配, 根据所述内网路由转发所述报文; [0110] 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 based on the default interface board; if the packet is a search result of the matching by the inner network, said inner network according to the packet by the forwarding Wen;

[0111] 所述第二类接口板,用于存储包括外网路由在内的路由,并向外围转发所述第一类接口板发送的报文。 [0111] The second type of interface board, for storing comprises an outer routes including the route and forward the first packet peripheral interface board type of transmission.

[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 (17)

  1. 一种分布式设备中报文转发的方法,所述分布式设备中包括第一类接口板和第二类接口板,所述分布式设备作为内网的网关与外网连接,其特征在于,所述第一类接口板上存储内网路由和默认路由,所述第二类接口板上存储的路由包括外网路由,该方法进一步包括:当所述分布式设备通过第一类接口板接收到内网侧发送的报文时,查找所述第一类接口板上存储的路由;如果查找结果为所述报文与所述默认路由匹配,根据所述默认路由将所述报文向所述第二类接口板转发,由所述第二类接口板根据存储的外网路由将所述报文向外网转发;如果查找结果为所述报文与所述内网路由匹配,根据所述内网路由转发所述报文。 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, wherein, the first inner panel of the storage class interface routes and default routes, routing interface board type stored in said second external network comprises a, the method further comprising: the distributed type apparatus is received through the first interface board when packet transmitted to the side of the network, the routing of the interface plate of the first type stored; if the packet is a search result and match the default route, according to the default route the packet to the said second type of interface board forwarding, by the interface board according to the second type of outer NAS message from the external network; if the packet is a search result within the network by the matching, in accordance with the said packet within the network by the repeater.
  2. 2.如权利要求1所述的方法,其特征在于,根据所述默认路由将所述报文向所述第二类接口板转发包括:封装所述报文并根据默认路由以组播形式向板间链路转发所述报文;或者根据所述默认路由以单播形式向对应的所述第二类接口板发送所述报文。 2. The method according to claim 1, wherein routing comprises forwarding the packet to the second interface board according to the default type: encapsulating the packet according to the default route protocol packets between the plates of the forward link packet; or send the message in unicast to the corresponding interface board of the second type according to the default route.
  3. 3.如权利要求2所述的方法,其特征在于,所述封装所述报文包括下述一种或者多种: 封装组播标识字段和哈希字段,由所述第二类接口板根据所述组播标识字段和哈希字段的值确定是否处理所述报文;为所述报文封装源MAC地址,由所述第二类接口板根据所述源MAC地址获知所述报文的发送方接口板,进而判断是否处理所述报文;为所述报文封装类型字段,由所述第二类接口板根据所述类型字段的值确定是否向其他接口板转发所述报文。 3. The method according to claim 2, wherein said encapsulating the packet comprises one or more of: a package identifier field and a multicast hash field, according to the second type of interface board field and the value of the multicast identification hash field to determine whether to process the packet; the packet is encapsulated source MAC address, the interface board by the second known type of the packet according to the source MAC address sender interface board, 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.
  4. 4.如权利要求3所述的方法,其特征在于,所述哈希字段的值具体为:所述报文的源地址、源端口、目的地址或目的端口中的一种或多种通过哈希运算得到的值;或者匹配到默认路由的报文计数;或者所述报文的源地址或源地址中的特定部分; 由所述第二类接口板通过同一路由转发具有相同哈希字段的值的报文。 4. The method according to claim 3, wherein the hash value of the specific field are: the source address of the packet, 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.
  5. 5.如权利要求3或4所述的方法,其特征在于,所述第二类接口板根据存储的外网路由将所述报文向外网转发包括:所述第二类接口板在本地查找与所述报文对应的出接口;如果存在多条等价路由,所述第二类接口板根据所述报文中携带的哈希值选择其中一条路由转发所述报文。 5. A method as claimed in claim 3 or claim 4, wherein said second type of interface board comprises forwarding the packets to the external network outside the network according to the stored: the second type of interface board in the local Find out the packet corresponding to the interface; if equal-cost routes exist, select the second type of interface board in which a route forwarding the packet according to a hash value of the message carried.
  6. 6.如权利要求1所述的方法,其特征在于,所述第二类接口板根据存储的外网路由将所述报文向外网转发包括:所述第二类接口板在本地查找与所述报文对应的出接口;如果查找到所述出接口属于自身,所述第二类接口板通过所述出接口转发所述报文; 否则,所述第二类接口板丢弃所述报文,或者向所述出接口所属的接口板转发所述报文。 6. The method according to claim 1, wherein said second type of interface board is forwarded by the network packets to the external memory in accordance with an outer network comprises: the second type and the interface board in the local lookup said message corresponding to the outgoing interface; if the interface belongs to the find itself, the second type of interface board via the egress interface of the packet; otherwise, the second type of discarding the packet interface board text, or forward the packet to the interface belongs to an interface board.
  7. 7.如权利要求1所述的方法,其特征在于,根据所述默认路由将所述报文向所述第二类接口板转发之后,还包括:所述第一类接口板向主控板申请所述报文的外网路由; 所述第一类接口板根据存储的内网路由和申请得到的外网路由进行报文转发。 7. The method according to claim 1, characterized in that, after routing the packet to the second type based on the default forwarding interface board, further comprising: the first type of interface board to the main control board application of the packet from the external network; forward the first packet based network interface board according to the external network and the stored obtained by the application carried out.
  8. 8.如权利要求7所述的方法,其特征在于,所述第一类接口板向主控板申请所述报文的外网路由包括:所述第一类接口板记录向所述第二类接口板转发的报文的目的地址,通过计数器统计记录的报文的目的地址的数量,并通过定时器统计向所述主控板申请外网路由的时间间隔;当所述计数器的计数达到最大值、且所述时间间隔大于预设较小值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由;或者当所述时间间隔达到预设较大值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由。 8. The method according to claim 7, wherein the first type of application to the MPU interface board of the packet from the external network comprises: the first type of record to the second interface board class interface board destination addresses of packets forwarded by the destination address of the packet number counter statistical records, and applied by the external network to the time interval by a timer MPU statistics; when the count of said counter reaches maximum value, 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 preset large value, transmitted to the main control board of the recording destination address of the packet, the request packet from the external network.
  9. 9.如权利要求1_4、6-8中任一项所述的方法,其特征在于,当所述分布式设备中存在正常工作的所述第二类接口板时,所述第一类接口板上即配置所述默认路由;或者在所述第一类接口板上的路由数量超过阈值时配置默认路由。 1_4,6-8 9. The method according to any one of claims, wherein, when the normal operation of the present apparatus in the distributed second class interface board, the first type of interface board i.e. on configuring the default route; configure a default route or when the number of the first type of routing interface board exceeds a threshold value.
  10. 10. 一种分布式设备,作为内网的网关与外网连接,其特征在于,所述分布式设备包括第一类接口板和第二类接口板;所述第一类接口板上存储内网路由和默认路由,所述第二类接口板上存储的路由包括外网路由,所述第一类接口板,用于存储内网路由和默认路由,在接收到内网侧发送的报文时,查找本地存储的路由;如果查找结果为所述报文与所述默认路由匹配,根据所述默认路由将所述报文向所述第二类接口板转发;如果查找结果为所述报文与所述内网路由匹配,根据所述内网路由转发所述报文;所述第二类接口板,用于存储包括外网路由在内的路由,并向外围转发所述第一类接口板发送的报文。 A distributed devices within the network as the gateway connecting the external network, wherein 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 routes, routing the stored second type of interface board comprises an outer network by the first type of interface board for the storage of network and default routes in the received packets to the network side when a route lookup locally stored; if the result is to find the default route the packet matches, the packet forwarding route to the second type based on the default interface board; if the search result is reported described by the matching with the inner network, said inner network according to the packet by the repeater; the second type of interface board, for storing comprises an outer routes including the route, and forwards the periphery of the first type Interface board packets transmitted.
  11. 11.如权利要求10所述的分布式设备,其特征在于,所述第一类接口板包括: 封装单元,用于封装所述报文;转发单元,用于根据所述默认路由以组播形式向板间链路转发所述封装单元封装后的报文;或者根据所述默认路由以单播形式向对应的所述第二类接口板发送所述报文。 Forwarding unit, according to the default route for multicast; encapsulation means for encapsulating the packet: 11. The distributed device according to claim 10, wherein said interface board comprises a first type forwarding the encapsulated packet in the form of the link plate between the unit packages; or send the message in unicast to the corresponding interface board of the second type according to the default route.
  12. 12.如权利要求11所述的分布式设备,其特征在于,所述封装单元还用于:为所述报文封装组播标识字段和哈希字段,和/或为所述报文封装源MAC地址,和/或为所述报文封装类型字段;所述第二类接口板还用于:根据所述组播标识字段和哈希字段的值确定是否处理所述报文;和/或根据所述源MAC地址获知所述报文的发送方接口板,进而判断是否处理所述报文;和/或根据所述类型字段的值确定是否需要向其他接口板转发所述报文。 12. The distributed device according to claim 11, wherein said encapsulating unit is further configured: to the encapsulated multicast packet identification field and a hash field, and / or from the source packet encapsulation MAC address, and / or for the encapsulation of the packet type field; 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 the source MAC address of the packet is known to the sender of the interface board, and then determines whether the packet process; and / or value of the type field to determine whether to forward the packet to the boards based.
  13. 13.如权利要求12所述的分布式设备,其特征在于,所述哈希字段的值具体为: 所述报文的源地址、源端口、目的地址或目的端口中的一种或多种通过哈希运算得到的值;或者匹配到默认路由的报文计数;或者所述报文的源地址或源地址中的特定部分。 13. The distributed device according to claim 12, wherein the hash value of the specific field are: the source address of the packet, source port, destination port addresses or one kind or more purposes value 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.
  14. 14.如权利要求12或13所述的分布式设备,其特征在于,所述第二类接口板包括: 查找单元,用于在本地查找与所述报文对应的出接口;转发单元,与所述查找单元连接,用于当所述查找单元的查找结果为存在多条等价路由时,根据所述报文中携带的哈希值选择其中一条路由转发所述报文。 Forwarding unit, and; a searching unit configured to find out the local interface corresponding to the packet: 12 or 14. The distributed device according to claim 13, wherein said second type of interface board comprising the search unit is connected, when the search unit for lookup when there are multiple equal-cost routes, based on a hash value of the message carrying the selected one of said packet routing and forwarding result.
  15. 15.如权利要求10所述的分布式设备,其特征在于,所述第二类接口板还用于: 在本地查找与所述报文对应的出接口;如果查找到所述出接口属于自身,通过所述出接口转发所述报文; 否则,丢弃所述报文,或者向所述出接口所属的接口板转发所述报文。 15. The distributed device according to claim 10, wherein said 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.
  16. 16.如权利要求10所述的分布式设备,其特征在于,所述第一类接口板还包括: 申请单元,用于向主控板申请所述报文的外网路由;转发单元,用于根据存储的内网路由和申请得到的外网路由进行报文转发。 Forwarding unit for; application unit configured to apply the message to the external network by the main control board: 16. The distributed device according to claim 10, wherein said first type of interface board further comprises in the packet is forwarded by the external network according to the NAS and the application obtained from.
  17. 17.如权利要求10所述的分布式设备,其特征在于,所述第一类接口板还包括: 记录单元,用于记录向所述第二类接口板转发的报文的目的地址;统计单元,与所述记录单元连接,用于统计所述记录单元记录的报文的目的地址的数量;计时单元,用于统计向所述主控板申请外网路由的时间间隔;所述申请单元还用于:当所述统计单元统计的数量达到最大值、且所述时间间隔大于预设较小值时,向所述主控板发送记录的所述报文的目的地址,申请所述报文的外网路由; 或者当所述时间间隔达到预设较大值时,向所述主控板发送记录的所述报文的目的地址, 申请所述报文的外网路由。 17. The distributed device according to claim 10, wherein said first type of interface board further comprises: a recording means for recording the destination address to forward to the second type of packet interface board; Statistics number of units connected to the recording means, recording means for recording the count of the packet destination address; timing unit, for counting by a network application for the outer time interval to the main control board; the application unit. further configured to: when the statistical maximum quantity statistics unit, and the time interval is greater than a preset lower value, transmitted to the main control board of the recording destination address of the packet, the request packet outside the network packets; 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.
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 true CN101827038A (en) 2010-09-08
CN101827038B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143072A (en) * 2011-03-21 2011-08-03 华为数字技术有限公司 Method for fluid control configuration and network equipment
CN102571610A (en) * 2012-03-02 2012-07-11 杭州华三通信技术有限公司 Packet forwarding method and edge equipment
CN102739526A (en) * 2012-06-13 2012-10-17 烽火通信科技股份有限公司 Realization method of efficient distributed routing list realizing method
CN104601428A (en) * 2014-12-23 2015-05-06 广州亦云信息技术有限公司 Communication method of virtual machines
CN104954249A (en) * 2014-03-27 2015-09-30 华为技术有限公司 Packet forwarding method, system and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725761A (en) * 2005-06-10 2006-01-25 杭州华为三康技术有限公司 Method of implementing link aggregation of network equipment
CN1878130A (en) * 2005-06-08 2006-12-13 华为技术有限公司 Data forwarding method
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

Patent Citations (4)

* 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
CN1725761A (en) * 2005-06-10 2006-01-25 杭州华为三康技术有限公司 Method of implementing link aggregation of network equipment
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

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143072A (en) * 2011-03-21 2011-08-03 华为数字技术有限公司 Method for fluid control configuration and network equipment
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
CN102739526A (en) * 2012-06-13 2012-10-17 烽火通信科技股份有限公司 Realization method of efficient distributed routing list realizing method
CN102739526B (en) * 2012-06-13 2015-02-25 烽火通信科技股份有限公司 Realization method of efficient distributed routing list realizing method
CN104954249A (en) * 2014-03-27 2015-09-30 华为技术有限公司 Packet forwarding method, system and device
WO2015143981A1 (en) * 2014-03-27 2015-10-01 华为技术有限公司 Packet forwarding method, system, and apparatus
CN104601428A (en) * 2014-12-23 2015-05-06 广州亦云信息技术有限公司 Communication method of virtual machines

Also Published As

Publication number Publication date Type
CN101827038B (en) 2013-12-11 grant

Similar Documents

Publication Publication Date Title
US20130003549A1 (en) Resilient Hashing for Load Balancing of Traffic Flows
US20090135728A1 (en) User datagram protocol traceroute probe extension
US20070280258A1 (en) Method and apparatus for performing link aggregation
US20120155467A1 (en) Methods for configuring network switches
US20120189009A1 (en) Methods and apparatus related to route selection within a network
US20050027881A1 (en) Method and apparatus for direct frame switching using frame contained destination information
US20140098669A1 (en) Method and apparatus for accelerating forwarding in software-defined networks
US20110238816A1 (en) Methods and apparatus for automatically provisioning resources within a distributed control plane of a switch
US20090252170A1 (en) Method and device of link aggregation and method and system for transceiving mac frames
CN1921457A (en) Network equipment and message transferring method based on multiple-core processor
CN1725761A (en) Method of implementing link aggregation of network equipment
CN103227757A (en) Message forwarding method and equipment
US20120201138A1 (en) Quality of service in a heterogeneous network
US20140198793A1 (en) Traffic forwarding in a point multi-point link aggregation using a link selector data table
US20120163376A1 (en) Methods and apparatus to route fibre channel frames using reduced forwarding state on an fcoe-to-fc gateway
US20130107709A1 (en) Distributed Chassis Architecture Having Integrated Service Appliances
CN103763146A (en) Soft defined network controller and transmission information generating method of soft defined network controller
CN101719877A (en) Message forwarding device, network equipment and method
CN102413046A (en) Method for forwarding flow by means of virtual router redundancy protocol backup set and equipment
CN103166874A (en) Message forwarding method and device
US20100074098A1 (en) Method and device for protecting ethernet tree services
US20120158930A1 (en) Methods and apparatus for managing next hop identifiers in a distributed switch fabric system
US9008080B1 (en) Systems and methods for controlling switches to monitor network traffic
CN103067277A (en) Method of building control channel, forwarding point (FP) and controller
CN101505278A (en) Packet forwarding path obtaining method, packet forwarding method and packet forwarding apparatus

Legal Events

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