WO2016070725A1 - Method and device for realizing vlan n:1 conversion on dhcp broadcast interaction packet - Google Patents

Method and device for realizing vlan n:1 conversion on dhcp broadcast interaction packet Download PDF

Info

Publication number
WO2016070725A1
WO2016070725A1 PCT/CN2015/092755 CN2015092755W WO2016070725A1 WO 2016070725 A1 WO2016070725 A1 WO 2016070725A1 CN 2015092755 W CN2015092755 W CN 2015092755W WO 2016070725 A1 WO2016070725 A1 WO 2016070725A1
Authority
WO
WIPO (PCT)
Prior art keywords
vlan
source
conversion
packet
dhcp
Prior art date
Application number
PCT/CN2015/092755
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 WO2016070725A1 publication Critical patent/WO2016070725A1/en

Links

Images

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for implementing VLAN N:1 conversion of DHCP broadcast interactive messages.
  • a virtual local area network is a method of dividing a physical network into a logical (virtual) local area network.
  • VLAN virtual local area network
  • ITV Internet audiovisual services
  • N:1 conversion also known as Nto1 conversion
  • the N:1 conversion refers to mapping data in one VLAN to another VLAN.
  • the related Layer 2 switch chip cannot basically implement N:1 conversion of broadcast packets. Even if there are a few broadcast floodings that can be implemented by flooding on the basis of unicast N:1 conversion, for dynamic address resolution.
  • the protocol of the Dynamic Host Configuration Protocol (DHCP) is not applicable. Because the Layer 2 switch chip performs N:1 conversion through a combination of Media Access Control (MAC) and VLAN, the secondary switch chip cannot obtain the source MAC address of the uplink broadcast packet. Therefore, The downlink broadcast packet does not have enough information to determine which upstream VLAN is coming from.
  • MAC Media Access Control
  • the VLAN conversion can only be performed according to the configured N:1 conversion entry, that is, the packet is copied N times, and the downlink conversion of all the conversion entries is completed.
  • the implementation of the DHCP class has a security risk for the first-come, first-served protocol interaction.
  • the number of packets is proportional to the number of conversion entries. In the case of a large number of packets, the network load is likely to be aggravated.
  • the main purpose of the embodiment of the present invention is to provide a method and device for implementing VLAN N:1 conversion of a DHCP broadcast interactive message, which is used to solve the problem that the Layer 2 switch chip cannot complete the VLAN N:1 conversion of the DHCP broadcast interactive message.
  • the embodiment of the present invention provides a method for implementing a VLAN N:1 conversion of a DHCP broadcast interactive message, including: generating a VLAN conversion table, where the mapping relationship between the source MAC address, the source VLAN, and the upper VLAN is recorded in the VLAN translation table. According to the above VLAN translation table, VLAN N:1 conversion is performed on the received DHCP broadcast exchange message.
  • the method further includes: obtaining, by using a pre-configured Layer 2 switch chip, a source MAC address and a source VLAN of the user terminal required to generate the VLAN conversion table.
  • the source MAC address and the source VLAN required to generate the VLAN switch table are obtained by using a pre-configured Layer 2 switch chip, including: configuring a packet extraction rule for the Layer 2 switch chip in advance; and receiving the Layer 2 switch chip according to the foregoing
  • the uplink DHCP broadcast exchange message sent by the user terminal extracted by the packet extraction rule is obtained.
  • the source MAC address and the source VLAN of the user terminal are obtained based on the uplink DHCP broadcast exchange message sent for the first time.
  • the method further includes: pre-configuring the VLAN corresponding information; wherein the VLAN corresponding information records the correspondence relationship between the source VLAN and the upper VLAN; and generating the VLAN conversion table, including: after obtaining the source MAC address and the source VLAN of the user terminal And storing the source MAC address, the source VLAN, and an upper VLAN corresponding to the source VLAN to form a VLAN conversion table.
  • the VLAN N:1 conversion is performed on the received DHCP broadcast exchange packet according to the foregoing VLAN translation table, including: according to the source MAC address and the source VLAN included in the received uplink DHCP broadcast interaction packet, in the foregoing VLAN
  • the mapping table searches for the corresponding upper VLAN, and converts the source VLAN in the uplink DHCP broadcast exchange packet into a corresponding upper VLAN; according to the source MAC address and the upper VLAN included in the received downlink DHCP broadcast exchange packet, The source VLAN is searched for in the VLAN translation table, and the upper VLAN in the downlink DHCP broadcast exchange packet is converted into a corresponding source VLAN.
  • the method further includes: after the VLAN conversion table is generated, the VLAN corresponding information is sent to the layer 2 switch chip, and the layer 2 switch chip directly performs the received uplink DHCP broadcast exchange message to perform VLAN N:1 conversion.
  • the method further includes: receiving a DHCP response packet extracted by the layer 2 switch chip according to the packet extraction rule; obtaining a source IP address corresponding to the source MAC address based on the DHCP response packet; and adding the VLAN translation table Source IP address corresponding to the source MAC address.
  • the method further includes: receiving an address resolution protocol ARP broadcast request message extracted by the layer 2 switch chip according to the packet extraction rule; and according to the uplink VLAN and the source IP address included in the ARP broadcast request message, in the VLAN In the translation table, the corresponding source VLAN is searched, and the uplink VLAN in the ARP broadcast request packet is converted into the corresponding source VLAN.
  • the embodiment of the present invention further provides a device for implementing VLAN N:1 conversion of a DHCP broadcast interactive message, comprising: a configuration module, configured to generate a VLAN conversion table; wherein the source MAC address, the source VLAN, and the source VLAN are recorded in the VLAN conversion table. Corresponding relationship information of the upper VLAN; the conversion module is configured to perform VLAN N:1 conversion on the received DHCP broadcast interactive packet according to the foregoing VLAN translation table.
  • the device further includes an obtaining module configured to obtain a source MAC address and a source VLAN of the user terminal required to generate the VLAN conversion table by using a pre-configured Layer 2 switch chip.
  • the obtaining module is configured to: configure a packet extraction rule for the Layer 2 switch chip in advance; and receive an uplink DHCP broadcast interaction message that is sent by the user terminal according to the packet extraction rule for the first time; The uplink DHCP broadcast exchange message is sent to obtain the source MAC address and the source VLAN of the user terminal.
  • the configuration module is configured to: pre-configure VLAN corresponding information; wherein, the foregoing VLAN corresponding information Recording the mapping relationship between the source VLAN and the upper VLAN. After obtaining the source MAC address and the source VLAN of the user terminal, the source MAC address, the source VLAN, and the upper VLAN corresponding to the source VLAN are stored to form a VLAN switch. table.
  • the foregoing conversion module is configured to: in the foregoing VLAN translation table, search for a corresponding upper VLAN according to the source MAC address and the source VLAN included in the received uplink DHCP broadcast exchange message, and the uplink DHCP broadcast interaction packet
  • the source VLAN is converted into a corresponding upper VLAN; the source VLAN address and the upper VLAN included in the received downlink DHCP broadcast exchange message are searched for the corresponding source VLAN in the VLAN translation table, and the downlink DHCP broadcast interaction is reported.
  • the upper VLAN in the text is converted into the corresponding source VLAN.
  • the device further includes: a sending module, configured to send the VLAN corresponding information to the layer 2 switch chip after the VLAN conversion table is generated, and directly receive the received uplink DHCP broadcast by the layer 2 switch chip Interwork packets for VLAN N:1 conversion.
  • a sending module configured to send the VLAN corresponding information to the layer 2 switch chip after the VLAN conversion table is generated, and directly receive the received uplink DHCP broadcast by the layer 2 switch chip Interwork packets for VLAN N:1 conversion.
  • the configuration module is further configured to: receive the DHCP response message extracted by the layer 2 switch chip according to the packet extraction rule; obtain the source IP address corresponding to the source MAC address based on the DHCP response message; The source IP address corresponding to the source MAC address is added.
  • the conversion module is further configured to: receive an address resolution protocol ARP broadcast request message that is extracted by the layer 2 switch chip according to the packet extraction rule; and according to the uplink VLAN and the source IP address included in the ARP broadcast request message, In the VLAN conversion table, the source VLAN is searched for, and the uplink VLAN in the ARP broadcast request packet is converted into a corresponding source VLAN.
  • the source MAC address information in the DHCP broadcast exchange message is obtained by the processor, and a VLAN conversion table including the source MAC address, the source port, the source VLAN, and the upper VLAN correspondence information is generated, and the VLAN conversion table is used to perform DHCP.
  • Broadcast interactive packets are VLAN N:1.
  • the VLAN N:1 conversion of the DHCP broadcast interactive message is implemented by the processor, and the technology blank of the VLAN N:1 conversion of the DHCP broadcast interactive message cannot be implemented in the related art. Further, the present invention only needs to forward one copy of the uplink or downlink DHCP broadcast exchange message without copying, thereby effectively improving the VLAN N:1 conversion efficiency and reducing the network load.
  • FIG. 1 is a flowchart of a method for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the invention
  • FIG. 2 is a flowchart of generating a VLAN conversion table by a Layer 2 switch chip according to an embodiment of the invention
  • FIG. 3 is a specific flowchart of VLAN N:1 conversion and forwarding of a DHCP broadcast interactive message according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a step of VLAN N:1 conversion of an ARP broadcast request message according to an embodiment of the present invention
  • FIG. 5 is a structural diagram of a system for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the present invention
  • FIG. 6 is a structural diagram of an apparatus for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the invention.
  • the VLAN N:1 conversion (also referred to as VLAN Nto1 conversion) is to map the source VLAN of the user terminal included in the uplink packet to the upper VLAN.
  • the upper VLAN included in the downlink packet is mapped to the source VLAN of the user terminal.
  • the uplink packet is: a packet sent from the user side to the network side, that is, a packet that is sent from the user interface of the Layer 2 switch chip and sent from the network side interface of the Layer 2 switch chip;
  • the downlink packet is: A packet sent from the side to the user side, that is, a packet that is sent from the network side interface of the Layer 2 switch chip and sent from the user side interface of the Layer 2 switch chip.
  • the embodiment of the present invention provides a method and device for implementing the DHCP broadcast interactive message VLAN N:1 conversion.
  • the main idea of the present invention is to obtain the source MAC address information in the DHCP broadcast interactive message by using the processor, and generate the source MAC address, the source port, the source VLAN, and the upper VLAN.
  • the VLAN conversion table of the information; and the VLAN conversion table is used to perform VLAN N:1 conversion on the DHCP broadcast interactive message.
  • the VLAN N:1 conversion of the DHCP broadcast interactive packet is implemented by the processor, and the technology blank of the VLAN N:1 conversion of the DHCP broadcast interactive packet cannot be implemented in the related technology;
  • the uplink or downlink DHCP broadcast exchange packets need only be forwarded one copy, and no copying is required, which effectively improves the VLAN N:1 conversion efficiency and reduces the network load.
  • FIG. 1 is a flowchart of a method for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the invention.
  • Step S110 generating a VLAN conversion table.
  • the mapping information between the source MAC address, the source VLAN, and the upper VLAN is recorded in the VLAN translation table. Further, the VLAN translation table may also record information such as a source port and a source IP address.
  • the source MAC address refers to the MAC address of the user terminal, that is, the MAC address of the uplink packet.
  • the source VLAN is the initial VLAN of the upstream packet, that is, the VLAN before the transition of the upstream packet VLAN N:1.
  • the upper-layer VLAN is the VLAN of the downlink packet, that is, the VLAN of the upstream packet VLAN N:1.
  • the source port is the source port number that the upstream packet enters, that is, the destination port number corresponding to the downlink packet.
  • the source IP address refers to the Internet Protocol Address (IP address) of the user terminal.
  • IP address Internet Protocol Address
  • the source MAC address and the source VLAN of the user terminal required for generating the VLAN translation table can be obtained by collecting related information of the user terminal set in the network.
  • the generated VLAN can also be obtained through the pre-configured Layer 2 switch chip.
  • the source MAC address and source VLAN of the user terminal required for the conversion table are not limited thereto.
  • the corresponding information of the VLAN (or the conversion rule) is configured in advance, and the corresponding information of the VLAN includes the correspondence between the source VLAN and the upper VLAN.
  • the source MAC address, the source VLAN, and the upper VLAN corresponding to the source VLAN are correspondingly stored to form a VLAN conversion table, and the VLAN conversion table is configured. .
  • Step S120 Perform VLAN N:1 conversion on the received DHCP broadcast exchange message according to the VLAN translation table.
  • Performing the VLAN N:1 conversion specifically includes the following steps:
  • Step 1 Differentiate the direction of the DHCP broadcast interactive packet.
  • the type of the DHCP broadcast exchange packet includes the uplink DHCP broadcast exchange packet and the downlink DHCP broadcast interaction packet.
  • the uplink and downlink need to be distinguished after receiving.
  • Step 2 Parsing the DHCP broadcast interactive packet.
  • the source MAC address and the source VLAN are parsed in the uplink DHCP broadcast exchange packet.
  • the source MAC address and the upper VLAN are parsed in the downlink DHCP broadcast exchange packet.
  • Step 3 Implement VLANN:1 conversion between the source VLAN and the upper VLAN based on the parsed information and the VLAN translation table. Based on the two pieces of information parsed, the remaining information corresponding to the two pieces of information can be found in the VLAN conversion table. For example, the source MAC address and the source VLAN are parsed, and the corresponding upper VLAN is searched in the VLAN translation table.
  • Step 4 After the VLAN N:1 is converted, the DHCP broadcast interactive packet is sent out through the corresponding source port.
  • the uplink DHCP broadcast packet is sent out through the uplink port, and the downlink DHCP broadcast packet is sent out through the downlink port (source port).
  • the VLAN translation table may be used to query from which source port the converted DHCP broadcast interaction message should be sent.
  • FIG. 2 is a flowchart of generating a VLAN conversion table by a Layer 2 switch chip according to an embodiment of the invention.
  • Step S210 Configure a packet extraction rule for the Layer 2 switch chip in advance.
  • the Layer 2 switch chip is used to receive and forward packets.
  • the packet extraction rule includes, but is not limited to, the type of the target message, the condition that the target message is satisfied, and the destination that the extracted target message needs to be transmitted.
  • the type of the target packet includes, but is not limited to, a DHCP broadcast exchange message, an address resolution protocol (ARP) broadcast request message, and an DHCP response (Acknowledgement, ACK for short) message.
  • ARP address resolution protocol
  • ACK DHCP response
  • the conditions for the target packet are met, but are not limited to: when the VLAN translation table is generated, the uplink DHCP broadcast exchange message sent by the user terminal and the DHCP response message sent by the network side are extracted; after the VLAN conversion table is generated, the uplink DHCP is extracted. Broadcast interactive packets, downlink DHCP broadcast interactive packets, and ARP broadcast request packets.
  • the destination end to which the target message is transmitted is a processor.
  • the processor is the execution body of the S210-S240.
  • the processor sends the packet extraction rule to the Layer 2 switch chip, so that the packet extraction rule takes effect on the Layer 2 switch chip, and the packet extraction rule is executed by the Layer 2 switch chip.
  • Step S220 receiving a DHCP broadcast interactive message extracted by the layer 2 switch chip according to the packet extraction rule.
  • the Layer 2 switch chip in the process of receiving the message, carries out the packet according to the message extraction rule, and after extracting the destination message, transmits the target message to the processor.
  • the first uplink DHCP broadcast exchange message sent by the user terminal is extracted, and the VLAN conversion table is dynamically generated. Further, the VLAN before the uplink DHCP broadcast exchange packet is not converted needs to be consistent with the source VLAN to which the user terminal belongs.
  • Step S230 Obtain user terminal information such as a source MAC address, a source port number, and a source VLAN of the user terminal, based on the uplink DHCP broadcast exchange message sent by the user terminal.
  • Step S240 Store the obtained source MAC address, source port number, source VLAN, and upper VLAN corresponding to the source VLAN to form a VLAN conversion table.
  • the source VLAN is used as the index to query the VLAN corresponding information, that is, the upper VLAN corresponding to the source VLAN can be obtained.
  • the source port number of the user terminal is obtained in the uplink DHCP broadcast exchange message, so that the obtained source port number information can be added in the VLAN translation table, so that after the VLAN N:1 conversion is completed, the source port number and the source VLAN are used.
  • the validity check of the uplink DHCP broadcast interactive packet may be performed to confirm whether the actual length of the packet is the same as the length recorded in the packet, and whether the checksum is correct. Whether the direction of the message (upstream or downstream) conflicts with the actual one. If the actual length of the packet is the same as the record length, the checksum is correct, and the direction is correct, the packet is valid. For the legal packet, step S230 is performed. If the invalid packet is discarded, the user terminal that sends the packet is the second.
  • the DHCP broadcast interactive packet VLAN N:1 conversion and forwarding is implemented according to the generated VLAN translation table. As shown in FIG. 3, it is a specific flowchart of a DHCP broadcast interactive message VLAN N:1 conversion and forwarding according to an embodiment of the present invention.
  • Step S310 the Layer 2 switch chip extracts a DHCP broadcast interaction message according to the packet extraction rule.
  • Step S320 The Layer 2 switch chip reports the extracted DHCP broadcast interaction message to the processor.
  • Step S330 the processor performs validity check on the DHCP broadcast interaction packet.
  • the inter-packet message performs step S340; and the legal DHCP broadcast exchange message performs step S350.
  • the legality check is as described above and will not be described in detail here.
  • step S340 the processor discards the invalid DHCP broadcast interaction message and releases the corresponding resource.
  • Step S350 the processor determines the direction of the DHCP broadcast interactive message.
  • the uplink DHCP broadcast interactive message is executed in step S360, and the downlink DHCP broadcast interactive message is executed in step S380.
  • Step S360 The processor performs VLAN N:1 conversion on the uplink DHCP broadcast exchange message.
  • the source VLAN address and the source VLAN included in the received uplink DHCP broadcast exchange packet are searched for the corresponding upper VLAN in the VLAN translation table, and the source VLAN in the uplink DHCP broadcast exchange packet is converted into the corresponding upper VLAN.
  • step S370 the processor sends the uplink DHCP broadcast exchange message that completes the VLAN N:1 conversion to the uplink port of the layer 2 switch chip.
  • Step S380 The processor performs VLAN N:1 conversion on the downlink DHCP broadcast exchange message.
  • the source MAC address and the upper-layer VLAN included in the received downlink DHCP broadcast exchange packet are searched for the corresponding source VLAN in the VLAN translation table, and the upper-layer VLAN in the downlink DHCP broadcast exchange packet is converted into the corresponding source VLAN.
  • step S390 the processor sends the downlink DHCP broadcast exchange packet that completes the VLAN N:1 conversion to the downlink interface of the Layer 2 switch chip.
  • the corresponding source port number is searched in the VLAN translation table, and the downlink DHCP broadcast exchange packet of the VLAN N:1 conversion is completed to the source port.
  • the source port (the lower link) pointed to by the number is sent. And receiving, by the user terminal connected to the source port, the downlink DHCP broadcast exchange message after the VLAN N:1 conversion.
  • the VLAN corresponding information is sent to the Layer 2 switch chip, so that the VLAN corresponding information is valid on the Layer 2 switch chip, and the Layer 2 switch chip directly receives the message.
  • the upstream DHCP broadcast exchange packet is sent to VLAN N:1. Further, before the Layer 2 switch chip receives the packet, the rule of the source VLAN or the source VLAN can be sent to the Layer 2 switch chip. When an entry in the VLAN translation table is generated, a user is generated.
  • the mapping between the source VLAN, the source port, the source port, and the upper VLAN of the terminal After the mapping between the source VLAN, the source port, the source port, and the upper VLAN of the terminal, the mapping between the source VLAN and the upper VLAN included in the VLAN corresponding information is based on the mapping between the source VLAN and the upper VLAN.
  • the relationship is sent to the Layer 2 switch chip to replace the null rule that is valid in the Layer 2 switch chip or the source VLAN to the source VLAN. This mode can prevent the source of the uplink DHCP broadcast interactive packet from being sent for the first time. Before the MAC address, the DHCP broadcast exchange packet is forwarded by the Layer 2 switch chip.
  • the upper VLANs of the same source VLAN are the same as the upper VLANs. Therefore, if the mapping between the source VLAN and the upper VLAN is included in the VLAN corresponding information, the packets are transmitted according to the downlink DHCP broadcast.
  • the upper-layer VLAN included in the upper-layer VLAN cannot be used to determine the source VLAN of the upper-layer VLAN.
  • the VLAN N:1 conversion of the downstream DHCP broadcast packets is not directly performed by the Layer 2 switch chip.
  • the downlink DHCP broadcast packets are sent to the processor for VLAN. N:1 conversion.
  • the DHCP server sends an ARP broadcast request packet to the DHCP server.
  • the DHCP server sends an ARP broadcast request packet to check whether the user terminal is legal and whether the obtained IP address is in progress. use.
  • the embodiment of the present invention may further improve the VLAN translation table to implement the downlink ARP broadcast request message based on the improved VLAN translation table. VLAN N:1 conversion.
  • FIG. 4 is a flowchart of a procedure of VLAN N:1 conversion of an ARP broadcast request message according to an embodiment of the present invention.
  • Step S410 receiving a DHCP response message extracted by the layer 2 switch chip according to the packet extraction rule.
  • Step S420 Acquire a source IP address corresponding to the source MAC address based on the DHCP response message.
  • the source IP address is an address assigned to the user by the DHCP server through the DHCP protocol.
  • the processor receives the DHCP ACK packet sent by the DHCP server when receiving the downlink packet.
  • the yiaddr (your ip address field) of the DHCP protocol field in the DHCP ACK packet is parsed, and the IP address in the field is obtained.
  • Step S430 adding a source IP address corresponding to the source MAC in the VLAN translation table.
  • the source MAC address and the upper VLAN can be obtained in the DHCP response packet because the DHCP response packet is a unicast packet and is a downlink packet.
  • the obtained IP address can be saved under the entry corresponding to the source MAC address and the upper VLAN.
  • Step S440 receiving an ARP broadcast request message extracted by the layer 2 switch chip according to the packet extraction rule.
  • the ARP broadcast request packet is an ARP packet sent by the DHCP server to the user terminal.
  • the Layer 2 switch chip packets the ARP broadcast request received by the uplink port to the processor.
  • step S450 the obtained ARP broadcast request packet is parsed, and the source IP address and the upper VLAN included in the APR packet are obtained.
  • Step S460 Search for the corresponding source VLAN in the VLAN translation table according to the uplink VLAN and the source IP address included in the ARP broadcast request message. Further, in the VLAN translation table, the corresponding source port number is searched for.
  • Step S470 Convert the upper VLAN in the ARP broadcast request message to the corresponding source VLAN.
  • Step S480 the converted ARP broadcast request message is sent to the user terminal corresponding to the source VLAN. Further, the method is sent to a user terminal corresponding to the source VLAN and the source port number.
  • FIG. 5 a structural diagram of a system for implementing VLAN N:1 conversion of DHCP broadcast interactive messages is shown below, as shown in FIG. 5.
  • SrcMac Source MAC
  • CVLAN CVLAN
  • SVLAN SVLAN
  • SrcPort SrcPort
  • SrcIp SrcIp.
  • the system includes six user terminals (PC A1 to A3, PC B1 to B3), two home gateways (HG1 and HG2), one optical network unit (ONU), and an optical line terminal (Optical Line Terminal (OLT).
  • PC A1 to A3, PC B1 to B3 two home gateways
  • HG1 and HG2 two optical network unit
  • ONU optical network unit
  • ONT optical line terminal
  • PC A1 to A3 are connected to one end of HG1; PCs B1 to B3 are connected to one end of HG2; the other end of HG1 is connected to the A port of the ONU (the lower port); the other end of HG2 is connected to the B port of the ONU (the lower port); the upper port of the ONU is connected.
  • the Layer 2 switch chip in the ONU extracts the first broadcast of the DHCP broadcast exchange message and the received DHCP response message from the PCs A1 to A3 and PC B1 to B3.
  • the processor in the ONU parses the DHCP broadcast exchange message, obtains SrcMac, CVLAN, and SrcPort; parses the DHCP response message, and obtains SrcIp, SrcMac, and SVLAN. Fill in the obtained information in the VLAN conversion table according to the user terminal.
  • the SVLAN corresponding to the CVLAN is filled in the VLAN translation table according to the preset VLAN mapping information.
  • a VLAN conversion table that can be used is generated, as shown in the table in FIG.
  • the ONU After performing the VLAN N:1 conversion, the ONU receives the uplink DHCP broadcast exchange message from the PC, and the processor determines, in the VLAN translation table, the CVLAN and the SVLAN corresponding to the SrcMac in the uplink DHCP broadcast exchange message, and The CVLAN in the uplink DHCP broadcast exchange packet is converted into a corresponding SVLAN and sent to the OLT through the uplink port.
  • the processor After receiving the downlink DHCP broadcast exchange message from the Ethernet, the processor determines, in the VLAN translation table, the CVLAN corresponding to the SrcMac and the SVLAN in the downlink DHCP broadcast exchange message, and the SVLAN in the downlink DHCP broadcast exchange message.
  • the processor determines, in the VLAN translation table, the CVLAN corresponding to the SrcIP and the SVLAN in the downlink ARP broadcast request packet, and the SVLAN in the downlink ARP broadcast request packet. Convert to CVLAN and send it to the corresponding CVLAN through the corresponding SrcPort.
  • the embodiment of the invention further provides an apparatus for implementing VLAN N:1 conversion of a DHCP broadcast interactive message.
  • the device is the above processor.
  • FIG. 6 is a structural diagram of an apparatus for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the present invention.
  • the device includes:
  • the configuration module 610 is configured to generate a VLAN translation table, where the mapping information of the source MAC address, the source VLAN, and the upper VLAN is recorded in the VLAN translation table.
  • the conversion module 620 is configured to perform VLAN N:1 conversion on the received DHCP broadcast exchange message according to the VLAN translation table.
  • the apparatus further includes an obtaining module 630 configured to obtain, by using a pre-configured Layer 2 switch chip, a source MAC address and a source VLAN of the user terminal required to generate the VLAN translation table.
  • the obtaining module 630 is configured to: configure a packet extraction rule for the Layer 2 switch chip in advance; receive an uplink DHCP broadcast interaction message that is sent by the user terminal for the first time according to the packet extraction rule; and receive the uplink DHCP broadcast interaction based on the first transmission.
  • the packet obtains the source MAC address and source VLAN of the user terminal.
  • the configuration module 610 is configured to pre-configure the VLAN corresponding information.
  • the VLAN corresponding information records the correspondence between the source VLAN and the upper VLAN. After obtaining the source MAC address and the source VLAN of the user terminal, the source MAC address and the source are obtained. The VLAN and the upper VLAN corresponding to the source VLAN are stored correspondingly to form a VLAN translation table.
  • the conversion module 620 is configured to: according to the source MAC address and the source VLAN included in the received uplink DHCP broadcast exchange message, search for a corresponding upper VLAN in the VLAN translation table, and convert the source VLAN in the uplink DHCP broadcast exchange message. And corresponding to the upper-layer VLAN; according to the source MAC address and the upper-layer VLAN included in the received downlink DHCP broadcast exchange message, the corresponding source VLAN is searched in the VLAN translation table, and the upper-layer VLAN in the downlink DHCP broadcast exchange message is converted. Become the corresponding source VLAN.
  • the device further includes a sending module 640, configured to send the VLAN corresponding information to the Layer 2 switching chip after the VLAN conversion table is generated, and directly receive the received uplink DHCP broadcast by the Layer 2 switching chip. Interwork packets for VLAN N:1 conversion.
  • the configuration module 610 is further configured to: receive a DHCP response message extracted by the layer 2 switch chip according to the packet extraction rule; obtain a source IP address corresponding to the source MAC address based on the DHCP response message; Add the source IP address corresponding to the source MAC address in the table.
  • the conversion module 620 is further configured to: receive an address resolution protocol ARP broadcast request message extracted by the layer 2 switch chip according to the packet extraction rule; and in the VLAN conversion table according to the uplink VLAN and the source IP address included in the ARP broadcast request message, Find the source VLAN and translate the upstream VLAN in the ARP broadcast request packet to the corresponding source VLAN.
  • the source MAC address information in the DHCP broadcast interactive packet is obtained by the processor, and a VLAN conversion table including the source MAC address, the source port, the source VLAN, and the upper VLAN corresponding relationship information is generated, and the VLAN conversion table is used.
  • VLAN N:1 conversion for DHCP broadcast exchange packets Through the processor to achieve a wide range of DHCP The VLAN N:1 conversion of the broadcast packet is used to make up the technical blank of the VLAN N:1 conversion of the DHCP broadcast interactive packet. Further, the present invention only needs to forward one copy of the uplink or downlink DHCP broadcast exchange message without copying, thereby effectively improving the VLAN N:1 conversion efficiency and reducing the network load.

Landscapes

  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed are a method and device for realizing VLAN N:1 conversion on a DHCP broadcast interaction packet. The method comprises: generating a VLAN conversion table, wherein information about the correlations of a source MAC address, a source VLAN and an upper-layer VLAN are recorded in the VLAN conversion table; and according to the VLAN conversion table, conducting VLAN N:1 conversion on a received DHCP broadcast interaction packet. The present invention realizes the conducting of VLAN N:1 conversion on a DHCP broadcast interaction packet through a processor, thereby making up for the technical gap in the related art that a layer-2 switching chip cannot realize the conducting of VLAN N:1 conversion on the DHCP broadcast interaction packet. Furthermore, by means of the present invention, only one copy of an uplink or downlink DHCP broadcast interaction packet needs to be forwarded without being copied, thereby effectively improving the efficiency of VLAN N:1 conversion and reducing the network load.

Description

一种实现DHCP广播交互报文VLAN N:1转换的方法和装置Method and device for implementing DHCP broadcast interactive message VLAN N:1 conversion 技术领域Technical field
本发明涉及通信技术领域,特别是涉及一种实现DHCP广播交互报文VLAN N:1转换的方法和装置。The present invention relates to the field of communications technologies, and in particular, to a method and apparatus for implementing VLAN N:1 conversion of DHCP broadcast interactive messages.
背景技术Background technique
虚拟局域网(Virtural LAN,简称VLAN)是一种将物理网络划分成逻辑(虚拟)局域网的方法。目前,为了满足日益复杂的组网要求,在现场组网中往往需要利用VLAN来划分不同的服务和不同的局域网,比如上网业务和宽带互联网视听业务(Interactive Television,简称ITV)需要使用不同的VLAN。为了使不同的VLAN最终能够享受相同的服务并且相互不会影响,那么就需要引入VLAN转换的技术。而在VLAN转换中,N:1转换(又称Nto1转换)的实现方式最为复杂,N:1转换是指将一个VLAN中的数据映射到另一VLAN。A virtual local area network (VLAN) is a method of dividing a physical network into a logical (virtual) local area network. At present, in order to meet the increasingly complex networking requirements, it is often necessary to use VLANs to divide different services and different local area networks in the field networking. For example, Internet services and broadband Internet audiovisual services (ITV) need to use different VLANs. . In order to enable different VLANs to eventually enjoy the same service and not affect each other, it is necessary to introduce a VLAN conversion technology. In VLAN conversion, the N:1 conversion (also known as Nto1 conversion) is the most complicated implementation. The N:1 conversion refers to mapping data in one VLAN to another VLAN.
在N:1转换中以广播/组播报文交互最为困难。相关的二层交换芯片,基本无法实现广播报文的N:1转换,即使有少数能够在单播N:1转换的基础上通过洪泛方式实现的广播洪泛的,但是,对于动态地址解析协议(Dynamic Host Configuration Protocol,简称DHCP)类的报文并不适用。因为,二层交换芯片是通过媒体访问控制(Media Access Control,简称MAC)和VLAN相结合的方式来进行N:1转换,二次交换芯片无法获得上行广播报文的源MAC地址,因此,对于下行广播报文没有足够的信息来确定来自于哪个上行VLAN,所以只能根据配置的N:1转换条目进行VLAN转换,即将报文复制N份,并完成所有转换条目的下行转换,而这种实现方式对于DHCP类的先到先得的协议交互存在安全隐患,并且由于报文复制的数量与转换条目的数量成正比,在报文数量较多的情况下,容易造成网络负担加重的问题。It is most difficult to interact with broadcast/multicast messages in N:1 conversion. The related Layer 2 switch chip cannot basically implement N:1 conversion of broadcast packets. Even if there are a few broadcast floodings that can be implemented by flooding on the basis of unicast N:1 conversion, for dynamic address resolution. The protocol of the Dynamic Host Configuration Protocol (DHCP) is not applicable. Because the Layer 2 switch chip performs N:1 conversion through a combination of Media Access Control (MAC) and VLAN, the secondary switch chip cannot obtain the source MAC address of the uplink broadcast packet. Therefore, The downlink broadcast packet does not have enough information to determine which upstream VLAN is coming from. Therefore, the VLAN conversion can only be performed according to the configured N:1 conversion entry, that is, the packet is copied N times, and the downlink conversion of all the conversion entries is completed. The implementation of the DHCP class has a security risk for the first-come, first-served protocol interaction. The number of packets is proportional to the number of conversion entries. In the case of a large number of packets, the network load is likely to be aggravated.
发明内容Summary of the invention
本发明实施例的主要目的在于提供一种实现DHCP广播交互报文VLAN N:1转换的方法和装置,用以解决二层交换芯片无法完成DHCP广播交互报文VLAN N:1转换的问题。The main purpose of the embodiment of the present invention is to provide a method and device for implementing VLAN N:1 conversion of a DHCP broadcast interactive message, which is used to solve the problem that the Layer 2 switch chip cannot complete the VLAN N:1 conversion of the DHCP broadcast interactive message.
基于上述技术问题,本发明实施例是通过以下技术方案来解决的。Based on the above technical problem, the embodiment of the present invention is solved by the following technical solutions.
本发明实施例提供了一种实现DHCP广播交互报文VLAN N:1转换的方法,包括:生成VLAN转换表;其中,上述VLAN转换表中记录源MAC地址、源VLAN和上层VLAN的对应关系信息;根据上述VLAN转换表,对接收到的DHCP广播交互报文,进行VLAN N:1转换。The embodiment of the present invention provides a method for implementing a VLAN N:1 conversion of a DHCP broadcast interactive message, including: generating a VLAN conversion table, where the mapping relationship between the source MAC address, the source VLAN, and the upper VLAN is recorded in the VLAN translation table. According to the above VLAN translation table, VLAN N:1 conversion is performed on the received DHCP broadcast exchange message.
其中,上述方法还包括:通过预先配置的二层交换芯片,获得生成上述VLAN转换表所需的用户终端的源MAC地址和源VLAN。 The method further includes: obtaining, by using a pre-configured Layer 2 switch chip, a source MAC address and a source VLAN of the user terminal required to generate the VLAN conversion table.
其中,通过预先配置的二层交换芯片,获得生成上述VLAN转换表所需的源MAC地址和源VLAN,包括:预先为上述二层交换芯片配置报文提取规则;收上述二层交换芯片根据上述报文提取规则提取的用户终端首次发送的上行DHCP广播交互报文;基于上述首次发送的上行DHCP广播交互报文,获取上述用户终端的源MAC地址和源VLAN。The source MAC address and the source VLAN required to generate the VLAN switch table are obtained by using a pre-configured Layer 2 switch chip, including: configuring a packet extraction rule for the Layer 2 switch chip in advance; and receiving the Layer 2 switch chip according to the foregoing The uplink DHCP broadcast exchange message sent by the user terminal extracted by the packet extraction rule is obtained. The source MAC address and the source VLAN of the user terminal are obtained based on the uplink DHCP broadcast exchange message sent for the first time.
其中,上述方法还包括:预先配置VLAN对应信息;其中,上述VLAN对应信息记录了源VLAN和上层VLAN的对应关系信息;生成VLAN转换表,包括:在获得用户终端的源MAC地址和源VLAN后,将上述源MAC地址、上述源VLAN、以及与上述源VLAN对应的上层VLAN对应存储,形成VLAN转换表。The method further includes: pre-configuring the VLAN corresponding information; wherein the VLAN corresponding information records the correspondence relationship between the source VLAN and the upper VLAN; and generating the VLAN conversion table, including: after obtaining the source MAC address and the source VLAN of the user terminal And storing the source MAC address, the source VLAN, and an upper VLAN corresponding to the source VLAN to form a VLAN conversion table.
其中,根据上述VLAN转换表,对接收到的DHCP广播交互报文,进行VLAN N:1转换,包括:根据接收到的上行DHCP广播交互报文中包含的源MAC地址和源VLAN,在上述VLAN转换表中查找对应的上层VLAN,并将上述上行DHCP广播交互报文中的源VLAN转换成对应的上层VLAN;根据接收到的下行DHCP广播交互报文中包含的源MAC地址和上层VLAN,在上述VLAN转换表中查找对应的源VLAN,并将上述下行DHCP广播交互报文中的上层VLAN转换成对应的源VLAN。The VLAN N:1 conversion is performed on the received DHCP broadcast exchange packet according to the foregoing VLAN translation table, including: according to the source MAC address and the source VLAN included in the received uplink DHCP broadcast interaction packet, in the foregoing VLAN The mapping table searches for the corresponding upper VLAN, and converts the source VLAN in the uplink DHCP broadcast exchange packet into a corresponding upper VLAN; according to the source MAC address and the upper VLAN included in the received downlink DHCP broadcast exchange packet, The source VLAN is searched for in the VLAN translation table, and the upper VLAN in the downlink DHCP broadcast exchange packet is converted into a corresponding source VLAN.
其中,上述方法还包括:在上述VLAN转换表生成后,将上述VLAN对应信息下发至上述二层交换芯片,由上述二层交换芯片,直接对接收到的上行DHCP广播交互报文,进行VLAN N:1转换。The method further includes: after the VLAN conversion table is generated, the VLAN corresponding information is sent to the layer 2 switch chip, and the layer 2 switch chip directly performs the received uplink DHCP broadcast exchange message to perform VLAN N:1 conversion.
其中,上述方法还包括:接收上述二层交换芯片根据上述报文提取规则提取的DHCP应答报文;基于上述DHCP应答报文,获取源MAC地址对应的源IP地址;在上述VLAN转换表中增加上述源MAC对应的源IP地址。The method further includes: receiving a DHCP response packet extracted by the layer 2 switch chip according to the packet extraction rule; obtaining a source IP address corresponding to the source MAC address based on the DHCP response packet; and adding the VLAN translation table Source IP address corresponding to the source MAC address.
其中,上述方法还包括:接收上述二层交换芯片根据上述报文提取规则提取的地址解析协议ARP广播请求报文;根据上述ARP广播请求报文中包含的上行VLAN、源IP地址,在上述VLAN转换表中,查找对应的源VLAN,并将上述ARP广播请求报文中的上行VLAN转换为对应的源VLAN。The method further includes: receiving an address resolution protocol ARP broadcast request message extracted by the layer 2 switch chip according to the packet extraction rule; and according to the uplink VLAN and the source IP address included in the ARP broadcast request message, in the VLAN In the translation table, the corresponding source VLAN is searched, and the uplink VLAN in the ARP broadcast request packet is converted into the corresponding source VLAN.
本发明实施例还提供了一种实现DHCP广播交互报文VLAN N:1转换的装置,包括:配置模块,设置为生成VLAN转换表;其中,上述VLAN转换表中记录源MAC地址、源VLAN和上层VLAN的对应关系信息;转换模块,设置为根据上述VLAN转换表,对接收到的DHCP广播交互报文,进行VLAN N:1转换。The embodiment of the present invention further provides a device for implementing VLAN N:1 conversion of a DHCP broadcast interactive message, comprising: a configuration module, configured to generate a VLAN conversion table; wherein the source MAC address, the source VLAN, and the source VLAN are recorded in the VLAN conversion table. Corresponding relationship information of the upper VLAN; the conversion module is configured to perform VLAN N:1 conversion on the received DHCP broadcast interactive packet according to the foregoing VLAN translation table.
其中,上述装置还包括获取模块,设置为通过预先配置的二层交换芯片,获得生成上述VLAN转换表所需的用户终端的源MAC地址和源VLAN。The device further includes an obtaining module configured to obtain a source MAC address and a source VLAN of the user terminal required to generate the VLAN conversion table by using a pre-configured Layer 2 switch chip.
其中,上述获取模块设置为:预先为上述二层交换芯片配置报文提取规则;接收上述二层交换芯片根据上述报文提取规则提取的用户终端首次发送的上行DHCP广播交互报文;基于上述首次发送的上行DHCP广播交互报文,获取上述用户终端的源MAC地址和源VLAN。The obtaining module is configured to: configure a packet extraction rule for the Layer 2 switch chip in advance; and receive an uplink DHCP broadcast interaction message that is sent by the user terminal according to the packet extraction rule for the first time; The uplink DHCP broadcast exchange message is sent to obtain the source MAC address and the source VLAN of the user terminal.
其中,上述配置模块,设置为:预先配置VLAN对应信息;其中,上述VLAN对应信息 记录了源VLAN和上层VLAN的对应关系信息;在获得用户终端的源MAC地址和源VLAN后,将上述源MAC地址、上述源VLAN、以及与上述源VLAN对应的上层VLAN对应存储,形成VLAN转换表。The configuration module is configured to: pre-configure VLAN corresponding information; wherein, the foregoing VLAN corresponding information Recording the mapping relationship between the source VLAN and the upper VLAN. After obtaining the source MAC address and the source VLAN of the user terminal, the source MAC address, the source VLAN, and the upper VLAN corresponding to the source VLAN are stored to form a VLAN switch. table.
其中,上述转换模块设置为:根据接收到的上行DHCP广播交互报文中包含的源MAC地址和源VLAN,在上述VLAN转换表中查找对应的上层VLAN,并将上述上行DHCP广播交互报文中的源VLAN转换成对应的上层VLAN;根据接收到的下行DHCP广播交互报文中包含的源MAC地址和上层VLAN,在上述VLAN转换表中查找对应的源VLAN,并将上述下行DHCP广播交互报文中的上层VLAN转换成对应的源VLAN。The foregoing conversion module is configured to: in the foregoing VLAN translation table, search for a corresponding upper VLAN according to the source MAC address and the source VLAN included in the received uplink DHCP broadcast exchange message, and the uplink DHCP broadcast interaction packet The source VLAN is converted into a corresponding upper VLAN; the source VLAN address and the upper VLAN included in the received downlink DHCP broadcast exchange message are searched for the corresponding source VLAN in the VLAN translation table, and the downlink DHCP broadcast interaction is reported. The upper VLAN in the text is converted into the corresponding source VLAN.
其中,上述装置还包括:下发模块,设置为在上述VLAN转换表生成后,将上述VLAN对应信息下发至上述二层交换芯片,由上述二层交换芯片,直接对接收到的上行DHCP广播交互报文,进行VLAN N:1转换。The device further includes: a sending module, configured to send the VLAN corresponding information to the layer 2 switch chip after the VLAN conversion table is generated, and directly receive the received uplink DHCP broadcast by the layer 2 switch chip Interwork packets for VLAN N:1 conversion.
其中,上述配置模块还设置为:接收上述二层交换芯片根据上述报文提取规则提取的DHCP应答报文;基于上述DHCP应答报文,获取源MAC地址对应的源IP地址;在上述VLAN转换表中增加上述源MAC对应的源IP地址。The configuration module is further configured to: receive the DHCP response message extracted by the layer 2 switch chip according to the packet extraction rule; obtain the source IP address corresponding to the source MAC address based on the DHCP response message; The source IP address corresponding to the source MAC address is added.
其中,上述转换模块还设置为:接收上述二层交换芯片根据上述报文提取规则提取的地址解析协议ARP广播请求报文;根据上述ARP广播请求报文中包含的上行VLAN、源IP地址,在上述VLAN转换表中,查找对应的源VLAN,并将上述ARP广播请求报文中的上行VLAN转换为对应的源VLAN。The conversion module is further configured to: receive an address resolution protocol ARP broadcast request message that is extracted by the layer 2 switch chip according to the packet extraction rule; and according to the uplink VLAN and the source IP address included in the ARP broadcast request message, In the VLAN conversion table, the source VLAN is searched for, and the uplink VLAN in the ARP broadcast request packet is converted into a corresponding source VLAN.
本发明实施例有益效果如下:The beneficial effects of the embodiments of the present invention are as follows:
本发明实施例通过处理器获取DHCP广播交互报文中的源MAC地址信息,生成包含源MAC地址、源端口、源VLAN和上层VLAN对应关系信息的VLAN转换表,利用该VLAN转换表,对DHCP广播交互报文进行VLAN N:1转换。In the embodiment of the present invention, the source MAC address information in the DHCP broadcast exchange message is obtained by the processor, and a VLAN conversion table including the source MAC address, the source port, the source VLAN, and the upper VLAN correspondence information is generated, and the VLAN conversion table is used to perform DHCP. Broadcast interactive packets are VLAN N:1.
本发明实施例通过处理器实现了对DHCP广播交互报文的VLAN N:1转换,弥补了相关技术中二层交换芯片无法实现DHCP广播交互报文VLAN N:1转换的技术空白。进一步地,通过本发明,对于上行或下行DHCP广播交互报文只需转发一份,无需进行复制,有效提高了VLAN N:1转换效率,降低了网络负荷。In the embodiment of the present invention, the VLAN N:1 conversion of the DHCP broadcast interactive message is implemented by the processor, and the technology blank of the VLAN N:1 conversion of the DHCP broadcast interactive message cannot be implemented in the related art. Further, the present invention only needs to forward one copy of the uplink or downlink DHCP broadcast exchange message without copying, thereby effectively improving the VLAN N:1 conversion efficiency and reducing the network load.
附图说明DRAWINGS
图1是根据本发明一实施例的实现DHCP广播交互报文VLAN N:1转换的方法的流程图;FIG. 1 is a flowchart of a method for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the invention;
图2是根据本发明一实施例的通过二层交换芯片生成VLAN转换表的流程图;2 is a flowchart of generating a VLAN conversion table by a Layer 2 switch chip according to an embodiment of the invention;
图3是根据本发明一实施例DHCP广播交互报文VLAN N:1转换和转发的具体流程图;FIG. 3 is a specific flowchart of VLAN N:1 conversion and forwarding of a DHCP broadcast interactive message according to an embodiment of the present invention; FIG.
图4是根据本发明一实施例的对ARP广播请求报文的VLAN N:1转换的步骤的流程图; 4 is a flowchart of a step of VLAN N:1 conversion of an ARP broadcast request message according to an embodiment of the present invention;
图5是根据本发明一实施例的实现DHCP广播交互报文VLAN N:1转换的系统的结构图;FIG. 5 is a structural diagram of a system for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the present invention; FIG.
图6是根据本发明一实施例的实现DHCP广播交互报文VLAN N:1转换的装置的结构图。FIG. 6 is a structural diagram of an apparatus for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the invention.
具体实施方式detailed description
VLAN N:1转换(又称VLAN Nto1转换)是指,将上行报文中包含的用户终端的源VLAN映射到上层VLAN;将下行报文中包含的上层VLAN映射到用户终端的源VLAN。进一步地,上行报文为:从用户侧发往网络侧的报文,即从二层交换芯片用户侧接口进入、从二层交换芯片网络侧接口发出的报文;下行报文为:从网络侧发往用户侧的报文,即从二层交换芯片网络侧接口进入、从二层交换芯片用户侧接口发出的报文。The VLAN N:1 conversion (also referred to as VLAN Nto1 conversion) is to map the source VLAN of the user terminal included in the uplink packet to the upper VLAN. The upper VLAN included in the downlink packet is mapped to the source VLAN of the user terminal. Further, the uplink packet is: a packet sent from the user side to the network side, that is, a packet that is sent from the user interface of the Layer 2 switch chip and sent from the network side interface of the Layer 2 switch chip; the downlink packet is: A packet sent from the side to the user side, that is, a packet that is sent from the network side interface of the Layer 2 switch chip and sent from the user side interface of the Layer 2 switch chip.
为了解决二层交换芯片无法完成DHCP广播交互报文VLAN N:1转换的问题,本发明实施例提供了一种实现DHCP广播交互报文VLAN N:1转换的方法和装置。In order to solve the problem that the Layer 2 switch chip cannot complete the VLAN N:1 conversion of the DHCP broadcast interactive message, the embodiment of the present invention provides a method and device for implementing the DHCP broadcast interactive message VLAN N:1 conversion.
本发明的主要思想在于,针对报文中的DHCP广播交互报文,通过处理器获取DHCP广播交互报文中的源MAC地址信息;生成包含源MAC地址、源端口、源VLAN和上层VLAN对应关系信息的VLAN转换表;以及,利用该VLAN转换表,对DHCP广播交互报文进行VLAN N:1转换。The main idea of the present invention is to obtain the source MAC address information in the DHCP broadcast interactive message by using the processor, and generate the source MAC address, the source port, the source VLAN, and the upper VLAN. The VLAN conversion table of the information; and the VLAN conversion table is used to perform VLAN N:1 conversion on the DHCP broadcast interactive message.
本发明实施例通过处理器实现了对DHCP广播交互报文的VLAN N:1转换,弥补了相关技术中二层交换芯片无法实现DHCP广播交互报文VLAN N:1转换的技术空白;而且,对于上行或下行DHCP广播交互报文只需转发一份,无需进行复制,有效提高了VLAN N:1转换效率,降低了网络负荷。In the embodiment of the present invention, the VLAN N:1 conversion of the DHCP broadcast interactive packet is implemented by the processor, and the technology blank of the VLAN N:1 conversion of the DHCP broadcast interactive packet cannot be implemented in the related technology; The uplink or downlink DHCP broadcast exchange packets need only be forwarded one copy, and no copying is required, which effectively improves the VLAN N:1 conversion efficiency and reduces the network load.
以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。The invention will be further described in detail below with reference to the drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
如图1所示,图1是根据本发明一实施例的实现DHCP广播交互报文VLAN N:1转换的方法的流程图。As shown in FIG. 1, FIG. 1 is a flowchart of a method for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the invention.
步骤S110,生成VLAN转换表。Step S110, generating a VLAN conversion table.
VLAN转换表中记录源MAC地址、源VLAN和上层VLAN的对应关系信息。进一步地,VLAN转换表中还可以记录源端口、源IP地址等信息。The mapping information between the source MAC address, the source VLAN, and the upper VLAN is recorded in the VLAN translation table. Further, the VLAN translation table may also record information such as a source port and a source IP address.
源MAC地址是指用户终端的MAC地址,即上行报文的MAC地址。源VLAN是指上行报文的初始VLAN,即上行报文VLAN N:1转换前的VLAN。上层VLAN是指下行报文的VLAN,即上行报文VLAN N:1转换后的VLAN。源端口是指上行报文进入的源端口号,也即下行报文对应的目的端口号。源IP地址是指用户终端的互联网协议地址(Internet Protocol Address,简称IP地址)。The source MAC address refers to the MAC address of the user terminal, that is, the MAC address of the uplink packet. The source VLAN is the initial VLAN of the upstream packet, that is, the VLAN before the transition of the upstream packet VLAN N:1. The upper-layer VLAN is the VLAN of the downlink packet, that is, the VLAN of the upstream packet VLAN N:1. The source port is the source port number that the upstream packet enters, that is, the destination port number corresponding to the downlink packet. The source IP address refers to the Internet Protocol Address (IP address) of the user terminal.
具体的,可以通过采集网络中设置的用户终端的相关信息,获得生成VLAN转换表所需的用户终端的源MAC地址和源VLAN;还可以通过预先配置的二层交换芯片,获得生成VLAN 转换表所需的用户终端的源MAC地址和源VLAN。本领域技术人员应当知道,获得用户终端信息的方式不限于此。Specifically, the source MAC address and the source VLAN of the user terminal required for generating the VLAN translation table can be obtained by collecting related information of the user terminal set in the network. The generated VLAN can also be obtained through the pre-configured Layer 2 switch chip. The source MAC address and source VLAN of the user terminal required for the conversion table. Those skilled in the art should know that the manner of obtaining user terminal information is not limited thereto.
预先配置VLAN对应信息(或者称为转换规则),VLAN对应信息包括:源VLAN和上层VLAN的对应关系信息。The corresponding information of the VLAN (or the conversion rule) is configured in advance, and the corresponding information of the VLAN includes the correspondence between the source VLAN and the upper VLAN.
在获得用户终端的源MAC地址和源VLAN后,将所述源MAC地址、所述源VLAN、以及与所述源VLAN对应的上层VLAN对应存储,形成VLAN转换表,实现对VLAN转换表的配置。After obtaining the source MAC address and the source VLAN of the user terminal, the source MAC address, the source VLAN, and the upper VLAN corresponding to the source VLAN are correspondingly stored to form a VLAN conversion table, and the VLAN conversion table is configured. .
步骤S120,根据所述VLAN转换表,对接收到的DHCP广播交互报文,进行VLAN N:1转换。Step S120: Perform VLAN N:1 conversion on the received DHCP broadcast exchange message according to the VLAN translation table.
进行VLAN N:1转换具体包括如下步骤:Performing the VLAN N:1 conversion specifically includes the following steps:
步骤1,对DHCP广播交互报文的方向进行区分。DHCP广播交互报文的类型包括上行DHCP广播交互报文和下行DHCP广播交互报文,上行、下行需要在接收后进行区分。Step 1: Differentiate the direction of the DHCP broadcast interactive packet. The type of the DHCP broadcast exchange packet includes the uplink DHCP broadcast exchange packet and the downlink DHCP broadcast interaction packet. The uplink and downlink need to be distinguished after receiving.
步骤2,对DHCP广播交互报文进行解析。在上行DHCP广播交互报文中,解析出源MAC地址和源VLAN;在下行DHCP广播交互报文中,解析出源MAC地址和上层VLAN。Step 2: Parsing the DHCP broadcast interactive packet. The source MAC address and the source VLAN are parsed in the uplink DHCP broadcast exchange packet. The source MAC address and the upper VLAN are parsed in the downlink DHCP broadcast exchange packet.
步骤3,基于解析出的信息和VLAN转换表,实现源VLAN和上层VLAN之间的VLANN:1转换。根据解析出的两个信息,可以在VLAN转换表中查找与该两个信息对应的、剩下的一个信息。例如:解析出源MAC地址和源VLAN,在VLAN转换表中查找对应的上层VLAN。Step 3: Implement VLANN:1 conversion between the source VLAN and the upper VLAN based on the parsed information and the VLAN translation table. Based on the two pieces of information parsed, the remaining information corresponding to the two pieces of information can be found in the VLAN conversion table. For example, the source MAC address and the source VLAN are parsed, and the corresponding upper VLAN is searched in the VLAN translation table.
步骤4,将完成VLAN N:1转换后DHCP广播交互报文,通过相应的源端口发送出去。将上行DHCP广播交互报文通过上联口发送出去,将下行DHCP广播交互报文通过下联口(源端口)发送出去。进一步地,在将源MAC地址、源VLAN对应的源端口号记录在VLAN转换表中后,可以在VLAN转换表中查询到转换后的DHCP广播交互报文应当从哪个源端口发送。Step 4: After the VLAN N:1 is converted, the DHCP broadcast interactive packet is sent out through the corresponding source port. The uplink DHCP broadcast packet is sent out through the uplink port, and the downlink DHCP broadcast packet is sent out through the downlink port (source port). Further, after the source port number corresponding to the source MAC address and the source VLAN is recorded in the VLAN translation table, the VLAN translation table may be used to query from which source port the converted DHCP broadcast interaction message should be sent.
下面针对通过二层交换芯片获得用户终端信息,并形成的VLAN转换表的过程进行具体说明。如图2所示,图2是根据本发明一实施例的通过二层交换芯片生成VLAN转换表的流程图。The following describes the process of obtaining the user terminal information through the layer 2 switch chip and forming the VLAN conversion table. As shown in FIG. 2, FIG. 2 is a flowchart of generating a VLAN conversion table by a Layer 2 switch chip according to an embodiment of the invention.
步骤S210,预先为二层交换芯片配置报文提取规则。Step S210: Configure a packet extraction rule for the Layer 2 switch chip in advance.
二层交换芯片用于接收、转发报文。The Layer 2 switch chip is used to receive and forward packets.
报文提取规则包括但不限于:目标报文的类型、目标报文满足的条件、提取出的目标报文需要传送的目的端等。The packet extraction rule includes, but is not limited to, the type of the target message, the condition that the target message is satisfied, and the destination that the extracted target message needs to be transmitted.
目标报文的类型包括但不限于:DHCP广播交互报文、地址解析协议(Address Resolution Protocol,简称ARP)广播请求报文、DHCP应答(Acknowledgement,简称ACK)报文。 The type of the target packet includes, but is not limited to, a DHCP broadcast exchange message, an address resolution protocol (ARP) broadcast request message, and an DHCP response (Acknowledgement, ACK for short) message.
目标报文满足的条件包括但不限于:在生成VLAN转换表时,提取用户终端首次发送的上行DHCP广播交互报文和网络侧发送的DHCP应答报文;在VLAN转换表生成后,提取上行DHCP广播交互报文、下行DHCP广播交互报文和ARP广播请求报文。The conditions for the target packet are met, but are not limited to: when the VLAN translation table is generated, the uplink DHCP broadcast exchange message sent by the user terminal and the DHCP response message sent by the network side are extracted; after the VLAN conversion table is generated, the uplink DHCP is extracted. Broadcast interactive packets, downlink DHCP broadcast interactive packets, and ARP broadcast request packets.
在本实施例中,目标报文被传送的目的端为处理器。处理器为S210-S240的执行主体。In this embodiment, the destination end to which the target message is transmitted is a processor. The processor is the execution body of the S210-S240.
处理器将报文提取规则下发到二层交换芯片,使该报文提取规则在二层交换芯片生效,由二层交换芯片执行该报文提取规则。The processor sends the packet extraction rule to the Layer 2 switch chip, so that the packet extraction rule takes effect on the Layer 2 switch chip, and the packet extraction rule is executed by the Layer 2 switch chip.
步骤S220,接收二层交换芯片根据报文提取规则提取的DHCP广播交互报文。Step S220, receiving a DHCP broadcast interactive message extracted by the layer 2 switch chip according to the packet extraction rule.
二层交换芯片在接收报文的过程中,按照报文提取规则提包,在提取到目的报文后,将目标报文传送至处理器。The Layer 2 switch chip, in the process of receiving the message, carries out the packet according to the message extraction rule, and after extracting the destination message, transmits the target message to the processor.
本实施例为了能够快速实现DHCP广播交互报文的VLAN N:1转换,提取用户终端发出的第一个上行DHCP广播交互报文,动态地生成VLAN转换表。进一步地,上行DHCP广播交互报文未转换前的VLAN需要和用户终端所属的源VLAN保持一致。In this embodiment, in order to quickly implement the VLAN N:1 conversion of the DHCP broadcast exchange message, the first uplink DHCP broadcast exchange message sent by the user terminal is extracted, and the VLAN conversion table is dynamically generated. Further, the VLAN before the uplink DHCP broadcast exchange packet is not converted needs to be consistent with the source VLAN to which the user terminal belongs.
步骤S230,基于用户终端首次发送的上行DHCP广播交互报文,获取该用户终端的源MAC地址、源端口号、源VLAN等用户终端信息。Step S230: Obtain user terminal information such as a source MAC address, a source port number, and a source VLAN of the user terminal, based on the uplink DHCP broadcast exchange message sent by the user terminal.
步骤S240,将获得的源MAC地址、源端口号、源VLAN、以及与该源VLAN对应的上层VLAN对应存储,形成VLAN转换表。Step S240: Store the obtained source MAC address, source port number, source VLAN, and upper VLAN corresponding to the source VLAN to form a VLAN conversion table.
以源VLAN为索引,查询VLAN对应信息,即可以得到源VLAN对应的上层VLAN。The source VLAN is used as the index to query the VLAN corresponding information, that is, the upper VLAN corresponding to the source VLAN can be obtained.
在上行DHCP广播交互报文中获得用户终端的源端口号,是为了可以在VLAN转换表中添加获得的源端口号信息,以便在完成VLAN N:1转换后,按照源端口号和源VLAN,发送下行DHCP广播交互报文。The source port number of the user terminal is obtained in the uplink DHCP broadcast exchange message, so that the obtained source port number information can be added in the VLAN translation table, so that after the VLAN N:1 conversion is completed, the source port number and the source VLAN are used. Sends a downlink DHCP broadcast exchange packet.
在一个实施例中,在步骤S220和S230之间,还可以对上行DHCP广播交互报文进行合法性校验,确认报文实际长度和报文中记录的长度是否相同、校验和是否正确、报文的方向(上行或下行)是否与实际有冲突。若报文实际长度与记录长度相同、校验和正确、方向无冲突,则报文合法,对于合法的报文执行步骤S230,不合法的报文丢弃,将发送该报文的用户终端第二次发送的上行DHCP广播交互报文作为第一次发送的上行DHCP广播交互报文。In an embodiment, between the steps S220 and S230, the validity check of the uplink DHCP broadcast interactive packet may be performed to confirm whether the actual length of the packet is the same as the length recorded in the packet, and whether the checksum is correct. Whether the direction of the message (upstream or downstream) conflicts with the actual one. If the actual length of the packet is the same as the record length, the checksum is correct, and the direction is correct, the packet is valid. For the legal packet, step S230 is performed. If the invalid packet is discarded, the user terminal that sends the packet is the second. The uplink DHCP broadcast exchange packet sent as the first uplink DHCP broadcast interactive packet.
根据生成的VLAN转换表,实现DHCP广播交互报文VLAN N:1转换和转发。如图3所示,为根据本发明一实施例的DHCP广播交互报文VLAN N:1转换和转发的具体流程图。The DHCP broadcast interactive packet VLAN N:1 conversion and forwarding is implemented according to the generated VLAN translation table. As shown in FIG. 3, it is a specific flowchart of a DHCP broadcast interactive message VLAN N:1 conversion and forwarding according to an embodiment of the present invention.
步骤S310,二层交换芯片根据报文提取规则提取DHCP广播交互报文。Step S310, the Layer 2 switch chip extracts a DHCP broadcast interaction message according to the packet extraction rule.
步骤S320,二层交换芯片将提取的DHCP广播交互报文上报处理器。Step S320: The Layer 2 switch chip reports the extracted DHCP broadcast interaction message to the processor.
步骤S330,处理器对DHCP广播交互报文进行合法性校验。对于不合法的DHCP广播交 互报文执行步骤S340;对于合法的DHCP广播交互报文执行步骤S350。合法性校验如前述,在此不作具体描述。Step S330, the processor performs validity check on the DHCP broadcast interaction packet. For illegal DHCP broadcasts The inter-packet message performs step S340; and the legal DHCP broadcast exchange message performs step S350. The legality check is as described above and will not be described in detail here.
步骤S340,处理器丢弃不合法的DHCP广播交互报文,并释放相应资源。In step S340, the processor discards the invalid DHCP broadcast interaction message and releases the corresponding resource.
步骤S350,处理器判断DHCP广播交互报文的方向。上行DHCP广播交互报文执行步骤S360,下行DHCP广播交互报文执行步骤S380。Step S350, the processor determines the direction of the DHCP broadcast interactive message. The uplink DHCP broadcast interactive message is executed in step S360, and the downlink DHCP broadcast interactive message is executed in step S380.
步骤S360,处理器对上行DHCP广播交互报文进行VLAN N:1转换。Step S360: The processor performs VLAN N:1 conversion on the uplink DHCP broadcast exchange message.
根据接收到的上行DHCP广播交互报文中包含的源MAC地址和源VLAN,在VLAN转换表中查找对应的上层VLAN,并将上行DHCP广播交互报文中的源VLAN转换成对应的上层VLAN。The source VLAN address and the source VLAN included in the received uplink DHCP broadcast exchange packet are searched for the corresponding upper VLAN in the VLAN translation table, and the source VLAN in the uplink DHCP broadcast exchange packet is converted into the corresponding upper VLAN.
步骤S370,处理器将完成VLAN N:1转换的上行DHCP广播交互报文向二层交换芯片的上联口发送。In step S370, the processor sends the uplink DHCP broadcast exchange message that completes the VLAN N:1 conversion to the uplink port of the layer 2 switch chip.
步骤S380,处理器对下行DHCP广播交互报文进行VLAN N:1转换。Step S380: The processor performs VLAN N:1 conversion on the downlink DHCP broadcast exchange message.
根据接收到的下行DHCP广播交互报文中包含的源MAC地址和上层VLAN,在VLAN转换表中查找对应的源VLAN,并将下行DHCP广播交互报文中的上层VLAN转换成对应的源VLAN。The source MAC address and the upper-layer VLAN included in the received downlink DHCP broadcast exchange packet are searched for the corresponding source VLAN in the VLAN translation table, and the upper-layer VLAN in the downlink DHCP broadcast exchange packet is converted into the corresponding source VLAN.
步骤S390,处理器将完成VLAN N:1转换的下行DHCP广播交互报文向二层交换芯片的下联口发送。In step S390, the processor sends the downlink DHCP broadcast exchange packet that completes the VLAN N:1 conversion to the downlink interface of the Layer 2 switch chip.
根据接收到的下行DHCP广播交互报文中包含的源MAC地址和上层VLAN,在VLAN转换表中查找对应的源端口号,将完成VLAN N:1转换的下行DHCP广播交互报文向该源端口号指向的源端口(下联口)发送。进而由与该源端口相连接的、处于对应源VLAN的用户终端接收该VLAN N:1转换后的下行DHCP广播交互报文。According to the source MAC address and the upper-layer VLAN included in the received downlink DHCP broadcast exchange packet, the corresponding source port number is searched in the VLAN translation table, and the downlink DHCP broadcast exchange packet of the VLAN N:1 conversion is completed to the source port. The source port (the lower link) pointed to by the number is sent. And receiving, by the user terminal connected to the source port, the downlink DHCP broadcast exchange message after the VLAN N:1 conversion.
在一个实施例中,为了加快DHCP广播交互报文的转发效率,将VLAN对应信息下发至二层交换芯片,使该VLAN对应信息在二层交换芯片生效,由二层交换芯片,直接对接收到的上行DHCP广播交互报文,进行VLAN N:1转换。进一步地,在二层交换芯片接收报文之前,可以先将空规则、或者源VLAN到源VLAN的规则下发到二层交换芯片,当生成VLAN转换表中的一个条目后,即生成一个用户终端的源VLAN、源MAC、源端口、以及上层VLAN的对应关系后,根据该条目中包含的源VLAN和上层VLAN的对应关系,将VLAN对应信息中包含的相同的源VLAN和上层VLAN的对应关系下发到二层交换芯片,用来替换二层交换芯片中生效的空规则、或者源VLAN到源VLAN的规则,该方式可以避免在未获取首次发送的上行DHCP广播交互报文包含的源MAC地址之前,该DHCP广播交互报文就被二层交换芯片转发出去。In one embodiment, in order to speed up the forwarding efficiency of the DHCP broadcast exchange message, the VLAN corresponding information is sent to the Layer 2 switch chip, so that the VLAN corresponding information is valid on the Layer 2 switch chip, and the Layer 2 switch chip directly receives the message. The upstream DHCP broadcast exchange packet is sent to VLAN N:1. Further, before the Layer 2 switch chip receives the packet, the rule of the source VLAN or the source VLAN can be sent to the Layer 2 switch chip. When an entry in the VLAN translation table is generated, a user is generated. After the mapping between the source VLAN, the source port, the source port, and the upper VLAN of the terminal, the mapping between the source VLAN and the upper VLAN included in the VLAN corresponding information is based on the mapping between the source VLAN and the upper VLAN. The relationship is sent to the Layer 2 switch chip to replace the null rule that is valid in the Layer 2 switch chip or the source VLAN to the source VLAN. This mode can prevent the source of the uplink DHCP broadcast interactive packet from being sent for the first time. Before the MAC address, the DHCP broadcast exchange packet is forwarded by the Layer 2 switch chip.
一般而言,同一物理局域网中的多个源VLAN对应的上层VLAN都相同,因此,在VLAN对应信息中只包括源VLAN和上层VLAN对应关系的情况下,根据下行DHCP广播交互报文 中包括的上层VLAN,无法确定该上层VLAN对应的源VLAN,进而无法直接由二层交换芯片进行下行DHCP广播交互报文的VLAN N:1转换,下行DHCP广播交互报文交由处理器进行VLAN N:1转换。Generally, the upper VLANs of the same source VLAN are the same as the upper VLANs. Therefore, if the mapping between the source VLAN and the upper VLAN is included in the VLAN corresponding information, the packets are transmitted according to the downlink DHCP broadcast. The upper-layer VLAN included in the upper-layer VLAN cannot be used to determine the source VLAN of the upper-layer VLAN. The VLAN N:1 conversion of the downstream DHCP broadcast packets is not directly performed by the Layer 2 switch chip. The downlink DHCP broadcast packets are sent to the processor for VLAN. N:1 conversion.
由于DHCP交互过程中不可避免的会涉及到ARP类的报文,例如:在DHCP续约阶段,DHCP服务器会发送ARP广播请求报文,查询用户终端是否合法、以及其获取到的IP地址是否正在使用。为了确保下行ARP广播请求报文能够正确的完成VLAN N:1转换和转发,本发明实施例还可以对VLAN转换表进行改进,以便基于该改进的VLAN转换表,实现对下行ARP广播请求报文的VLAN N:1转换。The DHCP server sends an ARP broadcast request packet to the DHCP server. The DHCP server sends an ARP broadcast request packet to check whether the user terminal is legal and whether the obtained IP address is in progress. use. In order to ensure that the downlink ARP broadcast request message can correctly complete the VLAN N:1 conversion and forwarding, the embodiment of the present invention may further improve the VLAN translation table to implement the downlink ARP broadcast request message based on the improved VLAN translation table. VLAN N:1 conversion.
如图4所示,图4是根据本发明一实施例的对ARP广播请求报文的VLAN N:1转换的步骤的流程图。As shown in FIG. 4, FIG. 4 is a flowchart of a procedure of VLAN N:1 conversion of an ARP broadcast request message according to an embodiment of the present invention.
步骤S410,接收二层交换芯片根据报文提取规则提取的DHCP应答报文。Step S410, receiving a DHCP response message extracted by the layer 2 switch chip according to the packet extraction rule.
步骤S420,基于DHCP应答报文,获取源MAC地址对应的源IP地址。Step S420: Acquire a source IP address corresponding to the source MAC address based on the DHCP response message.
该源IP地址为DHCP服务器通过DHCP协议分配给用户中的地址。The source IP address is an address assigned to the user by the DHCP server through the DHCP protocol.
如果有用户终端申请IP地址,处理器在接收下行报文时,会接收到DHCP服务器发送的DHCP ACK报文。解析DHCP ACK报文中的DHCP协议字段的yiaddr(your ip address字段),获取该字段中的IP地址。If the user terminal applies for an IP address, the processor receives the DHCP ACK packet sent by the DHCP server when receiving the downlink packet. The yiaddr (your ip address field) of the DHCP protocol field in the DHCP ACK packet is parsed, and the IP address in the field is obtained.
步骤S430,在VLAN转换表中增加源MAC对应的源IP地址。Step S430, adding a source IP address corresponding to the source MAC in the VLAN translation table.
由于DHCP应答报文为单播报文,且为下行报文,因此,可以在DHCP应答报文中获取到源MAC地址和上层VLAN。在VLAN转换表中,可以将获取的IP地址保存该源MAC地址和上层VLAN对应的条目下。The source MAC address and the upper VLAN can be obtained in the DHCP response packet because the DHCP response packet is a unicast packet and is a downlink packet. In the VLAN translation table, the obtained IP address can be saved under the entry corresponding to the source MAC address and the upper VLAN.
步骤S440,接收二层交换芯片根据报文提取规则提取的ARP广播请求报文。Step S440, receiving an ARP broadcast request message extracted by the layer 2 switch chip according to the packet extraction rule.
ARP广播请求报文为DHCP服务器向用户终端发送的ARP的报文。二层交换芯片将上联口收到的ARP广播请求报文提包到处理器。The ARP broadcast request packet is an ARP packet sent by the DHCP server to the user terminal. The Layer 2 switch chip packets the ARP broadcast request received by the uplink port to the processor.
步骤S450,解析获取的ARP广播请求报文,获得APR报文中包括的源IP地址和上层VLAN。In step S450, the obtained ARP broadcast request packet is parsed, and the source IP address and the upper VLAN included in the APR packet are obtained.
步骤S460,根据ARP广播请求报文中包含的上行VLAN、源IP地址,在VLAN转换表中,查找对应的源VLAN。进一步地,在VLAN转换表中,查找对应的源端口号。Step S460: Search for the corresponding source VLAN in the VLAN translation table according to the uplink VLAN and the source IP address included in the ARP broadcast request message. Further, in the VLAN translation table, the corresponding source port number is searched for.
步骤S470,将ARP广播请求报文中的上层VLAN转换为对应的源VLAN。Step S470: Convert the upper VLAN in the ARP broadcast request message to the corresponding source VLAN.
步骤S480,将转换后的ARP广播请求报文向源VLAN对应的用户终端发送。进一步地,向源VLAN、源端口号对应的用户终端发送。 Step S480, the converted ARP broadcast request message is sent to the user terminal corresponding to the source VLAN. Further, the method is sent to a user terminal corresponding to the source VLAN and the source port number.
为了更加清晰的说明本发明,下面给出实现DHCP广播交互报文VLAN N:1转换的系统的结构图,如图5所示。In order to explain the present invention more clearly, a structural diagram of a system for implementing VLAN N:1 conversion of DHCP broadcast interactive messages is shown below, as shown in FIG. 5.
图5中各个符号代表的含义分别为:The meanings of the symbols in Figure 5 are:
SrcMac:源MAC;CVLAN:CVLAN;SVLAN:SVLAN;SrcPort:SrcPort;SrcIp:SrcIp。SrcMac: Source MAC; CVLAN: CVLAN; SVLAN: SVLAN; SrcPort: SrcPort; SrcIp: SrcIp.
该该系统中,包括6个用户终端(PC A1~A3,PC B1~B3),2个家庭网关(HG1和HG2)、1个光网络单元(Optical Network Unit,简称ONU)、光线路终端(Optical Line Terminal,简称OLT)。The system includes six user terminals (PC A1 to A3, PC B1 to B3), two home gateways (HG1 and HG2), one optical network unit (ONU), and an optical line terminal ( Optical Line Terminal (OLT).
PC A1~A3连接HG1的一端;PC B1~B3连接HG2的一端;HG1另一端连接ONU的A端口(下联口);HG2另一端连接ONU的B端口(下联口);ONU的上联口连接OLT一端;OLT另一端连接以太网。PC A1 to A3 are connected to one end of HG1; PCs B1 to B3 are connected to one end of HG2; the other end of HG1 is connected to the A port of the ONU (the lower port); the other end of HG2 is connected to the B port of the ONU (the lower port); the upper port of the ONU is connected. One end of the OLT; the other end of the OLT is connected to the Ethernet.
ONU中的二层交换芯片提取出PC A1~A3、PC B1~B3第一次发送DHCP广播交互报文、以及提取接收到的DHCP应答报文。ONU中的处理器解析DHCP广播交互报文,获取SrcMac、CVLAN和SrcPort;解析DHCP应答报文,获取SrcIp、SrcMac和SVLAN。将获取的信息按照用户终端的不同,分别填写到VLAN转换表中。按照预先设置的VLAN对应信息,将CVLAN对应的SVLAN填写到VLAN转换表中。最终生成可以使用的VLAN转换表,如图5中的表格。The Layer 2 switch chip in the ONU extracts the first broadcast of the DHCP broadcast exchange message and the received DHCP response message from the PCs A1 to A3 and PC B1 to B3. The processor in the ONU parses the DHCP broadcast exchange message, obtains SrcMac, CVLAN, and SrcPort; parses the DHCP response message, and obtains SrcIp, SrcMac, and SVLAN. Fill in the obtained information in the VLAN conversion table according to the user terminal. The SVLAN corresponding to the CVLAN is filled in the VLAN translation table according to the preset VLAN mapping information. Finally, a VLAN conversion table that can be used is generated, as shown in the table in FIG.
在进行VLAN N:1转换时,ONU接收到来自PC端的上行DHCP广播交互报文后,处理器在VLAN转换表中,确定该上行DHCP广播交互报文中的CVLAN和SrcMac对应的SVLAN,并将该上行DHCP广播交互报文中的CVLAN转换成对应的SVLAN,并通过上联口向OLT发送。ONU接收到来自以太网的下行DHCP广播交互报文后,处理器在VLAN转换表中,确定下行DHCP广播交互报文中的SrcMac和SVLAN对应的CVLAN,并将下行DHCP广播交互报文中的SVLAN转换成对应的CVLAN,并通过对应的SrcPort向相应的CVLAN发送。ONU接收到来自以太网的下行ARP广播请求报文后,处理器在VLAN转换表中,确定下行ARP广播请求报文中的SrcIP和SVLAN对应的CVLAN,并将下行ARP广播请求报文中的SVLAN转换为CVLAN,并通过对应的SrcPort向相应的CVLAN发送。After performing the VLAN N:1 conversion, the ONU receives the uplink DHCP broadcast exchange message from the PC, and the processor determines, in the VLAN translation table, the CVLAN and the SVLAN corresponding to the SrcMac in the uplink DHCP broadcast exchange message, and The CVLAN in the uplink DHCP broadcast exchange packet is converted into a corresponding SVLAN and sent to the OLT through the uplink port. After receiving the downlink DHCP broadcast exchange message from the Ethernet, the processor determines, in the VLAN translation table, the CVLAN corresponding to the SrcMac and the SVLAN in the downlink DHCP broadcast exchange message, and the SVLAN in the downlink DHCP broadcast exchange message. Convert to the corresponding CVLAN and send it to the corresponding CVLAN through the corresponding SrcPort. After receiving the downlink ARP broadcast request packet from the Ethernet, the processor determines, in the VLAN translation table, the CVLAN corresponding to the SrcIP and the SVLAN in the downlink ARP broadcast request packet, and the SVLAN in the downlink ARP broadcast request packet. Convert to CVLAN and send it to the corresponding CVLAN through the corresponding SrcPort.
本发明实施例还提供了一种实现DHCP广播交互报文VLAN N:1转换的装置。该装置为上述处理器。The embodiment of the invention further provides an apparatus for implementing VLAN N:1 conversion of a DHCP broadcast interactive message. The device is the above processor.
如图6所示,图6是根据本发明一实施例的实现DHCP广播交互报文VLAN N:1转换的装置的结构图。该装置包括:As shown in FIG. 6, FIG. 6 is a structural diagram of an apparatus for implementing VLAN N:1 conversion of a DHCP broadcast interactive message according to an embodiment of the present invention. The device includes:
配置模块610,设置为生成VLAN转换表;其中,所述VLAN转换表中记录源MAC地址、源VLAN和上层VLAN的对应关系信息。 The configuration module 610 is configured to generate a VLAN translation table, where the mapping information of the source MAC address, the source VLAN, and the upper VLAN is recorded in the VLAN translation table.
转换模块620,设置为根据VLAN转换表,对接收到的DHCP广播交互报文,进行VLAN N:1转换。The conversion module 620 is configured to perform VLAN N:1 conversion on the received DHCP broadcast exchange message according to the VLAN translation table.
在一个实施例中,装置还包括获取模块630,设置为通过预先配置的二层交换芯片,获得生成VLAN转换表所需的用户终端的源MAC地址和源VLAN。In an embodiment, the apparatus further includes an obtaining module 630 configured to obtain, by using a pre-configured Layer 2 switch chip, a source MAC address and a source VLAN of the user terminal required to generate the VLAN translation table.
获取模块630设置为:预先为二层交换芯片配置报文提取规则;接收二层交换芯片根据报文提取规则提取的用户终端首次发送的上行DHCP广播交互报文;基于首次发送的上行DHCP广播交互报文,获取用户终端的源MAC地址和源VLAN。The obtaining module 630 is configured to: configure a packet extraction rule for the Layer 2 switch chip in advance; receive an uplink DHCP broadcast interaction message that is sent by the user terminal for the first time according to the packet extraction rule; and receive the uplink DHCP broadcast interaction based on the first transmission. The packet obtains the source MAC address and source VLAN of the user terminal.
配置模块610,设置为预先配置VLAN对应信息;其中,所述VLAN对应信息记录了源VLAN和上层VLAN的对应关系信息;在获得用户终端的源MAC地址和源VLAN后,将源MAC地址、源VLAN、以及与源VLAN对应的上层VLAN对应存储,形成VLAN转换表。The configuration module 610 is configured to pre-configure the VLAN corresponding information. The VLAN corresponding information records the correspondence between the source VLAN and the upper VLAN. After obtaining the source MAC address and the source VLAN of the user terminal, the source MAC address and the source are obtained. The VLAN and the upper VLAN corresponding to the source VLAN are stored correspondingly to form a VLAN translation table.
转换模块620设置为:根据接收到的上行DHCP广播交互报文中包含的源MAC地址和源VLAN,在VLAN转换表中查找对应的上层VLAN,并将上行DHCP广播交互报文中的源VLAN转换成对应的上层VLAN;根据接收到的下行DHCP广播交互报文中包含的源MAC地址和上层VLAN,在VLAN转换表中查找对应的源VLAN,并将下行DHCP广播交互报文中的上层VLAN转换成对应的源VLAN。The conversion module 620 is configured to: according to the source MAC address and the source VLAN included in the received uplink DHCP broadcast exchange message, search for a corresponding upper VLAN in the VLAN translation table, and convert the source VLAN in the uplink DHCP broadcast exchange message. And corresponding to the upper-layer VLAN; according to the source MAC address and the upper-layer VLAN included in the received downlink DHCP broadcast exchange message, the corresponding source VLAN is searched in the VLAN translation table, and the upper-layer VLAN in the downlink DHCP broadcast exchange message is converted. Become the corresponding source VLAN.
在另一实施例中,装置还包括下发模块640,设置为在VLAN转换表生成后,将VLAN对应信息下发至二层交换芯片,由二层交换芯片,直接对接收到的上行DHCP广播交互报文,进行VLAN N:1转换。In another embodiment, the device further includes a sending module 640, configured to send the VLAN corresponding information to the Layer 2 switching chip after the VLAN conversion table is generated, and directly receive the received uplink DHCP broadcast by the Layer 2 switching chip. Interwork packets for VLAN N:1 conversion.
在又一实施例中,配置模块610还设置为:接收二层交换芯片根据报文提取规则提取的DHCP应答报文;基于DHCP应答报文,获取源MAC地址对应的源IP地址;在VLAN转换表中增加源MAC对应的源IP地址。In another embodiment, the configuration module 610 is further configured to: receive a DHCP response message extracted by the layer 2 switch chip according to the packet extraction rule; obtain a source IP address corresponding to the source MAC address based on the DHCP response message; Add the source IP address corresponding to the source MAC address in the table.
转换模块620还设置为:接收二层交换芯片根据报文提取规则提取的地址解析协议ARP广播请求报文;根据ARP广播请求报文中包含的上行VLAN、源IP地址,在VLAN转换表中,查找对应的源VLAN,并将ARP广播请求报文中的上行VLAN转换为对应的源VLAN。The conversion module 620 is further configured to: receive an address resolution protocol ARP broadcast request message extracted by the layer 2 switch chip according to the packet extraction rule; and in the VLAN conversion table according to the uplink VLAN and the source IP address included in the ARP broadcast request message, Find the source VLAN and translate the upstream VLAN in the ARP broadcast request packet to the corresponding source VLAN.
本发明所述的装置的功能已经在图1-图5所示的方法实施例中进行了描述,故本实施例的描述中未详尽之处,可以参见前述实施例中的相关说明,在此不做赘述。The functions of the device according to the present invention have been described in the method embodiments shown in FIG. 1 to FIG. 5. Therefore, in the description of the present embodiment, reference may be made to the related description in the foregoing embodiment. Do not repeat them.
尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。While the preferred embodiments of the present invention have been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.
工业实用性Industrial applicability
在本发明实施例中,通过处理器获取DHCP广播交互报文中的源MAC地址信息,生成包含源MAC地址、源端口、源VLAN和上层VLAN对应关系信息的VLAN转换表,利用该VLAN转换表,对DHCP广播交互报文进行VLAN N:1转换。通过处理器实现了对DHCP广 播交互报文的VLAN N:1转换,弥补了相关技术中二层交换芯片无法实现DHCP广播交互报文VLAN N:1转换的技术空白。进一步地,通过本发明,对于上行或下行DHCP广播交互报文只需转发一份,无需进行复制,有效提高了VLAN N:1转换效率,降低了网络负荷。 In the embodiment of the present invention, the source MAC address information in the DHCP broadcast interactive packet is obtained by the processor, and a VLAN conversion table including the source MAC address, the source port, the source VLAN, and the upper VLAN corresponding relationship information is generated, and the VLAN conversion table is used. VLAN N:1 conversion for DHCP broadcast exchange packets. Through the processor to achieve a wide range of DHCP The VLAN N:1 conversion of the broadcast packet is used to make up the technical blank of the VLAN N:1 conversion of the DHCP broadcast interactive packet. Further, the present invention only needs to forward one copy of the uplink or downlink DHCP broadcast exchange message without copying, thereby effectively improving the VLAN N:1 conversion efficiency and reducing the network load.

Claims (16)

  1. 一种实现动态地址解析协议DHCP广播交互报文虚拟局域网VLAN N:1转换的方法,包括:A method for implementing a dynamic address resolution protocol DHCP broadcast interactive message virtual local area network VLAN N:1 conversion, comprising:
    生成VLAN转换表;其中,所述VLAN转换表中记录源MAC地址、源VLAN和上层VLAN的对应关系信息;Generating a VLAN conversion table, where the mapping information of the source MAC address, the source VLAN, and the upper VLAN is recorded in the VLAN translation table;
    根据所述VLAN转换表,对接收到的DHCP广播交互报文,进行VLAN N:1转换。And performing VLAN N:1 conversion on the received DHCP broadcast exchange packet according to the VLAN translation table.
  2. 如权利要求1所述的方法,其中,所述方法还包括:The method of claim 1 wherein the method further comprises:
    通过预先配置的二层交换芯片,获得生成所述VLAN转换表所需的用户终端的源MAC地址和源VLAN。The source MAC address and the source VLAN of the user terminal required to generate the VLAN translation table are obtained through a pre-configured Layer 2 switch chip.
  3. 如权利要求2所述的方法,其中,通过预先配置的二层交换芯片,获得生成所述VLAN转换表所需的源MAC地址和源VLAN,包括:The method of claim 2, wherein the source MAC address and the source VLAN required to generate the VLAN translation table are obtained by using a pre-configured Layer 2 switch chip, including:
    预先为所述二层交换芯片配置报文提取规则;Configuring a packet extraction rule for the Layer 2 switch chip in advance;
    接收所述二层交换芯片根据所述报文提取规则提取的用户终端首次发送的上行DHCP广播交互报文;Receiving, by the layer 2 switch chip, an uplink DHCP broadcast interaction message sent by the user terminal that is first sent by the user equipment according to the packet extraction rule;
    基于所述首次发送的上行DHCP广播交互报文,获取所述用户终端的源MAC地址和源VLAN。And obtaining a source MAC address and a source VLAN of the user terminal according to the first uplink DHCP broadcast exchange message.
  4. 如权利要求1、2或3所述的方法,其中,所述方法还包括:The method of claim 1, 2 or 3, wherein the method further comprises:
    预先配置VLAN对应信息;其中,所述VLAN对应信息记录了源VLAN和上层VLAN的对应关系信息;The VLAN corresponding information is pre-configured; wherein the VLAN corresponding information records the correspondence relationship between the source VLAN and the upper VLAN;
    生成VLAN转换表,包括:Generate a VLAN translation table, including:
    在获得用户终端的源MAC地址和源VLAN后,将所述源MAC地址、所述源VLAN、以及与所述源VLAN对应的上层VLAN对应存储,形成VLAN转换表。After obtaining the source MAC address and the source VLAN of the user terminal, the source MAC address, the source VLAN, and the upper VLAN corresponding to the source VLAN are stored correspondingly to form a VLAN conversion table.
  5. 如权利要求4所述的方法,其中,根据所述VLAN转换表,对接收到的DHCP广播交互报文,进行VLAN N:1转换,包括:The method of claim 4, wherein the VLAN N:1 conversion is performed on the received DHCP broadcast exchange message according to the VLAN translation table, including:
    根据接收到的上行DHCP广播交互报文中包含的源MAC地址和源VLAN,在所述VLAN转换表中查找对应的上层VLAN,并将所述上行DHCP广播交互报文中的源VLAN转换成对应的上层VLAN;The source VLAN address and the source VLAN included in the received uplink DHCP broadcast exchange message are searched for the corresponding upper VLAN in the VLAN translation table, and the source VLAN in the uplink DHCP broadcast exchange packet is converted into a corresponding Upper VLAN;
    根据接收到的下行DHCP广播交互报文中包含的源MAC地址和上层VLAN,在所述VLAN转换表中查找对应的源VLAN,并将所述下行DHCP广播交互报文中的上层VLAN转换成对应的源VLAN。And searching for the corresponding source VLAN in the VLAN translation table according to the source MAC address and the upper VLAN included in the received downlink DHCP broadcast exchange packet, and converting the upper VLAN in the downlink DHCP broadcast interaction packet into a corresponding Source VLAN.
  6. 如权利要求4所述的方法,其中,所述方法还包括:The method of claim 4 wherein the method further comprises:
    在所述VLAN转换表生成后,将所述VLAN对应信息下发至所述二层交换芯片,由 所述二层交换芯片,直接对接收到的上行DHCP广播交互报文,进行VLAN N:1转换。After the VLAN conversion table is generated, the VLAN corresponding information is sent to the layer 2 switch chip, where The Layer 2 switch chip directly performs the VLAN N:1 conversion on the received uplink DHCP broadcast exchange message.
  7. 如权利要求3所述的方法,其中,所述方法还包括:The method of claim 3 wherein the method further comprises:
    接收所述二层交换芯片根据所述报文提取规则提取的DHCP应答报文;Receiving a DHCP response message extracted by the layer 2 switch chip according to the packet extraction rule;
    基于所述DHCP应答报文,获取源MAC地址对应的源IP地址;Obtaining a source IP address corresponding to the source MAC address, based on the DHCP response packet;
    在所述VLAN转换表中增加所述源MAC对应的源IP地址。Adding a source IP address corresponding to the source MAC in the VLAN translation table.
  8. 如权利要求7所述的方法,其中,所述方法还包括:The method of claim 7 wherein said method further comprises:
    接收所述二层交换芯片根据所述报文提取规则提取的地址解析协议ARP广播请求报文;Receiving, by the layer 2 switch chip, an address resolution protocol ARP broadcast request message extracted according to the packet extraction rule;
    根据所述ARP广播请求报文中包含的上行VLAN、源IP地址,在所述VLAN转换表中,查找对应的源VLAN,并将所述ARP广播请求报文中的上行VLAN转换为对应的源VLAN。And searching, according to the uplink VLAN and the source IP address, in the ARP broadcast request packet, searching for a corresponding source VLAN in the VLAN translation table, and converting the uplink VLAN in the ARP broadcast request packet into a corresponding source. VLAN.
  9. 一种实现DHCP广播交互报文VLAN N:1转换的装置,包括:A device for implementing VLAN N:1 conversion of a DHCP broadcast interactive message includes:
    配置模块,设置为生成VLAN转换表;其中,所述VLAN转换表中记录源VLAN和上层VLAN的对应关系信息;The configuration module is configured to generate a VLAN conversion table, where the VLAN conversion table records correspondence information between the source VLAN and the upper VLAN;
    转换模块,设置为根据所述VLAN转换表,对接收到的DHCP广播交互报文,进行VLAN N:1转换。The conversion module is configured to perform VLAN N:1 conversion on the received DHCP broadcast exchange message according to the VLAN conversion table.
  10. 如权利要求9所述的装置,其中,所述装置还包括获取模块,设置为通过预先配置的二层交换芯片,获得生成所述VLAN转换表所需的用户终端的源MAC地址和源VLAN。The apparatus of claim 9, wherein the apparatus further comprises an acquisition module configured to obtain, by a pre-configured Layer 2 switch chip, a source MAC address and a source VLAN of the user terminal required to generate the VLAN translation table.
  11. 如权利要求10所述的装置,其中,所述获取模块设置为:The apparatus of claim 10 wherein said obtaining module is configured to:
    预先为所述二层交换芯片配置报文提取规则;Configuring a packet extraction rule for the Layer 2 switch chip in advance;
    接收所述二层交换芯片根据所述报文提取规则提取的用户终端首次发送的上行DHCP广播交互报文;Receiving, by the layer 2 switch chip, an uplink DHCP broadcast interaction message sent by the user terminal that is first sent by the user equipment according to the packet extraction rule;
    基于所述首次发送的上行DHCP广播交互报文,获取所述用户终端的源MAC地址和源VLAN。And obtaining a source MAC address and a source VLAN of the user terminal according to the first uplink DHCP broadcast exchange message.
  12. 如权利要求9、10或11所述的装置,其中,所述配置模块,设置为:The apparatus of claim 9, 10 or 11, wherein said configuration module is configured to:
    预先配置VLAN对应信息;其中,所述VLAN对应信息记录了源VLAN和上层VLAN的对应关系信息;The VLAN corresponding information is pre-configured; wherein the VLAN corresponding information records the correspondence relationship between the source VLAN and the upper VLAN;
    在获得用户终端的源MAC地址和源VLAN后,将所述源MAC地址、所述源VLAN、以及与所述源VLAN对应的上层VLAN对应存储,形成VLAN转换表。 After obtaining the source MAC address and the source VLAN of the user terminal, the source MAC address, the source VLAN, and the upper VLAN corresponding to the source VLAN are stored correspondingly to form a VLAN conversion table.
  13. 如权利要求12所述的装置,其中,所述转换模块设置为:The apparatus of claim 12 wherein said conversion module is configured to:
    根据接收到的上行DHCP广播交互报文中包含的源MAC地址和源VLAN,在所述VLAN转换表中查找对应的上层VLAN,并将所述上行DHCP广播交互报文中的源VLAN转换成对应的上层VLAN;The source VLAN address and the source VLAN included in the received uplink DHCP broadcast exchange message are searched for the corresponding upper VLAN in the VLAN translation table, and the source VLAN in the uplink DHCP broadcast exchange packet is converted into a corresponding Upper VLAN;
    根据接收到的下行DHCP广播交互报文中包含的源MAC地址和上层VLAN,在所述VLAN转换表中查找对应的源VLAN,并将所述下行DHCP广播交互报文中的上层VLAN转换成对应的源VLAN。And searching for the corresponding source VLAN in the VLAN translation table according to the source MAC address and the upper VLAN included in the received downlink DHCP broadcast exchange packet, and converting the upper VLAN in the downlink DHCP broadcast interaction packet into a corresponding Source VLAN.
  14. 如权利要求12所述的装置,其中,所述装置还包括:下发模块,设置为在所述VLAN转换表生成后,将所述VLAN对应信息下发至所述二层交换芯片,由所述二层交换芯片,直接对接收到的上行DHCP广播交互报文,进行VLAN N:1转换。The device of claim 12, wherein the device further comprises: a sending module, configured to send the VLAN corresponding information to the layer 2 switch chip after the VLAN conversion table is generated, The Layer 2 switch chip directly performs the VLAN N:1 conversion on the received uplink DHCP broadcast exchange message.
  15. 如权利要求11所述的装置,其中,所述配置模块还设置为:The apparatus of claim 11 wherein said configuration module is further configured to:
    接收所述二层交换芯片根据所述报文提取规则提取的DHCP应答报文;Receiving a DHCP response message extracted by the layer 2 switch chip according to the packet extraction rule;
    基于所述DHCP应答报文,获取源MAC地址对应的源IP地址;Obtaining a source IP address corresponding to the source MAC address, based on the DHCP response packet;
    在所述VLAN转换表中增加所述源MAC对应的源IP地址。Adding a source IP address corresponding to the source MAC in the VLAN translation table.
  16. 如权利要求15所述的装置,其中,所述转换模块还设置为:The apparatus of claim 15 wherein said conversion module is further configured to:
    接收所述二层交换芯片根据所述报文提取规则提取的地址解析协议ARP广播请求报文;Receiving, by the layer 2 switch chip, an address resolution protocol ARP broadcast request message extracted according to the packet extraction rule;
    根据所述ARP广播请求报文中包含的上行VLAN、源IP地址,在所述VLAN转换表中,查找对应的源VLAN,并将所述ARP广播请求报文中的上行VLAN转换为对应的源VLAN。 And searching, according to the uplink VLAN and the source IP address, in the ARP broadcast request packet, searching for a corresponding source VLAN in the VLAN translation table, and converting the uplink VLAN in the ARP broadcast request packet into a corresponding source. VLAN.
PCT/CN2015/092755 2014-11-05 2015-10-23 Method and device for realizing vlan n:1 conversion on dhcp broadcast interaction packet WO2016070725A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410618048.9A CN105635330B (en) 2014-11-05 2014-11-05 A kind of method and apparatus for realizing dhcp broadcast mutual message VLAN N:1 conversion
CN201410618048.9 2014-11-05

Publications (1)

Publication Number Publication Date
WO2016070725A1 true WO2016070725A1 (en) 2016-05-12

Family

ID=55908557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/092755 WO2016070725A1 (en) 2014-11-05 2015-10-23 Method and device for realizing vlan n:1 conversion on dhcp broadcast interaction packet

Country Status (2)

Country Link
CN (1) CN105635330B (en)
WO (1) WO2016070725A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933471B (en) * 2016-06-28 2020-06-02 北京北信源软件股份有限公司 Method for simplifying and allocating isolation domain IP based on DHCP admission

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080089323A1 (en) * 2006-10-13 2008-04-17 At&T Knowledge Ventures, L.P. System and method for assigning virtual local area networks
CN102257772A (en) * 2010-06-07 2011-11-23 华为技术有限公司 Method, device and system for service configuration
CN102325087A (en) * 2011-09-07 2012-01-18 中兴通讯股份有限公司 Method and system for realizing VLAN (Virtual Local Area Network) QinQ
US20130201978A1 (en) * 2012-02-06 2013-08-08 Pradeep Iyer Method and System for Partitioning Wireless Local Area Network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080089323A1 (en) * 2006-10-13 2008-04-17 At&T Knowledge Ventures, L.P. System and method for assigning virtual local area networks
CN102257772A (en) * 2010-06-07 2011-11-23 华为技术有限公司 Method, device and system for service configuration
CN102325087A (en) * 2011-09-07 2012-01-18 中兴通讯股份有限公司 Method and system for realizing VLAN (Virtual Local Area Network) QinQ
US20130201978A1 (en) * 2012-02-06 2013-08-08 Pradeep Iyer Method and System for Partitioning Wireless Local Area Network

Also Published As

Publication number Publication date
CN105635330B (en) 2019-08-02
CN105635330A (en) 2016-06-01

Similar Documents

Publication Publication Date Title
CN102970227B (en) The method and apparatus of VXLAN message repeating is realized in ASIC
CN102215170B (en) Method and processor for restraining Internet storm
US8369246B2 (en) Method and apparatus for sending and receiving multicast packets on a multicast tree
WO2016082588A1 (en) Link connectivity checking method and apparatus
US9621459B2 (en) Message forwarding method, system, and relay agent device
CN104010049A (en) Ethernet IP message packaging method based on SDN and network isolation and DHCP implementing method based on SDN
WO2018214809A1 (en) Message transmission method and device, and storage medium
WO2012109917A1 (en) Message forwarding method, apparatus and system in network
US10225091B2 (en) Method for implementing point-to-multipoint multicast, network node, and system
CN111092863A (en) Method, client, server, device and medium for accessing internet website
CN102045250B (en) Forwarding method for multicast message in VPLS, and service provider edge equipment
WO2014153860A1 (en) Network access method, gateway and system
WO2012109864A1 (en) Message forwarding method and device
CN109347844B (en) Method and device for accessing equipment to Internet
WO2014169812A1 (en) Forwarding processing method and device for message
CN102868642B (en) The method and apparatus of NVGRE message repeating is realized in ASIC
CN111211982B (en) Data forwarding method and device, electronic equipment and storage medium
WO2017036384A1 (en) Provider edge device and data forwarding method
WO2016070725A1 (en) Method and device for realizing vlan n:1 conversion on dhcp broadcast interaction packet
US10536367B2 (en) Multipoint seamless bi-directional forwarding detection
WO2013026299A1 (en) Address resolution method and device, and information transmission method
EP2908476A1 (en) Method and apparatus for sending multi-link transparent interconnected data frame
CN110062259B (en) Video acquisition method, system, device and computer readable storage medium
WO2016138747A1 (en) Information synchronization method and apparatus
US8913614B2 (en) Method, system and access service router for implementing multicast service

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: 15856325

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15856325

Country of ref document: EP

Kind code of ref document: A1