CN102957585B - The data transmission method of a kind of Ethernet and data transmission device - Google Patents

The data transmission method of a kind of Ethernet and data transmission device Download PDF

Info

Publication number
CN102957585B
CN102957585B CN201210510861.5A CN201210510861A CN102957585B CN 102957585 B CN102957585 B CN 102957585B CN 201210510861 A CN201210510861 A CN 201210510861A CN 102957585 B CN102957585 B CN 102957585B
Authority
CN
China
Prior art keywords
value
packet
ethernet frame
procotol
frame
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
Application number
CN201210510861.5A
Other languages
Chinese (zh)
Other versions
CN102957585A (en
Inventor
阳天发
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201210510861.5A priority Critical patent/CN102957585B/en
Publication of CN102957585A publication Critical patent/CN102957585A/en
Application granted granted Critical
Publication of CN102957585B publication Critical patent/CN102957585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses data transmission method and the data transmission device of a kind of Ethernet.The method includes: transmitting terminal arranges the procotol value of type field in ethernet frame according to the destination address of destination address field (DAF) in ethernet frame and the frame check value of frame check field and sends this ethernet frame;Receiving terminal receives ethernet frame and judges whether the procotol value in ethernet frame is private network protocol value;If so, the packet during receiving terminal extracts ethernet frame.By the way, the procotol value of the type field of the present invention dynamically changes, and hacker cannot crack the Changing Pattern of type field by Statistics thus obtain the data of transmission in ethernet frame, thus substantially increases the safety of data transmission.

Description

The data transmission method of a kind of Ethernet and data transmission device
Technical field
The present invention relates to field of data transmission, particularly to data transmission method and the data transmission dress of a kind of Ethernet Put.
Background technology
Along with the development of ethernet technology, people rely on Ethernet to transmit data more and more, how to ensure data The safety of transmission and confidentiality, have become as the problem that people increasingly pay close attention to.
Traditional Ethernet data transmission uses transmission control protocol/Internet Protocol (Transmission Control Protocol/Internet Protocol, TCP/IP), in order to realize interconnecting easily mutually between the network terminal Logical, ICP/IP protocol is at the design initial stage, it is contemplated that much for the rule needing everybody jointly to observe that interconnects, this way Opening and convenience is provided, but it does not have think over its safety and confidentiality for everybody.Also just because of this rule Change and standardization, leave potential safety hazard to assault network.
Assault network obtains the all-network information of transmission data often through the approach of network intercepting, such as, Packet information.Then, analytical data package informatin, with reference to the rule of ICP/IP protocol, try to figure out data and pass the intention of loser.Profit again By the rule of ICP/IP protocol, copy/distort/manufacture network packet maliciously, to realize: destroy and pass loser's intention, realization The purpose that oneself is intended to.
Therefore, improving the safety of the data transmission of Ethernet, preventing assault is a problem demanding prompt solution.
Summary of the invention
The technical problem that present invention mainly solves be to provide the high Ethernet of a kind of security performance data transmission method and Data transmission device.
For solving above-mentioned technical problem, the technical scheme that the present invention uses is: provide the data of a kind of Ethernet to pass Transmission method, the method includes: transmitting terminal is according to the destination address of destination address field (DAF) in ethernet frame and the frame of frame check field Check value arranges the procotol value of the type field in ethernet frame;
Whether the procotol value judging ethernet frame is existing procotol value;If so, split in ethernet frame Packet the ethernet frame of the packet after building corresponding fractionation, return and judge whether the procotol value of ethernet frame is The step of some procotol values, if it is not, send ethernet frame;
Receiving terminal receives ethernet frame and judges whether the procotol value in ethernet frame is private network protocol value;If It is that receiving terminal extracts the packet in ethernet frame;
Wherein procotol value to be sent is set by transmitting terminal according to linear function f (x1, x2, x3, x4, x5, x6, x7) Put, wherein,
F (x1, x2, x3, x4, x5, x6, x7)
=a1 × x1+a2 × x2+a3 × x3+a4 × x4+a5 × x5+a6 × x6+a7 × x7,
A1, a2, a3, a4, a5, a6, a7 are constant, and x1, x2, x3, x4, x5, x6 are corresponding in turn to destination in ethernet frame Six bytes of location field, a byte of the lowest order of frame check field in x7 correspondence ethernet frame.
Wherein, receiving terminal judge the procotol value in ethernet frame whether with linear function f (x1, x2, x3, x4, x5, X6, x7) value equal;If equal, then judge that the procotol value in ethernet frame is private network protocol value.
Wherein, a1, a2, a3, a4, a5 and a6 positive negative integer successively is arranged, and a1 and a2, a3 and a4, a5 and a6 The difference of absolute value is less than or equal to 10 and more than or equal to-10, and a7 is the positive integer less than or equal to 10, so that procotol value is less than In 32767 and more than or equal to-32767.
Wherein, the step bag of the ethernet frame of the packet after splitting the packet in ethernet frame and building corresponding fractionation Include: split the packet in ethernet frame to form the first packet and the second packet;Obtain corresponding first packet respectively Frame check value with the second packet;The network association of corresponding first packet and the second packet is obtained respectively according to frame check value View value;Corresponding first packet and the ethernet frame of the second packet is built respectively according to frame check value and procotol value.
Wherein, the step of the frame check value obtaining corresponding first packet and the second packet respectively is: according to formulaObtain the frame check value of corresponding first packet and the second packet, wherein, D [i] corresponding first data respectively respectively Data in units of byte in bag and the second packet, the most corresponding first packet of n and the second packet with byte are The number of the data of unit.
Wherein, existing procotol value is 0x0800,0x0806,0x8137 or 0x809B.
For solving above-mentioned technical problem, another technical solution used in the present invention is: provide a kind of data transmission device, This device includes: procotol value arranges module, for according to the destination address of destination address field (DAF) in ethernet frame and frame school The frame check value testing field arranges the procotol value of the type field in ethernet frame;Wherein, transmitting terminal is according to linear function f (x1, x2, x3, x4, x5, x6, x7) arranges procotol value, wherein,
F (x1, x2, x3, x4, x5, x6, x7)
=a1 × x1+a2 × x2+a3 × x3+a4 × x4+a5 × x5+a6 × x6+a7 × x7,
A1, a2, a3, a4, a5, a6, a7 are constant, and x1, x2, x3, x4, x5, x6 are corresponding in turn to destination in ethernet frame Six bytes of location field, a byte of the lowest order of frame check field in x7 correspondence ethernet frame;
Sending module, is used for sending ethernet frame;Receiver module, is used for receiving ethernet frame;First judge module, is used for Whether the procotol value judging the type field in ethernet frame is private network protocol value;
Packet extraction module, for judging the procotol value of the type field in ethernet frame when the first judge module During for private network protocol value, extract the packet in ethernet frame;
Second judge module, is used for judging whether procotol value is existing procotol value;Ethernet frame builds mould Block, for when the second judge module judges procotol value as existing procotol value, splitting the packet in ethernet frame And build the ethernet frame of the packet after corresponding fractionation.
Wherein, the first judge module judge the procotol value in ethernet frame whether with linear function f (x1, x2, x3, X4, x5, x6, x7) value equal;If equal, then judge that the procotol value in ethernet frame is private network protocol value.
The invention has the beneficial effects as follows: compared with prior art, the data transmission method of the Ethernet of the present invention and data Transmitting device, it arranges ether by the destination address of destination address field (DAF) in ethernet frame and the frame check value of frame check field The procotol value of the type field in net frame, the procotol value of type field dynamically changes, and hacker cannot be former by statistics Reason cracks the Changing Pattern of type field thus obtains the data of transmission in ethernet frame, thus substantially increases data transmission Safety.
Accompanying drawing explanation
Fig. 1 is the flow chart of the data transmission method of the Ethernet of first embodiment of the invention;
Fig. 2 is the flow chart of the data transmission method of the Ethernet of second embodiment of the invention;
Fig. 3 is the ethernet frame of the packet after splitting the packet in ethernet frame in Fig. 2 and building corresponding fractionation Flow chart;
Fig. 4 is the structural representation of the data transmission device of the Ethernet of first embodiment of the invention.
Detailed description of the invention
The present invention is described in detail with embodiment below in conjunction with the accompanying drawings.
Data transmission method disclosed by the invention is data transmission method based on Ethernet, the system architecture bag used Include transmitting terminal and receiving terminal, transmitting terminal and receiving terminal by Ethernet mutual data transmission.Wherein, transmitting terminal and receiving terminal are permissible It is PC, mobile phone, TV or panel computer etc..Further, the data transmission method of the present invention utilizes three-layer network model, It is respectively physical layer, data link layer and application layer.
As it is known by the man skilled in the art, by Ethernet mutual data transmission, need data to be sealed in data link layer Then the form dressing up ethernet frame is transmitted by physical layer.Wherein, ethernet frame includes 7 byte lead codes, 1 byte frame First symbol, 6 byte destination addresses, 6 byte source addresses, 2 byte type field, 46~1500 byte data and 4 byte frame check Field.The structure of ethernet frame is specific as follows shown:
Lead code Frame first symbol Destination address Source address Type field Data field Frame check field
7B 1B 6B 6B 2B 46-1500B 4B
In the structure of ethernet frame, type field represents that network protocol type, existing network protocol type include IP Agreement, ARP protocol, Novell Internetwork Packet Exchange, Apple Talk agreement etc., the procotol value of its correspondence is respectively as follows: 0x0800、0x0806、0x8137、0x809B。
Fig. 1 is the flow chart of the data transmission method of the Ethernet of first embodiment of the invention.As it is shown in figure 1, the party Method includes step:
Step S11: transmitting terminal is according to the destination address of destination address field (DAF) in ethernet frame and the frame school of frame check field Test value arrange the procotol value of type field in ethernet frame and send ethernet frame, and perform step S12;
Private data to be sent is packaged into the form of ethernet frame and sends this Ethernet by Ethernet by transmitting terminal Frame.
In the present embodiment, transmitting terminal arranges ethernet frame according to linear function f (x1, x2, x3, x4, x5, x6, x7) In procotol value to be sent, wherein,
F (x1, x2, x3, x4, x5, x6, x7)=
A1 × x1+a2 × x2+a3 × x3+a4 × x4+a5 × x5+a6 × x6+a7 × x7,
A1, a2, a3, a4, a5, a6, a7 are constant, and x1, x2, x3, x4, x5, x6 are corresponding in turn to destination in ethernet frame Six bytes of location field, a byte of the lowest order of frame check field in x7 correspondence ethernet frame.
Further, though a1, a2, a3, a4, a5, a6, a7 are constant, but its value need to meet certain rule, so that network Protocol value is less than or equal to 32767 and more than or equal to-32767.Specifically, a1, a2, a3, a4, a5 and a6 are one positive one negative whole successively Number is arranged, and the difference of the absolute value of a1 and a2, a3 and a4, a5 and a6 is less than or equal to 10 and more than or equal to-10, and a7 takes and is less than or equal to The positive integer of 10.In the present embodiment, procotol value can be on the occasion of alternatively negative value, and it uses complement format to store, Procotol value accounts for 2 bytes, namely 16 in the form of ethernet frame again, therefore it is required that procotol value is less than or equal to 32767 and more than or equal to-32767.
Preferably, linear function f (x1, x2, x3, x4, x5, x6, x7) can also increase multiple multinomial to improve network The confidentiality of protocol value, such as, increases multinomial a8*x8, and wherein, a8 takes the positive integer less than or equal to 10, x8 correspondence frame check Byte for the highest order of field etc..
Such as, with the address of transmitting terminal as 0x8DCE97765D08, the address of receiving terminal is 0x5A80BACD90E7, sends End illustrates send the private data bag of 46 bytes to receiving terminal as a example by.
Transmitting terminal first by the form that private data encapsulation is ethernet frame of 46 bytes the most again by this ethernet frame It is sent to receiving terminal.The structure of this ethernet frame is specific as follows shown:
Wherein, lead code and frame first symbol are fixed value, and destination address is the address of the receiving terminal receiving ethernet frame, source Address is the address of the transmitting terminal sending ethernet frame.Private data bag according to destination address, source address and 46 bytes can obtain Getting frame check value is 0x06ECC5F3.
In the present embodiment, definition a1, a2, a3, a4, a5, a6, a7 represent respectively 34 with 10 system numbers ,-38, 21、-18、87、-79、8.In other embodiments, a1, a2, a3, a4, a5, a6, a7 can be defined for being different from this embodiment party Other value of formula, only need to meet above-mentioned rule.
According to destination address 0x5A80BACD90E7, available x1, x2, x3, x4, x5, x6 be respectively 0x5A, 0x80, 0xBA、0xCD、0x90、0xE7。
According to frame check value 0x06ECC5F3, available x7 is 0xF3.
According to above-mentioned a1, a2, a3, a4, a5, a6, a7, x1, x2, x3, x4, x5, x6, x7, procotol value f can be obtained (x1, x2, x3, x4, x5, x6, x7) is 0xEB0B.
In the present embodiment, because the x1 in linear function f (x1, x2, x3, x4, x5, x6, x7), x2, x3, x4, x5, X6, x7 are underrange, and the procotol value of the type field that transmitting terminal is sent in the ethernet frame of receiving terminal dynamically changes, black Visitor cannot crack the Changing Pattern of type field by Statistics thus obtain private data bag.
Step S12: receiving terminal receives ethernet frame, and performs step S13;
In the present embodiment, receiving terminal receives all ether of all destination address correspondence receiving terminal addresses from Ethernet Net frame.
Step S13: receiving terminal judges whether the procotol value in ethernet frame is private network protocol value, the most then Perform step S14, if it is not, then perform step S15;
Receiving terminal judge the procotol value in ethernet frame whether with linear function f (x1, x2, x3, x4, x5, x6, x7) Value equal;If equal, then judge that the procotol value in ethernet frame is proprietary protocol value.
Accepting aforementioned, receiving terminal receives the ethernet frame of private data bag of band 46 byte that transmitting terminal sends, with Reading very much available procotol value in net frame is 0xEB0B.The meter of the value of linear function f (x1, x2, x3, x4, x5, x6, x7) Calculation method hereinbefore has been carried out describing in detail, does not repeats them here.It will be recalled from above that linear function f (x1, x2, x3, X4, x5, x6, x7) value be 0xEB0B.It follows that the procotol value in the ethernet frame that receives of receiving terminal is privately owned Procotol value, performs step S14.
It is assumed that receiving terminal receives the ethernet frame of private data of band 46 byte that transmitting terminal sends, but ethernet frame The procotol value that middle reading obtains is other value differing from 0xEB0B, for example, 0x3B4B.And linear function f (x1, x2, x3, X4, x5, x6, x7) value be 0xEB0B.It follows that the procotol value in the ethernet frame that receives of receiving terminal is the most private There is procotol value, then perform step S15: receiving terminal abandons ethernet frame.
Step S14: extract the packet in ethernet frame.
After receiving terminal receives the ethernet frame that procotol value is private network protocol value, receiving terminal extracts Ethernet Packet in frame also passes to application layer, and this packet is for further processing by application layer.
Accepting aforementioned, receiving terminal extracts the private data bag of 46 bytes in ethernet frame and passes to application layer, application This private data bag is for further processing by layer.
Fig. 2 is the flow chart of the data transmission method of the Ethernet of second embodiment of the invention.As in figure 2 it is shown, the party Method includes step:
Step S21: transmitting terminal is according to the destination address of destination address field (DAF) in ethernet frame and the frame school of frame check field Test value and the procotol value of the type field in ethernet frame is set, and perform step S22;
This step is similar with step S11 in Fig. 1, does not repeats them here.
Step S22: whether the procotol value judging ethernet frame is existing procotol value, the most then perform step Rapid S23, if it is not, then perform step S24;
Procotol value step S21 acquired is compared with existing procotol value, specifically, by step The procotol value that S21 acquires is compared with above-mentioned existing procotol value 0x0800,0x0806,0x8137 or 0x809B Relatively, if identical, then perform step S23, if it is different, then perform step S24.
Step S23: the ethernet frame of the packet after splitting the packet in ethernet frame and building corresponding fractionation, and hold Row step S22;
When step S22 judges that the procotol value obtaining ethernet frame as existing procotol value, then needs this ether Packet in net frame carries out the ethernet frame of the packet after splitting and build corresponding fractionation, until the ethernet frame after Gou Jianing Procotol value different from existing procotol value till.
Fig. 3 is the ethernet frame of the packet after splitting the packet in ethernet frame in Fig. 2 and building corresponding fractionation Flow chart.As it is shown on figure 3, step S23 specifically includes following steps:
Step S231: the packet in fractionation ethernet frame is to form the first packet and the second packet, and performs step Rapid S232;
Packet in ethernet frame can be split from centre position, it is also possible to tear open from 1/3rd positions Point, the position that packet splits is not limited by present embodiment.Further, the packet for obtaining after splitting adds multiple The identical numerical value of byte is until the length of packet and the length of raw data packets are identical.
In the present embodiment, the packet ethernet frame is split to form the first packet and second from centre position Packet.Further, the first packet formed after splitting and the second packet are added multiple bytes 0xFF, until the first number Identical with the length of raw data packets with the length of the second packet according to bag.
Such as, the transmitting terminal encapsulation packet of 10 bytes and the ethernet frame that obtains, its structure is as follows:
Wherein, 10 byte datas are: 0x112233445566778899AA.
Because the procotol value of type field is 0x0800, identical with existing procotol value, then split 10 bytes Packet is to form the first packet and the second packet, and the first packet and the second packet structure that obtain after fractionation are as follows Shown in:
First packet is: 0x1122334455FFFFFFFFFF;
Second packet is: 0xFFFFFFFFF66778899AA.
Step S232: obtain the frame check value of corresponding first packet and the second packet respectively, and perform step S233;
Transmitting terminal is according to formulaObtain the frame check value of corresponding first packet and the second packet respectively, its In, D [i] distinguishes the data in corresponding first packet and the second packet in units of byte, n corresponding first packet respectively With the number of data in units of byte in the second packet.
Accept aforementioned, according to formulaThe frame check value obtaining corresponding first packet is: 0x5FA, corresponding second The frame check value of packet is: 0x7A3.
In other embodiments, in the first packet/the second packet, data in units of byte also can be with leading It is right that the data in units of byte in code, frame first symbol, destination address, source address and frame check field carry out suing for peace obtaining Answer the frame check value of the first packet/the second packet.
Step S233: obtain the procotol value of corresponding first packet and the second packet according to frame check value respectively, And perform step S234;
Transmitting terminal obtains corresponding first packet and the second data according to linear function f (x1, x2, x3, x4, x5, x6, x7) The procotol value of bag, wherein, the method obtaining procotol value according to linear function f (x1, x2, x3, x4, x5, x6, x7) exists In Fig. 1, step 11 has been carried out describing in detail, does not repeats them here.
Accept aforementioned, according to frame check value 5FA and the frame check value of corresponding second packet of corresponding first packet 7A3, can obtain procotol value 0xEB1B and the procotol value of corresponding second packet of corresponding first packet 0xE88B。
Step S234: build corresponding first packet and the second packet respectively according to frame check value and procotol value Ethernet frame, and perform step S22.
Step S231, step S232, step S233 are acquired procotol value, the first packet/the second packet Store with frame check value the type field to ethernet frame, data field and frame check field with build corresponding first packet/ The ethernet frame of the second packet.
Accepting aforementioned, the ethernet frame that the first packet/the second packet is corresponding is specific as follows shown:
Wherein, the first packet is: 0x1122334455FFFFFFFFFF;
Wherein, the second packet is: 0xFFFFFFFFF66778899AA.
Step S24: transmitting terminal sends ethernet frame, and performs step S25;
Transmitting terminal by physical layer send ethernet frame, to send this ethernet frame to receiving terminal, it is achieved transmitting terminal and Data interaction between receiving terminal.
Step S25: receiving terminal receives ethernet frame, and performs step S26;
This step is similar with step S12 in Fig. 1, does not repeats them here.
Step S26: receiving terminal judges whether the procotol value in ethernet frame is private network protocol value, the most then Perform step S27, if it is not, then perform step S28;
This step is similar with step S13 in Fig. 1, does not repeats them here.
Step S27: receiving terminal extracts the packet in ethernet frame;
In the present embodiment, receiving terminal is after the packet extracted in ethernet frame, and the content of read data packet is also sentenced Whether the packet of disconnected ethernet frame is the packet split, the most then splice this packet split to form one Complete packet.Specifically, it is judged that whether with the identical numerical value of multiple bytes in packet, the most then judge this number It it is the packet split according to bag.Wherein, the connecting method of packet is corresponding with the fractionation mode of step S231 in Fig. 3.
Accept aforementioned, when receiving terminal reads the first packet, because the first packet has 5 bytes continuous in low byte storage 0xFF, then judge that the first packet is the packet split.When receiving terminal reads the second packet, because the second packet exists Upper byte storage has 5 byte continuous print 0xFF, then judge that the second packet is the packet split.Splice the first packet The complete data packet that transmitting terminal the most available with the second packet sends.
Step S28: receiving terminal abandons ethernet frame.
Fig. 4 is the structural representation of the data transmission device of the Ethernet of first embodiment of the invention.Such as Fig. 4 institute Showing, this device includes: procotol value arranges module the 10, second judge module 20, ethernet frame builds module 30, sending module 40, receiver module the 50, first judge module 60, packet extraction module 70.
Procotol value arranges module 10, for according to the destination address of destination address field (DAF) in ethernet frame and frame check The frame check value of field arranges the procotol value of the type field in ethernet frame.
Wherein, procotol value arranges module 10 and arranges pending according to linear function f (x1, x2, x3, x4, x5, x6, x7) SCN Space Cable Network protocol value, wherein,
F (x1, x2, x3, x4, x5, x6, x7)
=a1 × x1+a2 × x2+a3 × x3+a4 × x4+a5 × x5+a6 × x6+a7 × x7,
A1, a2, a3, a4, a5, a6, a7 are constant, and x1, x2, x3, x4, x5, x6 are corresponding in turn to destination in ethernet frame Six bytes of location field, a byte of the lowest order of frame check field in x7 correspondence ethernet frame.
Second judge module 20, builds module 30 with ethernet frame respectively and procotol value arranges module 10 and is connected, use In judging whether procotol value is existing procotol value.
Ethernet frame builds module 30, is connected with the second judge module 20, for judging that network is assisted when the second judge module When view value is for existing procotol value, the Ethernet of the packet after splitting the packet in ethernet frame and building corresponding fractionation Frame.
Sending module 40, is connected with the second judge module 20, for judging procotol value not when the second judge module 20 When being existing procotol value, send ethernet frame.
Receiver module 50, is connected with sending module 40, is used for receiving ethernet frame.
First judge module 60, is connected 50 with receiver module, for judging the network association of the type field in ethernet frame Whether view value is private network protocol value.
Wherein, the first judge module 60 judge the procotol value of the type field in ethernet frame whether with above-mentioned linearly The value of function f (x1, x2, x3, x4, x5, x6, x7) is equal;If equal, then judge that the procotol value in ethernet frame is privately owned Procotol value.
Packet extraction module 70, is connected with the first judge module 60, for judging Ethernet when the first judge module 60 When the procotol value of the type field in frame is private network protocol value, extract the packet in ethernet frame.
The invention has the beneficial effects as follows: compared with prior art, compared with prior art, the data of the Ethernet of the present invention Transmission method and data transmission device, its destination address passing through destination address field (DAF) in ethernet frame and the frame of frame check field Check value arranges the procotol value of the type field in ethernet frame, and the procotol value of type field dynamically changes, hacker The Changing Pattern of type field cannot be cracked by Statistics thus obtain the data of transmission in ethernet frame, the most significantly carry The high safety of data transmission.
The foregoing is only embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every utilization is originally Equivalent structure or equivalence flow process that description of the invention and accompanying drawing content are made convert, or are directly or indirectly used in what other were correlated with Technical field, is the most in like manner included in the scope of patent protection of the present invention.

Claims (8)

1. the data transmission method of an Ethernet, it is characterised in that described method includes:
Transmitting terminal arranges described according to the destination address of destination address field (DAF) in ethernet frame and the frame check value of frame check field The procotol value of the type field in ethernet frame;
Whether the described procotol value judging described ethernet frame is existing procotol value;
The described Ethernet of the described packet after if so, splitting the packet in described ethernet frame and building corresponding fractionation Frame, returns the step whether described described procotol value judging described ethernet frame is existing procotol value, if it is not, Send described ethernet frame;
Receiving terminal receives described ethernet frame and judges whether the described procotol value in described ethernet frame is private network Protocol value;
If so, the packet during receiving terminal extracts described ethernet frame;
Wherein, procotol value to be sent is set by described transmitting terminal according to linear function f (x1, x2, x3, x4, x5, x6, x7) Put, wherein,
F (x1, x2, x3, x4, x5, x6, x7)=
A1 × x1+a2 × x2+a3 × x3+a4 × x4+a5 × x5+a6 × x6+a7 × x7,
A1, a2, a3, a4, a5, a6, a7 are constant, and x1, x2, x3, x4, x5, x6 are corresponding in turn to mesh described in described ethernet frame Six bytes of address field, a byte of the lowest order of frame check field described in the corresponding described ethernet frame of x7.
Data transmission method the most according to claim 1, it is characterised in that described receiving terminal judges in described ethernet frame Described procotol value the most equal with the value of described linear function f (x1, x2, x3, x4, x5, x6, x7);If equal, then sentence Described procotol value in disconnected described ethernet frame is private network protocol value.
Data transmission method the most according to claim 1 and 2, it is characterised in that described a1, described a2, described a3, described A4, a described a5 and described a6 positive negative integer successively is arranged, and described a1 and described a2, described a3 and described a4, described a5 Less than or equal to 10 and being more than or equal to-10 with the difference of the absolute value of described a6, described a7 is the positive integer less than or equal to 10, so that institute State procotol value less than or equal to 32767 and more than or equal to-32767.
Data transmission method the most according to claim 1, it is characterised in that described in the described ethernet frame of described fractionation The step of the described ethernet frame of packet the described packet after building corresponding fractionation includes:
Split the described packet in described ethernet frame to form the first packet and the second packet;
Obtain corresponding described first packet and the described frame check value of described second packet respectively;
Corresponding described first packet and the described procotol of described second packet is obtained respectively according to described frame check value Value;
Corresponding described first packet and described second data is built respectively according to described frame check value and described procotol value The described ethernet frame of bag.
Data transmission method the most according to claim 4, it is characterised in that described corresponding described first data of acquisition respectively The step of the described frame check value of bag and described second packet is:
According to formulaObtain corresponding described first packet and the described frame check value of described second packet respectively, its In, D [i] distinguishes the data in corresponding described first packet and described second packet in units of byte, the most corresponding institute of n State in the first packet and described second packet the number of described data in units of byte.
Data transmission method the most according to claim 1, it is characterised in that described existing procotol value is 0x0800,0x0806,0x8137 or 0x809B.
7. the data transmission device of an Ethernet, it is characterised in that described device includes:
Procotol value arranges module, for according to the destination address of destination address field (DAF) in ethernet frame and frame check field Frame check value arranges the procotol value of the type field in described ethernet frame;
Wherein, described procotol value arranges module and arranges described net according to linear function f (x1, x2, x3, x4, x5, x6, x7) Network protocol value, wherein,
F (x1, x2, x3, x4, x5, x6, x7)
=a1*x1+a2*x2+a3*x3+a4*x4+a5*x5+a6*x6+a7*x7,
A1, a2, a3, a4, a5, a6, a7 are constant, and x1, x2, x3, x4, x5, x6 are corresponding in turn to mesh described in described ethernet frame Six bytes of address field, a byte of the lowest order of frame check field described in the corresponding described ethernet frame of x7;
Sending module, is used for sending described ethernet frame;
Receiver module, is used for receiving described ethernet frame;
Whether the first judge module, be private for judging the described procotol value of the described type field in described ethernet frame There is procotol value;
Packet extraction module, for judging the institute of the described type field in described ethernet frame when described first judge module State procotol value when being private network protocol value, extract the packet in described ethernet frame;
Second judge module, is used for judging whether described procotol value is existing procotol value;
Ethernet frame builds module, for judging that described procotol value is as existing procotol value when described second judge module Time, the described ethernet frame of the described packet after splitting the described packet in described ethernet frame and building corresponding fractionation.
Data transmission device the most according to claim 7, it is characterised in that described first judge module judges described ether Described procotol value in net frame is the most equal with the value of described linear function f (x1, x2, x3, x4, x5, x6, x7);If phase Deng, then judge that the described procotol value in described ethernet frame is described private network protocol value.
CN201210510861.5A 2012-12-03 2012-12-03 The data transmission method of a kind of Ethernet and data transmission device Active CN102957585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210510861.5A CN102957585B (en) 2012-12-03 2012-12-03 The data transmission method of a kind of Ethernet and data transmission device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210510861.5A CN102957585B (en) 2012-12-03 2012-12-03 The data transmission method of a kind of Ethernet and data transmission device

Publications (2)

Publication Number Publication Date
CN102957585A CN102957585A (en) 2013-03-06
CN102957585B true CN102957585B (en) 2016-08-31

Family

ID=47765846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210510861.5A Active CN102957585B (en) 2012-12-03 2012-12-03 The data transmission method of a kind of Ethernet and data transmission device

Country Status (1)

Country Link
CN (1) CN102957585B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685322B (en) * 2013-12-31 2016-12-21 广州博冠信息科技有限公司 The method and apparatus of transmitting network data bag
CN108112031B (en) * 2016-11-24 2020-01-10 腾讯科技(深圳)有限公司 Network type determination method and device
CN107483279B (en) * 2017-10-10 2020-06-12 福建星网智慧软件有限公司 Method for local batch operation of network equipment based on Ethernet frame
CN112398780B (en) * 2019-08-13 2023-08-08 南京智数科技有限公司 Equipment self-identification communication method suitable for multiple networks

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007065358A1 (en) * 2005-12-06 2007-06-14 Huawei Technologies Co., Ltd. Method and system for service processing based on vlan stack
CN101051874A (en) * 2007-05-18 2007-10-10 北京大学 Simulating moving self organization network method
CN101616037A (en) * 2009-07-27 2009-12-30 华为技术有限公司 The detection method of packet loss, Apparatus and system in the network service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007065358A1 (en) * 2005-12-06 2007-06-14 Huawei Technologies Co., Ltd. Method and system for service processing based on vlan stack
CN101051874A (en) * 2007-05-18 2007-10-10 北京大学 Simulating moving self organization network method
CN101616037A (en) * 2009-07-27 2009-12-30 华为技术有限公司 The detection method of packet loss, Apparatus and system in the network service

Also Published As

Publication number Publication date
CN102957585A (en) 2013-03-06

Similar Documents

Publication Publication Date Title
CN102957585B (en) The data transmission method of a kind of Ethernet and data transmission device
US9286249B2 (en) USB device communication method, device and system wherein a human interface device (HID) descriptor and report are added to a driver of USB device
US20170193702A1 (en) Head-mounted display device and method for interaction between head-mounted display device and intelligent terminal
CN102571732B (en) A kind of methods, devices and systems of processes sensor protocol information
CN111970353A (en) Data processing method and device for heterogeneous equipment in Internet of things of cloud computing platform
CN103176834B (en) A kind of method of invoke extensions interface and device
CN102307223B (en) A kind of method and system realizing application platform adaptation
CN103618792B (en) Data stream identification method and device
CN102662431B (en) A docking station, method and system for controlling peripheral by utilizing same
CN105635079A (en) Network isolation gap data exchange system
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN108363588A (en) Realize method, electronic device and readable storage medium storing program for executing that web is interacted with primary function
CN102546542B (en) Electronic system and embedded device and transit device of electronic system
CN102866925A (en) Communication method and system for middleware and user interface
CN105847101A (en) Data transmission method based on vehicle bus
CN101667964A (en) Collocation method and device of access control list (ACL) regulations
CN103001966B (en) The process of a kind of private network IP, recognition methods and device
CN104202432B (en) Remote web management system and management method
CN101930362A (en) Method for integrating TTCN language and data description language
CN101609427A (en) A kind of programmable network automatization of service test macro and method
CN103152464A (en) Equipment, method and system of obtaining fixed phone calling information through wireless way
CN104735821B (en) A kind of wireless network card and its implementation turning serial port function with USB
CN102208998A (en) Field programmable gate array (FPGA)-based common object request broker architecture (CORBA) communication device
CN102364947A (en) Multipath IP video coding card based on PCIe bridge
CN103368915A (en) CAN bus based communication method

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