CN102638395A - Message forwarding method and message forwarding equipment - Google Patents
Message forwarding method and message forwarding equipment Download PDFInfo
- Publication number
- CN102638395A CN102638395A CN2012100731968A CN201210073196A CN102638395A CN 102638395 A CN102638395 A CN 102638395A CN 2012100731968 A CN2012100731968 A CN 2012100731968A CN 201210073196 A CN201210073196 A CN 201210073196A CN 102638395 A CN102638395 A CN 102638395A
- Authority
- CN
- China
- Prior art keywords
- field
- message
- information
- heading
- tcp
- 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.)
- Granted
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
An embodiment of the invention provides a message forwarding method and message forwarding equipment, which relate to the technical field of networks, and aim to solve the problem of information loss when message forwarding equipment forwards messages by means of a socket mechanism. The method includes: receiving a first message, acquiring information in a first message header field and load of the first message when the first message header field of the first message is stripped, packaging the load with a second message header field, writing the information of the first message header field into the second message header field to form a second message, and transmitting the second message. The method and the equipment are applied to message forwarding.
Description
Technical field
The present invention relates to networking technology area, relate in particular to the method and apparatus that a kind of message is transmitted.
Background technology
ECN (explicit congestion notification; The explicit congestion announcement) be a kind of mechanism of initiatively carrying out flow control; This mechanism relies on IP field and TCP field of message and carries the ECN control information, can under the situation of packet loss not, make TCP (Transmission Control Protocol transmission control protocol) thus the congested transmitted traffic that initiatively reduces of transmitting terminal sensing network to avoid the further congested and large-area lasting packet loss of network.
In the prior art; Usually add the ECN control information in IP field and TCP field of TCP/IP message; And this TCP/IP message is in the process of transmitting through message forwarding equipment; This message forwarding equipment can be peeled off IP field and TCP field of this TCP/IP message when using socket mechanism transmitting-receiving message, thereby causes when transmitting this TCP/IP message, causing the information dropout that is positioned at IP field and TCP field.
Summary of the invention
The method and apparatus that embodiments of the invention provide a kind of message to transmit is to solve the information dropout problem that message forwarding equipment causes when using socket mechanism to E-Packet.
For achieving the above object, embodiments of the invention adopt following technical scheme:
The method that provides a kind of message to transmit, said method are applied to use in the message forwarding equipment that socket mechanism E-Packets, and comprising:
Receive first message;
Peel off the first heading field of said first message, obtain information and the load of said first message in the said first heading field;
For said load encapsulates the second heading field; Information correspondence in the said first heading field is write in the said second heading field; Form second message; Said first heading field and the said second heading field comprise an Internet protocol IP field and a transmission control protocol TCP field, and said information comprises the first information and/or second information in the said TCP field in the said IP field;
Send said second message.
A kind of message forwarding equipment is provided, and said forwarding unit uses socket mechanism to E-Packet, and comprising:
First network interface is used to receive first message;
Peel off acquiring unit, be used to peel off the first heading field of said first message, obtain information and the load of said first message in the said first heading field;
Encapsulation unit; Be used to said load and encapsulate the second heading field; Information correspondence in the said first heading field is write in the said second heading field; Form second message, said first heading field and the said second heading field comprise an Internet protocol IP field and a transmission control protocol TCP field, and said information comprises the first information and/or second information in the said TCP field in the said IP field;
Second network interface is used to send said second message.
In the embodiment of the invention, message forwarding equipment receives first message, peels off the first heading field of first message; And obtain information and the load of this first message in this first heading field; For this load encapsulation second heading field, the information correspondence in the first heading field is write in this second heading field, form second message; And send this second message; Like this, be written as in the second heading section that the load in this first message encapsulates again, solved the information dropout problem that message forwarding equipment causes when using socket mechanism to E-Packet through the information correspondence in the first heading field that first message is peeled off.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The sketch map of a kind of message forwarding method that Fig. 1 provides for the embodiment of the invention;
A kind of schematic flow sheet that is applied to the message forwarding method of message forwarding equipment that Fig. 2 provides for the embodiment of the invention;
A kind of message forwarding equipment that Fig. 3 provides for the embodiment of the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The method that the embodiment of the invention provides a kind of message to transmit, as shown in Figure 1, the executive agent of this method is a kind of message forwarding equipment that uses socket mechanism to E-Packet, and comprising:
S101, reception first message.
Wherein, this first message comprises the load of the first heading field and this first message.
Particularly, message forwarding equipment receives this first message through the destination slogan corresponding port with this first heading field.
S102, peel off the first heading field of this first message, obtain information and the load of this first message in this first heading field.
Wherein, This first heading field comprises IP field and TCP field; Information in this heading field comprises IP the first information and/or second information in TCP field in the field, and the load of this first message is this first message data carried by data information.
Particularly; Comprise second information when comprising in the first information and TCP field in IP the field of this first message; Message forwarding equipment obtains IP the first information and second information in TCP field in the field when the IP that peels off this first a message field and TCP field;
When the information in this first heading field is the first information in IP the field of this first message; When promptly the TCP of this first a message field does not comprise any information; Message forwarding equipment only obtains IP the first information in the field when the IP that peels off this first a message field and TCP field;
Likewise; When the information in this first heading field is second information in TCP the field of this first message; When promptly the IP of this first a message field does not comprise any information; Message forwarding equipment only obtains second information in TCP the field when the IP that peels off this first a message field and TCP field.
S103, for the load of this first message encapsulates the second heading field, the information correspondence in this first heading field is write in this second heading field, form second message.
Wherein, this second heading field comprises IP field and TCP field.
Particularly; Get access under the situation of second information in TCP the field of the first information and first message in IP the field of first message at this message forwarding equipment; When IP the field that encapsulates second message for the load of this first message and TCP field; This first information and the second information correspondence are write in IP the field and TCP field of this second message, form second message.
Only get access under the situation of the first information in IP the field of first message at this message forwarding equipment; When IP the field that encapsulates second message for the load of this first message and TCP field; This first information correspondence is write in IP the field of this second message; Form second message, likewise
Only get access under the situation of second information in TCP the field of first message at this message forwarding equipment; When IP the field that encapsulates second message for the load of this first message and TCP field; This second information correspondence is write in TCP the field of this second message, form second message.
In addition; The source port number of the above-mentioned first heading field or source IP address are different with the source port number or the source IP address of the above-mentioned second heading field, and the destination slogan of the above-mentioned first heading field or purpose IP address are also different with the destination slogan or the purpose IP address of the above-mentioned second heading field.
S104, send this second message.
Particularly; This message forwarding equipment will send the source port number of the port numbers of this second message as this second message; The port numbers that receives this second message as the destination slogan, and is sent to this destination slogan corresponding port according to the destination slogan with this second message.
Need to prove; The first information in the foregoing description and second information can be identical information; Also can be different information; This first information and second information specifically can be ECN (Explicit Congestion Notification, explicit congestion announcement) control informations, and the embodiment of the invention is not limited thereto.
Like this; Be written as in the second heading section that the load in this first message encapsulates again through the information correspondence in the first heading field that first message is peeled off, solved the information dropout problem that message forwarding equipment causes when using socket mechanism to E-Packet.
The method that the embodiment of the invention provides another kind of message to transmit; Belong to further expanding to method shown in Figure 1; Be applied to a kind of message forwarding equipment that uses socket mechanism to E-Packet, this message forwarding equipment comprises: first network interface, peel off acquiring unit and the encapsulation unit and second network interface, the first information in the embodiment of the invention and second information are the ECN control information; This first information is specially an ECN control information; This second information is specially the 2nd ECN control information, and is as shown in Figure 2, and these method concrete steps comprise:
First network interface of S201, message forwarding equipment receives first message.
Wherein, this first message comprises the load of the first heading field and this first message.
Particularly, this message forwarding equipment receives this first message through the destination slogan corresponding port with this first heading field.
The acquiring unit of peeling off of S202, message forwarding equipment receives first message that this first NIU transmits.
S203, after this peels off acquiring unit and obtain this first message, peel off IP field and TCP field of this first message, and obtain an ECN control information and the 2nd ECN control information in TCP field and the load of this first message in IP the field.
Wherein, this ECN control information is applied to ECN mechanism, and ECN mechanism is a kind of mechanism of initiatively carrying out flow control, and this mechanism relies on IP field and TCP field of message and carries the ECN control information.
The encapsulation unit of S204, message forwarding equipment receives this ECN control information of peeling off the acquiring unit transmission and the load of the 2nd ECN control information and first message.
S205, this encapsulation unit are loaded for this and are encapsulated IP field and TCP field of second message, and an ECN control information is write IP field of second message; The 2nd ECN control information is write TCP field of second message, thereby form second message.
Wherein, This second heading field comprises IP field and TCP field; Comprise an ECN control information in the IP of this second message field, comprise the 2nd ECN control information in TCP the field, like this; The one ECN control information and the 2nd ECN control information just successfully write to IP field and TCP field of second message, make an ECN control information and the 2nd ECN control information can not lose along with IP field of first message and TCP peeling off of field.
In addition; The source port number of the above-mentioned first heading field or source IP address are different with the source port number or the source IP address of the above-mentioned second heading field, and the destination slogan of the above-mentioned first heading field or purpose IP address are also different with the destination slogan or the purpose IP address of the above-mentioned second heading field.
S206, this encapsulation unit are passed to this second message second network interface of message forwarding equipment.
S207, this second network interface send this second message.
Particularly, this message forwarding equipment will send the port numbers of this second message as this second message source port numbers, and according to the destination slogan this second message will be sent to this destination slogan corresponding port.
Need to prove that an above-mentioned ECN control information can be identical ECN control information with the 2nd ECN control information, also can be different ECN control informations, the embodiment of the invention is not limited thereto.
Like this; In IP the field that is written as that load in this first message encapsulates again through ECN control information in IP field that first message is peeled off and TCP the field and the 2nd ECN control information correspondence and TCP the field, solved the ECN control information and the 2nd ECN control information that when the IP that peels off first message field and TCP field, cause in the prior art and lost the problem of obtaining.
The embodiment of the invention provides a kind of message forwarding equipment 30, is used to realize Fig. 1 or method shown in Figure 2, and as shown in Figure 3, this message forwarding equipment comprises:
Wherein, this first message comprises the load of the first heading field and this first message, and the load of this first message is this first message data carried by data information.
Particularly, this first network interface 31 receives this first message through the destination slogan corresponding port with this first heading field.
Peel off acquiring unit 32, be used to peel off the first heading field of this first message, obtain information and the load of this first message in this first heading field.
Wherein, this first heading field and this second heading field comprise an Internet protocol IP field and a transmission control protocol TCP field, and this information comprises the first information and/or second information in this TCP field in this IP field
Particularly; When in comprising the first information and TCP field in IP the field of this first message, comprising second information; This peels off acquiring unit 32, is used for when the IP that peels off this first a message field and TCP field, obtains the first information and second information in TCP field in IP the field of this first message; Then accordingly; This encapsulation unit 33 is used for for IP field of this load encapsulation second message during with TCP field, at least one correspondence in this first information and this second information is write in IP the field and TCP field of this second message.
Particularly; When the information in this first heading field was the first information in IP the field of this first message, when promptly the TCP of this first a message field did not comprise any information, this peeled off acquiring unit 32; Be used for when the IP that peels off this first a message field and TCP field; Obtain the first information in IP the field of this first message, then accordingly, this encapsulation unit 33; Be used for when IP the field that encapsulates second message for this load and TCP field, this first information correspondence being write IP field of this second message.
Particularly, when the information in this first heading field was second information in TCP the field of this first message, this peeled off acquiring unit 32; Be used for when the IP that peels off this first a message field and TCP field; Obtain second information in TCP the field of this first message, then accordingly, this encapsulation unit 33; Be used for when IP the field that encapsulates second message for this load and TCP field, this second information correspondence being write TCP field of this second message.
Particularly, this second network interface 34 will send the source port number of the port numbers of this second message as this second message, and according to the destination slogan this second message will be sent to this destination slogan corresponding port.
Need to prove that the first information in the foregoing description and second information can be identical information, also can be different information, and this first information and second information can be the ECN control informations specifically, and the embodiment of the invention is not limited thereto.
In addition; The source port number of the above-mentioned first heading field or source IP address are different with the source port number or the source IP address of the above-mentioned second heading field, and the destination slogan of the above-mentioned first heading field or purpose IP address are also different with the destination slogan or the purpose IP address of the above-mentioned second heading field.
Through adopting the message forwarding equipment in the foregoing description to carry out message forwarding; Be written as in the second heading section that the load in this first message encapsulates again through the information correspondence in the first heading field that first message is peeled off, solved the information dropout problem that message forwarding equipment causes when using socket mechanism to E-Packet.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technical staff who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of said claim.
Claims (10)
1. the method transmitted of a message is characterized in that, said method is applied to use in the message forwarding equipment that socket mechanism E-Packets, and comprising:
Receive first message;
Peel off the first heading field of said first message, obtain information and the load of said first message in the said first heading field;
For said load encapsulates the second heading field; Information correspondence in the said first heading field is write in the said second heading field; Form second message; Said first heading field and the said second heading field comprise an Internet protocol IP field and a transmission control protocol TCP field, and said information comprises the first information and/or second information in the said TCP field in the said IP field;
Send said second message.
2. method according to claim 1 is characterized in that, the said first heading field of peeling off said first message is obtained the information in the said first heading field, is specially:
When the IP that peels off said first message field and TCP field, obtain the first information and second information in TCP field in IP the field of said first message;
Saidly encapsulate the second heading field, the information correspondence in the said first heading field write in the said second heading field, be specially for said load:
When encapsulating IP field and TCP field of second message, the said first information and the said second information correspondence are write in IP the field and TCP field of said second message for said load.
3. method according to claim 1 is characterized in that, the said first heading field of peeling off said first message is obtained the information in the said first heading field, is specially:
When the IP that peels off said first message field and TCP field, obtain the first information in IP the field of said first message;
Saidly encapsulate the second heading field, the information correspondence in the said first heading field write in the said second heading field, be specially for said load:
When IP the field that encapsulates second message for said load and TCP field, said first information correspondence is write IP field of said second message.
4. method according to claim 1 is characterized in that, the said first heading field of peeling off said first message is obtained the information in the said first heading field, is specially:
When the IP that peels off said first message field and TCP field, obtain second information in TCP the field of said first message;
Saidly encapsulate the second heading field, the information correspondence in the said first heading field write in the said second heading field, be specially for said load:
When IP the field that encapsulates second message for said load and TCP field, the said second information correspondence is write TCP field of said second message.
5. according to the described method of arbitrary claim in the claim 1 to 4, it is characterized in that the said first information and said second information are explicit congestion announcement ECN control information.
6. a message forwarding equipment is characterized in that, said forwarding unit uses socket mechanism to E-Packet, and comprising:
First network interface is used to receive first message;
Peel off acquiring unit, be used to peel off the first heading field of said first message, obtain information and the load of said first message in the said first heading field;
Encapsulation unit; Be used to said load and encapsulate the second heading field; Information correspondence in the said first heading field is write in the said second heading field; Form second message, said first heading field and the said second heading field comprise an Internet protocol IP field and a transmission control protocol TCP field, and said information comprises the first information and/or second information in the said TCP field in the said IP field;
Second network interface is used to send said second message.
7. equipment according to claim 6 is characterized in that, the said acquiring unit of peeling off specifically is used for:
When the IP that peels off said first message field and TCP field, obtain the first information and second information in TCP field in IP the field of said first message;
Said encapsulation unit specifically is used in IP the field that encapsulates second message for said load during with TCP field, correspondence in the said first information and said second information is write in IP the field and TCP field of said second message.
8. equipment according to claim 6 is characterized in that, the said acquiring unit of peeling off specifically is used for:
When the IP that peels off said first message field and TCP field, obtain the first information in IP the field of said first message;
Said encapsulation unit specifically is used for when IP the field that encapsulates second message for said load and TCP field, said first information correspondence being write IP field of said second message.
9. equipment according to claim 6 is characterized in that, the said acquiring unit of peeling off specifically is used for:
When the IP that peels off said first message field and TCP field, obtain second information in TCP the field of said first message;
Said encapsulation unit specifically is used for when IP the field that encapsulates second message for said load and TCP field, the said second information correspondence being write TCP field of said second message.
10. according to the described equipment of arbitrary claim in the claim 6 to 9, it is characterized in that,
The said first information and said second information are explicit congestion announcement ECN control information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210073196.8A CN102638395B (en) | 2012-03-19 | 2012-03-19 | Message forwarding method and message forwarding equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210073196.8A CN102638395B (en) | 2012-03-19 | 2012-03-19 | Message forwarding method and message forwarding equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102638395A true CN102638395A (en) | 2012-08-15 |
CN102638395B CN102638395B (en) | 2015-01-21 |
Family
ID=46622648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210073196.8A Active CN102638395B (en) | 2012-03-19 | 2012-03-19 | Message forwarding method and message forwarding equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102638395B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104852855A (en) * | 2014-02-19 | 2015-08-19 | 华为技术有限公司 | Congestion control method, device and equipment |
WO2015180560A1 (en) * | 2014-05-30 | 2015-12-03 | 华为技术有限公司 | Service router packet processing method and service node |
WO2016188306A1 (en) * | 2015-05-27 | 2016-12-01 | 华为技术有限公司 | Information transmission method, information acquisition method, sending end device and receiving end device |
WO2019205799A1 (en) * | 2018-04-27 | 2019-10-31 | 华为技术有限公司 | Method and apparatus for processing multicast data packet |
CN112511323A (en) * | 2019-09-16 | 2021-03-16 | 华为技术有限公司 | Method and related apparatus for handling network congestion |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101304387A (en) * | 2008-06-18 | 2008-11-12 | 中兴通讯股份有限公司 | Method for implementing tunnel conversion of bi-layer tunnel protocol |
CN102255808A (en) * | 2011-07-08 | 2011-11-23 | 福建星网锐捷网络有限公司 | Congestion notification method, device, system and network equipment |
-
2012
- 2012-03-19 CN CN201210073196.8A patent/CN102638395B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101304387A (en) * | 2008-06-18 | 2008-11-12 | 中兴通讯股份有限公司 | Method for implementing tunnel conversion of bi-layer tunnel protocol |
CN102255808A (en) * | 2011-07-08 | 2011-11-23 | 福建星网锐捷网络有限公司 | Congestion notification method, device, system and network equipment |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104852855A (en) * | 2014-02-19 | 2015-08-19 | 华为技术有限公司 | Congestion control method, device and equipment |
CN104852855B (en) * | 2014-02-19 | 2018-08-21 | 华为技术有限公司 | Jamming control method, device and equipment |
WO2015180560A1 (en) * | 2014-05-30 | 2015-12-03 | 华为技术有限公司 | Service router packet processing method and service node |
CN105471927A (en) * | 2014-05-30 | 2016-04-06 | 华为技术有限公司 | Method for processing service routing message, and service node |
CN105471927B (en) * | 2014-05-30 | 2019-01-08 | 华为技术有限公司 | The method and service node that a kind of pair of business routing message is handled |
WO2016188306A1 (en) * | 2015-05-27 | 2016-12-01 | 华为技术有限公司 | Information transmission method, information acquisition method, sending end device and receiving end device |
WO2019205799A1 (en) * | 2018-04-27 | 2019-10-31 | 华为技术有限公司 | Method and apparatus for processing multicast data packet |
US11431615B2 (en) | 2018-04-27 | 2022-08-30 | Huawei Technologies Co., Ltd. | Multicast data packet processing method and apparatus |
CN112511323A (en) * | 2019-09-16 | 2021-03-16 | 华为技术有限公司 | Method and related apparatus for handling network congestion |
CN112511323B (en) * | 2019-09-16 | 2022-06-14 | 华为技术有限公司 | Method and related apparatus for handling network congestion |
US11991082B2 (en) | 2019-09-16 | 2024-05-21 | Huawei Technologies Co., Ltd. | Network congestion processing method and related apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN102638395B (en) | 2015-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190245809A1 (en) | System and method for message handling in a network device | |
CN102594713B (en) | A kind of method and apparatus realizing Explicit Congestion and notice | |
CN105577501B (en) | Standby incoming communication implementation method and device are hung under private network customer terminal equipment | |
CN102638395A (en) | Message forwarding method and message forwarding equipment | |
CN102710639B (en) | A kind of based on ActiveMQ data/address bus across power ampere whole district Real Data Exchangs method | |
CN110290093A (en) | The SD-WAN network architecture and network-building method, message forwarding method | |
WO2007143717A3 (en) | Methods, computer readable medium and apparatus for using short addresses in a communication system | |
CN102624723B (en) | Method and device for achieving explicit congestion notification | |
CN102882781B (en) | Method, route bridge and system for transmitting message | |
CN107196834B (en) | Message processing method and device | |
CN102625363A (en) | Mobile evolved packet network system | |
CN102740283A (en) | Gateway equipment in long term evolution (LTE) system and data splitting method for gateway equipment | |
CN102291305B (en) | Method and device for implementing 6 to 4 relay routing, and message forwarding method | |
CN104703126B (en) | Wireless network broadcast information transmission system and its method based on iBeacon | |
US8179795B2 (en) | Communication terminal apparatus, distribution apparatus, error notification method, and error notification program | |
CN105471827A (en) | Message transmission method and device | |
CN101645895B (en) | Method and device for realizing tunnel safety | |
CN103442015A (en) | Method and system for processing capwap tunnel data on wireless network controller based on linux virtual network card | |
CN102316044B (en) | Method for realizing mutual separation of control and forwarding, and device | |
CN104168273A (en) | Method and system for achieving TCP proxy in thin AP mode | |
CN102710495A (en) | Method and device for establishing routing information of user host computer in monitoring network | |
CN102710510A (en) | Information processing method, device and system | |
WO2015096734A1 (en) | Downlink transmission method for service data, and packet data gateway | |
CN104023091B (en) | A kind of multilink fusion method and equipment | |
CN103368841A (en) | Message forwarding method and device thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |