CN107342940A - The generation method and device and message processing method and device of a kind of control information - Google Patents

The generation method and device and message processing method and device of a kind of control information Download PDF

Info

Publication number
CN107342940A
CN107342940A CN201610285708.5A CN201610285708A CN107342940A CN 107342940 A CN107342940 A CN 107342940A CN 201610285708 A CN201610285708 A CN 201610285708A CN 107342940 A CN107342940 A CN 107342940A
Authority
CN
China
Prior art keywords
message
address
control information
pppoe
terminal
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
Application number
CN201610285708.5A
Other languages
Chinese (zh)
Other versions
CN107342940B (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201610285708.5A priority Critical patent/CN107342940B/en
Publication of CN107342940A publication Critical patent/CN107342940A/en
Application granted granted Critical
Publication of CN107342940B publication Critical patent/CN107342940B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a kind of generation method of control information and device and message processing method and device, the generation method of control information is applied to server, including:The user profile of terminal is obtained, wherein, user profile includes:MAC Address, IP address and pppoe session mark;After PPP connections are established between server and terminal, user profile is sent to by controller by the first control passage, so that controller generates subscriber control information according to user profile, and subscriber control information is sent to by forwarding unit by the second control passage.Using technical scheme provided in an embodiment of the present invention, the flexibility of message handling system is increased.

Description

The generation method and device and message processing method and device of a kind of control information
Technical field
The present invention relates to communication technical field, the generation method and device and report of more particularly to a kind of control information Literary processing method and processing device.
Background technology
At present, usually using BRAS (Broadband Remote Access Server, broad band remote access clothes It is engaged in device) building network, the message that terminal room communicates in network is all to be responsible for processing by BRAS.Specifically, BRAS is generated according to the information of the terminal of access network and is stored user control table, according to the user control table The message received is handled.BRAS needs to generate user control table, it is also necessary to is controlled according to the user Tabulation processing message, this causes system all underactions of whole message handling system.
The content of the invention
The embodiment of the invention discloses a kind of generation method of control information and device and message processing method and dress Put, to increase the flexibility of message handling system.
To reach above-mentioned purpose, the embodiment of the invention discloses a kind of generation method of control information, it is applied to Server, methods described include:
The user profile of terminal is obtained, wherein, the user profile includes:MAC Address, IP address and PPPoE Session identification;
After PPP connections are established between the server and the terminal, by the first control passage by the use Family information is sent to controller, so that the controller generates subscriber control information according to the user profile, And the subscriber control information is sent to by forwarding unit by the second control passage.
Optionally, the user profile for obtaining terminal, including:
The MAC Address is obtained in any message sent from the terminal received;
The pppoe session obtained between the terminal of discovery phase distribution and the server identifies;
Obtain in the IP address that negotiation phase is the terminal distribution.
Optionally, the subscriber control information includes:MAC Address, IP address, pppoe session mark and Port-mark.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of message processing method, applied to forwarding Equipment, methods described include:
Receive the first message;
If first message carrys out the PPPoE data messages of self terminal or first message carrys out automatic network The IP messages of side, judge user profile that first message carries whether with the subscriber control information that prestores Matching, wherein, the subscriber control information includes:MAC Address, IP address, pppoe session mark and Port-mark;
If matching, the second message is obtained according to first message, and send second message.
Optionally, when first message is the message that terminal is sent, methods described also includes:
Judge whether first message includes PPPoE data message feature fields;
If it is, judge that first message is PPPoE data messages;
It is described judge user profile that first message carries whether with the subscriber control information that prestores Match somebody with somebody, including:
Judge source MAC, source IP address, source pppoe session mark and source that first message carries Whether port-mark matches with the subscriber control information;
If it is, judge that the user profile that first message carries matches with the subscriber control information;
It is described that second message is obtained according to first message, and second message is sent, including:
First message is decapsulated, removes PPPoE heads, the second message is obtained and sends.
Optionally, when judging that obtaining first message does not include PPPoE data message feature fields, or work as Source MAC, source IP address, source pppoe session mark and the source port mark that first message carries When not matched with the subscriber control information, methods described also includes:
First message is transmitted to by server by the double layer network data channel pre-established.
Optionally, it is described to judge first message when first message is the IP messages from network side Whether the user profile of carrying matches with the subscriber control information prestored, including:
Judge the purpose IP address of the first message carrying whether in the subscriber control information prestored;
If it is, judge that the user profile that first message carries matches with the subscriber control information;
It is described that second message is obtained according to first message, and second message is sent, including:
According to the purpose IP address, target MAC (Media Access Control) address, purpose are obtained from the subscriber control information Pppoe session identifies and destination interface mark;
Identified according to the target MAC (Media Access Control) address, purpose pppoe session mark and the destination interface, PPPoE heads are encapsulated for first message, obtain the second message, and second message is sent from destination interface.
Optionally, when first message is the PPPoE messages from server, methods described also includes:
Described in being searched from two layer MAC address table corresponding to the double layer network switching domain belonging to first message Target MAC (Media Access Control) address corresponding to the purpose IP address that first message carries, and turned according to the target MAC (Media Access Control) address Send out the first message described.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of generating means of control information, application In server, described device includes:
Information acquisition unit, for obtaining the user profile of terminal, wherein, the user profile includes:MAC Address, IP address and pppoe session mark;
Information transmitting unit, after PPP connections are established between the server and the terminal, pass through The user profile is sent to controller by one control passage, so that the controller is according to the user profile Subscriber control information is generated, and the subscriber control information is sent to by forwarding unit by the second control passage.
Optionally, described information acquiring unit, it is specifically used for:
The MAC Address is obtained in any message sent from the terminal received;
The pppoe session obtained between the terminal of discovery phase distribution and the server identifies;
Obtain in the IP address that negotiation phase is the terminal distribution.
Optionally, the subscriber control information includes:MAC Address, IP address, pppoe session mark and Port-mark.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of message process device, applied to forwarding Equipment, described device include:
Message receiving unit, for receiving the first message;
Information judging unit, if carrying out the PPPoE data messages or described of self terminal for first message Whether one message is the IP messages from network side, judge the user profile of the first message carrying with depositing in advance The subscriber control information matching of storage, wherein, the subscriber control information includes:MAC Address, IP address, Pppoe session identifies and port-mark;
Packet sending unit, in the case of being in described information judging unit judged result, according to institute State the first message and obtain the second message, and send second message.
Optionally, when first message is the message that terminal is sent, described device also includes:
Field judging unit, for judging whether first message includes PPPoE data message feature fields; If it is, judge that first message is PPPoE data messages;
Described information judging unit, is specifically used for:
Judge source MAC, source IP address, source pppoe session mark and source that first message carries Whether port-mark matches with the subscriber control information;If it is, judge the use that first message carries Family information matches with the subscriber control information;
The packet sending unit, is specifically used for:
First message is decapsulated, removes PPPoE heads, the second message is obtained and sends.
Optionally, described device also includes:
Message retransmission unit, for not including PPPoE data message tagged words when judgement obtains first message Duan Shi, or when first message carry source MAC, source IP address, source pppoe session mark and When source port mark does not match with the subscriber control information, pass through the double layer network data channel pre-established First message is transmitted to server.
Optionally, when first message is the IP messages from network side, described information judging unit, tool Body is used for:
Judge the purpose IP address of the first message carrying whether in the subscriber control information prestored;If It is yes, judges that the user profile that first message carries matches with the subscriber control information;
The packet sending unit, is specifically used for:
According to the purpose IP address, target MAC (Media Access Control) address, purpose are obtained from the subscriber control information Pppoe session identifies and destination interface mark;
Identified according to the target MAC (Media Access Control) address, purpose pppoe session mark and the destination interface, PPPoE heads are encapsulated for first message, obtain the second message, and second message is sent from destination interface.
Optionally, when first message is the PPPoE messages from server, the message retransmission unit, It is additionally operable to:
Described in being searched from two layer MAC address table corresponding to the double layer network switching domain belonging to first message Target MAC (Media Access Control) address corresponding to the purpose IP address that first message carries, and turned according to the target MAC (Media Access Control) address Send out the first message described.
Therefore in embodiments of the present invention, when generating control information, server obtains the use of terminal Family information, wherein, user profile includes:MAC Address, IP address and pppoe session mark;In the clothes After establishing PPP connections between business device and terminal, user profile is sent to by controller by the first control passage, Controller generates subscriber control information according to the user profile that receives, then by the second control passage by user Control information is sent to forwarding unit.In this case, controller is responsible for specially safeguarding in renewal forwarding unit Subscriber control information is stored so that whole message handling system is more flexible.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to implementing The required accompanying drawing used is briefly described in example or description of the prior art, it should be apparent that, describe below In accompanying drawing be only some embodiments of the present invention, for those of ordinary skill in the art, do not paying On the premise of going out creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the generation method of control information provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet of message processing method provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of communication between devices process provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of the generating means of control information provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of message process device provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear Chu, it is fully described by, it is clear that described embodiment is only part of the embodiment of the present invention, rather than Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creation Property work under the premise of the every other embodiment that is obtained, belong to the scope of protection of the invention.
Below by specific embodiment, the present invention is described in detail.
With reference to figure 1, Fig. 1 is that a kind of flow of generation method of control information provided in an embodiment of the present invention is illustrated Figure, applied to server, this method includes:
S101:Obtain the user profile of terminal;
Here, user profile includes:MAC Address, IP address and pppoe session mark.
In a kind of implementation of the present invention, each information included in user profile can be in terminal and clothes Different phase when business device establishes PPP connections obtains, such as:
The acquisition of MAC Address:The end is obtained in any message that server can be sent from the terminal received The MAC Address at end;
The acquisition of pppoe session mark:In discovery phase, session that server can be between terminal and the server Pppoe session mark is distributed, server can obtain pppoe session mark;
The acquisition of IP address:In negotiation phase, server can be the IP address of terminal distribution, and server can obtain Take the IP address.
S102:After PPP connections are established between server and terminal, by the first control passage by user profile It is sent to controller.
In this case, controller generates subscriber control information according to the user profile that receives, and passes through the Subscriber control information is sent to forwarding unit by two control passages, and then forwarding unit is according to subscriber control information Forward PPPoE data messages.
In a kind of implementation of the present invention, the message of terminal room communication is mostly PPPoE data messages, is also had A small amount of other messages, such as protocol massages, specific message, in the embodiment of the present invention, in order to avoid all Message is all sent by same equipment, and then requires that the equipment has higher forwarding performance, improves network cost The problem of, PPPoE data messages are sent by forwarding unit, realize the unloading of flow.
In this case, forwarding unit is mainly responsible for the transmission of PPPoE data messages, and the message in network is more For data message, therefore it is required that forwarding unit needs the high forwarding performance of comparison, in this case, forward The hardware product of equipment can be used and realized based on the server of ASIC/NP frameworks, in order to ensure in network The transmission of message.
It is noted that the first control passage is:Control sets the control passage between device and server;Second Control passage is:Control passage between controller and forwarding unit.In one embodiment of the invention, control Device obtains user profile by the first control passage from server, and by the second control passage to forwarding Subscriber control information in equipment such as is added, deleted at the attended operation.Here, subscriber control information can be with Including:MAC Address, IP address, pppoe session mark and port-mark.
In one embodiment of the invention, above-mentioned first control passage and above-mentioned second control passage can adopt With the management interface technique construction such as Openflow, netconf, SNMP, REST API, alternatively, it is also possible to Using other management interface technique constructions, the present invention is to this without limiting.
Using embodiment illustrated in fig. 1, when generating control information, server obtains the user profile of terminal, its In, user profile includes:MAC Address, IP address and pppoe session mark;In the server and terminal Between establish PPP connections after, user profile is sent to by controller by the first control passage, controller according to The user profile generation subscriber control information received, then sent out subscriber control information by the second control passage Give forwarding unit.In this case, controller, which is responsible for specially safeguarding in renewal forwarding unit, has stored user Control information so that whole message handling system is more flexible.
In a kind of implementation of the present invention, forwarding unit forwards PPPoE datagrams according to subscriber control information Text, the method for realizing flow unloading, specifically refers to Fig. 2, Fig. 2 is one kind provided in an embodiment of the present invention The schematic flow sheet of message processing method, this method are applied to forwarding unit, including:
S201:Receive the first message;
S202:It is to come from network side that if the first message, which comes the PPPoE data messages of self terminal or first message, IP messages, judge the first message carry user profile whether matched with the subscriber control information prestored; If it is, perform S203;
In the PPPoE business of broadband, if the first message includes PPPoE data message feature fields, it can sentence Fixed first message is PPPoE data messages.Specifically, PPPoE data messages feature field can be: EtheretType=0x8864, PPPoE Code=0x00, PPP protocol=0x21.
In one embodiment of the invention, the subscriber control information can be stored in user control table, with It is easy to forwarding unit quickly to obtain information from the user control table, and is controlled according to the information of acquisition The transmission of message.
S203:Second message is obtained according to the first message, and sends the second message.
In a kind of implementation of the present invention, when the first message carrys out the PPPoE data messages of self terminal, S202 is specially:
S2021, judge the first message carry source MAC, source IP address, source pppoe session mark and Source port identifies whether to match with subscriber control information, if it is, performing S2022;
S2022, judge that the user profile that the first message carries matches with subscriber control information.
In this case, S203 is specially:
The first message is decapsulated, removes PPPoE heads, IP messages is obtained, is further searched in three-layer routing table The information such as purpose P address, target MAC (Media Access Control) address, and the IP messages are sent to by network according to the information found Side.Here, IP messages are above-mentioned second message.
In the implementation of the present invention, the terminal for accessing network is at real-time change, current time First terminal accesses network, and perhaps the subsequent time first terminal will exit network, therefore, it is necessary in real time Subscriber control information is updated, specifically, can be included:
S11, the first user profile of first terminal is sent to server by double layer network data channel, with Make server that the first user profile are sent into controller by the first control passage pre-established;
Here, forwarding unit is established with server and communicated to connect, and forwarding unit is established with first terminal and communicated Connection, this communication connection, it is substantially:Server communicates to connect with first terminal.
It is noted that first terminal, forwarding unit and service equipment belong to same Layer 2 -switched domain, this When sample server communicates with first terminal, two layer net of the forwarding unit can according to belonging to the message received The message received is transmitted to same two layers of net by the information in two layer MAC address table corresponding to network switching domain The equipment of network switching domain, realize the interaction of message between first terminal and server.In addition, forwarding is set Standby to be connected with server by the Layer 2 data tunneling traffic pre-established, forwarding unit can pass through message The double layer channel is forwarded to server, Layer 2 data passage mentioned here can use VLAN, VxLAN, Various two layers of networking technology structures such as L2OverGRE, MPLS L2VPN, can also use other two layers of groups Network technology is built, and the present invention is to this without limiting.
In addition, the first user profile can include:Belonging to the source MAC of first terminal, the first terminal The information such as mark of source port used by VLAN mark and the first terminal communicate with forwarding unit.This In, the first user profile is more detailed, and controller is directed to the first terminal according to what first user profile generated The first subscriber control information and after being sent to forwarding unit, be more easy to forwarding unit to be controlled according to first user Information processed controls the message that the first terminal is sent and the message sent to the first terminal.
S12, the first subscriber control information that controller is sent by the second control passage is received, and according to first Subscriber control information updates subscriber control information.
Specifically, PPP connections are established between first terminal and server, that is to say, that first terminal access network After network, the first user profile of the first terminal that controller is sent according to server by the first control passage The first subscriber control information is generated, user's control of first subscriber control information for addition for first terminal First subscriber control information is sent to forwarding unit by information, controller by the second control passage, forwarding Equipment stores first subscriber control information into the subscriber control information prestored, is set in order to forward It is standby to control first terminal to send message according to the subscriber control information;In first terminal is connected with server PPP To have no progeny, controller will receive the first user profile for first terminal of server transmission again, according to First user profile generates the first subscriber control information, and first subscriber control information is deleted and stored First subscriber control information, controller control forwarding unit by the first subscriber control information from subscriber control information Middle deletion;In addition, when the user profile of first terminal changes, controller can also control forwarding to set It is standby to update its first subscriber control information stored.It is this to be responsible for safeguarding that renewal turns specially by controller The subscriber control information stored in hair equipment so that whole message handling system is more flexible.
In order to preferably control the forwarding of message, its subscriber control information stored needs to include forwarding unit: The mark for the port that first terminal communicates with forwarding unit, but first may not included in the first user profile The mark for the port that terminal communicates with forwarding unit, in this case, above-mentioned S12 can include:
S121, receive the port-mark for the first terminal that controller is sent by the second control passage Obtain instruction;
S122, the source MAC according to the first terminal included in port-mark acquisition instruction, from two layers Source port mark is obtained in mac address table, and source port is identified control is sent to by the second control passage Device, to cause first subscriber control information of the controller according to the generation of source port mark for first terminal;
Specifically, controller receive source port mark after, according to the source port mark and the first user profile, The first subscriber control information is generated, and first subscriber control information is sent to forwarding unit.
S123, receive the first subscriber control information that controller is sent by the second control passage;
S124, the subscriber control information prestored according to the renewal of the first subscriber control information.
In another implementation, if not including the mark of port in the first user profile, above-mentioned S12 can be wrapped Include:
S125, the first subscriber control information that controller is sent by the second control passage is received, wherein, should Do not include source port in first subscriber control information to identify;
S126, the source MAC according to the first terminal included in the first subscriber control information, from two layers Source port mark is obtained in mac address table, and is used according to source port mark and the renewal of the first subscriber control information Family control information.
Specifically, the first user profile received is sent to and turned by controller as the first subscriber control information Equipment is sent out, forwarding unit finds first subscriber control information after first subscriber control information is received In do not include source port identify, then according to the source MAC included in first subscriber control information at two layers Source port mark is obtained in mac address table, and source port mark is filled to first subscriber control information In, update subscriber control information further according to first subscriber control information after filling.
In one embodiment of the invention, when the first message is the message that terminal is sent, if the first report Do not include PPPoE data message feature fields in text, or the first message carry source MAC, source IP Location, source pppoe session mark and source port mark do not match with subscriber control information, pass through double layer network data First message is transmitted to server by passage.Server is handled first message, is obtained and is sent Two messages.
Here, server can be connected with multiple forwarding units by double layer network data channel communication, and it is negative Duty concentrate send the message from each forwarding unit, and its send message for non-data message and comprising Source MAC and the unmatched message of subscriber control information, this message are a small number of messages, therefore to clothes The forwarding performance of business device requires relatively low.In addition, server is also responsible for management terminal access network, summary Two factors, its hardware product can not use BRAS to realize, but use the service based on x86 frameworks Device realizes that here, server based on x86 frameworks has the ability of preferable management terminal access network, And the forwarding capability with double layer network and three-layer network, it can concentrate and send the report from each forwarding unit Text, and then saved the cost of networking.
In one embodiment of the invention, forwarding unit not only needs processing to carry out the message of self terminal, also needs Handle the message from network side.Specifically, when the first message is the IP messages from network side, S202 Specially:
S2023, judge the purpose IP address of the first message carrying whether in the subscriber control information prestored In, if it is, performing S2024;
S2024, judge that the user profile that the first message carries matches with subscriber control information.
In this case, S203 is specially:
S2031, according to purpose IP address, target MAC (Media Access Control) address, purpose PPPoE are obtained from subscriber control information Session identification and destination interface mark;
S2032, according to target MAC (Media Access Control) address, purpose pppoe session mark and destination interface identify, be first Message encapsulates PPPoE heads, obtains the second message, and send the second message from destination interface.
Specifically, purpose IP address is carried in the first message, if first message is the IP messages from network side When, forwarding unit can obtain control information corresponding with purpose IP address from subscriber control information, such as:Mesh MAC Address, purpose pppoe session mark and destination interface mark etc., if finding, can be should First message encapsulates PPPoE heads, obtains the second message, and being sent from destination interface corresponding to destination interface mark should Second message.
In a kind of implementation of the present invention, if not found and purpose IP address pair from subscriber control information The control information answered, Yi Zhongshi:Directly first packet loss is fallen;Another kind is to retain one section of duration First message, can so avoid purpose terminal because temporarily with server interrupt communicate to connect, control Device deletes the subscriber control information of the purpose terminal from the subscriber control information of forwarding unit, and causes mesh Terminal the problem of can not receiving first message in time.If in addition, more than duration is retained, still can not be from Control information corresponding with destination address is found in subscriber control information, then first packet loss is fallen, To avoid excessive message from caching or be stored in forwarding unit for a long time, the Message processing of forwarding unit is influenceed Energy.
In one embodiment of the invention, when the first message is what server was sent by Layer 2 data passage During PPPoE messages, from two layer MAC address table corresponding to the double layer network switching domain belonging to first message Target MAC (Media Access Control) address corresponding to the purpose IP address of the first message carrying is searched, and is turned according to target MAC (Media Access Control) address Send out the first message.
In one embodiment of the invention, multiple terminals, multiple forwarding units, more can be included in network Individual server and multiple controllers, with reference to an example, only with included in network a terminal, one turn The communication process of equipment room is illustrated exemplified by hair equipment, a server and a controller.
With reference to figure 3, Fig. 3 is a kind of schematic diagram of communication between devices process provided in an embodiment of the present invention, the width 301, one, a terminal server 303 of forwarding unit 302, one and a control are included in band PPPoE business Device 304 processed.Specifically, the communication between terminal 301, forwarding unit 302, server 303 and controller 304 Journey can be divided into 2 stages:Discovery phase and session stage:
Discovery phase:
Terminal 301 sends a PADI message to forwarding unit 302, can be included in the PADI messages:The end The service type information that end 301 needs;When there is multiple forwarding units to be communicated to connect with the terminal 301, the end End 301 is to communicating with each forwarding unit broadcast transmission of connection PADI messages;
After forwarding unit 302 receives the PADI messages, the PADI messages are transmitted to server 303;
After server 303 receives the PADI messages, by the service type information included in the PADI messages and The access service type information that itself can be provided is compared, if it does, sending one to forwarding unit 302 Individual PADO messages, then the PADO messages are transmitted to terminal 301 by forwarding unit 302;
After terminal 301 receives the PADO messages, it is its PPPoE service equipment to determine server 303, and to Forwarding unit 302 sends a PADR message;In addition, if terminal 301 receives multiple PADO messages, Server 303 corresponding to the PIDO messages being initially received is defined as its PPPoE server;
After forwarding unit 302 receives the PADR messages, the PADR messages are transmitted to server 303;
Server 303 generates a pppoe session to be conversated with the terminal 301 according to the PADR messages Mark, pppoe session mark are unique, then send one to forwarding unit 302 and carry the PPPoE The PADS messages of session identification, then the PADS messages are transmitted to terminal 301 by forwarding unit 302;
After terminal 301 receives the PADS messages, identified according to the pppoe session carried in the PADS messages, Session is established with server 303, discovery phase terminates;
Session stage:The stage can be subdivided into LCP negotiation phases, authentication phase, ipcp negotiation stage again And data transfer phase;
LCP negotiation phases:Configuring request message, configure-ack/negative/refusal report are forwarded by forwarding unit 302 Text, complete foundation, configuration and the detection of link connection between terminal 301 and server 303;
Authentication phase:Terminal 301 forwards ID authentication request message by forwarding unit 302 to server 303; Server 303 goes the identity of AAA system certification terminal 301, and sends identity validation report to forwarding unit 302 Text, then identity validation message is transmitted to terminal 301 by forwarding unit 302;
The ipcp negotiation stage:Configuring request message, configure-ack/negative/refusal are forwarded by forwarding unit 302 Message, it is the network layer protocols such as the configuration of IP of terminal 301 and DNS;
Data transfer phase:In authentication phase, server 303 obtains the identity information (user of terminal 301 Information), in this stage, the identity information of terminal 301 is sent to controller 304, controller by server 303 304 generate subscriber control information according to identity information, and are sent to forwarding unit 302;Forwarding unit 302 is connecing After the PPPoE data messages for receiving the transmission of terminal 301, according to subscriber control information and PPPoE data messages, Message is sent to network.
In this case, the PPPoE data messages that terminal 301 is sent, carried in the PPPoE data messages In the case that user profile matches with subscriber control information, forwarding unit 302 obtains according to the PPPoE data messages IP messages are obtained, are concurrently sent to network, without PPPoE data messages are sent into server 303, are completed The unloading of flow.
In addition, server 303 can also retain the function of forwarding and processing message.If the report that terminal 301 is sent Text is the protocol massages such as PADI messages, or the message that terminal 301 is sent is the user profile and user's control carried The message received is sent to server 303, server 303 by the unmatched message of information, forwarding unit 302 Message is received, handles or forward the message.This can both be unloaded by forwarding unit 302 E-Packets, and also may be used To handle the framework of message by server 303 so that Message processing process is more flexible.
Using above-mentioned each embodiment, when handling message, forwarding unit is responsible for sending datagram, and carries out Flow unloads, and forwarding unit by non-data message and comprising information and the subscriber control information that prestores Unmatched low volume data message is transmitted to server, by server process.Forwarding unit is responsible for the number sent Occupied the majority according to message, and the message that server is responsible for processing occupies the minority, so, in actual building network, Consider the demand of forwarding unit and server process message, individually plan forwarding unit and server, save The cost of networking.
With reference to figure 4, Fig. 4 is a kind of structural representation of the generating means of control information provided in an embodiment of the present invention Figure, applied to server, the device includes:
Information acquisition unit 401, for obtaining the user profile of terminal, wherein, the user profile includes: MAC Address, IP address and pppoe session mark;
Information transmitting unit 402, after PPP connections are established between the server and the terminal, lead to Cross the first control passage and the user profile is sent to controller, so that the controller is according to the user Information generates subscriber control information, and the subscriber control information is sent into forwarding by the second control passage Equipment.
In a kind of implementation of the present invention, information acquisition unit 401, it is specifically used for:
The MAC Address is obtained in any message sent from the terminal received;
The pppoe session obtained between the terminal of discovery phase distribution and the server identifies;
Obtain in the IP address that negotiation phase is the terminal distribution.
In a kind of implementation of the present invention, the subscriber control information includes:MAC Address, IP address, Pppoe session identifies and port-mark.
Using embodiment illustrated in fig. 4, when generating control information, server obtains the user profile of terminal, its In, user profile includes:MAC Address, IP address and pppoe session mark;In the server and terminal Between establish PPP connections after, user profile is sent to by controller by the first control passage, controller according to The user profile generation subscriber control information received, then sent out subscriber control information by the second control passage Give forwarding unit.In this case, controller, which is responsible for specially safeguarding in renewal forwarding unit, has stored user Control information so that whole message handling system is more flexible.
In a kind of implementation of the present invention, forwarding unit forwards PPPoE datagrams according to subscriber control information Text, realize that the device of flow unloading refers to Fig. 5, Fig. 5 is a kind of Message processing provided in an embodiment of the present invention The structural representation of device, the device are applied to forwarding unit, including:
Message receiving unit 501, for receiving the first message;
Information judging unit 502, if coming PPPoE data messages or the institute of self terminal for first message It is the IP messages from network side to state the first message, judge user profile that first message carries whether with advance The subscriber control information matching first stored, wherein, the subscriber control information includes:MAC Address, IP Location, pppoe session mark and port-mark;
Packet sending unit 503, in the case of being in the judged result of described information judging unit 502, Second message is obtained according to first message, and sends second message.
In one embodiment of the invention, it is above-mentioned when first message is the message that terminal is sent Message process device can also include:
Field judging unit, for judging whether first message includes PPPoE data message feature fields; If it is, judge that first message is PPPoE data messages (not shown in Fig. 5);
Described information judging unit 502, is specifically used for:
Judge source MAC, source IP address, source pppoe session mark and source that first message carries Whether port-mark matches with the subscriber control information;If it is, judge the use that first message carries Family information matches with the subscriber control information;
The packet sending unit 503, is specifically used for:
First message is decapsulated, removes PPPoE heads, the second message is obtained and sends.
In one embodiment of the invention, described device also includes:
Message retransmission unit, for not including PPPoE data message tagged words when judgement obtains first message Duan Shi, or when first message carry source MAC, source IP address, source pppoe session mark and When source port mark does not match with the subscriber control information, pass through the double layer network data channel pre-established First message is transmitted to server (not shown in Fig. 5).
In one embodiment of the invention, when first message is the IP messages from network side, institute Information judging unit 502 is stated, is specifically used for:
Judge the purpose IP address of the first message carrying whether in the subscriber control information prestored;If It is yes, judges that the user profile that first message carries matches with the subscriber control information;
The packet sending unit 503, is specifically used for:
According to the purpose IP address, target MAC (Media Access Control) address, purpose are obtained from the subscriber control information Pppoe session identifies and destination interface mark;
Identified according to the target MAC (Media Access Control) address, purpose pppoe session mark and the destination interface, PPPoE heads are encapsulated for first message, obtain the second message, and second message is sent from destination interface.
In one embodiment of the invention, when first message is the PPPoE messages from server When, the message retransmission unit, it is additionally operable to:
Described in being searched from two layer MAC address table corresponding to the double layer network switching domain belonging to first message Target MAC (Media Access Control) address corresponding to the purpose IP address that first message carries, and turned according to the target MAC (Media Access Control) address Send out the first message described.
Using above-mentioned each embodiment, when handling message, forwarding unit is responsible for sending datagram, and carries out Flow unloads, and forwarding unit by non-data message and comprising information and the subscriber control information that prestores Unmatched low volume data message is transmitted to server, by server process.Forwarding unit is responsible for the number sent Occupied the majority according to message, and the message that server is responsible for processing occupies the minority, so, in actual building network, Consider the demand of forwarding unit and server process message, individually plan forwarding unit and server, save The cost of networking.
For device embodiment, because it is substantially similar to embodiment of the method, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these Any this actual relation or order be present between entity or operation.Moreover, term " comprising ", "comprising" Or any other variant thereof is intended to cover non-exclusive inclusion, so that the mistake including a series of elements Journey, method, article or equipment not only include those key elements, but also other including being not expressly set out Key element, or also include for this process, method, article or the intrinsic key element of equipment.Do not having In the case of more limitations, the key element that is limited by sentence "including a ...", it is not excluded that including it is described will Other identical element also be present in the process of element, method, article or equipment.
One of ordinary skill in the art will appreciate that realize all or part of step in above method embodiment It is that by program the hardware of correlation can be instructed to complete, described program can be stored in computer-readable Take in storage medium, the storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention. Any modification, equivalent substitution and improvements made within the spirit and principles of the invention etc., are all contained in In protection scope of the present invention.

Claims (16)

1. a kind of generation method of control information, it is characterised in that applied to server, methods described includes:
The user profile of terminal is obtained, wherein, the user profile includes:MAC Address, IP address and PPPoE Session identification;
After PPP connections are established between the server and the terminal, by the first control passage by the use Family information is sent to controller, so that the controller generates subscriber control information according to the user profile, And the subscriber control information is sent to by forwarding unit by the second control passage.
2. according to the method for claim 1, it is characterised in that the user profile for obtaining terminal, Including:
The MAC Address is obtained in any message sent from the terminal received;
The pppoe session obtained between the terminal of discovery phase distribution and the server identifies;
Obtain in the IP address that negotiation phase is the terminal distribution.
3. according to the method for claim 1, it is characterised in that the subscriber control information includes:MAC Address, IP address, pppoe session mark and port-mark.
4. a kind of message processing method, it is characterised in that applied to forwarding unit, methods described includes:
Receive the first message;
If first message carrys out the PPPoE data messages of self terminal or first message carrys out automatic network The IP messages of side, judge user profile that first message carries whether with the subscriber control information that prestores Matching, wherein, the subscriber control information includes:MAC Address, IP address, pppoe session mark and Port-mark;
If matching, the second message is obtained according to first message, and send second message.
5. according to the method for claim 4, it is characterised in that when first message sends for terminal Message when, methods described also includes:
Judge whether first message includes PPPoE data message feature fields;
If it is, judge that first message is PPPoE data messages;
It is described judge user profile that first message carries whether with the subscriber control information that prestores Match somebody with somebody, including:
Judge source MAC, source IP address, source pppoe session mark and source that first message carries Whether port-mark matches with the subscriber control information;
If it is, judge that the user profile that first message carries matches with the subscriber control information;
It is described that second message is obtained according to first message, and second message is sent, including:
First message is decapsulated, removes PPPoE heads, the second message is obtained and sends.
6. according to the method for claim 5, it is characterised in that when judgement obtains first message not During comprising PPPoE data message feature fields, or when first message carry source MAC, source IP When address, source pppoe session mark and source port mark do not match with the subscriber control information, methods described Also include:
First message is transmitted to by server by the double layer network data channel pre-established.
7. according to the method for claim 4, it is characterised in that when first message is to carry out automatic network During the IP messages of side, whether the user profile for judging that first message carries is controlled with the user prestored Information matches processed, including:
Judge the purpose IP address of the first message carrying whether in the subscriber control information prestored;
If it is, judge that the user profile that first message carries matches with the subscriber control information;
It is described that second message is obtained according to first message, and second message is sent, including:
According to the purpose IP address, target MAC (Media Access Control) address, purpose are obtained from the subscriber control information Pppoe session identifies and destination interface mark;
Identified according to the target MAC (Media Access Control) address, purpose pppoe session mark and the destination interface, PPPoE heads are encapsulated for first message, obtain the second message, and second message is sent from destination interface.
8. according to the method for claim 4, it is characterised in that when first message is from service During the PPPoE messages of device, methods described also includes:
Described in being searched from two layer MAC address table corresponding to the double layer network switching domain belonging to first message Target MAC (Media Access Control) address corresponding to the purpose IP address that first message carries, and turned according to the target MAC (Media Access Control) address Send out the first message described.
9. a kind of generating means of control information, it is characterised in that applied to server, described device includes:
Information acquisition unit, for obtaining the user profile of terminal, wherein, the user profile includes:MAC Address, IP address and pppoe session mark;
Information transmitting unit, after PPP connections are established between the server and the terminal, pass through The user profile is sent to controller by one control passage, so that the controller is according to the user profile Subscriber control information is generated, and the subscriber control information is sent to by forwarding unit by the second control passage.
10. device according to claim 9, it is characterised in that described information acquiring unit is specific to use In:
The MAC Address is obtained in any message sent from the terminal received;
The pppoe session obtained between the terminal of discovery phase distribution and the server identifies;
Obtain in the IP address that negotiation phase is the terminal distribution.
11. device according to claim 9, it is characterised in that the subscriber control information includes:MAC Address, IP address, pppoe session mark and port-mark.
12. a kind of message process device, it is characterised in that applied to forwarding unit, described device includes:
Message receiving unit, for receiving the first message;
Information judging unit, if carrying out the PPPoE data messages or described of self terminal for first message Whether one message is the IP messages from network side, judge the user profile of the first message carrying with depositing in advance The subscriber control information matching of storage, wherein, the subscriber control information includes:MAC Address, IP address, Pppoe session identifies and port-mark;
Packet sending unit, in the case of being in described information judging unit judged result, according to institute State the first message and obtain the second message, and send second message.
13. device according to claim 12, it is characterised in that when first message is sent out for terminal During the message sent, described device also includes:
Field judging unit, for judging whether first message includes PPPoE data message feature fields; If it is, judge that first message is PPPoE data messages;
Described information judging unit, is specifically used for:
Judge source MAC, source IP address, source pppoe session mark and source that first message carries Whether port-mark matches with the subscriber control information;If it is, judge the use that first message carries Family information matches with the subscriber control information;
The packet sending unit, is specifically used for:
First message is decapsulated, removes PPPoE heads, the second message is obtained and sends.
14. device according to claim 13, it is characterised in that described device also includes:
Message retransmission unit, for not including PPPoE data message tagged words when judgement obtains first message Duan Shi, or when first message carry source MAC, source IP address, source pppoe session mark and When source port mark does not match with the subscriber control information, pass through the double layer network data channel pre-established First message is transmitted to server.
15. device according to claim 12, it is characterised in that when first message is from net During the IP messages of network side, described information judging unit, it is specifically used for:
Judge the purpose IP address of the first message carrying whether in the subscriber control information prestored;If It is yes, judges that the user profile that first message carries matches with the subscriber control information;
The packet sending unit, is specifically used for:
According to the purpose IP address, target MAC (Media Access Control) address, purpose are obtained from the subscriber control information Pppoe session identifies and destination interface mark;
Identified according to the target MAC (Media Access Control) address, purpose pppoe session mark and the destination interface, PPPoE heads are encapsulated for first message, obtain the second message, and second message is sent from destination interface.
16. device according to claim 12, it is characterised in that when first message is from clothes During the PPPoE messages of business device, the message retransmission unit, it is additionally operable to:
Described in being searched from two layer MAC address table corresponding to the double layer network switching domain belonging to first message Target MAC (Media Access Control) address corresponding to the purpose IP address that first message carries, and turned according to the target MAC (Media Access Control) address Send out the first message described.
CN201610285708.5A 2016-04-29 2016-04-29 Control information generation method and device and message processing method and device Active CN107342940B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610285708.5A CN107342940B (en) 2016-04-29 2016-04-29 Control information generation method and device and message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610285708.5A CN107342940B (en) 2016-04-29 2016-04-29 Control information generation method and device and message processing method and device

Publications (2)

Publication Number Publication Date
CN107342940A true CN107342940A (en) 2017-11-10
CN107342940B CN107342940B (en) 2020-10-20

Family

ID=60222021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610285708.5A Active CN107342940B (en) 2016-04-29 2016-04-29 Control information generation method and device and message processing method and device

Country Status (1)

Country Link
CN (1) CN107342940B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110460687A (en) * 2019-08-15 2019-11-15 深圳震有科技股份有限公司 Recognition methods, device and the storage medium of a kind of IP address distribution port
CN111162976A (en) * 2019-12-20 2020-05-15 北京邮电大学 Campus network PPPoE proxy dialing method and device
CN113014507A (en) * 2019-12-19 2021-06-22 中国电信股份有限公司 Traffic processing method, device, system and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020154328A1 (en) * 2001-04-18 2002-10-24 Eiichi Sato Printing control apparatus and printing control method enabling image forming apparatus to adapt various printing data formats
CN1674576A (en) * 2004-06-03 2005-09-28 华为技术有限公司 Method for transmitting strategic information inter-network equipment
CN101197851A (en) * 2008-01-08 2008-06-11 杭州华三通信技术有限公司 Method and system for implementing control of plane centralized type data plane distribution
CN104272679A (en) * 2012-05-09 2015-01-07 日本电气株式会社 Communication system, control device, communication method, and program
CN104301184A (en) * 2014-10-31 2015-01-21 北京百度网讯科技有限公司 Link health checking method and device
CN105490945A (en) * 2014-09-15 2016-04-13 上海贝尔股份有限公司 Method and device for controlling data transmission in control plane

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020154328A1 (en) * 2001-04-18 2002-10-24 Eiichi Sato Printing control apparatus and printing control method enabling image forming apparatus to adapt various printing data formats
CN1674576A (en) * 2004-06-03 2005-09-28 华为技术有限公司 Method for transmitting strategic information inter-network equipment
CN101197851A (en) * 2008-01-08 2008-06-11 杭州华三通信技术有限公司 Method and system for implementing control of plane centralized type data plane distribution
CN104272679A (en) * 2012-05-09 2015-01-07 日本电气株式会社 Communication system, control device, communication method, and program
CN105490945A (en) * 2014-09-15 2016-04-13 上海贝尔股份有限公司 Method and device for controlling data transmission in control plane
CN104301184A (en) * 2014-10-31 2015-01-21 北京百度网讯科技有限公司 Link health checking method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110460687A (en) * 2019-08-15 2019-11-15 深圳震有科技股份有限公司 Recognition methods, device and the storage medium of a kind of IP address distribution port
CN113014507A (en) * 2019-12-19 2021-06-22 中国电信股份有限公司 Traffic processing method, device, system and computer readable storage medium
CN113014507B (en) * 2019-12-19 2022-09-23 中国电信股份有限公司 Traffic processing method, device, system and computer readable storage medium
CN111162976A (en) * 2019-12-20 2020-05-15 北京邮电大学 Campus network PPPoE proxy dialing method and device

Also Published As

Publication number Publication date
CN107342940B (en) 2020-10-20

Similar Documents

Publication Publication Date Title
CN101218575B (en) Techniques for migrating a point to point protocol to a protocol for an access network
CN107786613B (en) Broadband remote access server BRAS forwarding implementation method and device
CN106559292A (en) A kind of broad band access method and device
CN104125191B (en) Processing method, equipment and the system of point-to-point protocol based on Ethernet
CN103313308B (en) A kind of data transmission method and equipment
CN106559302A (en) Single tunnel method for building up, device and system
CN104821904B (en) Network repeater and relaying data packets method
CN107277190A (en) A kind of method of SDN equipment automatic wire charging, SDN equipment and controller
CN108882305A (en) A kind of shunt method and device of data packet
CN104283858A (en) Method, device and system for controlling user terminal access
CN107241454A (en) A kind of method for realizing address administration, device, aaa server and SDN controllers
EP4189925A1 (en) Normalized lookup and forwarding for diverse virtual private networks
CN107547340A (en) A kind of message forwarding method and device
KR20160111668A (en) Method and apparatus for generating packet
CN103595712B (en) A kind of Web authentication method, apparatus and system
CN107342940A (en) The generation method and device and message processing method and device of a kind of control information
CN107820262A (en) Method for parameter configuration, apparatus and system
CN106059885B (en) Processing method and system of the wireless controller to CAPWAP message
CN107645556B (en) It is a kind of to realize that SDN turns the isolated broadband access of control and keepalive method and device
WO2015100585A1 (en) Fiber-to-the-distribution point device and communication method therefor
CN104486217A (en) Cross network message transmitting method and equipment
CN106209637A (en) From message forwarding method and the equipment of virtual expansible LAN to VLAN
JP7298606B2 (en) Communication system and communication method
CN110199504A (en) The method that the enhancing of switching fabric in the central office delivering point of broadband access network for telecommunication network uses
CN100479457C (en) Implementation method for transferring data in virtual private network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant