Nothing Special   »   [go: up one dir, main page]

WO2014153860A1 - Network access method, gateway and system - Google Patents

Network access method, gateway and system Download PDF

Info

Publication number
WO2014153860A1
WO2014153860A1 PCT/CN2013/077488 CN2013077488W WO2014153860A1 WO 2014153860 A1 WO2014153860 A1 WO 2014153860A1 CN 2013077488 W CN2013077488 W CN 2013077488W WO 2014153860 A1 WO2014153860 A1 WO 2014153860A1
Authority
WO
WIPO (PCT)
Prior art keywords
access
pppoed
terminal
network
server
Prior art date
Application number
PCT/CN2013/077488
Other languages
French (fr)
Chinese (zh)
Inventor
景麟
王晓晖
施驰
Original Assignee
深圳创维数字技术股份有限公司
深圳市创维软件有限公司
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 深圳创维数字技术股份有限公司, 深圳市创维软件有限公司 filed Critical 深圳创维数字技术股份有限公司
Publication of WO2014153860A1 publication Critical patent/WO2014153860A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2854Wide area networks, e.g. public data networks
    • H04L12/2856Access arrangements, e.g. Internet access
    • H04L12/2869Operational details of access network equipments
    • H04L12/287Remote access server, e.g. BRAS
    • H04L12/2872Termination of subscriber connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2854Wide area networks, e.g. public data networks
    • H04L12/2856Access arrangements, e.g. Internet access
    • H04L12/2858Access network architectures
    • H04L12/2859Point-to-point connection between the data network and the subscribers

Definitions

  • the present invention relates to a communication technology, and in particular, to a network access method, gateway, and system. Background technique
  • IPTV Internet Protocol TV
  • IPTV service-specific service network Access to the public Internet and access to the IPTV service-specific service network.
  • IPTV set-top boxes currently on the market usually have only one port fixedly connected to the IPTV service-specific service network. They are not compatible with both IPTV services and Internet services. Users cannot connect to other network types through set-top boxes, for example: access to the public Internet through set-top boxes. This poses a bottleneck for the business development of broadband operators and does not provide more networks for users to use. However, if the operator installs multiple ports on the set-top box to solve the problem, the set-top box can access multiple networks, which increases the hardware cost and requires connecting two physical network cables, which is neither beautiful nor network. Maintenance costs. Summary of the invention
  • the technical problem to be solved by the embodiments of the present invention is to provide a method and a gateway for network access. It can realize the function of single port access to multiple networks, saving hardware cost and network maintenance cost.
  • the embodiment of the present invention provides a network access method, including: when receiving a PPPoE packet sent by a terminal, detecting a packet type of the PPPoE packet, where the packet type includes sending Phase packet PPPoED or session phase packet PPP, the PPPoED carrying access Identification data;
  • the egress network channel matching the PPPoE message is obtained according to the access identifier data carried by the PPPoED;
  • the terminal is connected to the network through the egress network channel.
  • an embodiment of the present invention further provides a gateway, including:
  • a detecting unit configured to: when receiving a PPPoE packet sent by the terminal, detecting a type of the PPPoE packet, where the text type includes a sending phase, a PPPoED session, or a session phase, a PPP, the PPPoED Carrying access identification data;
  • a matching unit configured to: if the packet type of the PPPoE packet is PPPoED, obtain an egress network channel that matches the PPPoE packet according to the access identifier data carried by the PPPoED; The egress network channel connects the terminal to the network.
  • the present invention also provides a system for network access, comprising: a terminal and a server, and a gateway as described in the above invention.
  • the PPPoED packet in the transmission phase carries the access capable of discriminating the network type by extending the PPPoED packet in the PPPoE packet. Identifying the data and enabling the digital television terminal to access the corresponding egress network channel by parsing the access identification data.
  • This enables digital TV terminals to support multiple network accesses, enabling existing digital TV terminals to access multiple network types only through software upgrades of digital TV terminals and gateways, eliminating the need for users to replace single-port digital TV terminals. It can realize the function of accessing multiple network types, which not only saves hardware cost, user's use cost, but also saves network maintenance cost.
  • FIG. 1 is a schematic structural diagram of a conventional ADSL system networking of the present invention
  • FIG. 2 is a schematic flow chart of a first embodiment of a method for accessing a network according to the present invention
  • 3 is a schematic flow chart of a second embodiment of a method for network access according to the present invention
  • FIG. 4 is a schematic flow chart of a third embodiment of a method for network access according to the present invention.
  • FIG. 5 is a schematic flowchart diagram of a fourth embodiment of a method for network access according to the present invention.
  • FIG. 6 is a schematic flow chart of a fifth embodiment of a method for network access according to the present invention.
  • FIG. 7 is a schematic structural view of a first embodiment of a gateway according to the present invention.
  • FIG. 8 is a schematic structural view of a second embodiment of a gateway according to the present invention.
  • FIG. 9 is a schematic structural diagram of a third embodiment of a gateway according to the present invention.
  • FIG. 10 is a schematic structural diagram of a fourth embodiment of a gateway according to the present invention.
  • FIG. 11 is a schematic structural view of a fifth embodiment of a gateway according to the present invention.
  • FIG. 12 is a schematic structural diagram of a first embodiment of a network access system according to the present invention. detailed description
  • the terminal may be a digital television set top box, a digital television integrated machine, or the like, and a digital television terminal having a single or two-way digital television function.
  • FIG. 1 it is a flowchart of a first embodiment of a prior art ADSL (Asymmetric Digital Subscriber Line) system networking structure.
  • ADSL Asymmetric Digital Subscriber Line
  • the following describes the networking structure of the existing ADSL system in detail with reference to Figure 1, and introduces the PPPoE (Point to Point Protocol over Etherne) protocol.
  • PPPoE Point to Point Protocol over Etherne
  • the home user usually accesses the network of the operator by using the ADSL method.
  • the existing ADSL system networking structure can be generally divided into an ADSL transmission system 001, an ATM (Asynchronous Transfer Mode) network 002 and an access server 003.
  • the ADSL transmission system 001 includes a terminal 10 and a demodulator. 11 and the central office device 12, the ADSL transmission system 001 is responsible for the ADSL line codec and transmission of the telephone line segment.
  • the ATM network 002 is responsible for collecting user data from the central office device 12 into the access server 003 in an ATM PVC manner.
  • the access server 003 is an access server that implements the PPPoE function at the central office, and terminates the PPPoE process initiated by the user side.
  • the downlink Ethernet frame is sent from the IP metropolitan area network to the access server 003 via the router, and PPPoE is added.
  • the header is sent to the central office device 003 and encapsulated into an AAL5 frame, which is sent to the demodulator 11 through the cross module, and the AAL5 (ATM Adaptation Layer 5, ATM Adaptation Layer 5) frame recombination is completed by the demodulator 11 and the Ethernet frame is solved.
  • AAL5 ATM Adaptation Layer 5, ATM Adaptation Layer 5
  • the terminal 10 Sending to the terminal 10, the terminal 10 extracts the IP data packet from the PPPoE packet; the uplink PPPoE packet originates from the terminal 10, is encapsulated into an AAL5 frame in the demodulator 11, is transmitted by the ATM cell to the central office device 12, and is set by A good PVC (Permanent Virtual Circuit) is transmitted to the access server 003 for processing.
  • the ATM between the downlink of the central office device 12 and the demodulator 11 is ATM, and the ATM between the uplink of the central office device 12 and the access server 003 is also ATM.
  • the ATM PVC starts between the demodulator 11 and the access server 003.
  • the local device core uses ATM cell multiplexing, has a single structure, and does not require protocol conversion.
  • the local device is based on ATM's complete technical design, it can support multiple services, provide different processing measures and different buffer spaces for these services, provide different levels of priority and flow control for different service types, and make different ATM services.
  • the type obtains bandwidth compatible with the service throughout the service transmission line, thereby ensuring high performance quality support from the demodulator 11 to the access server 003.
  • the telecom operator's home media gateway can be configured with up to 8 channels of PVC, supports AUTO PVC and PVC sharing functions, and supports multi-session of single PVC and multiple PVC.
  • PVC supports AUTO PVC and PVC sharing functions
  • multi-session of single PVC and multiple PVC In order to ensure that the Internet and IPTV services do not interfere with each other and ensure the quality of IPTV users, two different PVCs are usually used for Internet and IPTV private network access, and each PVC adopts an independent PPPoE session.
  • ATM PVC has a natural security isolation mechanism, when PPPoE authentication is adopted, the PPP session from each terminal 10 to the access access server 003 is also isolated from each other, further enhancing the security mechanism.
  • the network port type is two RJ45 ports, or one RJ45 port and one WLAN port.
  • the set-top box uses two RJ45 ports
  • one of the dedicated IPTV ports connected to the home media gateway uses PPPoE dial-up to access the IPTV private network
  • the other one connects to the Internet port of the home media gateway, and also uses PPPoE dial-up mode to access the public. the Internet.
  • the user dials on the digital line of ADSL, adopts the special dialing protocol PPPoE, and dials directly to the verification server for verification.
  • the user needs to input the user name and password. After the verification is passed, a high-speed user number is established and correspondingly allocated.
  • Dynamic IP Dynamic IP.
  • the workflow of the PPPoE protocol includes two phases of discovery and session.
  • the discovery phase is stateless. The purpose is to obtain the Ethernet MAC address of the access server 003 and establish a unique PPPoE session identifier. After the discovery phase is over, it enters the standard PPP session phase.
  • a terminal 10 When a terminal 10 wants to start a PPPoE session, it must first perform a discovery phase to identify the Ethernet MAC address of the access server 003 and establish a PPPoE session identifier. In the discovery phase, based on the network topology, the host can discover multiple access servers 003 and then allow the user to select one. When the discovery phase is successfully completed, both the terminal 10 and the selected access server 003 have information that they have established a PPP connection on the Ethernet. Until the PPP session is established, the discovery phase remains stateless in client/server mode. Once the PPP session is established, both the terminal 10 and the access server 003 must allocate resources for the PPP virtual interface.
  • the PPPoE message is encapsulated in the data field of the Ethernet frame.
  • the Ethernet frame header includes: The destination server MAC address, followed by the address of the access server, the client MAC address, and the Ethernet protocol type.
  • the format of the PPPoE data packet includes: The first 4 bits of the PPPoE data packet are the version field, and the content filled in the domain is 0x01; the version field is followed by the 4-bit type field, and the content filled in the domain according to the protocol It is also 0x01; the code field occupies one byte. The content of this field is different for different P segments of PPPoE.
  • the session identifier occupies two bytes. When accessing the concentrator, no unique session ID is assigned to the user host.
  • the content of the changed domain must be filled with 0x0000; once the host obtains the session ID, then the unique session identifier must be filled in all subsequent messages; the PPPoE Payload length takes up two bytes, and the PPPoE Payload can It consists of multiple TLVs, each of which includes Tag_Type, Tag-Length, Tag_Vlaue.
  • the PPPoED process during the PPPoE discovery phase may include the following four phases: First, the terminal 10 sends a PADI frame for initialization. This frame will be broadcast over Ethernet, indicating that the access service is being sought; secondly, one or more access servers 003 reply to a PAD0 frame, ie, a response signal is sent to the terminal 10, indicating that the access server 003 is responding to whether a connection is to be established; 10 does not receive PAD0 within the specified time, it will resend the PADI packet, and double the waiting time, this process is generally repeated four times; again terminal 10 selects an access server 003, and sends a unicast PADR frame that is the connection request signal The access server 003 for the response indicates that it is desired to establish a connection; finally, the access server 003 sends a PADS frame, that is, a PPPoE connection confirmation signal, indicating that the connection can be established and the connection number is assigned.
  • the sending phase message PPPoED is stateless, and the purpose is to obtain the PPPoE access server 003, that is, the Ethernet MAC address of the access server 003 or a unique PPPoE session identifier established by the access server 003, the session identifier data.
  • the SESSION_ID Stored in the SESSION_ID in the PPPoE message.
  • the Payload of the PPPoE header always contains A TLV with a Tag_Type of 0x0103: Host-Uniq.
  • Host-Uniq is the host unique identifier, a random number randomly generated by the dialing host. Host-Uniq is similar to the identification field in PPP data packets, and is mainly used to match the sender and receiver. Because there are many PPPoE data messages in the broadcast network.
  • the PPP process includes: sending some configuration packets to configure the data link; authenticating; configuring the network layer protocol; and transmitting and terminating the PPPoE session. At this time, the user transmits or receives data by accessing the server.
  • FIG. 2 it is a flowchart of a first embodiment of a method for network access according to the present invention. As shown in FIG. 2, the steps of a network access method in this embodiment include:
  • the gateway port is set to be in the bridge mode, and the PPPoE packet is transparently transmitted.
  • the PPPoE Point to Point Protocol over Ethernet
  • the terminal can connect to a remote access server through a single bridge device.
  • the remote server can implement Control each access terminal. For example: When the terminal needs to access the public Internet, the terminal accesses the public Internet by sending a PPPoE message carrying the public Internet data, and transmits data according to the PPPoE protocol and the corresponding server in the public Internet.
  • the Ethernet frame detection is set, and the detection of the PPPoE packet is added in the bridging process.
  • the PPPoE packet includes the PPPoED packet and the PPP session.
  • the PPPoE packet type is detected and the corresponding operation is performed.
  • the Payload in the PPPoE packet always contains a TLV: Host-Uniq.
  • Host-Uniq is the host unique identifier, a random number randomly generated by the dialing host.
  • Host-Uniq is similar to the identifier field in PPP data packets. It is mainly used to match the sender and receiver. Because there are many PPPoE data packets in the broadcast network. Among them, we can use the always-present Host-Uniq as the access identification data to identify the type of access network required by the terminal.
  • the access identifier data may be set to, the value of one account type corresponding to Host-Uniq is between [0, C), and the other account type corresponds to the value of Host-Uniq. Between the [C, + ⁇ ) ranges, where C is a constant constant between (0, + ⁇ ), for example: No.
  • the terminal needs to access the IPTV private network, and the value of Host-Uniq is set between [C, + ⁇ ).
  • the access identification data may be set such that one account type corresponds to the value of Host-Uniq between [0, A), and the other account type corresponds to the value of Host-Uniq. ⁇ , ⁇ )
  • the third account type corresponds to the value of Host-Uniq between [B, C), etc., so that the value of Host-Uniq is set to multiple ranges to correspond to multiple accounts.
  • the packet type of the PPPoE packet is PPPoED, obtain an egress network channel that matches the PPPoE packet according to the access identifier data carried by the PPPoED packet.
  • the PPPoED packet is parsed to obtain the access identifier data carried by the PPPoED, and the access identifier data may be the data of the Host-Uniq indicated by the host in the Payload, and the terminal identifier is determined according to the access identifier data.
  • Dial-up account type for example: If Host-Uniq is in the [0, C) range, the message is from the Internet dial-up account, then the PPPoED message is mapped to the PVC1 network channel, and the PVC1 network channel access server It is an Internet server.
  • the packet is from the IPTV dial-up, and the PPoED packet is mapped to the PVC2 network channel.
  • the server accessed by the PVC2 network channel is the IPTV server.
  • the PVC1 and the PVC2 are permanent virtual circuits of the PVC.
  • the corresponding operation is performed according to the PPPoE protocol.
  • the setting of the access identification data for the PPPoED message includes setting the access identification data for the four processing stages of PADI, PADO, PADR, and PADS, wherein each stage performs a mapping of the network path.
  • the terminal accesses the terminal through the network channel, and the terminal exchanges information with the access server through the network channel.
  • the PPPoED when the server accessed by the egress network channel is an Internet server, the PPPoED is broadcast to the Internet.
  • the server accessing the egress network channel is an IPTV server
  • the PPPoED is broadcasted to the IPTV private network.
  • FIG. 3 is a flowchart of a second embodiment of a method for network access according to the present invention. As shown in FIG. 3, the steps of a network access method in this embodiment include:
  • the text type includes a sending phase PPPoED or a session phase PPP, and the PPPoED carries access identification data.
  • the PPPoED is parsed to obtain the access identifier data carried by the PPPoED, where the access identifier data includes: the host in the PPPoED indicates the host-Uniq data.
  • the access identifier data carried by the PPPoED may be the access identifier data carried by the PADI or PADO or the PADR or the PADS, and the identifier data may be marked in the host identifier host-Uniq of the packet.
  • S202 Determine, according to the access identifier data, a dialing account type of the terminal, where the dialing account type includes: an Internet Internet dialing account type or an interactive network television IPTV dialing account type.
  • the two dialing accounts are an Internet Internet dialing account type and an interactive Internet TV IPTV dialing account type
  • the PPPoE protocol of the terminal is extended, and the user needs to access the Internet.
  • Dial-up account type the digital TV terminal system sets the value of Host-Uniq in the PPPoED message between [0, C).
  • the digital TV terminal system will use the PPPoED message.
  • the value of Host-Uniq is set between [C, + ⁇ ), where C is a constant constant between (0, + ⁇ ), and the set rule is synchronized to the gateway. At this time, the access identifier is set.
  • the gateway parses out the access identifier data and obtains the value of Host-Uniq between [0, C), the corresponding setting rule, the gateway obtains the user needs to access the Internet network, when the gateway When the access identification data is parsed and the value of Host-Uniq is between [C, + ⁇ ), corresponding to the setting rule, the gateway obtains the user to access the IPTV private network.
  • the cell if it belongs to Internet dialing, the cell is mapped to PVC1, and if it belongs to IPTV dialing, the cell is mapped to PVC2.
  • the server accessing the PVC1 network channel is an Internet server, and the server accessed by the PVC2 network channel is an IPTV server.
  • steps S200 and S204 refer to step S100 and step S102 of the embodiment shown in FIG. 2, and details are not described herein.
  • FIG. 4 is a flowchart of a third embodiment of a method for network access according to the present invention. As shown in Figure 4 The steps of a network access method in this embodiment include:
  • the terminal When receiving the PPPoE file sent by the terminal, detecting, by the terminal, the type of the PPPoE file, where the file type includes a sending phase, a PPPoED, or a session phase, a PPP, where the PPPoED carries the access identifier data.
  • the packet type of the PPPoE packet is PPPoED, obtain an egress network channel that matches the PPPoE packet according to the access identifier data carried by the PPPoED.
  • the PPPoED is broadcast to the matching egress network path, and when the Internet network is matched, the PPPoED is broadcast to the Internet. When the match is for the IPTV private network, the PPPoED is broadcast to the IPTV private network.
  • S303 Receive a response message returned by at least one server in the network.
  • the lookup access server sent by the terminal is forwarded through the egress network channel, that is, the PADI frame, and the server in the network responds to the response message returned by the PADI frame, and the response message includes whether the terminal needs to establish a connection.
  • connection request is sent by the forwarding terminal, that is, the PADR frame is sent to the responding access server, indicating that it is desired to establish a connection with the server with the appropriate conditions.
  • the terminal when receiving a PPPOE connection confirmation sent by the access server, that is, a PADS frame, the terminal accesses the determined access server network.
  • the mapping relationship between the session identifier and the egress network channel is recorded according to the session identifier allocated by the access server.
  • the session identifier includes: a MAC address of the access server and a unique identifier generated by the access server, and the gateway may need to find the destination access server according to any session identifier.
  • the unique identifier generated by the access server is stored in the Session_ID in the PPPoE protocol structure, and the gateway can read the unique identifier generated by the access server in the Session_ID and obtain the destination access.
  • the server; the MAC address of the access server is stored in the last step of the broadcast PPPoED.
  • the source address of the Ethernet frame header of the PADS the source address of which is the MAC address of the access server, due to the MAC address of the access server.
  • the gateway can also find the destination access server according to the MAC address of the access server.
  • the mapping relationship between the session identifier and the egress network channel may be, for example, when the egress network channel of the access is PVC1, the mapping relationship between the session identifier and the PVC1 is recorded, and when the egress network channel is accessed, the PVC2 is , the mapping relationship between the session identifier and PVC2 is recorded.
  • the session identifier will uniquely identify a PPPoE session.
  • the session identifier is used in a PPP session.
  • step S300 and the step S301 reference may be made to the step S100 and the step S101 of the embodiment shown in FIG. 1 , and details are not described herein.
  • FIG. 5 it is a flowchart of a fourth embodiment of a method for network access according to the present invention. As shown in FIG. 5, the steps of a network access method in this embodiment include:
  • S401 If the packet type of the PPPoE packet is PPP, determine an access server according to the session identifier carried in the PPP, and determine an egress network channel that is mapped to the session identifier.
  • the current Ethernet frame is determined to be a PPP packet by using the set Ethernet frame detection.
  • the PPP uplink packet is encapsulated into an ATM cell by the protocol stack, and the mapping relationship between the session identifier and the query session identifier in the PPP packet is extracted, and the terminal and the access server that establish the connection relationship are obtained and obtained.
  • Export network channel When the session identifier is mapped to the PVC1 egress network channel, the ATM cell encapsulated by the PPP uplink packet is mapped to the PVC1 egress network channel.
  • the ATM cells encapsulated in the PPP uplink packet are mapped to the PVC2 egress network channel, and the access is queried to the corresponding access server according to the session identifier.
  • the session identifier may include a unique identifier generated by the access server and a MAC address of the access server.
  • the gateway extracts the uplink PPP.
  • the session identifier Session_ID is used to query the mapping relationship between the Session_ID and the PVC, thereby obtaining the terminal and the access server that establish the connection relationship and obtaining the egress network channel.
  • the gateway extracts the destination MAC address of the uplink PPP Ethernet frame header, that is, the MAC address of the access server, and queries the MAC address of the access server.
  • the mapping relationship between the PVCs is obtained, and the terminal and the access server that establish the connection relationship are obtained and the egress network channel is obtained.
  • FIG. 6 is a flowchart of a fifth embodiment of a method for network access according to the present invention. As shown in FIG. 6, the steps of a network access method in this embodiment include:
  • two PVC connections or more than two PVC connections are created. If two PVC connections are created, the two parameters of the VPI/VCI can be respectively connected to different networks in the ATM, the different The network may be an IPTV line and an Internet line, wherein PVC1 may be an Internet line, and PVC2 may be an IPTV line.
  • Step S501, step S502, and step S503 refer to step S100, step S101, and step S102 of the embodiment shown in FIG. 5, and details are not described herein.
  • FIG. 7 is a schematic structural diagram of a first embodiment of a gateway according to the present invention.
  • a gateway according to this embodiment includes:
  • the detecting unit 100 is configured to: when receiving the PPPoE packet sent by the terminal, detecting a packet type of the PPPoE packet, where the packet type includes a PPPOED packet or a session phase packet PPP, where the PPPoED carries Access identification data.
  • the gateway port is set to be in the bridge mode, and the PPPoE packet is transparently transmitted.
  • PPPoE Point to Point Protocol over Ethernet, Ethernet-based peer-to-peer ten-party negotiation
  • the terminal is connected to a remote access server through a single bridge device.
  • the remote server can control each access terminal. For example: When the terminal needs to access the public Internet, the terminal accesses the public Internet by sending a PPPoE message carrying the public Internet data, and transmits data according to the PPPoE protocol and the corresponding server in the public Internet.
  • the Ethernet frame detection is set, and the detection of the PPPoE packet is added in the bridging process.
  • the PPPoE packet includes the PPPoED packet and the PPP session.
  • the PPPoE packet type is detected and the corresponding operation is performed.
  • the Payload in the PPPoE packet always contains a TLV: Host-Uniq.
  • Host-Uniq is the host unique identifier, a random number randomly generated by the dialing host.
  • Host-Uniq is similar to the identifier field in PPP data packets. It is mainly used to match the sender and receiver. Because there are many PPPoE data packets in the broadcast network. Among them, we can use this always-present Host-Uniq as the access identification data to identify the type of access network required by the terminal.
  • the access identifier data may be set to, the value of one account type corresponding to Host-Uniq is between [0, C), and the other account type corresponds to the value of Host-Uniq. Between the [C, + ⁇ ) range, where C is a constant constant between (0, + ⁇ ), for example: If the dial-up uses an Internet dial-up account, ie, an Internet account, that is, the terminal needs to access the public Internet network. , set the value of Host-Uniq between [0, C).
  • the dial-up uses the IPTV dial-up account, that is, the @iptv account, that is, the terminal needs to access the IPTV private network, set the value of Host-Uniq at [C, + ⁇ ) between the ranges.
  • the access identification data may be set such that one account type corresponds to the value of Host-Uniq between [0, A), and the other account type corresponds to the value of Host-Uniq. ⁇ , ⁇ )
  • the third account type corresponds to the value of Host-Uniq between [B, C), etc., so that the value of Host-Uniq is set to multiple ranges to correspond to multiple accounts.
  • the matching unit 200 is configured to obtain, according to the access identifier data carried by the PPPoED, an egress network channel that matches the PPPoE packet, if the packet type of the PPPoE packet is PPPoED.
  • the PPPoED packet is parsed to obtain the access identifier data carried by the PPPoED, and the access identifier data may be the data of the Host-Uniq indicated by the host in the Payload, and the terminal identifier is determined according to the access identifier data.
  • Dial-up account type for example: If Host-Uniq is in the [0, C) range, the message is from the Internet dial-up account, then the PPPoED message is mapped to the PVC1 network channel, and the PVC1 network channel access server It is an Internet server.
  • the packet is from the IPTV dial-up, and the PPPoED packet is mapped to the PVC2 network channel, and the server accessed by the PVC2 network channel is the IPTV server.
  • the PVC1 and the PVC2 are permanent virtual circuits of the PVC.
  • the corresponding operation is performed according to the PPPoE protocol.
  • the setting of the access identification data for the PPPoED message includes setting the access identification data for the four processing stages of PADI, PADO, PADR, and PADS, wherein each stage performs a mapping of the network path.
  • the access unit 300 is configured to access the terminal to the network by using the egress network channel.
  • the terminal accesses the terminal through the network channel, and the terminal exchanges information with the access server through the network channel.
  • the PPPoED when the server accessed by the egress network channel is an Internet server, the PPPoED is broadcast to the Internet.
  • the server accessing the egress network channel is an IPTV server
  • the PPPoED is broadcasted to the IPTV private network.
  • FIG. 8 is a schematic structural diagram of a second embodiment of a gateway according to the present invention.
  • a gateway according to this embodiment includes:
  • the detecting unit 100, the matching unit 200, and the access unit 300 are detecting units 100, the matching unit 200, and the access unit 300.
  • the matching unit 200 may further include:
  • the parsing sub-unit 101 is configured to parse the PPPoED, and obtain the access identifier data carried by the PPPoED, where the access identifier data includes: the host in the PPPoED indicates host-Uniq data.
  • the access identifier data carried by the PPPoED may be the access identifier data carried by the PADI or PADO or the PADR or the PADS, and the identifier data may be marked in the host identifier host-Uniq of the packet.
  • the determining subunit 102 is configured to determine, according to the access identification data, a dialing account type of the terminal, where the dialing account type includes: an Internet Internet dialing account type or an interactive network television IPTV dialing account type.
  • the two dialing accounts are an Internet Internet dialing account type and an interactive network television IPTV dialing account type
  • the PPPoE protocol of the digital television terminal is extended, when the user needs to access Internet Internet dialing account type, the digital TV terminal system sets the value of Host-Uniq in the PPPoED message between [0, C).
  • the digital TV terminal system will report PPPoED.
  • Host-Uniq The value is set between the [C, + ⁇ ) range, where C is a constant constant between (0, + ⁇ ), and the set rule is synchronized to the gateway. At this time, the access identifier is set.
  • the gateway parses out the access identification data and obtains the value of Host-Uniq between [0, C), the corresponding setting rule, the gateway obtains the user needs to access the Internet network, when the gateway When the access identification data is parsed and the value of Host-Uniq is between [C, + ⁇ ), corresponding to the setting rule, the gateway obtains the user to access the television interactive network.
  • the first selection sub-unit 103 is configured to select, according to the dialed account type, an egress network channel that matches the dialed account type.
  • the cell if it belongs to Internet dialing, the cell is mapped to PVC1, and if it belongs to IPTV dialing, the cell is mapped to PVC2.
  • the server accessing the PVC1 network channel is an Internet server, and the server accessed by the PVC2 network channel is an IPTV server.
  • FIG. 9 is a schematic structural diagram of a third embodiment of a gateway according to the present invention.
  • a gateway according to this embodiment includes:
  • the detecting unit 100, the matching unit 200, and the access unit 300 are detecting units 100, the matching unit 200, and the access unit 300.
  • the access unit 300 may further include:
  • the broadcast subunit 201 is configured to broadcast the PPPoED to the network through the egress network channel.
  • the PPPoED is broadcast to the matching egress network path, and when the Internet network is matched, the PPPoED is broadcast to the Internet.
  • the match is for the IPTV private network, the PPPoED is broadcast to the IPTV private network.
  • the receiving subunit 202 is configured to receive a response message returned by at least one server in the network.
  • the lookup access server sent by the terminal is forwarded through the egress network channel, that is, the PADI frame, and the server in the network responds to the response message returned by the PADI frame, and the response message includes whether the terminal needs to establish a connection.
  • the second selection sub-unit 203 is configured to select one server from the at least one server as the access server according to the response message.
  • connection request is sent by the forwarding terminal, that is, the PADR frame is sent to the responding access server, indicating that it is desired to establish a connection with the server with the appropriate conditions.
  • the access subunit 204 is configured to access the terminal to the network by using the selected access server.
  • the terminal when receiving a PPPOE connection confirmation sent by the access server, that is, a PADS frame, the terminal is connected to the determined access server network.
  • the recording sub-unit 205 is configured to record, according to the session identifier allocated by the access server, a mapping relationship between the session identifier and the egress network channel.
  • the mapping relationship between the session identifier and the egress network channel is recorded according to the session identifier allocated by the access server.
  • the session identifier includes: a MAC address of the access server and a unique identification code generated by the access server, and the gateway may find the destination access server according to any of the session identifiers.
  • the unique identifier generated by the access server is stored in the Session_ID in the PPPOE protocol structure, and the gateway can read the unique identifier generated by the access server in the Session_ID to obtain the destination access server; the MAC address of the access server is stored in The last address in the PPPoED broadcasts the source address of the Ethernet frame header of the PADS.
  • the source address is the MAC address of the access server. Since the MAC address of the access server is unique, the gateway can also be based on the access server.
  • the MAC address is used to find the destination access server.
  • the mapping relationship between the session identifier and the egress network channel may be, for example, when the egress network channel of the access is PVC1, the mapping relationship between the session identifier and the PVC1 is recorded, and when the egress network channel is accessed, the PVC2 is , the mapping relationship between the session identifier and PVC2 is recorded.
  • the session identifier will uniquely identify a PPPOE session. The session identifier is used in a PPP session.
  • FIG. 10 is a schematic structural diagram of a fourth embodiment of a gateway according to the present invention.
  • a gateway according to this embodiment includes:
  • the detecting unit 100 wherein the gateway further includes:
  • the determining unit 400 is configured to: when the packet type of the PPPoE packet is PPP, determine an access server according to the session identifier carried by the PPP, and determine an egress network channel that is mapped to the session identifier.
  • the current Ethernet frame is determined to be a PPP packet by using the set Ethernet frame detection.
  • the PPP uplink packet is encapsulated into an ATM cell by protocol stack conversion, and the session identifier in the PPP packet and the mapping relationship between the query session identifier and the egress network path are extracted, thereby obtaining an egress network channel and an access server.
  • the session identifier is mapped to the PVC1 egress network channel
  • the ATM cell encapsulated by the PPP uplink packet is mapped to the PVC1 egress network channel.
  • the PPP is mapped.
  • the ATM cell encapsulated in the uplink packet is mapped to the PVC2 egress network channel, and accesses the corresponding access server according to the session identifier.
  • the session identifier may include a unique identifier generated by the access server or an access server.
  • the MAC address when the read session identifier is a unique identifier generated by the server, the gateway extracts the session identifier Session_ID of the uplink PPP packet, and queries the mapping relationship between the Session_ID and the PVC, thereby obtaining the terminal and the access establishing the connection relationship.
  • the server gets the exit network channel.
  • the read session identifier is the MAC address of the access server
  • the source address of the Ethernet frame header of the last step PADS in the broadcast PPPoED is read, and the mapping relationship between the MAC address of the access server and the PVC is obtained, thereby obtaining Establish a connection terminal and an access server and obtain an exit network channel.
  • the sending unit 500 is configured to send, by using the egress network channel, the PPPoE message to the access server, so that the terminal performs a session with the access server.
  • an ATM cell is sent to the access server terminal and the access server to perform a PPP session through the egress network channel.
  • FIG. 11 is a schematic structural diagram of a fifth embodiment of a gateway according to the present invention.
  • a gateway according to this embodiment includes:
  • the gateway further includes:
  • the creating unit 600 is configured to create at least one egress network channel for connecting the terminal to the network.
  • two PVC connections or more than two PVC connections are created. If two PVC connections are created, the two parameters of the VPI/VCI can be respectively connected to different networks in the ATM, the different The network may be an IPTV line and an Internet line, wherein PVC1 may be an Internet line, and PVC2 may be an IPTV line.
  • a network access system includes:
  • Terminal 1 Gateway 2 and Server 3.
  • the terminal 1 can automatically switch between multiple networks according to the type of service that is running. For example, when the terminal 1 is powered on, the terminal 1 uses the Internet account to dial the connection network by default. After the IPTV application is started, the terminal 1 disconnects the current Internet dial-up connection and initiates the iTV private network dialing, so that the user can use the IPTV dedicated channel to use the IPTV service. When the user exits the IPTV application, the terminal 1 will Disconnect the IPTV private network dial-up connection and restore the Internet dial-up connection.
  • the gateway 2 is as described in the gateways shown in Figures 6-9.
  • the server 3 is connected to the PVC egress network channel, and the PVC is not less than one.
  • the following embodiments describe a system for network access.
  • the terminal 1 sets the corresponding PPPoE packet according to the user's selection.
  • the terminal 1 sets the value of the host-Uniq value of the access identifier data in the PPPoE packet to be in [0, C).
  • the terminal 1 sets the value of the host-Uniq value of the access identification data in the PPPoE message to be in the range of [C, + ⁇ ).
  • the terminal sends the packet to the gateway, and the gateway receives the packet and detects the packet type of the PPPoE packet.
  • the terminal searches for the packet according to the PPPoED.
  • the value of the data host-Uniq obtains an egress network channel that matches the PPPoE packet, that is, when the value of Host-Uniq is between [0, C), the matching egress network channel may be an access to the Internet network.
  • PVC1 when the value of Host-Uniq is between [C, + ⁇ ), the matching egress network channel can be PVC2 accessing the IPTV private network, and then the gateway sends the encapsulated ATM cell through the matching network.
  • the PPPoE packet exchanges data with the accessed server 3, wherein the access server may access the server according to the session identifier assigned by the access server, for example: when the read session identifier is a unique identifier generated by the server.
  • the gateway When the code is used, the gateway extracts the session identifier SessionJD of the uplink PPP packet, and searches for the mapping relationship between the Session_ID and the PVC, thereby obtaining the terminal and the access service for establishing the connection relationship. And obtain the egress network channel; or when the read session identifier is the MAC address of the access server, the gateway extracts the destination MAC address of the uplink PPP Ethernet frame header, that is, accesses the MAC address of the server, and Query the mapping between the MAC address of the access server and the PVC, and obtain the terminal and access server that establish the connection relationship and obtain the egress network channel.
  • the data exchange may be, by using the egress network channel, to broadcast an ATM cell to the network, and receive a response message returned by the plurality of servers 3 in the network, according to the response message, from the server 3 that returns the response message.
  • a server 3 is selected as the access server 3, and the terminal 1 is connected to the selected server 3 through the selected access server 3, so that the server 3 obtains the data content of the terminal 1 data content or the terminal content obtaining server 3.
  • the present invention has the following advantages:
  • the PPPoED packet in the transmission phase carries the access capable of discriminating the network type by extending the PPPoED packet in the PPPoE packet. Identifying the data and enabling the digital television terminal to access the corresponding egress network channel by parsing the access identification data.
  • This enables digital TV terminals to support access to multiple networks, allowing existing digital TV terminals to be upgraded only through software for digital TV terminals and gateways. Access to multiple network types allows users to access multiple network types without replacing single-port digital TV terminals. This not only saves hardware costs, user cost, but also saves network maintenance costs.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

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

Abstract

The embodiments of the present invention provide a network access method, comprising: when a PPPoE message sent by a terminal is received, detecting a message type of the PPPoE message, wherein the message type comprises a message PPPoED at the sending stage or a message PPP at the session stage, and the PPPoED carrying access identification data; if the message type of the PPPoE message is the PPPoED, obtaining an exit network channel matching the PPPoE message according to the access identification data carried by the PPPoED; and accessing the terminal to a network through the exit network channel. Also disclosed are a gateway and a system. By adopting the present invention, the function of accessing various networks through a single port can be achieved, thereby saving hardware costs and network maintenance costs.

Description

一种网络接入的方法、 网关及系统  Network access method, gateway and system
本申请要求于 2013年 3月 29日提交中国专利局、申请号为 201310110069.5, 发明名称为 "一种网络接入的方法、 网关及系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域  This application claims priority to Chinese Patent Application No. 201310110069.5, filed on March 29, 2013, entitled "A Method, Gateway and System for Network Access", the entire contents of which are incorporated by reference. In this application. Technical field
本发明涉及一种通信技术, 尤其涉及一种网络接入的方法、 网关及系统。 背景技术  The present invention relates to a communication technology, and in particular, to a network access method, gateway, and system. Background technique
随着宽带技术的发展, 以及互联网电视业务的蓬勃发展, 原有单纯 IPTV ( Internet Protocol TV, 交互式网络电视)终端产品不能满足宽带运营商的业务 发展需求,运营商迫切需要在 IPTV技术架构下引入互联网电视业务。 目前中国 主流宽带运营商(中国电信、 中国联通)开展 IPTV业务的时候, 为了保证服务 质量, 组建了 IPTV业务专用网络, 机顶盒通过 PPPoE等方式接入到 IPTV业务 专用网络。 而互联网电视业务, 需要通过传统的公众互联网才能访问的到。 因 此, 为了在终端上兼容这两种业务, 机顶盒需要具备以下网络接入及服务能力: 能够接入公众互联网和能够接入 IPTV业务专用业务网络。  With the development of broadband technology and the rapid development of Internet TV services, the original IPTV (Internet Protocol TV) terminal products cannot meet the business development needs of broadband operators, and operators urgently need to be under the IPTV technology architecture. Introduced Internet TV services. At present, when China's mainstream broadband operators (China Telecom, China Unicom) launch IPTV services, in order to ensure service quality, a dedicated network for IPTV services is set up, and set-top boxes are connected to IPTV service private networks through PPPoE and other means. The Internet TV service needs to be accessible through the traditional public Internet. Therefore, in order to be compatible with these two services on the terminal, the set-top box needs to have the following network access and service capabilities: Access to the public Internet and access to the IPTV service-specific service network.
但目前市面上销售的 IPTV机顶盒通常只有一个端口固定接入 IPTV业务专 用业务网络, 没有同时兼容 IPTV业务和互联网业务, 用户无法通过机顶盒连接 其他的网络类型, 例如: 通过机顶盒访问公众互联网。 这给宽带运营商的业务 发展带来了瓶颈, 也无法提供更多的网络供用户使用。 但若运营商为解决所述 问题而在机顶盒上安装多个端口以使机顶盒能接入多种网络, 这却增加了硬件 成本, 并且需要连接两个物理网线, 既不美观, 也增加了网络的维护成本。 发明内容  However, IPTV set-top boxes currently on the market usually have only one port fixedly connected to the IPTV service-specific service network. They are not compatible with both IPTV services and Internet services. Users cannot connect to other network types through set-top boxes, for example: access to the public Internet through set-top boxes. This poses a bottleneck for the business development of broadband operators and does not provide more networks for users to use. However, if the operator installs multiple ports on the set-top box to solve the problem, the set-top box can access multiple networks, which increases the hardware cost and requires connecting two physical network cables, which is neither beautiful nor network. Maintenance costs. Summary of the invention
本发明实施例所要解决的技术问题在于, 提供一种网络接入的方法及网关。 可实现单端口接入多种网络的功能, 节省了硬件成本、 网络维护成本。  The technical problem to be solved by the embodiments of the present invention is to provide a method and a gateway for network access. It can realize the function of single port access to multiple networks, saving hardware cost and network maintenance cost.
为了解决上述技术问题, 本发明实施例提供了一种网络接入的方法, 包括: 接收到终端发送的 PPPoE报文时, 检测所述 PPPoE报文的报文类型, 所述报文 类型包括发送阶段报文 PPPoED或会话阶段报文 PPP, 所述 PPPoED携带接入 标识数据; In order to solve the above technical problem, the embodiment of the present invention provides a network access method, including: when receiving a PPPoE packet sent by a terminal, detecting a packet type of the PPPoE packet, where the packet type includes sending Phase packet PPPoED or session phase packet PPP, the PPPoED carrying access Identification data;
若所述 ΡΡΡοΕ报文的报文类型为 PPPoED, 则根据所述 PPPoED携带的接 入标识数据获得与所述 PPPoE 4艮文相匹配的出口网络通道;  If the packet type of the packet is PPPoED, the egress network channel matching the PPPoE message is obtained according to the access identifier data carried by the PPPoED;
通过所述出口网络通道, 将所述终端接入网络。  The terminal is connected to the network through the egress network channel.
相应地, 本发明实施例还提供了一种网关, 包括:  Correspondingly, an embodiment of the present invention further provides a gateway, including:
检测单元, 用于当接收到终端发送的 PPPoE报文时, 检测所述 PPPoE报文 的 4艮文类型, 所述 文类型包括发送阶段 ^艮文 PPPoED或会话阶段 ^艮文 PPP, 所述 PPPoED携带接入标识数据;  a detecting unit, configured to: when receiving a PPPoE packet sent by the terminal, detecting a type of the PPPoE packet, where the text type includes a sending phase, a PPPoED session, or a session phase, a PPP, the PPPoED Carrying access identification data;
匹配单元, 用于若所述 PPPoE报文的报文类型为 PPPoED, 则根据所述 PPPoED携带的接入标识数据获得与所述 PPPoE报文相匹配的出口网络通道; 接入单元, 用于通过所述出口网络通道, 将所述终端接入网络。  a matching unit, configured to: if the packet type of the PPPoE packet is PPPoED, obtain an egress network channel that matches the PPPoE packet according to the access identifier data carried by the PPPoED; The egress network channel connects the terminal to the network.
本发明还提供一种网络接入的系统, 包括: 终端和服务器以及如上发明内 容所述的网关。  The present invention also provides a system for network access, comprising: a terminal and a server, and a gateway as described in the above invention.
实施本发明实施例, 具有如下有益效果:  Embodiments of the present invention have the following beneficial effects:
本发明实施例是在现有的数字电视终端和家庭媒体网关硬件架构下, 通过 对 PPPoE报文中的发送阶段报文 PPPoED的扩展, 使发送阶段报文 PPPoED携 带有能够辨别网络类型的接入标识数据, 并通过解析所述接入标识数据使数字 电视终端能够接入对应的出口网络通道。 这使数字电视终端能够支持多种网络 的接入, 使得现存的数字电视终端仅通过数字电视终端和网关的软件升级即可 接入多种网络类型, 使得用户不需通过更换单端口数字电视终端即可实现接入 多种网络类型的功能, 这不仅节省了硬件成本、 用户的使用成本, 也节约了网 络维护成本。 附图说明  In the embodiment of the present invention, in the existing digital television terminal and the home media gateway hardware architecture, the PPPoED packet in the transmission phase carries the access capable of discriminating the network type by extending the PPPoED packet in the PPPoE packet. Identifying the data and enabling the digital television terminal to access the corresponding egress network channel by parsing the access identification data. This enables digital TV terminals to support multiple network accesses, enabling existing digital TV terminals to access multiple network types only through software upgrades of digital TV terminals and gateways, eliminating the need for users to replace single-port digital TV terminals. It can realize the function of accessing multiple network types, which not only saves hardware cost, user's use cost, but also saves network maintenance cost. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施 例或现有技术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description It is merely some embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without any creative work.
图 1是本发明现有的 ADSL系统组网结构示意图;  1 is a schematic structural diagram of a conventional ADSL system networking of the present invention;
图 2是本发明一种网络接入的方法的第一实施例流程示意图; 图 3是本发明一种网络接入的方法的第二实施例流程示意图; 2 is a schematic flow chart of a first embodiment of a method for accessing a network according to the present invention; 3 is a schematic flow chart of a second embodiment of a method for network access according to the present invention;
图 4是本发明一种网络接入的方法的第三实施例流程示意图;  4 is a schematic flow chart of a third embodiment of a method for network access according to the present invention;
图 5是本发明一种网络接入的方法的第四实施例流程示意图;  FIG. 5 is a schematic flowchart diagram of a fourth embodiment of a method for network access according to the present invention; FIG.
图 6是本发明一种网络接入的方法的第五实施例流程示意图;  6 is a schematic flow chart of a fifth embodiment of a method for network access according to the present invention;
图 7是本发明一种网关的第一实施例结构示意图;  7 is a schematic structural view of a first embodiment of a gateway according to the present invention;
图 8是本发明一种网关的第二实施例结构示意图;  8 is a schematic structural view of a second embodiment of a gateway according to the present invention;
图 9是本发明一种网关的第三实施例结构示意图;  9 is a schematic structural diagram of a third embodiment of a gateway according to the present invention;
图 10是本发明一种网关的第四实施例结构示意图;  10 is a schematic structural diagram of a fourth embodiment of a gateway according to the present invention;
图 11是本发明一种网关的第五实施例结构示意图;  11 is a schematic structural view of a fifth embodiment of a gateway according to the present invention;
图 12是本发明一种网络接入的系统的第一实施例结构示意图。 具体实施方式  FIG. 12 is a schematic structural diagram of a first embodiment of a network access system according to the present invention. detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of the present invention.
本发明实施例中, 终端可以是数字电视机顶盒, 数字电视一体机等具备单 向或双向数字电视功能的数字电视终端。  In the embodiment of the present invention, the terminal may be a digital television set top box, a digital television integrated machine, or the like, and a digital television terminal having a single or two-way digital television function.
请参照图 1 , 为本发明现有的 ADSL ( Asymmetric Digital Subscriber Line , 非对称数字用户环路) 系统组网结构第一实施例流程图。 下面结合图 1 对现有 ADSL系统组网结构进行详细的介绍, 并对 PPPoE ( Point to Point Protocol over Etherne, 基于以太网的点对点协议)协议进行详细介绍。  Referring to FIG. 1 , it is a flowchart of a first embodiment of a prior art ADSL (Asymmetric Digital Subscriber Line) system networking structure. The following describes the networking structure of the existing ADSL system in detail with reference to Figure 1, and introduces the PPPoE (Point to Point Protocol over Etherne) protocol.
具体实施例中, 目前, 家庭用户通常采用 ADSL方式接入到运营商的网络。 现有的 ADSL 系统组网结构一般可以分为 ADSL 传送系统 001、 ATM ( Asynchronous Transfer Mode, 异步传输模式 ) 网 002和接入服务器 003三部 分,其中, ADSL传送系统 001包括终端 10、解调器 11和局端设备 12, ADSL 传送系统 001负责电话线段的 ADSL线路编解码和传送。 ATM网 002负责将来 自局端设备 12的用户数据以 ATM PVC方式汇集到接入服务器 003。 接入服务 器 003是局端实现 PPPoE功能的接入服务器, 它终结由用户侧发起的 PPPoE进 程。例如:下行的以太帧从 IP城域网经路由器送到接入服务器 003 ,被加上 PPPoE 的头后送到局端设备 003封装成 AAL5帧, 经过交叉模块发送到解调器 11 , 由 解调器 11完成 AAL5 ( ATM Adaptation Layer 5 , ATM适配层 5 )帧重组并解出 以太帧发送到终端 10, 终端 10从 PPPoE包中取出 IP数据包; 上行的 PPPoE包 起源于终端 10, 在解调器 11中封装成 AAL5帧, 由 ATM信元传输到局端设备 12, 并通过设好的 PVC ( Permanent Virtual Circuit, 永久虚电路)传送到接入服务 器 003中处理。局端设备 12下行与解调器 11之间为 ATM,局端设备 12上行与 接入服务器 003之间也是 ATM, ATM PVC起止于解调器 11和接入服务器 003 之间。 局部设备内核采用 ATM信元复用, 结构单一, 不需协议转换。 由于局部 设备基于 ATM的完善技术设计, 可支持多种业务, 对这些业务提供不同的处理 措施和不同的緩存空间, 对不同的业务类型提供不同级别的优先级和流控, 使 得不同的 ATM业务类型在整个业务传输线路中得到与该业务相适应的带宽,从 而保证了从解调器 11到接入服务器 003之间高性能质量支持。 In a specific embodiment, at present, the home user usually accesses the network of the operator by using the ADSL method. The existing ADSL system networking structure can be generally divided into an ADSL transmission system 001, an ATM (Asynchronous Transfer Mode) network 002 and an access server 003. The ADSL transmission system 001 includes a terminal 10 and a demodulator. 11 and the central office device 12, the ADSL transmission system 001 is responsible for the ADSL line codec and transmission of the telephone line segment. The ATM network 002 is responsible for collecting user data from the central office device 12 into the access server 003 in an ATM PVC manner. The access server 003 is an access server that implements the PPPoE function at the central office, and terminates the PPPoE process initiated by the user side. For example, the downlink Ethernet frame is sent from the IP metropolitan area network to the access server 003 via the router, and PPPoE is added. The header is sent to the central office device 003 and encapsulated into an AAL5 frame, which is sent to the demodulator 11 through the cross module, and the AAL5 (ATM Adaptation Layer 5, ATM Adaptation Layer 5) frame recombination is completed by the demodulator 11 and the Ethernet frame is solved. Sending to the terminal 10, the terminal 10 extracts the IP data packet from the PPPoE packet; the uplink PPPoE packet originates from the terminal 10, is encapsulated into an AAL5 frame in the demodulator 11, is transmitted by the ATM cell to the central office device 12, and is set by A good PVC (Permanent Virtual Circuit) is transmitted to the access server 003 for processing. The ATM between the downlink of the central office device 12 and the demodulator 11 is ATM, and the ATM between the uplink of the central office device 12 and the access server 003 is also ATM. The ATM PVC starts between the demodulator 11 and the access server 003. The local device core uses ATM cell multiplexing, has a single structure, and does not require protocol conversion. Because the local device is based on ATM's complete technical design, it can support multiple services, provide different processing measures and different buffer spaces for these services, provide different levels of priority and flow control for different service types, and make different ATM services. The type obtains bandwidth compatible with the service throughout the service transmission line, thereby ensuring high performance quality support from the demodulator 11 to the access server 003.
目前,电信运营商的家庭媒体网关可以配置多达 8路 PVC,支持 AUTO PVC 和 PVC共享功能,也支持单 PVC和多 PVC的多会话。为了保证 Internet和 IPTV 业务互相不干扰, 以及保障 IPTV的用户质量, 通常采用两路不同的 PVC用于 Internet和 IPTV专用网络接入, 并且每路 PVC采用独立的 PPPoE会话。 另夕卜, 由于 ATM PVC具有天然的安全隔离机制, 采用 PPPoE认证时, 从每个终端 10 到接入接入服务器 003之间的 PPP会话也是相互隔离的, 进一步加强了安全机 制。 例如: 具备两个物理网络的终端, 并采用双 PPPoE拨号的方式同时连接到 互联网和 IPTV专网, 实现双网双待。 一般情况下网络端口类型为两个 RJ45端 口, 或者一个 RJ45端口和一个 WLAN端口。 当机顶盒采用两个 RJ45端口的时 候, 其中一个连接家庭媒体网关的专用 IPTV端口使用 PPPoE拨号接入到 IPTV 专用网络, 另外一个连接到家庭媒体网关 Internet端口上,也采用 PPPoE拨号方 式接入到公众互联网。 从而实现用户接入多种类型网络的功能。  At present, the telecom operator's home media gateway can be configured with up to 8 channels of PVC, supports AUTO PVC and PVC sharing functions, and supports multi-session of single PVC and multiple PVC. In order to ensure that the Internet and IPTV services do not interfere with each other and ensure the quality of IPTV users, two different PVCs are usually used for Internet and IPTV private network access, and each PVC adopts an independent PPPoE session. In addition, since ATM PVC has a natural security isolation mechanism, when PPPoE authentication is adopted, the PPP session from each terminal 10 to the access access server 003 is also isolated from each other, further enhancing the security mechanism. For example: A terminal with two physical networks and dual PPPoE dial-up to connect to the Internet and IPTV private network simultaneously, achieving dual-network dual standby. In general, the network port type is two RJ45 ports, or one RJ45 port and one WLAN port. When the set-top box uses two RJ45 ports, one of the dedicated IPTV ports connected to the home media gateway uses PPPoE dial-up to access the IPTV private network, and the other one connects to the Internet port of the home media gateway, and also uses PPPoE dial-up mode to access the public. the Internet. Thereby achieving the function of the user accessing multiple types of networks.
其中, 用户在 ADSL的数字线上进行拨号, 采用专门的拨号协议 PPPoE, 拨号后直接由验证服务器进行检验, 用户需输入用户名与密码, 检验通过后就 建立起一条高速的用户数字并分配相应的动态 IP。 PPPoE协议的工作流程包含 发现和会话两个阶段, 发现阶段是无状态的, 目的是获得接入服务器 003 的以 太网 MAC地址, 并建立一个唯一的 PPPoE会话标识符。 发现阶段结束后, 就 进入标准的 PPP会话阶段。 当一个终端 10想开始一个 PPPoE会话, 它必须首先进行发现阶段, 以识别 接入服务器 003的以太网 MAC地址, 并建立一个 PPPoE会话标识符。 在发现 阶段, 基于网络的拓朴, 主机可以发现多个接入服务器 003, 然后允许用户选择 一个。 当发现阶段成功完成, 终端 10和选择的接入服务器 003都有了他们在以 太网上建立 PPP连接的信息。 直到 PPP会话建立, 发现阶段一直保持无状态的 客户 /服务器模式。一旦 PPP会话建立,终端 10和接入服务器 003都必须为 PPP 虚接口分配资源。 Among them, the user dials on the digital line of ADSL, adopts the special dialing protocol PPPoE, and dials directly to the verification server for verification. The user needs to input the user name and password. After the verification is passed, a high-speed user number is established and correspondingly allocated. Dynamic IP. The workflow of the PPPoE protocol includes two phases of discovery and session. The discovery phase is stateless. The purpose is to obtain the Ethernet MAC address of the access server 003 and establish a unique PPPoE session identifier. After the discovery phase is over, it enters the standard PPP session phase. When a terminal 10 wants to start a PPPoE session, it must first perform a discovery phase to identify the Ethernet MAC address of the access server 003 and establish a PPPoE session identifier. In the discovery phase, based on the network topology, the host can discover multiple access servers 003 and then allow the user to select one. When the discovery phase is successfully completed, both the terminal 10 and the selected access server 003 have information that they have established a PPP connection on the Ethernet. Until the PPP session is established, the discovery phase remains stateless in client/server mode. Once the PPP session is established, both the terminal 10 and the access server 003 must allocate resources for the PPP virtual interface.
进一步, PPPoE报文是被封装在以太网帧的数据域内的。 以太网帧头包括: 目的服务器 MAC地址, 其后为接入服务器的地址、 客户端 MAC地址和以太网 协议类型。 其中, PPPoE数据报文的格式包括: PPPoE数据报文最开始的 4位 为版本域, 这个域填充的内容为 0x01; 版本域后是 4位的类型域, 根据协议规 定, 这个域填充的内容也是 0x01; 代码域, 占用一个字节, 对于 PPPoE的不同 P介段这个域内容也不一样; 会话标识符占用两个字节, 当访问集中器时还没有 分配唯一的会话 ID给用户主机的话, 改域的内容必须填充为 0x0000; —旦主机 获取了会话 ID后,那么在后续的所有报文里面必须填充那个唯一的会话标识符; PPPoE的 Payload长度占两个字节, PPPoE的 Payload可以由多个 TLV组成,每 个 TLV包括 Tag—Type, Tag—Length, Tag_Vlaue。  Further, the PPPoE message is encapsulated in the data field of the Ethernet frame. The Ethernet frame header includes: The destination server MAC address, followed by the address of the access server, the client MAC address, and the Ethernet protocol type. The format of the PPPoE data packet includes: The first 4 bits of the PPPoE data packet are the version field, and the content filled in the domain is 0x01; the version field is followed by the 4-bit type field, and the content filled in the domain according to the protocol It is also 0x01; the code field occupies one byte. The content of this field is different for different P segments of PPPoE. The session identifier occupies two bytes. When accessing the concentrator, no unique session ID is assigned to the user host. The content of the changed domain must be filled with 0x0000; once the host obtains the session ID, then the unique session identifier must be filled in all subsequent messages; the PPPoE Payload length takes up two bytes, and the PPPoE Payload can It consists of multiple TLVs, each of which includes Tag_Type, Tag-Length, Tag_Vlaue.
其中, 在 PPPoE发现阶段 PPPoED的处理过程中可以包括以下四个阶段: 首先终端 10发送一个 PADI帧用于初始化。 这个帧将通过以太网进行广播, 表 示寻找接入服务; 其次一个或多个接入服务器 003回复一个 PAD0帧即响应信 号响应给终端 10,表示接入服务器 003正在响应是否要建立连接; 当终端 10在 指定的时间内没有接收到 PAD0 , 它会重发 PADI分组, 并且加倍等待时间, 这 个过程一般重复四次;再次终端 10选择一个接入服务器 003,并发送单播 PADR 帧即连接请求信号给该响应的接入服务器 003, 表示希望建立连接; 最后接入服 务器 003发送 PADS帧即 PPPoE连接确认信号, 表示可以建立连接并分配连接 号。该连接号连同终端和接入月良务器 003的以太网地址,将唯一标识一个 PPPoE 会话。 发送阶段报文 PPPoED是无状态的, 目的是获得 PPPoE接入服务器 003 , 即接入服务器 003的以太网 MAC地址或者由接入服务器 003建立的一个唯一的 PPPoE会话标识符, 该会话标识符数据存储在 PPPoE报文中的 SESSION_ID 中。 其中, 在 PPPoE发现阶段的四个步骤中, PPPoE头的 Payload中始终含有 一个 Tag_Type为 0x0103的 TLV: Host-Uniq。 Host-Uniq为主机唯一标识, 由拨 号主机随机产生的随机数。 Host-Uniq类似于 PPP数据报文中的标识域, 主要是 用来匹配发送和接收端的。 因为对于广播式的网络中会同时存在很多个 PPPoE 的数据报文。 The PPPoED process during the PPPoE discovery phase may include the following four phases: First, the terminal 10 sends a PADI frame for initialization. This frame will be broadcast over Ethernet, indicating that the access service is being sought; secondly, one or more access servers 003 reply to a PAD0 frame, ie, a response signal is sent to the terminal 10, indicating that the access server 003 is responding to whether a connection is to be established; 10 does not receive PAD0 within the specified time, it will resend the PADI packet, and double the waiting time, this process is generally repeated four times; again terminal 10 selects an access server 003, and sends a unicast PADR frame that is the connection request signal The access server 003 for the response indicates that it is desired to establish a connection; finally, the access server 003 sends a PADS frame, that is, a PPPoE connection confirmation signal, indicating that the connection can be established and the connection number is assigned. This connection number, along with the Ethernet address of the terminal and access server 003, will uniquely identify a PPPoE session. The sending phase message PPPoED is stateless, and the purpose is to obtain the PPPoE access server 003, that is, the Ethernet MAC address of the access server 003 or a unique PPPoE session identifier established by the access server 003, the session identifier data. Stored in the SESSION_ID in the PPPoE message. Among them, in the four steps of the PPPoE discovery phase, the Payload of the PPPoE header always contains A TLV with a Tag_Type of 0x0103: Host-Uniq. Host-Uniq is the host unique identifier, a random number randomly generated by the dialing host. Host-Uniq is similar to the identification field in PPP data packets, and is mainly used to match the sender and receiver. Because there are many PPPoE data messages in the broadcast network.
进一步的, 在 PPPoE会话阶段 PPP的处理过程中包括: 发送一些配置报文 来配置数据链路; 认证; 配置网络层协议; IP数据流传输和终止 PPPoE会话。 此时, 用户通过接入服务器来进行发送或接收数据。  Further, during the PPPoE session, the PPP process includes: sending some configuration packets to configure the data link; authenticating; configuring the network layer protocol; and transmitting and terminating the PPPoE session. At this time, the user transmits or receives data by accessing the server.
请参照图 2, 为本发明一种网络接入的方法的第一实施例流程图。 如图 2所 示, 本实施例所述的一种网络接入方法的步骤包括:  Referring to FIG. 2, it is a flowchart of a first embodiment of a method for network access according to the present invention. As shown in FIG. 2, the steps of a network access method in this embodiment include:
S100,接收到终端发送的 PPPoE 文时,检测所述 PPPoE 文的 文类型, 所述 文类型包括发送阶段 ^艮文 PPPoED或会话阶段 ^艮文 PPP, 所述 PPPoED 携带接入标识数据。  S100: When receiving the PPPoE text sent by the terminal, detecting the type of the PPPoE text, where the text type includes a sending phase, a PPPoED, or a session phase, and the PPPoED carries the access identifier data.
具体实施例中, 设定网关端口为桥接模式, 支持 PPPoE报文透传。 其中, PPPoE ( Point to Point Protocol over Ethernet, 基于以太网的点对点十办议)可以使 终端通过一个筒单的桥接设备连到一个远端的接入服务器上,通过 PPPoE协议, 远端服务器能够实现对每个接入终端进行控制。 例如: 当终端需接入公众因特 网时,终端通过发送携带接入公众因特网数据的 PPPoE报文来接入公众因特网, 并根据 PPPoE协议与公众因特网中的相应的服务器进行传输数据。  In a specific embodiment, the gateway port is set to be in the bridge mode, and the PPPoE packet is transparently transmitted. The PPPoE (Point to Point Protocol over Ethernet) allows the terminal to connect to a remote access server through a single bridge device. Through the PPPoE protocol, the remote server can implement Control each access terminal. For example: When the terminal needs to access the public Internet, the terminal accesses the public Internet by sending a PPPoE message carrying the public Internet data, and transmits data according to the PPPoE protocol and the corresponding server in the public Internet.
进一步的,设定以太网帧检测, 在桥接处理流程中加入 PPPoE报文的检测。 PPPoE报文包括发送阶段报文 PPPoED和会话阶段报文 PPP, 检测所述 PPPoE 报文类型, 再执行相应的操作。  Further, the Ethernet frame detection is set, and the detection of the PPPoE packet is added in the bridging process. The PPPoE packet includes the PPPoED packet and the PPP session. The PPPoE packet type is detected and the corresponding operation is performed.
进一步的, 当报文类型是发送阶段报文 PPPoED, 结合图 1的第一实施例, 在 PPPoE发现阶段的四个步骤中, PPPoE报文中的 Payload中始终含有一个 TLV: Host-Uniq。 Host-Uniq作为主机唯一标识, 由拨号主机随机产生的随机数。 Host-Uniq类似于 PPP数据报文中的标识域, 主要是用来匹配发送和接收端的, 因为对于广播式的网络中会同时存在很多个 PPPoE的数据报文。 其中, 我们可 以利用这个始终存在的 Host-Uniq来作为接入标识数据进行标识终端所需接入 网络的类型。 其中, 如果接入账号有两个, 则接入标识数据可以设置为, 一种 账号类型对应 Host-Uniq的值在 [0, C) 范围之间,另一种账号类型对应 Host-Uniq 的值在 [C, +∞) 范围之间, 其中 C为 (0, +∞)之间的一个恒定常数, 例如: 如果拨 号使用 Internet拨号账号即 ©internet账户, 即终端需接入的是公众因特网网络, 则设定 Host-Uniq的值在 [0, C) 范围之间,如果拨号使用 IPTV拨号账号即 @iptv 账户, 即终端需接入的是 IPTV专用网络, 则设定 Host-Uniq的值在 [C, +∞) 范 围之间。 当接入账号有多个, 则接入标识数据可以设置为, 一种账号类型对应 Host-Uniq的值在 [0, A) 范围之间, 另一种账号类型对应 Host-Uniq的值在 [Α,Β) 范围之间, 第三种账号类型对应 Host-Uniq 的值在 [B,C) 范围之间等, 如此对 Host-Uniq的值设置多个范围以对应多个账号。 Further, when the packet type is the transmission phase packet PPPoED, in combination with the first embodiment of FIG. 1, in the four steps of the PPPoE discovery phase, the Payload in the PPPoE packet always contains a TLV: Host-Uniq. Host-Uniq is the host unique identifier, a random number randomly generated by the dialing host. Host-Uniq is similar to the identifier field in PPP data packets. It is mainly used to match the sender and receiver. Because there are many PPPoE data packets in the broadcast network. Among them, we can use the always-present Host-Uniq as the access identification data to identify the type of access network required by the terminal. If the access account has two, the access identifier data may be set to, the value of one account type corresponding to Host-Uniq is between [0, C), and the other account type corresponds to the value of Host-Uniq. Between the [C, +∞) ranges, where C is a constant constant between (0, +∞), for example: No. Use the Internet dial-up account, ie, the Internet account, that is, the terminal needs to access the public Internet network. Set the value of Host-Uniq between [0, C). If the dial-up uses the IPTV dial-up account, that is, the @iptv account. That is, the terminal needs to access the IPTV private network, and the value of Host-Uniq is set between [C, +∞). When there are multiple access accounts, the access identification data may be set such that one account type corresponds to the value of Host-Uniq between [0, A), and the other account type corresponds to the value of Host-Uniq. Α, Β) Between the ranges, the third account type corresponds to the value of Host-Uniq between [B, C), etc., so that the value of Host-Uniq is set to multiple ranges to correspond to multiple accounts.
5101 , 若所述 PPPoE报文的报文类型为 PPPoED, 则根据所述 PPPoED携 带的接入标识数据获得与所述 PPPoE报文相匹配的出口网络通道;  5101. If the packet type of the PPPoE packet is PPPoED, obtain an egress network channel that matches the PPPoE packet according to the access identifier data carried by the PPPoED packet.
具体实施例中, 解析 PPPoED报文, 获得 PPPoED携带的接入标识数据, 所述接入标识数据可以是 Payload中的主机标示 Host-Uniq的数据, 根据接入标 识数据进行判断确定所述终端的拨号账号类型, 例如: 如果 Host-Uniq在 [0, C) 范围之间, 则该报文来自 Internet拨号账号, 则 PPPoED报文被映射到 PVC1网 络通道上, 所述 PVC1网络通道接入的服务器是因特网服务器。 如果 Host-Uniq 在 [C, +∞)范围之间,则该报文来自 IPTV拨号,则将 PPoED报文被映射到 PVC2 网络通道上, 所述 PVC2网络通道接入的服务器是 IPTV服务器。 其中, 所述 PVC1和 PVC2是 PVC永久虚电路, 当 PPPoED报文被映射到对应的网络通道 上, 再根据 PPPoE协议执行相应的操作。 其中, 对 PPPoED报文进行设定接入 标识数据包括对 PADI、 PADO、 PADR、 PADS四个处理阶段进行接入标识数据 设定, 其中, 每个阶段都要进行一次网络通路的映射。  In a specific embodiment, the PPPoED packet is parsed to obtain the access identifier data carried by the PPPoED, and the access identifier data may be the data of the Host-Uniq indicated by the host in the Payload, and the terminal identifier is determined according to the access identifier data. Dial-up account type, for example: If Host-Uniq is in the [0, C) range, the message is from the Internet dial-up account, then the PPPoED message is mapped to the PVC1 network channel, and the PVC1 network channel access server It is an Internet server. If the Host-Uniq is in the range of [C, +∞), the packet is from the IPTV dial-up, and the PPoED packet is mapped to the PVC2 network channel. The server accessed by the PVC2 network channel is the IPTV server. The PVC1 and the PVC2 are permanent virtual circuits of the PVC. When the PPPoED packet is mapped to the corresponding network channel, the corresponding operation is performed according to the PPPoE protocol. The setting of the access identification data for the PPPoED message includes setting the access identification data for the four processing stages of PADI, PADO, PADR, and PADS, wherein each stage performs a mapping of the network path.
5102, 通过所述出口网络通道, 将所述终端接入网络。  5102. Access the terminal to the network by using the egress network channel.
具体实施例中, 当根据接入标识数据将 PPPoED报文映射到对应的网络通 道时, 通过所述网络通道接入终端, 终端通过所述网络通道与接入服务器进行 信息交流。  In a specific embodiment, when the PPPoED packet is mapped to the corresponding network channel according to the access identifier data, the terminal accesses the terminal through the network channel, and the terminal exchanges information with the access server through the network channel.
具体实施例中, 当所述出口网络通道接入的服务器是因特网服务器时, 向 因特网广播所述 PPPoED。 当所述出口网络通道接入的服务器是 IPTV服务器, 向 IPTV专用网络广播所述 PPPoED„  In a specific embodiment, when the server accessed by the egress network channel is an Internet server, the PPPoED is broadcast to the Internet. When the server accessing the egress network channel is an IPTV server, the PPPoED is broadcasted to the IPTV private network.
请参照图 3, 为本发明一种网络接入的方法的第二实施例流程图。 如图 3所 示, 本实施例所述的一种网络接入方法的步骤包括:  Please refer to FIG. 3, which is a flowchart of a second embodiment of a method for network access according to the present invention. As shown in FIG. 3, the steps of a network access method in this embodiment include:
S200,接收到终端发送的 PPPoE 文时,检测所述 PPPoE 文的 文类型, 所述 文类型包括发送阶段 ^艮文 PPPoED或会话阶段 ^艮文 PPP, 所述 PPPoED 携带接入标识数据。 S200: When receiving the PPPoE text sent by the terminal, detecting the type of the PPPoE text, The text type includes a sending phase PPPoED or a session phase PPP, and the PPPoED carries access identification data.
5201 , 若所述 PPPoE报文的报文类型为 PPPoED, 解析所述 PPPoED, 获得 所述 PPPoED携带的接入标识数据, 所述接入标识数据包括: PPPoED中的主机 标示 host-Uniq数据。  5201. If the packet type of the PPPoE packet is PPPoED, the PPPoED is parsed to obtain the access identifier data carried by the PPPoED, where the access identifier data includes: the host in the PPPoED indicates the host-Uniq data.
具体实施例中,所述 PPPoED携带的接入标识数据可以是 PADI或 PADO或 PADR或 PADS携带的接入标识数据,所述标识数据可以标示在报文的主机标示 host-Uniq中。  In an embodiment, the access identifier data carried by the PPPoED may be the access identifier data carried by the PADI or PADO or the PADR or the PADS, and the identifier data may be marked in the host identifier host-Uniq of the packet.
5202, 根据所述接入标识数据, 确定所述终端的拨号账号类型, 所述拨号 账号类型包括: 因特网 Internet拨号账号类型或交互式网络电视 IPTV拨号账号 类型。  S202: Determine, according to the access identifier data, a dialing account type of the terminal, where the dialing account type includes: an Internet Internet dialing account type or an interactive network television IPTV dialing account type.
具体实施例中,如果拨号账号两个,例如所述两个拨号账号是因特网 Internet 拨号账号类型和交互式网络电视 IPTV拨号账号类型, 则对终端的 PPPoE协议 进行扩展, 当用户需接入因特网 Internet拨号账号类型, 数字电视终端系统将 PPPoED报文中的 Host-Uniq的值设置在 [0, C) 范围之间, 当用户需接入 IPTV 拨号账号类型,数字电视终端系统将将 PPPoED报文中的 Host-Uniq的值设置在 [C, +∞) 范围之间, 其中 C为 (0, +∞)之间的一个恒定常数, 并且所述设定规则同 步至网关中。 此时接入标识已设置好, 当网关解析出接入标识数据并获得 Host-Uniq的值在 [0, C) 范围之间时, 对应设定规则, 网关获得用户需接因特网 网络, 当网关解析出接入标识数据并获得 Host-Uniq的值在 [C, +∞)范围之间时, 对应设定规则, 网关获得用户需接入 IPTV专用网络。  In a specific embodiment, if two dialing accounts are used, for example, the two dialing accounts are an Internet Internet dialing account type and an interactive Internet TV IPTV dialing account type, the PPPoE protocol of the terminal is extended, and the user needs to access the Internet. Dial-up account type, the digital TV terminal system sets the value of Host-Uniq in the PPPoED message between [0, C). When the user needs to access the IPTV dial-up account type, the digital TV terminal system will use the PPPoED message. The value of Host-Uniq is set between [C, +∞), where C is a constant constant between (0, +∞), and the set rule is synchronized to the gateway. At this time, the access identifier is set. When the gateway parses out the access identifier data and obtains the value of Host-Uniq between [0, C), the corresponding setting rule, the gateway obtains the user needs to access the Internet network, when the gateway When the access identification data is parsed and the value of Host-Uniq is between [C, +∞), corresponding to the setting rule, the gateway obtains the user to access the IPTV private network.
5203 , 根据所述拨号账号类型, 选择与所述拨号账号类型相匹配的出口网 络通道。  5203. Select, according to the dialed account type, an egress network channel that matches the dialed account type.
具体实施例中, 如果属于 Internet拨号, 该信元被映射到 PVC1中, 如果属 于 IPTV拨号, 该信元被映射到 PVC2中。 所述 PVC1网络通道接入的服务器是 因特网服务器, 所述 PVC2网络通道接入的服务器是 IPTV服务器。  In a specific embodiment, if it belongs to Internet dialing, the cell is mapped to PVC1, and if it belongs to IPTV dialing, the cell is mapped to PVC2. The server accessing the PVC1 network channel is an Internet server, and the server accessed by the PVC2 network channel is an IPTV server.
5204, 通过所述出口网络通道, 将所述终端接入网络。  S204: Connect the terminal to the network by using the egress network channel.
其中, 步骤 S200和步骤 S204, 可以参见图 2所示实施例的步骤 S100和步 骤 S102, 在此不赘述。  For the steps S200 and S204, refer to step S100 and step S102 of the embodiment shown in FIG. 2, and details are not described herein.
请参照图 4, 为本发明一种网络接入的方法的第三实施例流程图。 如图 4所 示, 本实施例所述的一种网络接入方法的步骤包括: Please refer to FIG. 4, which is a flowchart of a third embodiment of a method for network access according to the present invention. As shown in Figure 4 The steps of a network access method in this embodiment include:
5300,接收到终端发送的 PPPoE 文时,检测所述 PPPoE 文的 文类型, 所述 文类型包括发送阶段 ^艮文 PPPoED或会话阶段 ^艮文 PPP, 所述 PPPoED 携带接入标识数据。  5300. When receiving the PPPoE file sent by the terminal, detecting, by the terminal, the type of the PPPoE file, where the file type includes a sending phase, a PPPoED, or a session phase, a PPP, where the PPPoED carries the access identifier data.
5301 , 若所述 PPPoE报文的报文类型为 PPPoED, 则根据所述 PPPoED携 带的接入标识数据获得与所述 PPPoE报文相匹配的出口网络通道。  5301. If the packet type of the PPPoE packet is PPPoED, obtain an egress network channel that matches the PPPoE packet according to the access identifier data carried by the PPPoED.
5302, 通过所述出口网络通道, 向网络广播所述 PPPoED。  5302. Broadcast the PPPoED to the network by using the egress network channel.
具体实施例中, 向匹配的出口网络通路广播 PPPoED, 当匹配的是因特网网 络, 向因特网广播所述 PPPoED。 当匹配的是 IPTV专用网络, 向 IPTV专用网 络广播所述 PPPoED。  In a specific embodiment, the PPPoED is broadcast to the matching egress network path, and when the Internet network is matched, the PPPoED is broadcast to the Internet. When the match is for the IPTV private network, the PPPoED is broadcast to the IPTV private network.
5303 , 接收所述网络中的至少一个服务器返回的响应消息。  S303: Receive a response message returned by at least one server in the network.
具体实施例中,通过出口网络通道转发终端发送的寻找接入服务器,即 PADI 帧, 网络中的服务器响应 PADI帧返回的响应消息, 所述响应消息包括终端是否 要建立连接。  In a specific embodiment, the lookup access server sent by the terminal is forwarded through the egress network channel, that is, the PADI frame, and the server in the network responds to the response message returned by the PADI frame, and the response message includes whether the terminal needs to establish a connection.
5304, 根据所述响应消息, 从所述至少一个服务器中选择一个服务器作为 接入服务器。  5304. Select, according to the response message, one server from the at least one server as an access server.
具体实施例中, 通过转发终端发送连接请求, 即 PADR帧给该响应的接入 服务器, 表示希望与条件合适的服务器建立连接。  In a specific embodiment, the connection request is sent by the forwarding terminal, that is, the PADR frame is sent to the responding access server, indicating that it is desired to establish a connection with the server with the appropriate conditions.
5305, 通过选择的所述接入服务器, 将所述终端接入所述网络。  S305. Access the terminal to the network by using the selected access server.
具体实施例中, 当接收到接入服务器发送的 PPPOE连接确认, 即 PADS帧 时, 将所述终端接入确定的接入服务器网络。  In a specific embodiment, when receiving a PPPOE connection confirmation sent by the access server, that is, a PADS frame, the terminal accesses the determined access server network.
5306, 根据所述接入服务器分配的会话标识符, 记录所述会话标识符与所 述出口网络通道的映射关系。  S306. Record a mapping relationship between the session identifier and the egress network channel according to the session identifier allocated by the access server.
具体实施例中, 当接收到接入服务器发送的 PPPoE连接确认, 根据所述接 入服务器分配的会话标识符, 记录所述会话标识符与所述出口网络通道的映射 关系。  In a specific embodiment, when receiving the PPPoE connection confirmation sent by the access server, the mapping relationship between the session identifier and the egress network channel is recorded according to the session identifier allocated by the access server.
其中, 所述会话标识符包括: 接入服务器的 MAC地址和 \或接入服务器生 成的唯一标识码,网关可以根据其中任意的会话标识符需找目的接入服务器。 其 中, 接入服务器生成的唯一标识码存储于 PPPoE协议结构中的 Session_ID中, 网关可以读取 Session_ID 中的接入服务器生成的唯一标识码继而获得目的接入 服务器;接入服务器的 MAC地址存储于广播 PPPoED中的最后一步 PADS的以 太网帧头的源地址, 其源地址就是接入月良务器的 MAC地址, 由于接入月良务器的 MAC地址是独一无二的, 即网关也可根据接入服务器的 MAC地址寻找目的接 入服务器。 进一步的, 会话标识符与出口网络通道的映射关系可以是, 例如: 当接入的出口网络通道是 PVC1时,则记录会话标识符与 PVC1的映射关系, 当 接入的出口网络通道时 PVC2时,则记录会话标识符与 PVC2的映射关系。其中, 所述会话标识符将唯一标识一个 PPPoE会话。所述会话标识符用于 PPP会话中。 The session identifier includes: a MAC address of the access server and a unique identifier generated by the access server, and the gateway may need to find the destination access server according to any session identifier. The unique identifier generated by the access server is stored in the Session_ID in the PPPoE protocol structure, and the gateway can read the unique identifier generated by the access server in the Session_ID and obtain the destination access. The server; the MAC address of the access server is stored in the last step of the broadcast PPPoED. The source address of the Ethernet frame header of the PADS, the source address of which is the MAC address of the access server, due to the MAC address of the access server. It is unique, that is, the gateway can also find the destination access server according to the MAC address of the access server. Further, the mapping relationship between the session identifier and the egress network channel may be, for example, when the egress network channel of the access is PVC1, the mapping relationship between the session identifier and the PVC1 is recorded, and when the egress network channel is accessed, the PVC2 is , the mapping relationship between the session identifier and PVC2 is recorded. The session identifier will uniquely identify a PPPoE session. The session identifier is used in a PPP session.
其中, 步骤 S300和步骤 S301 , 可以参见图 1所示实施例的步骤 S100和步 骤 S101 , 在此不赘述。  For the step S300 and the step S301, reference may be made to the step S100 and the step S101 of the embodiment shown in FIG. 1 , and details are not described herein.
请参照图 5 , 为本发明一种网络接入的方法的第四实施例流程图。 如图 5所 示, 本实施例所述的一种网络接入方法的步骤包括:  Referring to FIG. 5, it is a flowchart of a fourth embodiment of a method for network access according to the present invention. As shown in FIG. 5, the steps of a network access method in this embodiment include:
5400,接收到终端发送的 PPPoE 文时,检测所述 PPPoE 文的 文类型, 所述 文类型包括发送阶段 ^艮文 PPPoED或会话阶段 ^艮文 PPP, 所述 PPPoED 携带接入标识数据。  5400. When receiving the PPPoE file sent by the terminal, detecting, by the terminal, the type of the PPPoE file, where the file type includes a sending phase, a PPPoED, or a session, a PPP, where the PPPoED carries the access identifier data.
5401 , 若所述 PPPoE报文的报文类型为 PPP, 则根据 PPP携带的会话标识 符确定接入服务器, 以及确定与所述会话标识符相映射的出口网络通道。  S401: If the packet type of the PPPoE packet is PPP, determine an access server according to the session identifier carried in the PPP, and determine an egress network channel that is mapped to the session identifier.
具体实施例中, 通过设定的以太网帧检测, 判断当前以太网帧是 PPP报文。 通过协议栈转换将 PPP上行报文封装成 ATM信元, 提取 PPP报文中的会话标 识符和查询会话标识符与出口网络通路的映射关系, 从而获得建立连接关系的 终端和接入服务器并获得出口网络通道。 其中, 当会话标识符与 PVC1 出口网 络通道相映射时,则将 PPP上行 4艮文封装成的 ATM信元映射到 PVC1出口网络 通道, 当会话标识符与 PVC2出口网络通道相映射时, 则将 PPP上行报文封装 成的 ATM信元映射到 PVC2出口网络通道, 并接入根据会话标识符查询到对应 的接入服务器。  In a specific embodiment, the current Ethernet frame is determined to be a PPP packet by using the set Ethernet frame detection. The PPP uplink packet is encapsulated into an ATM cell by the protocol stack, and the mapping relationship between the session identifier and the query session identifier in the PPP packet is extracted, and the terminal and the access server that establish the connection relationship are obtained and obtained. Export network channel. When the session identifier is mapped to the PVC1 egress network channel, the ATM cell encapsulated by the PPP uplink packet is mapped to the PVC1 egress network channel. When the session identifier is mapped to the PVC2 egress network channel, The ATM cells encapsulated in the PPP uplink packet are mapped to the PVC2 egress network channel, and the access is queried to the corresponding access server according to the session identifier.
其中, 会话标识符可以包括接入服务器生成的唯一标识码和\或接入服务器 的 MAC地址, 当读取的会话标识符是服务器生成的唯一标识码时, 网关提取上 行的 PPP ^艮文的会话标识符 Session_ID, 查询 Session_ID与 PVC的映射关系, 从而获得建立连接关系的终端和接入服务器并获得出口网络通道。 当读取的会 话标识符是接入服务器的 MAC地址时, 网关提取上行的 PPP以太网帧头的目 的 MAC地址, 即接入服务器的 MAC地址, 并查询接入服务器的 MAC地址与 PVC 的映射关系, 从而获得建立连接关系的终端和接入服务器并获得出口网络 通道。 The session identifier may include a unique identifier generated by the access server and a MAC address of the access server. When the read session identifier is a unique identifier generated by the server, the gateway extracts the uplink PPP. The session identifier Session_ID is used to query the mapping relationship between the Session_ID and the PVC, thereby obtaining the terminal and the access server that establish the connection relationship and obtaining the egress network channel. When the read session identifier is the MAC address of the access server, the gateway extracts the destination MAC address of the uplink PPP Ethernet frame header, that is, the MAC address of the access server, and queries the MAC address of the access server. The mapping relationship between the PVCs is obtained, and the terminal and the access server that establish the connection relationship are obtained and the egress network channel is obtained.
S402,通过所述出口网络通道,将所述 PPPoE报文发送至所述接入服务器, 使所述终端与所述接入服务器进行会话。  S402. Send the PPPoE packet to the access server by using the egress network channel, so that the terminal performs a session with the access server.
具体实施例中, 通过所述出口网络通道, 将 ATM信元发送至所述接入服务 器终端与所述接入服务器进行 PPP会话。 请参照图 6, 为本发明一种网络接入的方法的第五实施例流程图。 如图 6所 示, 本实施例所述的一种网络接入方法的步骤包括:  In a specific embodiment, an ATM cell is sent to the access server terminal and the access server to perform a PPP session through the egress network channel. Please refer to FIG. 6, which is a flowchart of a fifth embodiment of a method for network access according to the present invention. As shown in FIG. 6, the steps of a network access method in this embodiment include:
5500, 创建至少一条用于将终端接入网络的出口网络通道。  5500. Create at least one egress network channel for connecting the terminal to the network.
具体实施例中,创建两条 PVC连接或多于两条的 PVC连接,若创建的是两 条 PVC连接,则可以通过设定 VPI/VCI两个参数分别连接到 ATM中不同网络, 所述不同网络可以是 IPTV线路和 Internet线路,其中 PVC1可以是 Internet线路, PVC2可以是 IPTV线路。  In a specific embodiment, two PVC connections or more than two PVC connections are created. If two PVC connections are created, the two parameters of the VPI/VCI can be respectively connected to different networks in the ATM, the different The network may be an IPTV line and an Internet line, wherein PVC1 may be an Internet line, and PVC2 may be an IPTV line.
5501 ,接收到终端发送的 PPPoE 文时,检测所述 PPPoE 文的 文类型, 所述 文类型包括发送阶段 ^艮文 PPPoED或会话阶段 ^艮文 PPP, 所述 PPPoED 携带接入标识数据。  5501. When receiving the PPPoE text sent by the terminal, detecting, by the terminal, the type of the PPPoE file, where the text type includes a sending phase, a PPPoED, or a session phase, a PPP, where the PPPoED carries the access identifier data.
5502, 若所述 PPPoE报文的报文类型为 PPPoED, 则根据所述 PPPoED携 带的接入标识数据获得与所述 PPPoE报文相匹配的出口网络通道。  S502: If the packet type of the PPPoE packet is PPPoED, obtain an egress network channel that matches the PPPoE packet according to the access identifier data carried by the PPPoED.
5503, 通过所述出口网络通道, 将所述终端接入网络。  S503. Access the terminal to the network by using the egress network channel.
其中, 步骤 S501、 步骤 S502和步骤 S503, 可以参见图 5所示实施例的步 骤 S100、 步骤 S101和步骤 S102, 在此不赘述。  Step S501, step S502, and step S503, refer to step S100, step S101, and step S102 of the embodiment shown in FIG. 5, and details are not described herein.
下面阐述本发明实施例提供的一种网关的具体实现。  A specific implementation of a gateway provided by an embodiment of the present invention is described below.
请参照图 7, 为本发明一种网关的第一实施例结构示意图。 本实施例所述的 一种网关包括:  Please refer to FIG. 7, which is a schematic structural diagram of a first embodiment of a gateway according to the present invention. A gateway according to this embodiment includes:
检测单元 100, 用于当接收到终端发送的 PPPoE报文时, 检测所述 PPPoE 报文的报文类型, 所述报文类型包括发送阶段报文 PPPoED 或会话阶段报文 PPP, 所述 PPPoED携带接入标识数据。  The detecting unit 100 is configured to: when receiving the PPPoE packet sent by the terminal, detecting a packet type of the PPPoE packet, where the packet type includes a PPPOED packet or a session phase packet PPP, where the PPPoED carries Access identification data.
具体实施例中, 设定网关端口为桥接模式, 支持 PPPoE报文透传。 其中, PPPoE ( Point to Point Protocol over Ethernet, 基于以太网的点对点十办议)可以使 终端通过一个筒单的桥接设备连到一个远端的接入服务器上,通过 PPPoE协议, 远端服务器能够实现对每个接入终端进行控制。 例如: 当终端需接入公众因特 网时,终端通过发送携带接入公众因特网数据的 PPPoE报文来接入公众因特网, 并根据 PPPoE协议与公众因特网中的相应的服务器进行传输数据。 In a specific embodiment, the gateway port is set to be in the bridge mode, and the PPPoE packet is transparently transmitted. Among them, PPPoE (Point to Point Protocol over Ethernet, Ethernet-based peer-to-peer ten-party negotiation) can make The terminal is connected to a remote access server through a single bridge device. Through the PPPoE protocol, the remote server can control each access terminal. For example: When the terminal needs to access the public Internet, the terminal accesses the public Internet by sending a PPPoE message carrying the public Internet data, and transmits data according to the PPPoE protocol and the corresponding server in the public Internet.
进一步的,设定以太网帧检测, 在桥接处理流程中加入 PPPoE报文的检测。 PPPoE报文包括发送阶段报文 PPPoED和会话阶段报文 PPP, 检测所述 PPPoE 报文类型, 再执行相应的操作。  Further, the Ethernet frame detection is set, and the detection of the PPPoE packet is added in the bridging process. The PPPoE packet includes the PPPoED packet and the PPP session. The PPPoE packet type is detected and the corresponding operation is performed.
进一步的, 当报文类型是发送阶段报文 PPPoED, 结合图 1的第一实施例, 在 PPPoE发现阶段的四个步骤中, PPPoE报文中的 Payload中始终含有一个 TLV: Host-Uniq。 Host-Uniq作为主机唯一标识, 由拨号主机随机产生的随机数。 Host-Uniq类似于 PPP数据报文中的标识域, 主要是用来匹配发送和接收端的, 因为对于广播式的网络中会同时存在很多个 PPPoE的数据报文。 其中, 我们可 以利用这个始终存在的 Host-Uniq来作为接入标识数据进行标识终端所需接入 网络的类型。 其中, 如果接入账号有两个, 则接入标识数据可以设置为, 一种 账号类型对应 Host-Uniq的值在 [0, C) 范围之间,另一种账号类型对应 Host-Uniq 的值在 [C, +∞) 范围之间, 其中 C为 (0, +∞)之间的一个恒定常数, 例如: 如果拨 号使用 Internet拨号账号即 ©internet账户, 即终端需接入的是公众因特网网络, 则设定 Host-Uniq的值在 [0, C) 范围之间,如果拨号使用 IPTV拨号账号即 @iptv 账户, 即终端需接入的是 IPTV专用网络, 则设定 Host-Uniq的值在 [C, +∞) 范 围之间。 当接入账号有多个, 则接入标识数据可以设置为, 一种账号类型对应 Host-Uniq的值在 [0, A) 范围之间, 另一种账号类型对应 Host-Uniq的值在 [Α,Β) 范围之间, 第三种账号类型对应 Host-Uniq 的值在 [B,C) 范围之间等, 如此对 Host-Uniq的值设置多个范围以对应多个账号。  Further, when the packet type is the transmission phase packet PPPoED, in combination with the first embodiment of FIG. 1, in the four steps of the PPPoE discovery phase, the Payload in the PPPoE packet always contains a TLV: Host-Uniq. Host-Uniq is the host unique identifier, a random number randomly generated by the dialing host. Host-Uniq is similar to the identifier field in PPP data packets. It is mainly used to match the sender and receiver. Because there are many PPPoE data packets in the broadcast network. Among them, we can use this always-present Host-Uniq as the access identification data to identify the type of access network required by the terminal. If the access account has two, the access identifier data may be set to, the value of one account type corresponding to Host-Uniq is between [0, C), and the other account type corresponds to the value of Host-Uniq. Between the [C, +∞) range, where C is a constant constant between (0, +∞), for example: If the dial-up uses an Internet dial-up account, ie, an Internet account, that is, the terminal needs to access the public Internet network. , set the value of Host-Uniq between [0, C). If the dial-up uses the IPTV dial-up account, that is, the @iptv account, that is, the terminal needs to access the IPTV private network, set the value of Host-Uniq at [C, +∞) between the ranges. When there are multiple access accounts, the access identification data may be set such that one account type corresponds to the value of Host-Uniq between [0, A), and the other account type corresponds to the value of Host-Uniq. Α, Β) Between the ranges, the third account type corresponds to the value of Host-Uniq between [B, C), etc., so that the value of Host-Uniq is set to multiple ranges to correspond to multiple accounts.
匹配单元 200, 用于若所述 PPPoE报文的报文类型为 PPPoED, 则根据所述 PPPoED携带的接入标识数据获得与所述 PPPoE报文相匹配的出口网络通道。  The matching unit 200 is configured to obtain, according to the access identifier data carried by the PPPoED, an egress network channel that matches the PPPoE packet, if the packet type of the PPPoE packet is PPPoED.
具体实施例中, 解析 PPPoED报文, 获得 PPPoED携带的接入标识数据, 所述接入标识数据可以是 Payload中的主机标示 Host-Uniq的数据, 根据接入标 识数据进行判断确定所述终端的拨号账号类型, 例如: 如果 Host-Uniq在 [0, C) 范围之间, 则该报文来自 Internet拨号账号, 则 PPPoED报文被映射到 PVC1网 络通道上, 所述 PVC1网络通道接入的服务器是因特网服务器。 如果 Host-Uniq 在 [C, +∞)范围之间, 则该报文来自 IPTV拨号, 则 PPPoED报文被映射到 PVC2 网络通道上, 所述 PVC2网络通道接入的服务器是 IPTV服务器。 其中, 所述 PVC1和 PVC2是 PVC永久虚电路, 当 PPPoED报文被映射到对应的网络通道 上, 再根据 PPPoE协议执行相应的操作。 其中, 对 PPPoED报文进行设定接入 标识数据包括对 PADI、 PADO、 PADR、 PADS四个处理阶段进行接入标识数据 设定, 其中, 每个阶段都要进行一次网络通路的映射。 In a specific embodiment, the PPPoED packet is parsed to obtain the access identifier data carried by the PPPoED, and the access identifier data may be the data of the Host-Uniq indicated by the host in the Payload, and the terminal identifier is determined according to the access identifier data. Dial-up account type, for example: If Host-Uniq is in the [0, C) range, the message is from the Internet dial-up account, then the PPPoED message is mapped to the PVC1 network channel, and the PVC1 network channel access server It is an Internet server. If Host-Uniq Between the [C, +∞) range, the packet is from the IPTV dial-up, and the PPPoED packet is mapped to the PVC2 network channel, and the server accessed by the PVC2 network channel is the IPTV server. The PVC1 and the PVC2 are permanent virtual circuits of the PVC. When the PPPoED packet is mapped to the corresponding network channel, the corresponding operation is performed according to the PPPoE protocol. The setting of the access identification data for the PPPoED message includes setting the access identification data for the four processing stages of PADI, PADO, PADR, and PADS, wherein each stage performs a mapping of the network path.
接入单元 300, 用于通过所述出口网络通道, 将所述终端接入网络。  The access unit 300 is configured to access the terminal to the network by using the egress network channel.
具体实施例中, 当根据接入标识数据将 PPPoED报文映射到对应的网络通 道时, 通过所述网络通道接入终端, 终端通过所述网络通道与接入服务器进行 信息交流。  In a specific embodiment, when the PPPoED packet is mapped to the corresponding network channel according to the access identifier data, the terminal accesses the terminal through the network channel, and the terminal exchanges information with the access server through the network channel.
具体实施例中, 当所述出口网络通道接入的服务器是因特网服务器时, 向 因特网广播所述 PPPoED。 当所述出口网络通道接入的服务器是 IPTV服务器, 向 IPTV专用网络广播所述 PPPoED„  In a specific embodiment, when the server accessed by the egress network channel is an Internet server, the PPPoED is broadcast to the Internet. When the server accessing the egress network channel is an IPTV server, the PPPoED is broadcasted to the IPTV private network.
请参照图 8, 为本发明一种网关的第二实施例结构示意图。 本实施例所述的 一种网关包括:  Please refer to FIG. 8, which is a schematic structural diagram of a second embodiment of a gateway according to the present invention. A gateway according to this embodiment includes:
检测单元 100、 匹配单元 200和接入单元 300。  The detecting unit 100, the matching unit 200, and the access unit 300.
其中, 所述匹配单元 200还可进一步包括:  The matching unit 200 may further include:
解析子单元 101 , 用于解析所述 PPPoED, 获得所述 PPPoED携带的接入标 识数据, 所述接入标识数据包括: PPPoED中的主机标示 host-Uniq数据。  The parsing sub-unit 101 is configured to parse the PPPoED, and obtain the access identifier data carried by the PPPoED, where the access identifier data includes: the host in the PPPoED indicates host-Uniq data.
具体实施例中,所述 PPPoED携带的接入标识数据可以是 PADI或 PADO或 PADR或 PADS携带的接入标识数据,所述标识数据可以标示在报文的主机标示 host-Uniq中。  In an embodiment, the access identifier data carried by the PPPoED may be the access identifier data carried by the PADI or PADO or the PADR or the PADS, and the identifier data may be marked in the host identifier host-Uniq of the packet.
确定子单元 102, 用于根据所述接入标识数据, 确定所述终端的拨号账号类 型, 所述拨号账号类型包括: 因特网 Internet拨号账号类型或交互式网络电视 IPTV拨号账号类型。  The determining subunit 102 is configured to determine, according to the access identification data, a dialing account type of the terminal, where the dialing account type includes: an Internet Internet dialing account type or an interactive network television IPTV dialing account type.
具体实施例中,如果拨号账号两个,例如所述两个拨号账号是因特网 Internet 拨号账号类型和交互式网络电视 IPTV拨号账号类型, 则对数字电视终端的 PPPoE协议进行扩展, 当用户需接入因特网 Internet拨号账号类型, 数字电视终 端系统将 PPPoED报文中的 Host-Uniq的值设置在 [0, C) 范围之间, 当用户需接 入 IPTV拨号账号类型, 数字电视终端系统将将 PPPoED报文中的 Host-Uniq的 值设置在 [C, +∞) 范围之间, 其中 C为 (0, +∞)之间的一个恒定常数, 并且所述设 定规则同步至网关中。 此时接入标识已设置好, 当网关解析出接入标识数据并 获得 Host-Uniq的值在 [0, C) 范围之间时, 对应设定规则, 网关获得用户需接因 特网网络,当网关解析出接入标识数据并获得 Host-Uniq的值在 [C, +∞)范围之间 时, 对应设定规则, 网关获得用户需接入电视交互式网络。 In a specific embodiment, if two dialing accounts are used, for example, the two dialing accounts are an Internet Internet dialing account type and an interactive network television IPTV dialing account type, the PPPoE protocol of the digital television terminal is extended, when the user needs to access Internet Internet dialing account type, the digital TV terminal system sets the value of Host-Uniq in the PPPoED message between [0, C). When the user needs to access the IPTV dialing account type, the digital TV terminal system will report PPPoED. Host-Uniq The value is set between the [C, +∞) range, where C is a constant constant between (0, +∞), and the set rule is synchronized to the gateway. At this time, the access identifier is set. When the gateway parses out the access identification data and obtains the value of Host-Uniq between [0, C), the corresponding setting rule, the gateway obtains the user needs to access the Internet network, when the gateway When the access identification data is parsed and the value of Host-Uniq is between [C, +∞), corresponding to the setting rule, the gateway obtains the user to access the television interactive network.
第一选择子单元 103, 用于根据所述拨号账号类型, 选择与所述拨号账号类 型相匹配的出口网络通道。  The first selection sub-unit 103 is configured to select, according to the dialed account type, an egress network channel that matches the dialed account type.
具体实施例中, 如果属于 Internet拨号, 该信元被映射到 PVC1中, 如果属 于 IPTV拨号, 该信元被映射到 PVC2中。 所述 PVC1网络通道接入的服务器是 因特网服务器, 所述 PVC2网络通道接入的服务器是 IPTV服务器。  In a specific embodiment, if it belongs to Internet dialing, the cell is mapped to PVC1, and if it belongs to IPTV dialing, the cell is mapped to PVC2. The server accessing the PVC1 network channel is an Internet server, and the server accessed by the PVC2 network channel is an IPTV server.
请参照图 9, 为本发明一种网关的第三实施例结构示意图。 本实施例所述的 一种网关包括:  Please refer to FIG. 9, which is a schematic structural diagram of a third embodiment of a gateway according to the present invention. A gateway according to this embodiment includes:
检测单元 100、 匹配单元 200和接入单元 300。  The detecting unit 100, the matching unit 200, and the access unit 300.
其中, 所述接入单元 300还可进一步包括:  The access unit 300 may further include:
广播子单元 201 , 用于通过所述出口网络通道, 向网络广播所述 PPPoED。 具体实施例中, 向匹配的出口网络通路广播 PPPoED, 当匹配的是因特网网 络, 向因特网广播所述 PPPoED。 当匹配的是 IPTV专用网络, 向 IPTV专用网 络广播所述 PPPoED。  The broadcast subunit 201 is configured to broadcast the PPPoED to the network through the egress network channel. In a specific embodiment, the PPPoED is broadcast to the matching egress network path, and when the Internet network is matched, the PPPoED is broadcast to the Internet. When the match is for the IPTV private network, the PPPoED is broadcast to the IPTV private network.
接收子单元 202, 用于接收所述网络中的至少一个服务器返回的响应消息。 具体实施例中,通过出口网络通道转发终端发送的寻找接入服务器,即 PADI 帧, 网络中的服务器响应 PADI帧返回的响应消息, 所述响应消息包括终端是否 要建立连接。  The receiving subunit 202 is configured to receive a response message returned by at least one server in the network. In a specific embodiment, the lookup access server sent by the terminal is forwarded through the egress network channel, that is, the PADI frame, and the server in the network responds to the response message returned by the PADI frame, and the response message includes whether the terminal needs to establish a connection.
第二选择子单元 203, 用于根据所述响应消息, 从所述至少一个服务器中选 择一个服务器作为接入服务器。  The second selection sub-unit 203 is configured to select one server from the at least one server as the access server according to the response message.
具体实施例中, 通过转发终端发送连接请求, 即 PADR帧给该响应的接入 服务器, 表示希望与条件合适的服务器建立连接。  In a specific embodiment, the connection request is sent by the forwarding terminal, that is, the PADR frame is sent to the responding access server, indicating that it is desired to establish a connection with the server with the appropriate conditions.
接入子单元 204, 用于通过选择的所述接入服务器, 将所述终端接入所述网 络。  The access subunit 204 is configured to access the terminal to the network by using the selected access server.
具体实施例中, 当接收到接入服务器发送的 PPPOE连接确认, 即 PADS帧 时, 将所述终端接入确定的接入服务器网络。 记录子单元 205, 用于根据所述接入服务器分配的会话标识符, 记录所述会 话标识符与所述出口网络通道的映射关系。 In a specific embodiment, when receiving a PPPOE connection confirmation sent by the access server, that is, a PADS frame, the terminal is connected to the determined access server network. The recording sub-unit 205 is configured to record, according to the session identifier allocated by the access server, a mapping relationship between the session identifier and the egress network channel.
具体实施例中, 当接收到接入服务器发送的 PPPOE连接确认, 根据所述接 入服务器分配的会话标识符, 记录所述会话标识符与所述出口网络通道的映射 关系。  In a specific embodiment, when receiving the PPPOE connection confirmation sent by the access server, the mapping relationship between the session identifier and the egress network channel is recorded according to the session identifier allocated by the access server.
其中, 所述会话标识符包括: 接入服务器的 MAC地址和 \或接入服务器生 成的唯一标识码,网关可以根据其中任意的会话标识符需找目的接入服务器。 其 中, 接入服务器生成的唯一标识码存储于 PPPOE协议结构中的 Session_ID中, 网关可以读取 Session_ID 中的接入服务器生成的唯一标识码继而获得目的接入 服务器;接入服务器的 MAC地址存储于广播 PPPoED中的最后一步 PADS的以 太网帧头的源地址, 其源地址就是接入月良务器的 MAC地址, 由于接入服务器的 MAC地址是独一无二的, 即网关也可根据接入服务器的 MAC地址寻找目的接 入服务器。 进一步的, 会话标识符与出口网络通道的映射关系可以是, 例如: 当接入的出口网络通道是 PVC1时,则记录会话标识符与 PVC1的映射关系, 当 接入的出口网络通道时 PVC2时,则记录会话标识符与 PVC2的映射关系。其中, 所述会话标识符将唯一标识一个 PPPOE会话。所述会话标识符用于 PPP会话中。  The session identifier includes: a MAC address of the access server and a unique identification code generated by the access server, and the gateway may find the destination access server according to any of the session identifiers. The unique identifier generated by the access server is stored in the Session_ID in the PPPOE protocol structure, and the gateway can read the unique identifier generated by the access server in the Session_ID to obtain the destination access server; the MAC address of the access server is stored in The last address in the PPPoED broadcasts the source address of the Ethernet frame header of the PADS. The source address is the MAC address of the access server. Since the MAC address of the access server is unique, the gateway can also be based on the access server. The MAC address is used to find the destination access server. Further, the mapping relationship between the session identifier and the egress network channel may be, for example, when the egress network channel of the access is PVC1, the mapping relationship between the session identifier and the PVC1 is recorded, and when the egress network channel is accessed, the PVC2 is , the mapping relationship between the session identifier and PVC2 is recorded. The session identifier will uniquely identify a PPPOE session. The session identifier is used in a PPP session.
请参照图 10, 为本发明一种网关的第四实施例结构示意图。 本实施例所述 的一种网关包括:  Please refer to FIG. 10, which is a schematic structural diagram of a fourth embodiment of a gateway according to the present invention. A gateway according to this embodiment includes:
检测单元 100, 其中, 所述网关还包括:  The detecting unit 100, wherein the gateway further includes:
确定单元 400, 用于当所述 PPPoE报文的报文类型为 PPP时, 则根据 PPP 携带的会话标识符确定接入服务器, 以及确定与所述会话标识符相映射的出口 网络通道。  The determining unit 400 is configured to: when the packet type of the PPPoE packet is PPP, determine an access server according to the session identifier carried by the PPP, and determine an egress network channel that is mapped to the session identifier.
具体实施例中, 通过设定的以太网帧检测, 判断当前以太网帧是 PPP报文。 通过协议栈转换将 PPP上行报文封装成 ATM信元, 提取 PPP报文中的会话标 识符和查询会话标识符与出口网络通路的映射关系, 从而获得出口网络通道和 接入服务器。 其中, 当会话标识符与 PVC1 出口网络通道相映射时, 则将 PPP 上行报文封装成的 ATM信元映射到 PVC1出口网络通道,当会话标识符与 PVC2 出口网络通道相映射时,则将 PPP上行 4艮文封装成的 ATM信元映射到 PVC2出 口网络通道, 并接入根据会话标识符查询到对应的接入服务器。  In a specific embodiment, the current Ethernet frame is determined to be a PPP packet by using the set Ethernet frame detection. The PPP uplink packet is encapsulated into an ATM cell by protocol stack conversion, and the session identifier in the PPP packet and the mapping relationship between the query session identifier and the egress network path are extracted, thereby obtaining an egress network channel and an access server. When the session identifier is mapped to the PVC1 egress network channel, the ATM cell encapsulated by the PPP uplink packet is mapped to the PVC1 egress network channel. When the session identifier is mapped to the PVC2 egress network channel, the PPP is mapped. The ATM cell encapsulated in the uplink packet is mapped to the PVC2 egress network channel, and accesses the corresponding access server according to the session identifier.
其中, 会话标识符可以包括接入服务器生成的唯一标识码或接入服务器的 MAC地址, 当读取的会话标识符是服务器生成的唯一标识码时, 网关提取上行 的 PPP报文的会话标识符 Session_ID, 查询 Session_ID与 PVC的映射关系, 从 而获得建立连接关系的终端和接入服务器并获得出口网络通道。 当读取的会话 标识符是接入服务器的 MAC地址时,读取广播 PPPoED中的最后一步 PADS的 以太网帧头的源地址, 并查询接入服务器的 MAC地址与 PVC的映射关系, 从 而获得建立连接关系的终端和接入服务器并获得出口网络通道。 The session identifier may include a unique identifier generated by the access server or an access server. The MAC address, when the read session identifier is a unique identifier generated by the server, the gateway extracts the session identifier Session_ID of the uplink PPP packet, and queries the mapping relationship between the Session_ID and the PVC, thereby obtaining the terminal and the access establishing the connection relationship. The server gets the exit network channel. When the read session identifier is the MAC address of the access server, the source address of the Ethernet frame header of the last step PADS in the broadcast PPPoED is read, and the mapping relationship between the MAC address of the access server and the PVC is obtained, thereby obtaining Establish a connection terminal and an access server and obtain an exit network channel.
发送单元 500, 用于通过所述出口网络通道, 将所述 PPPoE 4艮文发送至所 述接入服务器, 使所述终端与所述接入服务器进行会话  The sending unit 500 is configured to send, by using the egress network channel, the PPPoE message to the access server, so that the terminal performs a session with the access server.
具体实施例中, 通过所述出口网络通道, 将 ATM信元发送至所述接入服务 器终端与所述接入服务器进行 PPP会话。  In a specific embodiment, an ATM cell is sent to the access server terminal and the access server to perform a PPP session through the egress network channel.
请参照图 11 , 为本发明一种网关的第五实施例结构示意图。 本实施例所述 的一种网关包括:  Please refer to FIG. 11, which is a schematic structural diagram of a fifth embodiment of a gateway according to the present invention. A gateway according to this embodiment includes:
检测单元 100、匹配单元 200、接入单元 300、确定单元 400和发送单元 500。 其中, 所述网关还包括:  The detecting unit 100, the matching unit 200, the access unit 300, the determining unit 400, and the transmitting unit 500. The gateway further includes:
创建单元 600, 用于创建至少一条用于将终端接入网络的出口网络通道。 具体实施例中,创建两条 PVC连接或多于两条的 PVC连接,若创建的是两 条 PVC连接,则可以通过设定 VPI/VCI两个参数分别连接到 ATM中不同网络, 所述不同网络可以是 IPTV线路和 Internet线路,其中 PVC1可以是 Internet线路, PVC2可以是 IPTV线路。  The creating unit 600 is configured to create at least one egress network channel for connecting the terminal to the network. In a specific embodiment, two PVC connections or more than two PVC connections are created. If two PVC connections are created, the two parameters of the VPI/VCI can be respectively connected to different networks in the ATM, the different The network may be an IPTV line and an Internet line, wherein PVC1 may be an Internet line, and PVC2 may be an IPTV line.
请参照图 12, 是本发明一种网络接入的系统的第一实施例结构示意图。 本 实施例所述的一种网络接入的系统包括:  Referring to FIG. 12, it is a schematic structural diagram of a first embodiment of a network access system according to the present invention. A network access system according to this embodiment includes:
终端 1、 网关 2和服务器 3。  Terminal 1, Gateway 2 and Server 3.
具体实施例中, 所述终端 1 可以根据所运行的业务类型自动的在多个网络 中切换, 例如终端 1开机的时候, 终端 1默认的使用 ©internet账户拨号连接网 络, 这个时候用户可以自由使用各种互联网应用, 当用户启动 IPTV应用后, 终 端 1会断开当前互联网拨号连接, 启动 iTV专用网络拨号, 这样用户就可以使 用 IPTV专用通道使用 IPTV业务,当用户退出 IPTV应用后,终端 1会断开 IPTV 专用网络拨号连接, 恢复互联网拨号连接。  In a specific embodiment, the terminal 1 can automatically switch between multiple networks according to the type of service that is running. For example, when the terminal 1 is powered on, the terminal 1 uses the Internet account to dial the connection network by default. After the IPTV application is started, the terminal 1 disconnects the current Internet dial-up connection and initiates the iTV private network dialing, so that the user can use the IPTV dedicated channel to use the IPTV service. When the user exits the IPTV application, the terminal 1 will Disconnect the IPTV private network dial-up connection and restore the Internet dial-up connection.
所述网关 2如参见图 6~图 9所述的网关。  The gateway 2 is as described in the gateways shown in Figures 6-9.
所述服务器 3接入 PVC出口网络通道, 所述 PVC不少于一条。 下面实施例描述一种网络接入的系统。 The server 3 is connected to the PVC egress network channel, and the PVC is not less than one. The following embodiments describe a system for network access.
终端 1根据用户的选择设定对应的 PPPoE报文, 当用户选择接入因特网网 络时,终端 1设置 PPPoE报文中的接入标识数据的 host-Uniq的值的范围在在 [0, C) 范围之间, 当用户选择接入 IPTV专用网络时, 终端 1设置 PPPoE报文中的 接入标识数据的 host-Uniq的值的范围在在 [C, +∞) 范围之间。 终端将此报文发 送至网关, 网关接收报文并检测所述 PPPoE报文的报文类型, 当检测到所述 PPPoE报文的报文类型为 PPPoED, 则根据所述 PPPoED携带的接入标识数据 host-Uniq的值获得与所述 PPPoE报文相匹配的出口网络通道, 即当 Host-Uniq 的值在 [0, C) 范围之间时, 所匹配的出口网络通道可以是接入因特网网络的 PVC1 , 当 Host-Uniq的值在 [C, +∞) 范围之间时, 所匹配的出口网络通道可以是 接入 IPTV专用网络的 PVC2, 然后网关通过匹配的网络发送封装成 ATM信元 的 PPPoE报文, 与接入的服务器 3进行数据交流, 其中, 接入服务器可以是根 据接入服务器分配的会话标识符来接入服务器, 例如: 当读取的会话标识符是 服务器生成的唯一标识码时, 网关提取上行的 PPP 报文的会话标识符 SessionJD, 查询 Session_ID与 PVC的映射关系, 从而获得建立连接关系的终 端和接入服务器并获得出口网络通道; 或者当读取的会话标识符是接入服务器 的 MAC地址时, 网关提取上行的 PPP以太网帧头的目的 MAC地址, 即接入月^ 务器的 MAC地址, 并查询接入服务器的 MAC地址与 PVC的映射关系, 从而 获得建立连接关系的终端和接入服务器并获得出口网络通道。 进一步的, 所述 数据交流可以是, 通过所述出口网络通道, 向网络广播 ATM信元, 接收所述网 络中多个服务器 3返回的响应消息,根据响应消息, 从返回响应消息的服务器 3 中选择一个服务器 3作为接入服务器 3, 通过选择的接入服务器 3, 将终端 1与 选择的服务器 3建立连接通道, 以便服务器 3获得终端 1数据内容或终端内容 获得服务器 3的数据内容。  The terminal 1 sets the corresponding PPPoE packet according to the user's selection. When the user selects to access the Internet network, the terminal 1 sets the value of the host-Uniq value of the access identifier data in the PPPoE packet to be in [0, C). Between the ranges, when the user selects to access the IPTV private network, the terminal 1 sets the value of the host-Uniq value of the access identification data in the PPPoE message to be in the range of [C, +∞). The terminal sends the packet to the gateway, and the gateway receives the packet and detects the packet type of the PPPoE packet. When the packet type of the PPPoE packet is PPPoED, the terminal searches for the packet according to the PPPoED. The value of the data host-Uniq obtains an egress network channel that matches the PPPoE packet, that is, when the value of Host-Uniq is between [0, C), the matching egress network channel may be an access to the Internet network. PVC1, when the value of Host-Uniq is between [C, +∞), the matching egress network channel can be PVC2 accessing the IPTV private network, and then the gateway sends the encapsulated ATM cell through the matching network. The PPPoE packet exchanges data with the accessed server 3, wherein the access server may access the server according to the session identifier assigned by the access server, for example: when the read session identifier is a unique identifier generated by the server. When the code is used, the gateway extracts the session identifier SessionJD of the uplink PPP packet, and searches for the mapping relationship between the Session_ID and the PVC, thereby obtaining the terminal and the access service for establishing the connection relationship. And obtain the egress network channel; or when the read session identifier is the MAC address of the access server, the gateway extracts the destination MAC address of the uplink PPP Ethernet frame header, that is, accesses the MAC address of the server, and Query the mapping between the MAC address of the access server and the PVC, and obtain the terminal and access server that establish the connection relationship and obtain the egress network channel. Further, the data exchange may be, by using the egress network channel, to broadcast an ATM cell to the network, and receive a response message returned by the plurality of servers 3 in the network, according to the response message, from the server 3 that returns the response message. A server 3 is selected as the access server 3, and the terminal 1 is connected to the selected server 3 through the selected access server 3, so that the server 3 obtains the data content of the terminal 1 data content or the terminal content obtaining server 3.
通过上述实施例的描述, 本发明具有以下优点:  Through the description of the above embodiments, the present invention has the following advantages:
本发明实施例是在现有的数字电视终端和家庭媒体网关硬件架构下, 通过 对 PPPoE报文中的发送阶段报文 PPPoED的扩展, 使发送阶段报文 PPPoED携 带有能够辨别网络类型的接入标识数据, 并通过解析所述接入标识数据使数字 电视终端能够接入对应的出口网络通道。 这使数字电视终端能够支持多种网络 的接入, 使得现存的数字电视终端仅通过数字电视终端和网关的软件升级即可 接入多种网络类型, 使得用户不需通过更换单端口数字电视终端即可实现接入 多种网络类型的功能, 这不仅节省了硬件成本、 用户的使用成本, 也节约了网 络维护成本。 In the embodiment of the present invention, in the existing digital television terminal and the home media gateway hardware architecture, the PPPoED packet in the transmission phase carries the access capable of discriminating the network type by extending the PPPoED packet in the PPPoE packet. Identifying the data and enabling the digital television terminal to access the corresponding egress network channel by parsing the access identification data. This enables digital TV terminals to support access to multiple networks, allowing existing digital TV terminals to be upgraded only through software for digital TV terminals and gateways. Access to multiple network types allows users to access multiple network types without replacing single-port digital TV terminals. This not only saves hardware costs, user cost, but also saves network maintenance costs.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成, 所述的程序可存储于一计算 机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Random Access Memory, RAM )等。  A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. In execution, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所揭露的仅为本发明较佳实施例而已, 当然不能以此来限定本发明之 权利范围, 因此依本发明权利要求所作的等同变化, 仍属本发明所涵盖的范围。  The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and the equivalent changes made by the claims of the present invention are still within the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种网络接入的方法, 其特征在于, 所述方法包括: 1. A method of network access, characterized in that the method includes:
接收到终端发送的 PPPoE报文时, 检测所述 PPPoE报文的报文类型, 所 述报文类型包括发送 P介段报文 PPPoED或会话 P介段报文 PPP ,所述 PPPoED携 带接入标识数据; When receiving the PPPoE message sent by the terminal, the message type of the PPPoE message is detected. The message type includes sending a P-segment message PPPoED or a session P-segment message PPP, and the PPPoED carries an access identifier. data;
若所述 PPPoE报文的报文类型为 PPPoED,则根据所述 PPPoED携带的接 入标识数据获得与所述 PPPoE 4艮文相匹配的出口网络通道; If the message type of the PPPoE message is PPPoED, the egress network channel matching the PPPoE message is obtained according to the access identification data carried by the PPPoED;
通过所述出口网络通道, 将所述终端接入网络。 The terminal is connected to the network through the egress network channel.
2、 如权利要求 1所述的方法, 其特征在于, 所述根据所述 PPPoED携带 的接入标识数据获得与所述 PPPoE报文相匹配的出口网络通道包括: 2. The method of claim 1, wherein obtaining the egress network channel matching the PPPoE message based on the access identification data carried by the PPPoED includes:
解析所述 PPPoED , 获得所述 PPPoED携带的接入标识数据, 所述接入标 识数据包括: PPPoED中的主机标示 host-Uniq数据; Parse the PPPoED to obtain the access identification data carried by the PPPoED. The access identification data includes: the host identification host-Uniq data in the PPPoED;
根据所述接入标识数据,确定所述终端的拨号账号类型, 所述拨号账号类 根据所述拨号账号类型, 选择与所述拨号账号类型相匹配的出口网络通 道。 According to the access identification data, the dial-up account type of the terminal is determined, and the dial-up account type selects an egress network channel that matches the dial-up account type based on the dial-up account type.
3、 如权利要求 1所述的方法, 其特征在于, 所述通过所述出口网络通道, 将所述终端接入网络, 包括: 3. The method of claim 1, wherein said connecting the terminal to the network through the egress network channel includes:
通过所述出口网络通道, 向网络广播所述 PPPoED; Broadcast the PPPoED to the network through the egress network channel;
接收所述网络中的至少一个服务器返回的响应消息; Receive a response message returned by at least one server in the network;
根据所述响应消息, 从所述至少一个服务器中选择一个服务器作为接入服 务器; According to the response message, select one server from the at least one server as the access server;
通过选择的所述接入服务器, 将所述终端接入所述网络。 The terminal is accessed to the network through the selected access server.
4、 如权利要求 3所述的方法, 其特征在于, 所述通过选择的所述接入服 务器, 将所述终端接入所述网络之后, 还包括: 根据所述接入服务器分配的会话标识符,记录所述会话标识符与所述出口 网络通道的映射关系; 4. The method according to claim 3, characterized in that, after connecting the terminal to the network through the selected access server, it further includes: Record the mapping relationship between the session identifier and the egress network channel according to the session identifier assigned by the access server;
所述会话标识符包括: 所述接入服务器的 MAC地址或所述接入服务器生 成的唯一标识码。 The session identifier includes: the MAC address of the access server or a unique identification code generated by the access server.
5、 如权利要求 1所述的方法, 其特征在于, 还包括: 5. The method of claim 1, further comprising:
若所述 PPPoE报文的报文类型为 PPP, 则根据 PPP携带的会话标识符确 定接入服务器, 以及确定与所述会话标识符相映射的出口网络通道; If the message type of the PPPoE message is PPP, determine the access server based on the session identifier carried by PPP, and determine the egress network channel mapped to the session identifier;
通过所述出口网络通道, 将所述 PPPoE报文发送至所述接入服务器, 使 所述终端与所述接入服务器进行会话。 The PPPoE message is sent to the access server through the egress network channel, so that the terminal has a session with the access server.
6、如权利要求 6所述的方法,其特征在于,所述接收到终端发送的 PPPoE 报文时, 检测所述 PPPoE报文的报文类型之前, 还包括: 6. The method of claim 6, wherein when receiving the PPPoE message sent by the terminal, before detecting the message type of the PPPoE message, the method further includes:
创建至少一条用于将终端接入网络的出口网络通道。 Create at least one egress network channel for connecting the terminal to the network.
7、 一种网关, 其特征在于, 所述网关包括: 7. A gateway, characterized in that the gateway includes:
检测单元, 用于当接收到终端发送的 PPPoE报文时, 检测所述 PPPoE报 文的报文类型,所述报文类型包括发送阶段报文 PPPoED或会话阶段报文 PPP, 所述 PPPoED携带接入标识数据; The detection unit is configured to detect the message type of the PPPoE message when receiving the PPPoE message sent by the terminal. The message type includes the transmission phase message PPPoED or the session phase message PPP, and the PPPoED carries the Enter identification data;
匹配单元, 用于若所述 PPPoE报文的报文类型为 PPPoED, 则根据所述 Matching unit, used to if the message type of the PPPoE message is PPPoED, then according to the
PPPoED携带的接入标识数据获得与所述 PPPoE报文相匹配的出口网络通道; 接入单元, 用于通过所述出口网络通道, 将所述终端接入网络。 The access identification data carried by PPPoED obtains an egress network channel that matches the PPPoE message; an access unit is configured to access the terminal to the network through the egress network channel.
8、 如权利要求 7所述的网关, 其特征在于, 所述匹配单元包括: 解析子单元, 用于解析所述 PPPoED, 获得所述 PPPoED携带的接入标识 数据, 所述接入标识数据包括: PPPoED中的主机标示 host-Uniq数据; 8. The gateway according to claim 7, wherein the matching unit includes: a parsing subunit, configured to parse the PPPoED and obtain the access identification data carried by the PPPoED, and the access identification data includes : The host in PPPoED indicates host-Uniq data;
第一确定子单元,用于根据所述接入标识数据,确定所述终端的拨号账号 类型, 所述拨号账号类型包括: 因特网 Internet拨号账号类型或交互式网络电 视 IPTV拨号账号类型; 第一选择子单元,用于根据所述拨号账号类型,选择与所述拨号账号类型 相匹配的出口网络通道。 The first determination subunit is used to determine the dial-up account type of the terminal according to the access identification data. The dial-up account type includes: Internet dial-up account type or interactive network television IPTV dial-up account type; The first selection subunit is used to select an egress network channel that matches the dial-up account type according to the dial-up account type.
9、 如权利要求 7所述的网关, 其特征在于, 所述接入单元包括: 广播子单元, 用于通过所述出口网络通道, 向网络广播所述 PPPoED; 接收子单元, 用于接收所述网络中的至少一个月良务器返回的响应消息; 第二选择子单元, 用于根据所述响应消息, 从所述至少一个服务器中选择 一个服务器作为接入服务器; 9. The gateway according to claim 7, characterized in that the access unit includes: a broadcast subunit, used to broadcast the PPPoED to the network through the egress network channel; a receiving subunit, used to receive all a response message returned by at least one server in the network; a second selection subunit, configured to select one server from the at least one server as the access server according to the response message;
接入子单元, 用于通过选择的所述接入服务器,将所述终端接入所述网络。 The access subunit is configured to access the terminal to the network through the selected access server.
10、 如权利要求 9所述的网关, 其特征在于, 所述接入单元还包括: 记录子单元, 用于根据所述接入服务器分配的会话标识符, 记录所述会话 标识符与所述出口网络通道的映射关系; 10. The gateway according to claim 9, wherein the access unit further includes: a recording subunit, configured to record the session identifier and the session identifier according to the session identifier assigned by the access server. Mapping relationship of egress network channels;
所述会话标识符包括: 所述接入服务器的 MAC地址; 或者, 所述接入服 务器生成的唯一标识码。 The session identifier includes: the MAC address of the access server; or a unique identification code generated by the access server.
11、 如权利要求 7所述的网关, 其特征在于, 所述网关还包括: 11. The gateway according to claim 7, characterized in that, the gateway further includes:
确定单元, 用于当所述 PPPoE报文的报文类型为 PPP时, 则根据 PPP携 带的会话标识符确定接入服务器,以及确定与所述会话标识符相映射的出口网 络通道; A determining unit configured to determine the access server based on the session identifier carried by PPP when the message type of the PPPoE message is PPP, and determine the egress network channel mapped to the session identifier;
发送单元, 用于通过所述出口网络通道, 将所述 PPPoE · ^艮文发送至所述 接入服务器, 使所述终端与所述接入服务器进行会话。 A sending unit, configured to send the PPPoE message to the access server through the egress network channel, so that the terminal can conduct a session with the access server.
12、 如权利要求 11所述的网关, 其特征在于, 所述接网关还包括: 创建单元, 用于创建至少一条用于将终端接入网络的出口网络通道。 12. The gateway according to claim 11, wherein the access gateway further includes: a creation unit, configured to create at least one egress network channel for connecting the terminal to the network.
13、 一种网络接入的系统, 其特征在于, 所述系统包括: 终端和服务器以 及如权利要求 7-12所述的网关。 13. A network access system, characterized in that the system includes: a terminal and a server, and a gateway as claimed in claims 7-12.
PCT/CN2013/077488 2013-03-29 2013-06-19 Network access method, gateway and system WO2014153860A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310110069.5 2013-03-29
CN201310110069.5A CN103220276B (en) 2013-03-29 2013-03-29 A kind of method of network insertion, gateway and system

Publications (1)

Publication Number Publication Date
WO2014153860A1 true WO2014153860A1 (en) 2014-10-02

Family

ID=48817741

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/077488 WO2014153860A1 (en) 2013-03-29 2013-06-19 Network access method, gateway and system

Country Status (2)

Country Link
CN (1) CN103220276B (en)
WO (1) WO2014153860A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103618736A (en) * 2013-12-09 2014-03-05 成都达信通通讯设备有限公司 Safety application system for mobile terminal to automatically switch between different channel networking interfaces
US9294341B2 (en) * 2013-12-13 2016-03-22 International Business Machines Corporation Multipath fiber channel over ethernet networks
CN104767712A (en) * 2014-01-03 2015-07-08 中国银联股份有限公司 Equipment for safety information interaction and safety browser
CN105100955A (en) * 2014-05-16 2015-11-25 中兴通讯股份有限公司 Set top box switching network method and device, and set top box provided with device
CN105791019A (en) * 2016-03-16 2016-07-20 烽火通信科技股份有限公司 A method for realizing simultaneous support of wired and wireless network applications in an intelligent set top box
CN110381361A (en) * 2018-04-12 2019-10-25 华为技术有限公司 A kind of method for processing business and relevant device
CN114006759B (en) * 2021-10-29 2023-08-15 中国联合网络通信集团有限公司 Network access method, network connection device, and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050195751A1 (en) * 2004-03-02 2005-09-08 Sbc Knowledge Ventures, L.P. System and method for identifying devices using a point to point protocol
CN1750483A (en) * 2004-09-15 2006-03-22 中兴通讯股份有限公司 Method for point-to-point protocol service detection of wide band cut-in server
CN102136977A (en) * 2011-02-28 2011-07-27 中兴通讯股份有限公司 Dialing equipment and method for realizing virtual dialing according to user needs

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605040B (en) * 2008-06-12 2012-10-10 中兴通讯股份有限公司 Multicast control method under single-port and multi-user access mode and device
CN101902623B (en) * 2009-05-26 2014-06-25 上海贝尔股份有限公司 Method and device for transmitting network video service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050195751A1 (en) * 2004-03-02 2005-09-08 Sbc Knowledge Ventures, L.P. System and method for identifying devices using a point to point protocol
CN1750483A (en) * 2004-09-15 2006-03-22 中兴通讯股份有限公司 Method for point-to-point protocol service detection of wide band cut-in server
CN102136977A (en) * 2011-02-28 2011-07-27 中兴通讯股份有限公司 Dialing equipment and method for realizing virtual dialing according to user needs

Also Published As

Publication number Publication date
CN103220276A (en) 2013-07-24
CN103220276B (en) 2016-09-28

Similar Documents

Publication Publication Date Title
WO2014153860A1 (en) Network access method, gateway and system
US8908687B2 (en) Method for transmitting policy information between network equipment
KR101063080B1 (en) How to provide Ethernet DSL access multiplexer and dynamic service selection and end-user configuration
US6891825B1 (en) Method and system of providing multi-user access to a packet switched network
JP5674934B2 (en) Method and device for automatically switching networks, wireless access device and intermediate device
JP2019526983A (en) Separation of control plane function and transfer plane function of broadband remote access server
CN102025792B (en) Router and IP address setting method thereof
WO2009021458A1 (en) Method, apparatus and system for connecting layer2 network and layer3 network
WO2009067871A1 (en) Method, system and device for user access security control
WO2006122502A1 (en) A transmission method for message in layer 2 and an access device
US20060274766A1 (en) Smart intermediate authentication management (SIAM) system and method for multiple permanent virtual circuit (PVC) access environment
WO2007141840A1 (en) Relay network system and terminal adapter
JP2007536851A (en) Session-based packet switching equipment
WO2006007793A1 (en) A method and apparatus supporting a pppoa terminal accessing
WO2008106881A1 (en) A ppp access method, corresponding system and access node device
WO2007000120A1 (en) An authentication access system, method and server
WO2012130142A1 (en) Method, system, and access device for user service access
EP2525531B1 (en) Method and network access device for enabling data forwarding between different physical media
JP2003258935A (en) Network system
WO2007112691A1 (en) System, method and network device for vpn customer to access public network
WO2008058477A1 (en) Location information management method, apparatus and system
WO2012034413A1 (en) Method for dual stack user management and broadband access server
US7228358B1 (en) Methods, apparatus and data structures for imposing a policy or policies on the selection of a line by a number of terminals in a network
WO2008151548A1 (en) A method and apparatus for preventing the counterfeiting of the network-side media access control (mac) address
CN101686183B (en) Method, device and system for controlling packet voice service transmission

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13879813

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24/02/2016)

122 Ep: pct application non-entry in european phase

Ref document number: 13879813

Country of ref document: EP

Kind code of ref document: A1