Summary of the invention
Technical problem to be solved by this invention is directed against the shortcoming that prior art can not adapt to the IP Telecommunication Network data encapsulation exactly, a kind of new frame structure is provided and utilizes this frame structure to realize the link layer functionality of IP Telecommunication Network.
The present invention solve the technical problem, and the technical scheme of employing is, IP Telecommunication Network data frame encapsulation method, said Frame are by the frame header fields of fixed length, and frame check field three parts of random length information field and fixed length are formed; It is characterized in that, may further comprise the steps:
A., identification field and type field are set in said frame header fields;
B. with the mode of propagation of said identification field definition frame;
C. with the information type of said type field definition frame;
D, according to the circulation way of the said Frame of said identification field sign, on link layer, transmit said Frame.
Concrete is that among the said step b, the mode of propagation of frame is divided into clean culture, multicast and broadcasting.
Further be that among the said step c, information type is divided into test frame type, LCP frame type and protocol type information.
Further be said test frame type package vinculum road test frame and line test response frame; Said step e comprises: transmit leg issues line sending drive test examination frame ordering in order control, after the recipient receives the line test command frame, and return line test response frame.
Further be that said LCP frame type comprises reliable link control protocol frame and simplifies the LCP control frame; The said LCP control frame of simplifying also comprises link keep-alive control frame;
Under the reliable link control protocol, said steps d comprises:
After the device power-on, transmit leg is set up link with the recipient and is connected, and realizes the reliable transmission of said Frame on link layer through frame error control, after transfer of data is accomplished, under webmaster order control, accomplishes link and removes;
Simplifying under the LCP, said steps d comprises:
After the device power-on operation; Send said link keep-alive control frame immediately and regularly; Equipment is after receiving link keep-alive control frame, and the information type field of sending said Frame is the information frame of protocol type information sign, when equipment is not received link keep-alive control frame within a certain period of time; Then stop the transmission of said information frame, till the link keep-alive control frame of receiving the other side again.
Further be that said protocol type information comprises compression/security protocol frame, connecting-type procotol frame and connectionless network protocol frame.
The invention has the beneficial effects as follows, can adapt to different circuits, reach reliably at link layer, efficient and be convenient to the purpose that equipment is realized, be with good expansibility again simultaneously, be convenient to realize carrying and processing various packets; Can realize the transmitting function of link layer convenient on various point-to-point physical channels, efficiently; Can make things convenient for high efficient and reliable ground to accomplish the transmission of controlling links function and all kinds of groupings in upper strata.
Embodiment
The present invention handles multifunctionality, high efficiency, high flexibility and the high scalability problem of going up in order to solve link protocol, makes and can realize them easily through hardware.Be provided with an identification field on the frame structure of the present invention, through this field, this frame just can be realized clean culture, multicast and broadcast capability on point to point line easily in IP Telecommunication Network.This function can be avoided the repeatedly repetitive operation of mode of unicast when handling a bit to multipoint service, improves the treatment effeciency of multimedia broadcast/multicast service.
Be provided with a type field on the frame structure of the present invention, support the recognition function of line test function, controlling links function and variety of protocol bag through this field.In the test of line test function aspects both Support Line line state, support the Circuit Quality Test function again.In the controlling links function aspects, to the physical circuit characteristic of different transmission qualities, both supported to have transmitting-receiving sequence number mechanism and the reliable link control protocol function of retransmitting error correction, support transmission to simplify the LCP function efficiently again.
Frame structure of the present invention is made up of frame check field three parts of frame header fields, random length information field and the fixed length of fixed length, and is as shown in Figure 1.Wherein, frame head is made up of following field:
The identification field of fixed length;
The type field of fixed length.
This frame of identification field in frame head sign be point-to-point unicast frame, or point to multiple spot multicast frame and broadcast frame.The setting up of identification field makes in the network node device can be convenient on the physical channel of point-to-point type, all kinds of business such as clean culture, multicast and broadcasting handled respectively.
Identification field can be used 2 byte representations, defines as follows:
Complete 0: clean culture
Complete 1: broadcasting
Other: multicast, its value is the multicast group number
Type field in the frame head, the load information type of the frame of sign indefinite length comprises test frame type, LCP frame type, protocol type information.The line test frame type can be line test frame and line test response frame; Line test is meant that mainly with the single frames test be the line status test of characteristics and the Circuit Quality Test that is characteristics with one group of successive frame.The LCP frame type can be simple LCP frame and reliable link control protocol control frame.Protocol type information comprises compression/security protocol, and network layer protocol.Be subdivided into the connecting-type procotol again for network layer protocol, connectionless network protocol, or other procotol.
Type field can be used 1 byte, adopts as giving a definition:
0x00: reliable link control protocol
0x01: line test frame
0x02: line test response frame
0x03~0x07 keeps
0x08~0x0F: simplify the LCP control frame
0x10~0x1F: simplify LCP lower compression/security protocol
0x20~0x3F: keep
0x40~0x5F: simplify connecting-type procotol under the LCP
0x60~0x7F: simplify connectionless network protocol under the LCP
0x80~0xFF: keep
Reliable link control protocol frame only adopts " 0x00 " sign by type field value.The control frame type and the protocol type information of reliable link control protocol are further identified by the load information field.
Simplify the LCP control frame by type field value 0x08~0x0F sign.Can define 8 kinds of agreement control frames.
Compression/security protocol, identification information field are which kind of compressed format or which kind of security protocol.0x10~0x1F can define 16 kinds of different compression algorithms or security protocol, and they work in simplifies under the LCP.
The connecting-type procotol is by types value 0x40~0x5F sign.They identify the order and the data of these agreements respectively, and they work in simplifies under the LCP.
Connectionless network protocol is by types value 0x60~0x7F sign.They identify respectively, and packet, the control of these agreements under 64,96 and 128 byte network address length is divided into groups and management is divided into groups.
Other is left expansion in the future and uses.
No matter be the reliable link agreement or simplify link protocol, each frame all must carry out FCS (frame check) and carry out wrong detection, and the FCS sign indicating number is with 2 byte representations.For the wrong frame of FCS, directly abandon.
Frame structure of the present invention provides cover " line test " mechanism, and the plant maintenance personnel can accomplish line status test and Circuit Quality Test function through monitoring of tools order or webmaster order.
Frame structure of the present invention can adopt and simplify LCP for transmission quality circuit preferably.Simplifying LCP provides cover " keep-alive " (Keep alive) mechanism to come the monitoring and maintenance Link State.Do not have sequence number monitoring and wrong frame re-transmission, simplify the controlling links expense to greatest extent, be convenient to hardware and realize having very high frame efficiency of transmission.Frame structure of the present invention is being simplified under the LCP, assigns to discern three layers of protocol type information through frame header, can directly realize the transmission of upper-layer packet or compression/rescue bag at link layer.Through solidifying (regular length) various packet type forms, reduce hardware and realize difficulty and realize cost.
Frame structure of the present invention through achieve frame error control and error correction, can be realized the reliable transmission on the link layer under the reliable link control protocol.The frame structure of reliable link control protocol is as shown in Figure 2, and reliable link control protocol frame equals " 0x00 " sign by type field value.The control frame type and the protocol type information of reliable link control protocol are further identified by information field, and the general information field comprises two parts: information header (C) and message part (I); C partly has 7 types information header, is divided into 6 kinds of control frames (comprising control command frame and response frame) information header and a kind of information frame information header, the concrete definition as follows:
The I frame: the expression present frame is the information frame type of reliable link control protocol, and wherein the specifying information protocol type can be at the 1st byte representation (not describing in the drawings) of message part (I);
The RR frame: expression can receive the control frame of next information;
The RNR frame: expression wouldn't receive the control frame of next information frame;
REJ frame: the control frame of expression rejection current information frame;
The SABM frame: expression request and the other side set up link-attached control frame;
The DISC frame: the control frame of current link is removed in expression;
The UA frame: control frame is confirmed in expression.
Wherein NS representes current send sequence number, and NR representes Receive sequence number, and S representes the state of present frame, promptly requires response or does not require response.
The major function and the operation principle of reliable link agreement are described below, and mainly are divided into following function phases:
Link establishment
After device power-on, the request of transmission SABM frame is set up link with the other side and is connected.When receiving UA frame or SABM frame, link establishment.After transmit leg sends the SABM frame, when not receiving UA or SABM frame in the certain hour, retransmit SABM, until receiving UA or SABM.
Data transmit
After the link establishment, either party can send the information frame of band transmitting-receiving sequence number.The transmitting-receiving sequence number changes between 0~7 continuously, information frame of every transmission, and the NS that sends sequence number adds 1; Information frame of every reception, Receive sequence number NR adds 1.After the recipient receives an information frame; Sending a RR, RNR or REJ frame confirms; Sign can receive next information frame, wouldn't receive next information frame or rejection current information frame respectively, perhaps sends an information frame and carries out incidentally certain.
Error correcting
Transmit leg is not received acknowledgement frame after sending information frame in the certain hour, think that then this frame possibly lose owing to reasons such as circuit error codes, at this moment need correct this mistake through retransmitting this information frame.In addition, by frame acknowledgment when work,,, also can require transmit leg to retransmit REJ specified message frame, non-to correct the mistake of frame losing through reject frame REJ when receiving when sending sequence number the information frame of makeing mistakes.
Link is removed
Either party can remove this link through the DISC frame.Link is removed function through under webmaster order control, accomplishing.After transmit leg sends the DISC order, do not receive UA response or DISC order in the certain hour, retransmit the DISC frame, till receiving UA or DISC frame, or after retransmitting DISC frame limited number of time, link is removed and is accomplished.
The reliable link agreement can be corrected line errors through sequence number mechanism and retransmission mechanism, and frame can be transmitted on the bad circuit of transmission quality reliably.
The LCP of simplifying of the present invention does not have the link establishment process, does not does not receive and dispatch sequence number controlling mechanism and frame re-transmission mechanism yet.The operation principle of simplifying LCP is following:
After the device power-on operation, send immediately, and want regular transmit frame structure " keep-alive " (keep alive) frame as shown in Figure 3 later on, the keepalive frame type is with " 0x08 " expression.
After equipment receives " keep-alive " frame, just think that link is available.At this moment can send information type field among Fig. 1 is any information frame of protocol type information sign, like groupings such as compression/security protocol, connecting-type procotol and connectionless network protocols.
Equipment does not receive " keep-alive " frame within a certain period of time, thinks that then this link is unavailable at present.At this moment, stop the transmission of all information frames, till " keep-alive " frame that receives the other side again.
The control frame type of simplifying under the LCP also comprises the control frame based on different information protocols, and its frame structure here no longer describes.
Line test function of the present invention, no matter equipment work is in the reliable link control protocol or simplify under the LCP and can adopt.Line test function can order control down information type of transmission be that " 0x01 ", sequence number are that line status test command frame or one group of information type of 0 are that " 0x01 ", sequence number are the Circuit Quality Test command frame of non-0 (sequence number is continuous); After equipment receives the line test command frame; Will return the line test response frame of only having changed information type field (information type is " 0x02 ") immediately, frame structure is as shown in Figure 4.Sending the order square tube crosses response frame that inspection receives and judges line status and transmission quality this moment.
Frame structure of the present invention can adopt sign (Flag) demarcation frame forming tech (like the frame forming tech of HDLC, AHDLC), a synchronization length to delimit frame forming tech (like the frame forming tech of GFP, ATM) and preamble length demarcation frame forming tech any demarcation frame forming tech such as (like the Ethernet frame forming tech) with specifically the demarcation frame forming tech is irrelevant.Fig. 1~frame structure shown in Figure 4 has omitted the correlating markings field of delimiting frame forming tech, explanation hereby.
Frame structure of the present invention is suitable for any point-to-point physical channel.Frame structure of the present invention has good and beared information independence, can carry any upper-layer protocol.
About in this execution mode, about the value of the definition in each field, only be embodiment, be not construed as limiting the invention.