CN106302181B - Message forwarding configuration method and device of communication equipment and message forwarding method - Google Patents
Message forwarding configuration method and device of communication equipment and message forwarding method Download PDFInfo
- Publication number
- CN106302181B CN106302181B CN201510257961.5A CN201510257961A CN106302181B CN 106302181 B CN106302181 B CN 106302181B CN 201510257961 A CN201510257961 A CN 201510257961A CN 106302181 B CN106302181 B CN 106302181B
- Authority
- CN
- China
- Prior art keywords
- interface
- next hop
- routing
- narrow
- 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.)
- Active
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
Abstract
A message forwarding configuration method, a device and a method for communication equipment are provided, the message forwarding configuration method for communication equipment includes: an interface module of the communication equipment writes a next skip list of the narrow-band interface; and the routing module of the communication equipment acquires a routing table, and establishes the association with the next hop table in the routing table when judging that the routing outlet is the narrow-band interface according to the routing table. The problems that in the prior art, due to the fact that the configuration of the narrow-band interface needs strong relevance between the interface module and the routing module, the complexity between the modules is caused, and the difficulty of fault location is provided are solved, the complexity between the modules in the communication equipment is reduced, and the forwarding process of the narrow-band interface is simplified.
Description
Technical Field
The present invention relates to the field of data communication of communication equipment, and in particular, to a message forwarding configuration method, device and message forwarding method for communication equipment.
Background
On communication equipment such as a router or a switch and the like, three-layer forwarding mainly refers to routing forwarding, and can find a message outlet and a message header modification strategy for a message through routing and a next hop. On the existing router or switch, there are at least two interfaces for forwarding messages, including ethernet interface and narrowband interface. The differences between the narrowband interface and the ethernet interface mainly include: the three-layer forwarding of ethernet interfaces is non-connection oriented, so that one egress may correspond to multiple next hops, while the three-layer forwarding of narrowband interfaces is generally connection oriented, i.e. one interface will only correspond to one next hop.
Such as: destination IP is 10.10.10.10, mask is 255.255.0.0, next hop IP is 1.1.1.1, mask is 255.255.255.255; the three-layer information forwarding process of the common Ethernet interface comprises the following steps: after the routing protocol interaction is successful, the upper layer informs the bottom layer hardware to write a routing table and a next hop table respectively. The key value of the routing table is IP + mask (i.e. 10.10.10.10+16 in the above example), and the table entry result is the next hop index; the allocation policy for the next hop index is the next hop IP + egress (i.e., 1.1.1.1+ egress). And the key value of the next hop table is the next hop index, and the result is the exit information. And the routing table and the next hop table are associated through the next hop index to form complete forwarding information. Compared with the Ethernet interface, the narrow-band interface only sends down the route without sending down the next hop information, the bottom layer routing module writes the routing table when receiving the routing information, and simultaneously, when finding that the outlet is the narrow-band interface, the IP + narrow-band interface of the narrow-band interface is used for applying for the next hop index, and the next hop table is directly written.
Compared with the ethernet interface, the narrowband interface next hop list is strongly associated with a lot of interface related information, such as tag (label) negotiated inside the interface, processing priority of the interface, and the like. When the attribute of the narrowband interface changes, the routing module is informed to refresh the next hop table of the narrowband interface, and other related information of the interface is also required to be acquired in the refreshing process. Therefore, the strong relevance between the interface module and the routing module is caused, the complexity between the modules is increased, and the difficulty of fault positioning is improved.
Disclosure of Invention
The main technical problem to be solved by the present invention is to provide a method and an apparatus for configuring message forwarding of communication equipment, and a method for forwarding message, so as to solve the problems in the prior art that the configuration of a narrowband interface requires strong association between an interface module and a routing module, which results in complexity between modules, and difficulty in providing fault location.
In order to solve the above technical problem, the present invention provides a message forwarding configuration method for a communication device, including:
an interface module of the communication equipment writes a next skip list of the narrow-band interface;
and the routing module of the communication equipment acquires a routing table, and establishes the association with the next hop table in the routing table when judging that the routing outlet is the narrow-band interface according to the routing table.
In one embodiment of the present invention, the establishing, by the routing module, the association with the next hop table in the routing table includes: and the routing module acquires the index of the next hop table by using the narrow-band interface and writes the index into the routing table.
In an embodiment of the present invention, the next hop table includes: a next hop hardware table, and the encapsulation information and forwarding information of the narrowband message.
In an embodiment of the present invention, the method further comprises: and the interface module correspondingly modifies the next hop list of the narrow-band interface when the attribute of the narrow-band interface changes.
In an embodiment of the present invention, the attribute information of the narrowband interface includes: an internal negotiation tag of the narrowband interface and/or a processing priority of the narrowband interface.
In an embodiment of the present invention, the modifying, by the interface module, the next hop table of the narrowband interface correspondingly includes: the interface module acquires a next hop index by using the narrow-band interface; reading the changed next hop table according to the next hop index; and updating the changed attribute content according to the changed next skip list.
The invention also provides a message forwarding method, which comprises the following steps:
the communication equipment is configured according to the configuration method of any one of the embodiments;
and the communication equipment forwards the message according to the configuration.
To solve the above technical problem, the present invention provides a communication device, comprising:
the interface module is used for writing a next skip list of the narrow-band interface;
and the routing module is used for acquiring a routing table, and establishing the association with the next hop table in the routing table when judging that the routing outlet of the routing table is the narrow-band interface according to the routing table.
In one embodiment of the present invention, the routing module includes: the judgment submodule is used for judging whether a routing outlet of the routing table is the narrow-band interface or not; and the association establishing submodule is used for acquiring the next hop table index by using the narrow-band interface and writing the next hop table index into the routing table when the judgment result of the judgment submodule is yes.
In an embodiment of the present invention, the interface module is further configured to modify the next hop table of the narrowband interface correspondingly when the attribute of the narrowband interface changes.
In an embodiment of the present invention, the obtaining sub-module is configured to obtain a next-hop index by using the narrowband interface; the reading submodule is used for reading the changed next hop table according to the next hop index; and the updating submodule is used for updating the changed attribute content according to the changed next hop list.
The invention has the beneficial effects that:
the message forwarding configuration method of the communication equipment provided by the invention is characterized in that a next hop table of a narrow-band interface is written in an interface module of the communication equipment, a routing table is obtained through a routing module, and when a routing outlet of the routing table is judged to be the narrow-band interface according to the routing table, the association between the routing table and the next hop table is established in the routing table. Compared with the prior art, the method simplifies the route forwarding mode of the narrow-band interface, only needs to write the next skip list of the narrow-band interface into the interface module of the communication equipment, and does not need to write into the route module, thereby reducing the complexity between modules in the communication equipment and simplifying the forwarding process of the narrow-band interface.
Drawings
Fig. 1 is a schematic flow chart of a message forwarding configuration method of a communication device according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a communication device according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following detailed description and accompanying drawings.
The first embodiment is as follows:
referring to fig. 1, a method for configuring packet forwarding of a communication device according to this embodiment includes:
s101: an interface module of the communication equipment writes a next skip list of the narrow-band interface; in this embodiment, in the process of creating a narrowband interface of a communication device, a next skip list of the narrowband interface is written in an interface module of the communication device; it should be noted that the communication device in this scheme mainly includes devices that can complete a three-layer forwarding function of a message, including a router, a switch, and the like; the contents of the next hop table include: a next hop hardware table, and the encapsulation information and forwarding information of the narrowband message; in a link, a narrowband message does not have an ethernet header, but in a forwarding device, in order to share a common forwarding flow, after the message enters the device, an FPGA (Field-Programmable Gate Array) module encapsulates the message with the ethernet header and sends the encapsulated message to a forwarding module (the ethernet header is information inside the device), after the forwarding module processes the message, the forwarding module encapsulates the ethernet header (the destination mac is a fixed mac, the identifier is the narrowband message, a vlan (Virtual Local area network) is an internal negotiated tag, and a corresponding outlet) and sends the encapsulated ethernet header to the FPGA module, and the FPGA module acquires information that the message desires to obtain from the ethernet header and then removes the encapsulated ethernet header; therefore, the next hop table must include three kinds of information, namely a one-hop hardware table, and encapsulation information and forwarding information of the narrowband message;
s102: a routing module of the communication device acquires a routing table, judges whether a routing outlet of the communication device is the narrow-band interface or not according to the routing table, and if so, switches to S103; specifically, after the negotiation of the routing protocol of the communication device is successful, the upper layer module of the communication device forwards the routing table to the routing module of the bottom layer, so that the routing module determines whether the routing outlet in the routing table is a narrowband outlet after receiving the routing table.
S103: and the routing module establishes the association with the next hop table in the routing table. In this step, the routing module only needs to establish the association with the next hop table, and does not need to write in the next hop table while establishing the association as in the prior art, which simplifies the setting process of the routing module and reduces the difficulty of fault location.
The step S103 of the routing module establishing an association with the next hop table in the routing table includes: and the routing module acquires the index of the next hop table by using the narrow-band interface and writes the index into the routing table. And the routing module establishes the association between the routing table and the next hop table according to the index of the next hop table acquired by the routing module.
And the interface module correspondingly modifies the next hop list of the narrow-band interface when the attribute of the narrow-band interface changes. The attributes of the narrowband interface include: an internal negotiation tag of the narrowband interface and/or a processing priority of the narrowband interface. The changing of the property of the narrowband interface comprises: the internal negotiation label of the narrowband interface changes, or the processing priority of the narrowband interface changes, or both the internal negotiation label of the narrowband interface and the processing priority thereof change; aiming at the property change of the narrow-band interface, the interface module directly modifies the next skip list written in by the interface module; the interface module acquires a next hop index by using the narrow-band interface; reading the changed next hop table according to the next hop index; and updating the changed attribute content according to the changed next skip list. If the internal negotiation label of the narrow-band interface changes, the narrow-band interface is used for obtaining the next hop index of the narrow-band interface, then the next hop index is used for reading the next hop table item, and then the corresponding internal negotiation label field is covered by a new value and written into the next hop table. In this embodiment, compared to the prior art that when the attribute of the narrowband interface changes, the routing module of the communication device is required to refresh the next hop list of the narrowband interface, and other information of the narrowband interface needs to be acquired in the refreshing process, which is very cumbersome, and in the scheme, only the next hop list of the corresponding narrowband interface needs to be modified directly in the interface module, which simplifies the flow and facilitates the operation.
Example two:
the invention also provides a message forwarding method, and the communication equipment is configured according to the configuration method of any embodiment; and the communication equipment forwards the message according to the configuration. In this embodiment, the specific method for forwarding a packet includes the following steps:
step one, communication equipment is configured according to a configuration method; the specific configuration process comprises the following steps: an interface module of the communication equipment writes in a next hop table of a narrow-band interface, a routing module of the communication equipment acquires a routing table, and when a routing outlet of the routing table is judged to be the narrow-band interface according to the routing table, the association between the routing table and the next hop table is established;
step two: the communication equipment forwards the message according to the configuration; since the destination address in the message is often the host address and the destination address in the routing table is often the network address, there is a need for a bottom layer of operations during forwarding: firstly, carrying out logical AND operation on a destination address in a message and a subnet mask in a routing table to obtain a network address, then comparing the obtained network address with the network address in the routing table, and considering the network address to be matched if the network address is consistent with the network address in the routing table, otherwise, considering the network address not to be matched. If the routing tables are matched, the communication equipment checks whether the next hop address of the matched routing table is on a direct connection link; if the current hop is on the direct link, forwarding according to the next hop; if the address is not on the direct link, the routing entry matched with the next hop address needs to be searched again in the routing table; after the next hop address is determined, the communication equipment sends the message to the corresponding interface, the interface carries out corresponding address analysis, and after the corresponding link layer address is analyzed, the message is subjected to data encapsulation and forwarding.
Example three:
referring to fig. 2, the communication device 20 provided in the present embodiment includes an interface module 201 and a routing module 202; the interface module 201 is configured to write a next skip list of the narrowband interface; the routing module 202 is configured to obtain a routing table, and establish a relationship between the routing table and the next hop table when determining that a routing outlet of the routing table is the narrowband interface according to the routing table. It should be understood that, during the creation of the narrowband interface of the communication device 20, 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 devices capable of completing a three-layer forwarding function of a message, including a router, a switch, and the like; the contents of the next hop table include: a next hop hardware table, and the encapsulation information and forwarding information of the narrowband message; after the negotiation of the routing protocol of the communication device is successful, the upper layer module of the communication device forwards the routing table to the routing module 202 at the bottom layer, so that after receiving the routing table, the routing module 202 judges whether the routing outlet in the routing table is a narrow-band outlet; the routing module 202 only needs to establish the association with the next hop table, and does not need to write in 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: the judgment submodule is used for judging whether a routing outlet of the routing table is the narrow-band interface or not; the association establishing submodule is used for acquiring the next hop table index by using the narrow-band interface and writing the next hop table index into the routing table when the judgment result of the judgment submodule is yes; and the association establishing submodule establishes the association of the next hop table and the routing table after acquiring the routing table.
The interface module 201 is further configured to modify the next hop table of the narrowband interface correspondingly when the attribute of the narrowband interface changes. The attributes of the narrowband interface include: an internal negotiation tag of the narrowband interface and/or a processing priority of the narrowband interface. The changing of the property of the narrowband interface comprises: the internal negotiation label of the narrowband interface changes, or the processing priority of the narrowband interface changes, or both the internal negotiation label of the narrowband interface and the processing priority thereof change; and aiming at the change of the attribute of the narrow-band interface, the interface module directly modifies the written next skip list correspondingly. Specifically, the interface module includes: the acquisition submodule is used for acquiring a next hop index by using the narrow-band interface; the reading submodule is used for reading the changed next hop table according to the next hop index; and the updating submodule is used for updating the changed attribute content according to the changed next hop list. If the internal negotiation tag of the narrow-band interface changes, the obtaining submodule is used for obtaining the next hop index of the narrow-band interface by using the narrow-band interface; the reading submodule is used for reading a next hop table according to a next hop index; and the updating submodule then covers the corresponding internal negotiation label field with a new value and writes the new value into the next hop table.
The invention writes the next hop list of the narrow-band interface into the interface module of the communication equipment, obtains the routing list through the routing module, and establishes the association with the next hop list in the routing list when judging that the routing outlet is the narrow-band interface according to the routing list. The scheme simplifies the route forwarding mode of the narrow-band interface, only the next hop list of the narrow-band interface needs to be written in the interface module of the communication equipment, and writing in the route module is not needed, so that the complexity between modules in the communication equipment is reduced, and the forwarding flow of the narrow-band interface is simplified.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.
Claims (11)
1. A message forwarding configuration method of a communication device is characterized by comprising the following steps:
an interface module of the communication equipment writes a next skip list of the narrow-band interface;
and the routing module of the communication equipment acquires a routing table, and establishes the association with the next hop table in the routing table when judging that the routing outlet is the narrow-band interface according to the routing table.
2. The message forwarding configuration method of communication equipment according to claim 1, wherein the establishing, by the routing module, the association with the next hop table in the routing table comprises: and the routing module acquires the index of the next hop table by using the narrow-band interface and writes the index into the routing table.
3. The message forwarding configuration method of communication equipment according to claim 1, wherein the next hop table comprises: a next hop hardware table, and the encapsulation information and forwarding information of the narrowband message.
4. The message forwarding configuration method of communication equipment according to any of claims 1-3, further comprising: and the interface module correspondingly modifies the next hop list of the narrow-band interface when the attribute of the narrow-band interface changes.
5. The message forwarding configuration method of communication equipment according to claim 4, wherein the attributes of the narrowband interface comprise: an internal negotiation tag of the narrowband interface and/or a processing priority of the narrowband interface.
6. The message forwarding configuration method of claim 4, wherein the interface module correspondingly modifies the next hop table of the narrowband interface, and the modifying comprises: the interface module acquires a next hop index by using the narrow-band interface; reading the changed next hop table according to the next hop index; and updating the changed attribute content according to the changed next skip list.
7. A message forwarding method is characterized by comprising the following steps:
the communication device is configured according to the configuration method of any of claims 1-6;
and the communication equipment forwards the message according to the configuration.
8. A communication device, comprising:
the interface module is used for writing a next skip list of the narrow-band interface;
and the routing module is used for acquiring a routing table, and establishing the association with the next hop table in the routing table when judging that the routing outlet of the routing table is the narrow-band interface according to the routing table.
9. The communication device of claim 8, wherein the routing module comprises: the judgment submodule is used for judging whether a routing outlet of the routing table is the narrow-band interface or not; and the association establishing submodule is used for acquiring the next hop table index by using the narrow-band interface and writing the next hop table index into the routing table when the judgment result of the judgment submodule is yes.
10. The communications device of claim 8 or 9, wherein the interface module is further configured to modify the next hop table of the narrowband interface accordingly when a change occurs in an attribute of the narrowband interface.
11. The communication device of claim 10, wherein the interface module comprises: the acquisition submodule is used for acquiring a next hop index by using the narrow-band interface; the reading submodule is used for reading the changed next hop table according to the next hop index; and the updating submodule is used for updating the changed attribute content according to the changed next hop list.
Priority Applications (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 |
PCT/CN2015/085961 WO2016183944A1 (en) | 2015-05-19 | 2015-08-03 | Message forwarding configuration method and apparatus for communication device, and message forwarding method |
Applications Claiming Priority (1)
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 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106302181A CN106302181A (en) | 2017-01-04 |
CN106302181B true CN106302181B (en) | 2020-06-26 |
Family
ID=57319241
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510257961.5A Active CN106302181B (en) | 2015-05-19 | 2015-05-19 | Message forwarding configuration method and device of communication equipment and message forwarding method |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106302181B (en) |
WO (1) | WO2016183944A1 (en) |
Citations (7)
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 |
WO2001022667A1 (en) * | 1999-09-22 | 2001-03-29 | Effnet Group Ab | Method and system for efficient routing table compression and fast routing lookups |
CN1714548A (en) * | 2002-11-20 | 2005-12-28 | 4198638加拿大公司 | Forewarding system with multiple logical sub-system functionality |
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 |
-
2015
- 2015-05-19 CN CN201510257961.5A patent/CN106302181B/en active Active
- 2015-08-03 WO PCT/CN2015/085961 patent/WO2016183944A1/en active Application Filing
Patent Citations (7)
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 |
WO2001022667A1 (en) * | 1999-09-22 | 2001-03-29 | Effnet Group Ab | Method and system for efficient routing table compression and fast routing lookups |
CN1714548A (en) * | 2002-11-20 | 2005-12-28 | 4198638加拿大公司 | Forewarding system with multiple logical sub-system functionality |
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 |
---|---|
WO2016183944A1 (en) | 2016-11-24 |
CN106302181A (en) | 2017-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10757008B2 (en) | Flow specification protocol-based communications method, device, and system | |
CN106302206B (en) | Message forwarding processing method, device and system | |
CN105871721B (en) | Segment routing processing method, processing device and sending device | |
EP2945330B1 (en) | Route management method, route method, network controller and router | |
CN106230749B (en) | A kind of method to E-Packet in virtual expansible local area network and convergence switch | |
EP2860918B1 (en) | Message processing method and system in multi-homing access overlay network | |
EP2490375B1 (en) | Method and device for link protection in virtual private local area network | |
WO2015165311A1 (en) | Method for transmitting data packet and provider edge device | |
CN109995634A (en) | A kind of bearing method and equipment of multicasting virtual private network network | |
CN107026796B (en) | VPN route notification method, data flow forwarding method and related equipment | |
CN102611618B (en) | Route protection converting method and device | |
EP3125481B1 (en) | Information transmission method, device and communication system | |
US8964749B2 (en) | Method, device and system for establishing a pseudo wire | |
EP3457640B1 (en) | Route establishment and message sending | |
CN106341423A (en) | Message processing method and device | |
US20190007368A1 (en) | DHCP in Layer-3 Overlay with Anycast Address Support and Network Address Transparency | |
WO2022121466A1 (en) | Data processing method and device for ethernet virtual private network, and storage medium | |
EP2897328B1 (en) | Method, system and apparatus for establishing communication link | |
EP3032782B1 (en) | Packet transmission method and apparatus | |
CN104253751B (en) | A kind of message transmitting method and equipment based on multi-role host | |
CN108667729B (en) | SDN service isolation and routing method and device based on MPLS | |
WO2023082779A1 (en) | Packet forwarding method, electronic device, and storage medium | |
CN110572326A (en) | Method, device, network equipment and system for establishing forwarding path | |
WO2016074478A1 (en) | Method and device for identifying service chain path, and service chain | |
CN106302181B (en) | Message forwarding configuration method and device of communication equipment and message forwarding method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |