WO2016183944A1 - Message forwarding configuration method and apparatus for communication device, and message forwarding method - Google Patents
Message forwarding configuration method and apparatus for communication device, and message forwarding method Download PDFInfo
- Publication number
- WO2016183944A1 WO2016183944A1 PCT/CN2015/085961 CN2015085961W WO2016183944A1 WO 2016183944 A1 WO2016183944 A1 WO 2016183944A1 CN 2015085961 W CN2015085961 W CN 2015085961W WO 2016183944 A1 WO2016183944 A1 WO 2016183944A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- next hop
- interface
- routing
- communication device
- module
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/54—Organization of routing tables
Definitions
- the present invention relates to the field of data communication of a communication device, and in particular, to a message forwarding configuration method, device, and message forwarding method for a communication device.
- Layer 3 forwarding is mainly based on route forwarding.
- the route and the next hop can find the egress of the packet and the modification policy of the packet header.
- at least two types of interfaces are forwarded, including an Ethernet interface and a narrowband interface.
- the difference between the narrowband interface and the Ethernet interface mainly includes: Layer 3 forwarding of the Ethernet interface, which is non-connected. Therefore, one egress may correspond to multiple next hops, and the Layer 3 forwarding of the narrowband interface is generally connection-oriented. An interface will only correspond to one next hop.
- the destination IP address is 10.10.10.10
- the mask is 255.255.0.0
- the next hop IP is 1.1.1.1
- the mask is 255.255.255.255.
- the ordinary Ethernet interface Layer 3 forwarding information flow is: after the routing protocol interaction succeeds, the upper layer The underlying hardware will be notified to write the routing table and the next hop table, respectively.
- the key value of the routing table is IP+mask (ie 10.10.10.10+16 in the above example), and the result of the entry is the next hop index; the allocation strategy of the next hop index is the next hop IP+export (ie 1.1.1.1+) Export).
- the key value of the next hop table is the next hop index, and the result is the exit information.
- the routing table and the next hop table are associated by the next hop index to form complete forwarding information.
- the narrowband interface only sends routes and no next hop information is sent.
- the routing module receives the routing information, it writes the routing table.
- the outgoing interface is a narrowband interface
- the narrowband interface IP+ narrowband interface is used. Apply for the next hop index and write a hop table directly.
- the next hop table of the narrowband interface strongly associates many interface related information, such as the tag (label) negotiated inside the interface, and the processing priority of the interface.
- the routing module is notified to refresh the next hop table of the narrowband interface. During the refreshing process, other related information of the interface needs to be obtained. This results in strong correlation between the interface module and the routing module, which increases the complexity between modules and improves the difficulty of fault location.
- the embodiment of the present invention provides a packet forwarding configuration method, a device, and a packet forwarding method for a communication device, so as to at least solve the related problem in the related art, because the configuration of the narrowband interface requires strong association between the interface module and the routing module, and the module is The complexity of the problem provides the difficulty of fault location.
- an embodiment of the present invention provides a packet forwarding configuration method for a communications device, including:
- the interface module of the communication device writes the next hop table of the narrowband interface
- the routing module of the communication device obtains a routing table, and determines that the routing exit is the narrowband interface according to the routing table, and establishes an association with the next hop table in the routing table.
- the establishing, by the routing module, the association with the next hop table in the routing table includes: the routing module acquiring, by the narrowband interface, the next hop table index and writing In the routing table.
- the next hop table includes: a next hop hardware table, and encapsulation information and forwarding information of the narrowband message.
- the interface module performs corresponding modification on the next hop table of the narrowband interface when the attribute of the narrowband interface changes.
- the attribute information of the narrowband interface includes: an internal negotiation label of the narrowband interface and/or a processing priority of the narrowband interface.
- the corresponding modification of the next hop table of the narrowband interface by the interface module includes: the interface module acquires a next hop index by using the narrowband interface; The jump index reads the changed next hop table; and updates the attribute content that changes according to the changed next hop table.
- the embodiment of the invention further provides a packet forwarding method, including:
- the communication device is configured according to the configuration method according to any of the above embodiments;
- the communication device forwards the packet according to the configuration.
- an embodiment of the present invention provides a communications device, including:
- An interface module configured to write a next hop table of the narrowband interface
- the routing module is configured to obtain a routing table, and determine, according to the routing table, that the routing exit is the narrowband interface, and establish an association with the next hop table in the routing table.
- the routing module includes: a determining submodule, configured to determine whether a routing exit of the routing table is the narrowband interface; and an association establishing submodule, configured to be in the determining submodule If the result of the determination is yes, the next hop table index is obtained by the narrowband interface and written into the routing table.
- the interface module is further configured to perform corresponding modification on the next hop table of the narrowband interface when the attribute of the narrowband interface changes.
- the obtaining submodule is configured to acquire the next hop index by using the narrowband interface, and the reading submodule is configured to read the changed next hop table according to the next hop index. And updating the submodule, and setting the content of the attribute to be changed according to the changed next hop table.
- the packet forwarding configuration method of the communication device is to write the next hop table of the narrowband interface in the interface module of the communication device, obtain the routing table through the routing module, and determine the routing exit according to the routing table.
- the narrowband interface is described, an association with the next hop table is established in the routing table.
- the method of the present invention simplifies the routing and forwarding mode of the narrowband interface, and only needs to write the next hopping table of the narrowband interface in the interface module of the communication device, and does not need to be in the routing module. Writing is performed, which reduces the complexity between modules in the communication device and simplifies the forwarding process of the narrowband interface.
- FIG. 1 is a schematic flowchart of a packet forwarding configuration method of a communication device according to Embodiment 1 of the present invention
- FIG. 2 is a schematic structural diagram of a communication device according to Embodiment 3 of the present invention.
- Embodiment 1 is a diagrammatic representation of Embodiment 1:
- the packet forwarding configuration method of the communication device includes:
- the interface module of the communication device writes the next hop table of the narrowband interface; in this embodiment, during the creation of the narrowband interface of the communication device, the narrowband interface is written in the interface module of the communication device.
- a hop table it should be noted that the communication device in the solution mainly includes a device that can complete the packet forwarding function, including a router, a switch, and the like; the content of the next hop table includes: a next hop hardware table.
- the FPGA Field-Programmable Gate
- the Array Field Programmable Gate Array module will send the Ethernet header to the forwarding module (the Ethernet header is the internal information of the device). After the forwarding module finishes processing the packet, the Ethernet header is encapsulated (the destination mac is a fixed mac).
- the identifier is a narrowband packet
- the vlan Virtual Local Area Network
- the FPGA module is Obtaining the header information they want, but also will remove the encapsulated Ethernet header; thus, must be included in the next-hop table hop hardware table, and the encapsulation information packets and forwards the narrowband three information message;
- the routing module of the communication device obtains a routing table, and determines, according to the routing table, whether the routing exit is the narrowband interface, and if yes, proceeds to S103; specifically, after the routing protocol negotiation of the communication device succeeds, the communication device The upper module forwards the routing table to the underlying routing module, thereby After receiving the routing table, the module determines whether the route exit in the routing table is a narrowband exit.
- the routing module establishes an association with the next hop table in the routing table. In this step, the routing module only needs to establish an association with the next hop table, and does not need to write the next hop table while establishing the association, as in the prior art.
- the routing module setup process reduces the difficulty of fault location.
- the establishing, by the routing module in the routing table, the association with the next hop table in the routing table includes: the routing module acquiring the next hop table index by using the narrowband interface and writing the routing table. Therefore, the routing module establishes an association between the routing table and the next hop table according to the index of the next hop table obtained by the routing module.
- the interface module When the attribute of the narrowband interface changes, the interface module performs corresponding modification on the next hop table of the narrowband interface.
- the attributes of the narrowband interface include: an internal negotiation label of the narrowband interface and/or a processing priority of the narrowband interface.
- the change of the attribute of the narrowband interface includes: the internal negotiation label of the narrowband interface changes, or the processing priority of the narrowband interface changes, or the internal negotiation label and the processing priority of the narrowband interface change.
- the interface module directly changes the next hop table written by the interface module; the interface module obtains the next hop index by using the narrowband interface; and reads according to the next hop index.
- the changed next hop table the attribute content that changes is updated according to the changed next hop table.
- the narrowband interface is used to obtain the next hop index, and then the next hop index is read by the next hop index, and the corresponding internal negotiation label field is used with the new value.
- Overwrite write to the next hop table.
- the routing module of the communication device is required to refresh the next hop table of the narrowband interface, and the narrowband interface needs to be acquired during the refreshing process.
- Other information is very cumbersome, and the solution only needs to directly modify the next hop table of the corresponding narrowband interface in the interface module, which simplifies the process. Just operate.
- Embodiment 2 is a diagrammatic representation of Embodiment 1:
- the present invention further provides a method for packet forwarding, the communication device is configured according to the configuration method according to any of the above embodiments; the communication device forwards the packet according to the configuration.
- the specific method for packet forwarding includes:
- Step 1 The communication device is configured according to the configuration method.
- the specific configuration process includes: the interface module of the communication device writes the next hop table of the narrowband interface, the routing module of the communication device obtains the routing table, and determines the route according to the routing table. When the egress is the narrowband interface, establishing an association with the next hop table in the routing table;
- Step 2 The communication device forwards the packet according to the configuration.
- the destination address in the packet is often the host address, and the destination address in the routing table is often the network address. Therefore, the forwarding device needs to have a bottom layer.
- Operation First, perform a logical AND operation on the destination address in the packet and the subnet mask in the routing table to obtain a network address, and then compare the obtained network address with the network address in the routing table. Just think it matches, otherwise it doesn't match. If the routing table matches, the communication device checks whether the next hop address of the matched routing table is on the directly connected link; if it is on the directly connected link, it forwards according to the next hop; if not directly connected On the link, the routing entry needs to be searched for the routing entry matching the next hop address again. After the next hop address is determined, the communication device sends the packet to the corresponding interface, and the interface performs corresponding address resolution. After the corresponding link layer address is parsed, the packet is encapsulated and forwarded.
- Embodiment 3 is a diagrammatic representation of Embodiment 3
- the communication device 20 includes an interface module 201 and a routing module 202.
- the interface module 201 is configured to write a next hop table of a narrowband interface; the routing module 202 is configured to obtain a route. And determining, according to the routing table, that the routing exit is the narrowband interface, establishing an association with the next hop table in the routing table. It should be understood that for the communication device 20 During the creation of the narrowband interface, the next hop table of the narrowband interface is written in the interface module 201 of the communication device 20; the communication device 20 mainly includes a device that can complete the packet forwarding function, including a router.
- the content of the next hop table includes: a next hop hardware table, and encapsulation information and forwarding information of the narrowband packet; after the routing protocol negotiation of the communication device succeeds, the upper module of the communication device forwards the routing table
- the routing module 202 determines whether the routing exit in the routing table is a narrowband exit after receiving the routing table; the routing module 202 only needs to establish an association with the next hop table. There is no need to write the next hop table while establishing the association, as in the prior art, which simplifies the setting process of the routing module 202 and reduces the difficulty of fault location.
- the routing module 202 includes: a determining sub-module, configured to determine whether the routing exit of the routing table is the narrowband interface; and the association establishing sub-module is configured to use when the determining result of the determining sub-module is yes
- the narrowband interface obtains the next hop table index and writes the routing table; the association establishing submodule establishes an association between the next hop table and the routing table after obtaining the routing table.
- the interface module 201 is further configured to perform corresponding modification on the next hop table of the narrowband interface when the attribute of the narrowband interface changes.
- the attributes of the narrowband interface include: an internal negotiation label of the narrowband interface and/or a processing priority of the narrowband interface.
- the change of the attribute of the narrowband interface includes: the internal negotiation label of the narrowband interface changes, or the processing priority of the narrowband interface changes, or the internal negotiation label and the processing priority of the narrowband interface change.
- the attribute of the narrowband interface changes, and the interface module directly modifies the next hop table written thereto.
- the interface module includes: acquiring a sub-module, configured to acquire a next hop index by using the narrowband interface; and reading a sub-module, configured to read the changed next hop table according to the next hop index;
- the update submodule is configured to update the attribute content that changes according to the changed next hop table. For example, when the internal negotiation label of the narrowband interface changes, the acquisition submodule Set to use the narrowband interface to obtain its next hop index; the read submodule is configured to read the next hop table according to the next hop index; the update submodule then uses the corresponding internal negotiation label field with a new one. The value is overwritten and written to the next hop table.
- the invention creates a routing table in the routing table by writing the next hop table of the narrowband interface in the interface module of the communication device, and obtaining the routing table through the routing module, and determining that the routing exit is the narrowband interface according to the routing table.
- the association between the next hop tables. simplifies the routing and forwarding mode of the narrowband interface, and only needs to write the next hop table of the narrowband interface in the interface module of the communication device, and does not need to write in the routing module, thereby reducing the module in the communication device.
- the complexity of the simplification of the forwarding process of the narrowband interface is mapped to the routing table.
- the packet forwarding configuration method, apparatus, and packet forwarding method of the communication device provided by the embodiment of the present invention have the following beneficial effects: the routing and forwarding mode of the narrowband interface is simplified, and only needs to be in the interface module of the communication device.
- the next hop table written to the narrowband interface does not need to be written in the routing module. This reduces the complexity between modules in the communication device and simplifies the forwarding process of the narrowband interface.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本发明涉及通信设备的数据通讯领域,具体涉及一种通信设备的报文转发配置方法、装置及报文转发方法。The present invention relates to the field of data communication of a communication device, and in particular, to a message forwarding configuration method, device, and message forwarding method for a communication device.
在路由器或者交换机等通信设备上,三层转发主要依据路由转发,通过路由和下一跳能为报文找到报文的出口和报文头部的修改策略。而在现有的路由器或者交换机上,至少有两种接口的报文转发,包括以太接口和窄带接口。窄带接口和以太接口之间的区别主要包括:以太接口的三层转发,面向非连接,因此一个出口可能对应多个下一跳,而窄带接口的三层转发,一般都是面向连接的,即一个接口只会对应一个下一跳。On a communication device such as a router or a switch, Layer 3 forwarding is mainly based on route forwarding. The route and the next hop can find the egress of the packet and the modification policy of the packet header. On an existing router or switch, at least two types of interfaces are forwarded, including an Ethernet interface and a narrowband interface. The difference between the narrowband interface and the Ethernet interface mainly includes: Layer 3 forwarding of the Ethernet interface, which is non-connected. Therefore, one egress may correspond to multiple next hops, and the Layer 3 forwarding of the narrowband interface is generally connection-oriented. An interface will only correspond to one next hop.
如:目的IP为10.10.10.10,掩码是255.255.0.0,下一跳的IP是1.1.1.1,掩码是255.255.255.255;普通以太接口三层转发信息流程为:路由协议交互成功之后,上层会分别通知底层硬件写路由表和下一跳表。路由表的键值为IP+掩码(即上例中的10.10.10.10+16),表项结果是下一跳索引;下一跳索引的分配策略是下一跳IP+出口(即1.1.1.1+出口)。而下一跳表的键值就是下一跳索引,结果是出口信息。通过下一跳索引就将路由表和下一跳表关联起来,形成了完整的转发信息。相对以太接口,窄带接口只会下发路由,没有下一跳信息下发,底层路由模块在收到路由信息时,写路由表,同时发现出口是窄带接口时,用窄带接口的IP+窄带接口去申请下一跳索引,直接写下一跳表。For example, the destination IP address is 10.10.10.10, the mask is 255.255.0.0, the next hop IP is 1.1.1.1, and the mask is 255.255.255.255. The ordinary Ethernet interface Layer 3 forwarding information flow is: after the routing protocol interaction succeeds, the upper layer The underlying hardware will be notified to write the routing table and the next hop table, respectively. The key value of the routing table is IP+mask (ie 10.10.10.10+16 in the above example), and the result of the entry is the next hop index; the allocation strategy of the next hop index is the next hop IP+export (ie 1.1.1.1+) Export). The key value of the next hop table is the next hop index, and the result is the exit information. The routing table and the next hop table are associated by the next hop index to form complete forwarding information. Compared with the Ethernet interface, the narrowband interface only sends routes and no next hop information is sent. When the routing module receives the routing information, it writes the routing table. When the outgoing interface is a narrowband interface, the narrowband interface IP+ narrowband interface is used. Apply for the next hop index and write a hop table directly.
相对于以太接口,窄带接口下一跳表中,强关联了很多接口相关信息,如接口内部协商的tag(标签)、接口的处理优先级等。当窄带接口的属性变更, 得通知路由模块去刷新该窄带接口的下一跳表,在刷新过程中,还需要获取接口的其他相关信息。这样就导致接口模块和路由模块的强关联性,增加了模块间的复杂度,提高了故障定位的难度。Compared with the Ethernet interface, the next hop table of the narrowband interface strongly associates many interface related information, such as the tag (label) negotiated inside the interface, and the processing priority of the interface. When the properties of the narrowband interface change, The routing module is notified to refresh the next hop table of the narrowband interface. During the refreshing process, other related information of the interface needs to be obtained. This results in strong correlation between the interface module and the routing module, which increases the complexity between modules and improves the difficulty of fault location.
发明内容Summary of the invention
本发明实施例提供了一种通信设备的报文转发配置方法、装置及报文转发方法,以至少解决相关技术中由于窄带接口的配置需要接口模块与路由模块的强关联性,而导致模块之间的复杂度,提供故障定位的难度的问题。The embodiment of the present invention provides a packet forwarding configuration method, a device, and a packet forwarding method for a communication device, so as to at least solve the related problem in the related art, because the configuration of the narrowband interface requires strong association between the interface module and the routing module, and the module is The complexity of the problem provides the difficulty of fault location.
为解决上述技术问题,本发明实施例提供了一种通信设备的报文转发配置方法,包括:To solve the above technical problem, an embodiment of the present invention provides a packet forwarding configuration method for a communications device, including:
通信设备的接口模块写入窄带接口的下一跳表;The interface module of the communication device writes the next hop table of the narrowband interface;
通信设备的路由模块获取路由表,并根据该路由表判断其路由出口为所述窄带接口时,在所述路由表中建立与所述下一跳表之间的关联。The routing module of the communication device obtains a routing table, and determines that the routing exit is the narrowband interface according to the routing table, and establishes an association with the next hop table in the routing table.
在本发明的一种实施例中,路由模块在所述路由表中建立与所述下一跳表之间的关联包括:路由模块用所述窄带接口获取所述下一跳表索引并写入所述路由表中。In an embodiment of the present invention, the establishing, by the routing module, the association with the next hop table in the routing table includes: the routing module acquiring, by the narrowband interface, the next hop table index and writing In the routing table.
在本发明的一种实施例中,所述下一跳表包括:下一跳硬件表、以及窄带报文的封装信息和转发信息。In an embodiment of the present invention, the next hop table includes: a next hop hardware table, and encapsulation information and forwarding information of the narrowband message.
在本发明的一种实施例中,还包括:所述接口模块在所述窄带接口的属性发生变化时,对所述窄带接口的所述下一跳表进行对应的修改。In an embodiment of the present invention, the interface module performs corresponding modification on the next hop table of the narrowband interface when the attribute of the narrowband interface changes.
在本发明的一种实施例中,所述窄带接口的属性信息包括:所述窄带接口的内部协商标签和/或所述窄带接口的处理优先级。In an embodiment of the present invention, the attribute information of the narrowband interface includes: an internal negotiation label of the narrowband interface and/or a processing priority of the narrowband interface.
在本发明的一种实施例中,所述接口模块对所述窄带接口的所述下一跳表进行对应的修改包括:接口模块用所述窄带接口获取下一跳索引;根据所述下一跳索引读取变化后的下一跳表;根据所述变化后的下一跳表将发生变化的属性内容进行更新。 In an embodiment of the present invention, the corresponding modification of the next hop table of the narrowband interface by the interface module includes: the interface module acquires a next hop index by using the narrowband interface; The jump index reads the changed next hop table; and updates the attribute content that changes according to the changed next hop table.
本发明实施例还提供了一种报文转发方法,包括:The embodiment of the invention further provides a packet forwarding method, including:
通信设备根据如上述任一实施例所述的配置方法进行配置;The communication device is configured according to the configuration method according to any of the above embodiments;
所述通信设备根据所述配置进行报文的转发。The communication device forwards the packet according to the configuration.
为解决上述技术问题,本发明实施例提供了一种通信设备,包括:To solve the above technical problem, an embodiment of the present invention provides a communications device, including:
接口模块,设置为写入窄带接口的下一跳表;An interface module, configured to write a next hop table of the narrowband interface;
路由模块,设置为获取路由表,并根据该路由表判断其路由出口为所述窄带接口时,在所述路由表中建立与所述下一跳表之间的关联。The routing module is configured to obtain a routing table, and determine, according to the routing table, that the routing exit is the narrowband interface, and establish an association with the next hop table in the routing table.
在本发明的一种实施例中,所述路由模块包括:判断子模块,设置为判断所述路由表的路由出口是否为所述窄带接口;关联建立子模块,设置为在所述判断子模块的判断结果为是时,用所述窄带接口获取所述下一跳表索引并写入所述路由表中。In an embodiment of the present invention, the routing module includes: a determining submodule, configured to determine whether a routing exit of the routing table is the narrowband interface; and an association establishing submodule, configured to be in the determining submodule If the result of the determination is yes, the next hop table index is obtained by the narrowband interface and written into the routing table.
在本发明的一种实施例中,所述接口模块还设置为在所述窄带接口的属性发生变化时,对所述窄带接口的所述下一跳表进行对应的修改。In an embodiment of the present invention, the interface module is further configured to perform corresponding modification on the next hop table of the narrowband interface when the attribute of the narrowband interface changes.
在本发明的一种实施例中,获取子模块,设置为用所述窄带接口获取下一跳索引;读取子模块,设置为根据所述下一跳索引读取变化后的下一跳表;更新子模块,设置为根据所述变化后的下一跳表将发生变化的属性内容进行更新。In an embodiment of the present invention, the obtaining submodule is configured to acquire the next hop index by using the narrowband interface, and the reading submodule is configured to read the changed next hop table according to the next hop index. And updating the submodule, and setting the content of the attribute to be changed according to the changed next hop table.
本发明的有益效果是:The beneficial effects of the invention are:
本发明实施例提供的通信设备的报文转发配置方法,通过在通信设备的接口模块写入窄带接口的下一跳表,并通过路由模块获取路由表,根据该路由表判断其路由出口为所述窄带接口时,在所述路由表中建立与所述下一跳表之间的关联。采用本发明所述的方法,与现有技术相比,简化了窄带接口的路由转发方式,只需在通信设备的接口模块中写入窄带接口的下一跳表,并不需要在路由模块中进行写入,这样,降低了通信设备中模块之间的复杂度,简化了窄带接口的转发流程。The packet forwarding configuration method of the communication device provided by the embodiment of the present invention is to write the next hop table of the narrowband interface in the interface module of the communication device, obtain the routing table through the routing module, and determine the routing exit according to the routing table. When the narrowband interface is described, an association with the next hop table is established in the routing table. Compared with the prior art, the method of the present invention simplifies the routing and forwarding mode of the narrowband interface, and only needs to write the next hopping table of the narrowband interface in the interface module of the communication device, and does not need to be in the routing module. Writing is performed, which reduces the complexity between modules in the communication device and simplifies the forwarding process of the narrowband interface.
图1为本发明实施例一提供的通信设备的报文转发配置方法流程示意图;1 is a schematic flowchart of a packet forwarding configuration method of a communication device according to Embodiment 1 of the present invention;
图2为本发明实施例三提供的通信设备的结构示意图。FIG. 2 is a schematic structural diagram of a communication device according to Embodiment 3 of the present invention.
下面通过具体实施方式结合附图对本发明作进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings.
实施例一:Embodiment 1:
请参考图1所示,本实施例提供的通信设备的报文转发配置方法包括:Please refer to FIG. 1 , the packet forwarding configuration method of the communication device provided by this embodiment includes:
S101:通信设备的接口模块写入窄带接口的下一跳表;在本实施例中,对通信设备的窄带接口的创建过程中,就在该通信设备的接口模块中写入该窄带接口的下一跳表;需要说明的是,在本方案中的通信设备主要包括可以完成报文三层转发功能的设备,包括路由器、交换机等;所述下一跳表的内容包括:下一跳硬件表、以及窄带报文的封装信息和转发信息;在链路上窄带报文是没有以太头的,但是在转发设备中,为了共用普通的转发流程,报文进入设备之后,FPGA(Field-Programmable Gate Array现场可编程门阵列)模块会给报文封装上以太头送给转发模块(以太头是设备内部的信息),转发模块把报文处理完成之后,封装上以太头(目的mac为固定的mac,标识是窄带报文,vlan(Virtual Local Area Network虚拟局域网)是内部协商的tag,对应出口)送给FPGA模块,FPGA模块从以太头中获取到他们希望得到的信息,又会把封装的以太头去掉;因此,在下一跳表中必须包括一跳硬件表、以及窄带报文的封装信息和转发信息这三种信息;S101: The interface module of the communication device writes the next hop table of the narrowband interface; in this embodiment, during the creation of the narrowband interface of the communication device, the narrowband interface is written in the interface module of the communication device. A hop table; it should be noted that the communication device in the solution mainly includes a device that can complete the packet forwarding function, including a router, a switch, and the like; the content of the next hop table includes: a next hop hardware table. And the encapsulation information and forwarding information of the narrowband packet; the narrowband packet on the link has no Ethernet header, but in the forwarding device, in order to share the normal forwarding flow, after the packet enters the device, the FPGA (Field-Programmable Gate) The Array Field Programmable Gate Array module will send the Ethernet header to the forwarding module (the Ethernet header is the internal information of the device). After the forwarding module finishes processing the packet, the Ethernet header is encapsulated (the destination mac is a fixed mac). The identifier is a narrowband packet, and the vlan (Virtual Local Area Network) is an internally negotiated tag, which is sent to the FPGA module, and the FPGA module is Obtaining the header information they want, but also will remove the encapsulated Ethernet header; thus, must be included in the next-hop table hop hardware table, and the encapsulation information packets and forwards the narrowband three information message;
S102:通信设备的路由模块获取路由表,并根据该路由表判断其路由出口是否为所述窄带接口,若是,则转S103;具体地,在通信设备的路由协议协商成功之后,该通信设备的上层模块将路由表转发给底层的路由模块,从而,路 由模块在接收到路由表后,判断该路由表中的路由出口是否是个窄带出口。S102: The routing module of the communication device obtains a routing table, and determines, according to the routing table, whether the routing exit is the narrowband interface, and if yes, proceeds to S103; specifically, after the routing protocol negotiation of the communication device succeeds, the communication device The upper module forwards the routing table to the underlying routing module, thereby After receiving the routing table, the module determines whether the route exit in the routing table is a narrowband exit.
S103:路由模块在所述路由表中建立与所述下一跳表之间的关联。在本步骤中,路由模块只需要建立与所述下一跳表之间的关联,而不需要像现有技术那种,在建立关联的同时,需要写入所述下一跳表,这样简化了路由模块的设置过程,降低了故障定位的难度。S103: The routing module establishes an association with the next hop table in the routing table. In this step, the routing module only needs to establish an association with the next hop table, and does not need to write the next hop table while establishing the association, as in the prior art. The routing module setup process reduces the difficulty of fault location.
在步骤S103中的路由模块在所述路由表中建立与所述下一跳表之间的关联包括:路由模块用所述窄带接口获取所述下一跳表索引并写入所述路由表。从而所述路由模块根据其获取到的下一跳表的索引建立其所述路由表与所述下一跳表之间的关联。The establishing, by the routing module in the routing table, the association with the next hop table in the routing table includes: the routing module acquiring the next hop table index by using the narrowband interface and writing the routing table. Therefore, the routing module establishes an association between the routing table and the next hop table according to the index of the next hop table obtained by the routing module.
所述接口模块在所述窄带接口的属性发生变化时,对所述窄带接口的所述下一跳表进行对应的修改。所述窄带接口的属性包括:所述窄带接口的内部协商标签和/或所述窄带接口的处理优先级。所述窄带接口的属性发生变化包括:所述窄带接口的内部协商标签发生变化,或者所述窄带接口的处理优先级发生变化,或者所述窄带接口的内部协商标签和其处理优先级都发生变化;针对窄带接口的属性发生变化,所述接口模块直接对其写入的下一跳表进行对应的修改;接口模块用所述窄带接口获取下一跳索引;根据所述下一跳索引读取变化后的下一跳表;根据所述变化后的下一跳表将发生变化的属性内容进行更新。如当窄带接口的内部协商标签发生变化,则用该窄带接口去获取其下一跳索引,然后用下一跳索引读取下一跳表项,再将对应的内部协商标签字段用新的值覆盖,写入下一跳表中。在本实施例中,相对于现有技术中在窄带接口的属性发生变化时,需要通信设备的路由模块去刷新该窄带接口的下一跳表,且在刷新的过程中需要获取该窄带接口的其它信息,非常繁琐,而在方案只需在接口模块中直接将对应的窄带接口的下一跳表进行对应的修改即可,简化了流程,方 便操作。When the attribute of the narrowband interface changes, the interface module performs corresponding modification on the next hop table of the narrowband interface. The attributes of the narrowband interface include: an internal negotiation label of the narrowband interface and/or a processing priority of the narrowband interface. The change of the attribute of the narrowband interface includes: the internal negotiation label of the narrowband interface changes, or the processing priority of the narrowband interface changes, or the internal negotiation label and the processing priority of the narrowband interface change. The interface module directly changes the next hop table written by the interface module; the interface module obtains the next hop index by using the narrowband interface; and reads according to the next hop index. The changed next hop table; the attribute content that changes is updated according to the changed next hop table. For example, when the internal negotiation label of the narrowband interface changes, the narrowband interface is used to obtain the next hop index, and then the next hop index is read by the next hop index, and the corresponding internal negotiation label field is used with the new value. Overwrite, write to the next hop table. In this embodiment, when the attribute of the narrowband interface changes in the prior art, the routing module of the communication device is required to refresh the next hop table of the narrowband interface, and the narrowband interface needs to be acquired during the refreshing process. Other information is very cumbersome, and the solution only needs to directly modify the next hop table of the corresponding narrowband interface in the interface module, which simplifies the process. Just operate.
实施例二:Embodiment 2:
本发明还提供了一种报文转发的方法,通信设备根据如上述任一实施例所述的配置方法进行配置;所述通信设备根据所述配置进行报文的转发。在本实施例中,具体的报文转发的方法步骤包括:The present invention further provides a method for packet forwarding, the communication device is configured according to the configuration method according to any of the above embodiments; the communication device forwards the packet according to the configuration. In this embodiment, the specific method for packet forwarding includes:
步骤一,通信设备根据配置方法进行配置;其具体的配置过程包括:通信设备的接口模块写入窄带接口的下一跳表,通信设备的路由模块获取路由表,并根据该路由表判断其路由出口为所述窄带接口时,在所述路由表中建立与所述下一跳表之间的关联;Step 1: The communication device is configured according to the configuration method. The specific configuration process includes: the interface module of the communication device writes the next hop table of the narrowband interface, the routing module of the communication device obtains the routing table, and determines the route according to the routing table. When the egress is the narrowband interface, establishing an association with the next hop table in the routing table;
步骤二:所述通信设备根据所述配置进行报文的转发;由于报文中的目的地址往往是主机地址,而路由表中的目的地址往往为网络地址,因此,在转发时需要有个底层的操作:首先将报文中的目的地址和路由表中的子网掩码进行“逻辑与”操作,得到一个网络地址,然后将得到的网络地址与路由表中的网络地址做比较,如果一致就认为匹配,否则认为不匹配。如果路由表匹配,则通信设备查看所匹配的路由表的下一跳地址是否在直连的链路上;如果在直连的链路上,则根据此下一跳转发;如果不在直连的链路上,则需要在路由表中再次查找此下一跳地址所匹配的路由项;确定了下一跳地址后,通信设备将此报文送往对应的接口,接口进行相应的地址解析,解析出对应的链路层地址后,对该报文进行数据封装并转发。Step 2: The communication device forwards the packet according to the configuration. The destination address in the packet is often the host address, and the destination address in the routing table is often the network address. Therefore, the forwarding device needs to have a bottom layer. Operation: First, perform a logical AND operation on the destination address in the packet and the subnet mask in the routing table to obtain a network address, and then compare the obtained network address with the network address in the routing table. Just think it matches, otherwise it doesn't match. If the routing table matches, the communication device checks whether the next hop address of the matched routing table is on the directly connected link; if it is on the directly connected link, it forwards according to the next hop; if not directly connected On the link, the routing entry needs to be searched for the routing entry matching the next hop address again. After the next hop address is determined, the communication device sends the packet to the corresponding interface, and the interface performs corresponding address resolution. After the corresponding link layer address is parsed, the packet is encapsulated and forwarded.
实施例三:Embodiment 3:
请参考图2所示,本实施例提供的通信设备20包括接口模块201和路由模块202;所述接口模块201设置为写入窄带接口的下一跳表;所述路由模块202设置为获取路由表,并根据该路由表判断其路由出口为所述窄带接口时,在所述路由表中建立与所述下一跳表之间的关联。应当理解的是,对通信设备20的 窄带接口的创建过程中,就在该通信设备20的接口模块201中写入该窄带接口的下一跳表;所述通信设备20主要包括可以完成报文三层转发功能的设备,包括路由器、交换机等;所述下一跳表的内容包括:下一跳硬件表、以及窄带报文的封装信息和转发信息;在通信设备的路由协议协商成功之后,该通信设备的上层模块将路由表转发给底层的路由模块202,从而,路由模块202在接收到路由表后,判断该路由表中的路由出口是否是个窄带出口;路由模块202只需要建立与所述下一跳表之间的关联,而不需要像现有技术那种,在建立关联的同时,需要写入所述下一跳表,这样简化了路由模块202的设置过程,降低了故障定位的难度。Referring to FIG. 2, the communication device 20 provided in this embodiment includes an interface module 201 and a routing module 202. The interface module 201 is configured to write a next hop table of a narrowband interface; the routing module 202 is configured to obtain a route. And determining, according to the routing table, that the routing exit is the narrowband interface, establishing an association with the next hop table in the routing table. It should be understood that for the communication device 20 During the creation of the narrowband interface, the next hop table of the narrowband interface is written in the interface module 201 of the communication device 20; the communication device 20 mainly includes a device that can complete the packet forwarding function, including a router. a switch, etc.; the content of the next hop table includes: a next hop hardware table, and encapsulation information and forwarding information of the narrowband packet; after the routing protocol negotiation of the communication device succeeds, the upper module of the communication device forwards the routing table After the routing module 202 is received, the routing module 202 determines whether the routing exit in the routing table is a narrowband exit after receiving the routing table; the routing module 202 only needs to establish an association with the next hop table. There is no need to write the next hop table while establishing the association, as in the prior art, which simplifies the setting process of the routing module 202 and reduces the difficulty of fault location.
所述路由模块202包括:判断子模块,设置为判断所述路由表的路由出口是否为所述窄带接口;关联建立子模块,设置为在所述判断子模块的判断结果为是时,用所述窄带接口获取所述下一跳表索引并写入所述路由表中;所述关联建立子模块在获取路由表后建立所述下一跳表和路由表的关联。The routing module 202 includes: a determining sub-module, configured to determine whether the routing exit of the routing table is the narrowband interface; and the association establishing sub-module is configured to use when the determining result of the determining sub-module is yes The narrowband interface obtains the next hop table index and writes the routing table; the association establishing submodule establishes an association between the next hop table and the routing table after obtaining the routing table.
所述接口模块201还设置为在所述窄带接口的属性发生变化时,对所述窄带接口的所述下一跳表进行对应的修改。所述窄带接口的属性包括:所述窄带接口的内部协商标签和/或所述窄带接口的处理优先级。所述窄带接口的属性发生变化包括:所述窄带接口的内部协商标签发生变化,或者所述窄带接口的处理优先级发生变化,或者所述窄带接口的内部协商标签和其处理优先级都发生变化;针对窄带接口的属性发生变化,所述接口模块直接对其写入的下一跳表进行对应的修改。具体地,所述接口模块包括:获取子模块,设置为用所述窄带接口获取下一跳索引;读取子模块,设置为根据所述下一跳索引读取变化后的下一跳表;更新子模块,设置为根据所述变化后的下一跳表将发生变化的属性内容进行更新。如当窄带接口的内部协商标签发生变化是,所述获取子模块 设置为用该窄带接口去获取其下一跳索引;所述读取子模块设置为根据下一跳索引读取下一跳表;所述更新子模块再将对应的内部协商标签字段用新的值覆盖,写入下一跳表中。The interface module 201 is further configured to perform corresponding modification on the next hop table of the narrowband interface when the attribute of the narrowband interface changes. The attributes of the narrowband interface include: an internal negotiation label of the narrowband interface and/or a processing priority of the narrowband interface. The change of the attribute of the narrowband interface includes: the internal negotiation label of the narrowband interface changes, or the processing priority of the narrowband interface changes, or the internal negotiation label and the processing priority of the narrowband interface change. The attribute of the narrowband interface changes, and the interface module directly modifies the next hop table written thereto. Specifically, the interface module includes: acquiring a sub-module, configured to acquire a next hop index by using the narrowband interface; and reading a sub-module, configured to read the changed next hop table according to the next hop index; The update submodule is configured to update the attribute content that changes according to the changed next hop table. For example, when the internal negotiation label of the narrowband interface changes, the acquisition submodule Set to use the narrowband interface to obtain its next hop index; the read submodule is configured to read the next hop table according to the next hop index; the update submodule then uses the corresponding internal negotiation label field with a new one. The value is overwritten and written to the next hop table.
本发明通过在通信设备的接口模块写入窄带接口的下一跳表,并通过路由模块获取路由表,根据该路由表判断其路由出口为所述窄带接口时,在所述路由表中建立与所述下一跳表之间的关联。本方案实现了简化了窄带接口的路由转发方式,只需在通信设备的接口模块中写入窄带接口的下一跳表,并不需要在路由模块中进行写入,降低了通信设备中模块之间的复杂度,简化了窄带接口的转发流程。The invention creates a routing table in the routing table by writing the next hop table of the narrowband interface in the interface module of the communication device, and obtaining the routing table through the routing module, and determining that the routing exit is the narrowband interface according to the routing table. The association between the next hop tables. The solution simplifies the routing and forwarding mode of the narrowband interface, and only needs to write the next hop table of the narrowband interface in the interface module of the communication device, and does not need to write in the routing module, thereby reducing the module in the communication device. The complexity of the simplification of the forwarding process of the narrowband interface.
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It will be apparent to those skilled in the art that the present invention may be made without departing from the spirit and scope of the invention.
如上所述,本发明实施例提供的一种通信设备的报文转发配置方法、装置及报文转发方法具有以下有益效果:简化了窄带接口的路由转发方式,只需在通信设备的接口模块中写入窄带接口的下一跳表,并不需要在路由模块中进行写入,这样,降低了通信设备中模块之间的复杂度,简化了窄带接口的转发流程。 As described above, the packet forwarding configuration method, apparatus, and packet forwarding method of the communication device provided by the embodiment of the present invention have the following beneficial effects: the routing and forwarding mode of the narrowband interface is simplified, and only needs to be in the interface module of the communication device. The next hop table written to the narrowband interface does not need to be written in the routing module. This reduces the complexity between modules in the communication device and simplifies the forwarding process of the narrowband interface.
Claims (11)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510257961.5A CN106302181B (en) | 2015-05-19 | 2015-05-19 | Message forwarding configuration method and device of communication equipment and message forwarding method |
| CN201510257961.5 | 2015-05-19 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016183944A1 true WO2016183944A1 (en) | 2016-11-24 |
Family
ID=57319241
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/085961 Ceased WO2016183944A1 (en) | 2015-05-19 | 2015-08-03 | Message forwarding configuration method and apparatus for communication device, and message forwarding method |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106302181B (en) |
| WO (1) | WO2016183944A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2001022667A1 (en) * | 1999-09-22 | 2001-03-29 | Effnet Group Ab | Method and system for efficient routing table compression and fast routing lookups |
| CN102035738A (en) * | 2010-12-14 | 2011-04-27 | 中兴通讯股份有限公司 | Method and device for acquiring routing information |
| US7990973B2 (en) * | 2008-08-13 | 2011-08-02 | Alcatel-Lucent Usa Inc. | Hash functions for applications such as network address lookup |
| CN102201964A (en) * | 2010-03-22 | 2011-09-28 | 杭州华三通信技术有限公司 | Method for realizing rapid path switching and apparatus thereof |
| CN102355418A (en) * | 2011-10-08 | 2012-02-15 | 大连环宇移动科技有限公司 | Message forwarding method of router |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5287384A (en) * | 1992-10-15 | 1994-02-15 | Lxe Inc. | Frequency hopping spread spectrum data communications system |
| US20040098505A1 (en) * | 2002-11-20 | 2004-05-20 | Clemmensen Daniel G. | Forwarding system with multiple logical sub-system functionality |
-
2015
- 2015-05-19 CN CN201510257961.5A patent/CN106302181B/en active Active
- 2015-08-03 WO PCT/CN2015/085961 patent/WO2016183944A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2001022667A1 (en) * | 1999-09-22 | 2001-03-29 | Effnet Group Ab | Method and system for efficient routing table compression and fast routing lookups |
| US7990973B2 (en) * | 2008-08-13 | 2011-08-02 | Alcatel-Lucent Usa Inc. | Hash functions for applications such as network address lookup |
| CN102201964A (en) * | 2010-03-22 | 2011-09-28 | 杭州华三通信技术有限公司 | Method for realizing rapid path switching and apparatus thereof |
| CN102035738A (en) * | 2010-12-14 | 2011-04-27 | 中兴通讯股份有限公司 | Method and device for acquiring routing information |
| CN102355418A (en) * | 2011-10-08 | 2012-02-15 | 大连环宇移动科技有限公司 | Message forwarding method of router |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106302181A (en) | 2017-01-04 |
| CN106302181B (en) | 2020-06-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3461072B1 (en) | Access control in a vxlan | |
| US9686137B2 (en) | Method and system for identifying an outgoing interface using openflow protocol | |
| CN103259726B (en) | Method, device and system for storing and sending MAC address table entries | |
| WO2019128621A1 (en) | Method for bearing multicast virtual private network and device | |
| WO2016150057A1 (en) | Method and device for sending access control list (acl) | |
| WO2016192686A1 (en) | Data packet forwarding | |
| EP3598705B1 (en) | Routing control | |
| CN106936680A (en) | The system and method for intercommunication between cloud computing platform heterogeneous network | |
| US9531564B2 (en) | Single hop overlay architecture for line rate performance in campus networks | |
| CN101908996A (en) | Method for accessing private network, data transmission method, device and system | |
| CN103259717B (en) | Routing method and routing device based on strategy customization | |
| CN112583689B (en) | Mapping services to tunnels for forwarding packets using network devices | |
| WO2022135274A1 (en) | Chip implementation method for routing extension, and chip processing method and apparatus for data packet | |
| US11627081B2 (en) | Method and system segregating application traffic in a wide area network | |
| CN103379187B (en) | A kind of data processing method and Gateway Network Element | |
| WO2021190075A1 (en) | Method and apparatus for transmitting policy, and network transmission system | |
| US10171306B2 (en) | Automatic discovery and provisioning of multi-chassis etherchannel peers | |
| CN115118544B (en) | Communication method, device, and communication system | |
| CN105939261A (en) | Method and device for statically configuring VPN routing | |
| CN113395206B (en) | Route determining method, device and network equipment | |
| EP4618520A1 (en) | Data packet transmission method, switch, and storage medium | |
| US10812370B2 (en) | Unified control plane over MPLS and internet interfaces through BGP | |
| WO2016183944A1 (en) | Message forwarding configuration method and apparatus for communication device, and message forwarding method | |
| US11902166B2 (en) | Policy based routing in extranet networks | |
| CN113300931B (en) | Virtual machine migration discovery method and VTEP |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15892322 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15892322 Country of ref document: EP Kind code of ref document: A1 |