WO2016070725A1 - Procédé et dispositif pour réaliser une conversion vlan n:1 sur un paquet de diffusion interactif dhcp - Google Patents

Procédé et dispositif pour réaliser une conversion vlan n:1 sur un paquet de diffusion interactif dhcp 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
English (en)
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/fr

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

L'invention concerne un procédé et un dispositif pour réaliser une conversion VLAN N:1 sur un paquet de diffusion interactif DHCP. Le procédé consiste : à générer une table de conversion VLAN dans laquelle sont enregistrées des informations concernant les corrélations d'une adresse de contrôle d'accès au support (MAC) source, d'un VLAN source et d'un VLAN de couche supérieure; et selon la table de conversion VLAN, à effectuer une conversion VLAN N:1 d'un paquet de diffusion interfactif DHCP reçu. La présente invention réalise une conversion VLAN N:1 d'un paquet de diffusion interactif DHCP par l'intermédiaire d'un processeur, permettant ainsi de compenser la lacune technique de l'état de la technique que représente l'impossibilité pour une puce de commutation de couche 2 de réaliser une conversion VLAN N:1 du paquet de diffusion interactif DHCP. En outre, au moyen de la présente invention, le transfert une seule copie d'un paquet de diffusion interactif DHCP en liaison montante ou en liaison descendante suffit, sans autre copie, permettant ainsi d'améliorer de manière efficace l'efficacité de la conversion VLAN N:1 et de réduire la charge de réseau.
PCT/CN2015/092755 2014-11-05 2015-10-23 Procédé et dispositif pour réaliser une conversion vlan n:1 sur un paquet de diffusion interactif dhcp WO2016070725A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410618048.9A CN105635330B (zh) 2014-11-05 2014-11-05 一种实现dhcp广播交互报文vlan n:1转换的方法和装置
CN201410618048.9 2014-11-05

Publications (1)

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

Family

ID=55908557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/092755 WO2016070725A1 (fr) 2014-11-05 2015-10-23 Procédé et dispositif pour réaliser une conversion vlan n:1 sur un paquet de diffusion interactif dhcp

Country Status (2)

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

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933471B (zh) * 2016-06-28 2020-06-02 北京北信源软件股份有限公司 一种基于dhcp准入简化分配隔离域ip的实现方法

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 (zh) * 2010-06-07 2011-11-23 华为技术有限公司 业务配置方法、设备和系统
CN102325087A (zh) * 2011-09-07 2012-01-18 中兴通讯股份有限公司 实现Vlan 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 (zh) * 2010-06-07 2011-11-23 华为技术有限公司 业务配置方法、设备和系统
CN102325087A (zh) * 2011-09-07 2012-01-18 中兴通讯股份有限公司 实现Vlan 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
CN105635330A (zh) 2016-06-01
CN105635330B (zh) 2019-08-02

Similar Documents

Publication Publication Date Title
CN102970227B (zh) 在asic中实现vxlan报文转发的方法和装置
CN102215170B (zh) 抑制网络风暴的方法及处理器
US8369246B2 (en) Method and apparatus for sending and receiving multicast packets on a multicast tree
WO2016082588A1 (fr) Procédé et appareil de vérification de connectivité de liaison
US9621459B2 (en) Message forwarding method, system, and relay agent device
CN104010049A (zh) 基于sdn的以太网ip报文封装方法及网络隔离和dhcp实现方法
WO2018214809A1 (fr) Procédé et dispositif de transmission de message, et support de stockage
WO2012109917A1 (fr) Procédé, appareil et système de transfert de messages dans un réseau
CN111092863A (zh) 访问互联网网站的方法、客户端、服务器、设备及介质
CN102045250B (zh) Vpls中组播报文的转发方法和服务提供商边缘设备
WO2014153860A1 (fr) Procédé d'accès réseau, passerelle et système
WO2012109864A1 (fr) Procédé et dispositif de transfert de messages
CN109347844B (zh) 一种设备接入互联网的方法及装置
WO2014169812A1 (fr) Procédé et dispositif de traitement de transfert de message
CN102868642B (zh) 在asic中实现nvgre报文转发的方法和装置
CN111211982B (zh) 数据转发方法及装置、电子设备、存储介质
WO2017036384A1 (fr) Équipement de bordure de fournisseur et procédé de transfert de données
WO2016070725A1 (fr) Procédé et dispositif pour réaliser une conversion vlan n:1 sur un paquet de diffusion interactif dhcp
US10536367B2 (en) Multipoint seamless bi-directional forwarding detection
WO2013026299A1 (fr) Procédé et dispositif de résolution d'adresse, et procédé de transmission d'informations
EP2908476A1 (fr) Procédé et appareil pour envoyer une trame de données interconnectée transparente de liaison multiple
CN110062259B (zh) 视频获取方法、系统、设备和计算机可读存储介质
WO2016138747A1 (fr) Procédé et appareil de synchronisation d'informations
US8913614B2 (en) Method, system and access service router for implementing multicast service
CN111614536A (zh) 一种数据转发的方法及装置

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