WO2022057477A1 - 网络配置方法、终端、系统及存储介质 - Google Patents

网络配置方法、终端、系统及存储介质 Download PDF

Info

Publication number
WO2022057477A1
WO2022057477A1 PCT/CN2021/110087 CN2021110087W WO2022057477A1 WO 2022057477 A1 WO2022057477 A1 WO 2022057477A1 CN 2021110087 W CN2021110087 W CN 2021110087W WO 2022057477 A1 WO2022057477 A1 WO 2022057477A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
configuration information
vlan
configuration
network
Prior art date
Application number
PCT/CN2021/110087
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Priority to EP21868306.8A priority Critical patent/EP4117233A4/en
Priority to US17/995,490 priority patent/US20230179444A1/en
Publication of WO2022057477A1 publication Critical patent/WO2022057477A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • H04L12/4675Dynamic sharing of VLAN information amongst network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements

Definitions

  • the present application relates to a virtual local area network (Virtual Local Area Network, VLAN), and in particular, to a network configuration method, terminal, system and storage medium.
  • VLAN Virtual Local Area Network
  • Virtual local area network is a broadcast domain segmentation technology based on Layer 2 switches.
  • the application of virtual local area network VLAN can be grouped according to the location, role, and department of network users, or according to the applications and protocols used by network users, improving the freedom of network design. Spend.
  • Wit1q the 802.1Q protocol issued by the Institute of Electrical and Electronics Engineers (IEEE)
  • IEEE Institute of Electrical and Electronics Engineers
  • Bridges are allowed to share the same entity network publicly without information being leaked.
  • VLAN virtual local area network
  • the virtual local area network VLAN realizes the access and switching of the access device through the unique number (Identity document, ID) of the virtual local area network in the VLAN tagging (VLAN tagging).
  • the access device needs to monitor the information of the unique number of the virtual local area network (VLAN ID) in each data packet, which will occupy the resources of the device and affect the performance of the device; a large number of packets need to be sent in the virtual local area network (VLAN) system, which reduces the performance of the virtual local area network (VLAN) system. stability.
  • Embodiments of the present application provide a network configuration method, terminal, system, and storage medium.
  • an embodiment of the present application provides a network configuration method, which is applied to a first device, where the first device is communicatively connected to a second device, including: acquiring first configuration information of a virtual local area network VLAN; sending the first device configuration information to the second device; the manner in which the first device establishes a communication connection with the second device includes an untagged interface.
  • an embodiment of the present application provides a network configuration method, which is applied to a second device, where the second device is communicatively connected to the first device, including: acquiring first configuration information from the first device; The first configuration information sets the virtual local area network VLAN information of the second device, and obtains the second configuration information; the first device and the second device establish a communication connection through an untagged link.
  • an embodiment of the present application provides a network configuration method, which is applied to a first device and a second device that are communicatively connected, including: the first device obtains first configuration information of a virtual local area network VLAN; the first device The device sends the first configuration information to the second device; the second device sets the virtual local area network VLAN information of the second device according to the first configuration information; the second device The second configuration information is obtained from the local area network VLAN information; the second device sends the second configuration information to the first device; the first device establishes a communication connection with the second device through an untagged port.
  • an embodiment of the present application provides a terminal that is communicatively connected to a second terminal, including: an information acquisition module configured to acquire first configuration information of a virtual local area network VLAN; an information transmission module configured to send the first configuration information of the virtual local area network (VLAN); a configuration information to the second device; a communication module configured to establish a communication connection with the second terminal through an untagged interface.
  • an information acquisition module configured to acquire first configuration information of a virtual local area network VLAN
  • an information transmission module configured to send the first configuration information of the virtual local area network (VLAN); a configuration information to the second device
  • a communication module configured to establish a communication connection with the second terminal through an untagged interface.
  • an embodiment of the present application provides a terminal that is communicatively connected to the first terminal, including: an information acquisition module configured to acquire first configuration information of a virtual local area network VLAN from the first terminal; a network configuration module configured to The virtual local area network VLAN information is set according to the first configuration information, and the second configuration information is obtained; the communication module is configured to establish a communication connection with the first terminal through the untagged interface.
  • an embodiment of the present application provides a network configuration system, characterized by comprising: at least one first terminal according to the third aspect; and at least one second terminal according to the fourth aspect; The first terminal is in communication connection with the second terminal.
  • an embodiment of the present application provides a computer-readable storage medium for computer-readable storage, where the storage medium stores one or more programs, and the one or more programs can be stored by one or more
  • the processor executes to implement the network configuration method according to the first aspect; or, the network configuration method according to the second aspect; or, the network configuration method according to the third aspect.
  • FIG. 1 is a schematic flowchart of a network configuration method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a network configuration method provided by another embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a network configuration method provided by another embodiment of the present application.
  • FIG. 5 is a schematic flowchart of an information collection method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a method for transmitting network configuration information provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of the operation of the second device provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of the operation of the first device provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a network configuration architecture provided by an embodiment of the present application.
  • a Local Area Network can be a network composed of a few home computers or an enterprise network composed of hundreds of computers.
  • the local area network (LAN) referred to in the virtual local area network (VLAN) refers to a network divided by routers, that is, a broadcast domain.
  • the broadcast domain refers to the range to which broadcast frames (target MAC addresses are all 1) can be delivered, that is, the range that can be communicated directly.
  • the Layer 2 switch can only construct a single broadcast domain. After using the virtual local area network (VLAN) function, it can divide the network into multiple broadcast domains. If there is only one broadcast domain, after the switch receives the broadcast frame, it will forward it to all ports except the receiving port.
  • VLAN virtual local area network
  • the VLAN configuration of the virtual local area network is performed by applying the tagged data frame of the virtual local area network VLAN.
  • the change of the tagged packet structure is that after the source mac address and the destination mac address, 4 bytes of vlan information is added, that is, the vlan tag Header, such a message needs to be received by a specific device, which will increase the requirements of the virtual local area network (VLAN) device and increase the complexity of the system.
  • VLAN virtual local area network
  • FIG. 1 is a schematic flowchart of a network configuration method provided by an embodiment of the present application.
  • the network configuration method shown in FIG. 1 includes at least the following steps: S101: Receive first configuration information from a first device; S102: Set virtual local area network VLAN information of the second device according to the first configuration information; S103: Generate a second configuration information configuration information.
  • S101 Receive first configuration information from a first device.
  • the second device receives the first configuration information from the first device.
  • the first configuration information includes virtual local area network VLAN information.
  • S102 Set the virtual local area network VLAN information of the second device according to the first configuration information.
  • the second device sets the virtual local area network (VLAN) information of the second device according to the first configuration information.
  • VLAN virtual local area network
  • the second device generates the second configuration information according to its own virtual local area network (VLAN) information.
  • VLAN virtual local area network
  • the first configuration information includes at least one of the following information: a unique number of a virtual local area network (VLANID), Internet Protocol (Internet Protocol, IP) subnet information, Access Point Name (APN) information, in the port type information.
  • VLANID virtual local area network
  • IP Internet Protocol
  • API Access Point Name
  • the manner of obtaining the first configuration information from the first device includes at least one of receiving a socket and receiving a file.
  • the network configuration method further includes at least one of the following information: sending second configuration information to the first device, where the second configuration information includes a unique number of a virtual local area network (VLANID), IP subnet information, and access point information. name in the APN information.
  • VLANID virtual local area network
  • IP subnet information IP subnet information
  • access point information name in the APN information.
  • FIG. 2 is a schematic flowchart of a network configuration method provided by another embodiment of the present application.
  • the network configuration method shown in FIG. 2 includes at least the following steps: S201 : acquiring first configuration information of VLAN information of a virtual local area network; S202 : sending the first configuration information to a second device.
  • S201 Obtain first configuration information of VLAN information of a virtual local area network.
  • the first device obtains the first configuration information from the virtual local area network VLAN information.
  • S202 Send the first configuration information to the second device.
  • the first device sends the first configuration information to the second device.
  • the first configuration information includes at least one of the following information: the unique number of the virtual local area network (VLANID), the IP subnet information of the Internet Internet Protocol, the access point name APN information, and the port type information.
  • VLANID virtual local area network
  • IP subnet information of the Internet Internet Protocol the IP subnet information of the Internet Internet Protocol
  • access point name APN information the access point name APN information
  • port type information the unique number of the virtual local area network
  • the manner of sending the first configuration information to the second device includes at least one of sending a socket and sending a file.
  • the network configuration method further includes: obtaining second configuration information from the second device.
  • the network configuration method further includes: detecting whether the first configuration information and the second configuration information conflict according to the second configuration information; if there is no conflict, ending the process; if there is a conflict, executing a conflict avoidance method.
  • the conflict avoidance method includes: resetting the subnet address; and reconfiguring the subnet of the first device.
  • FIG. 3 is a schematic flowchart of a network configuration method provided by another embodiment of the present application.
  • the network configuration method shown in FIG. 3 includes at least the following steps: S301: the first device and the second device are synchronized; S302: the first device and the second device establish a communication link; S303: the first device and the second device confirm VLAN information transmission mode; S304: the first device obtains the VLAN information and sends it to the second device; S305: the second device configures its own VLAN information according to the VLAN information.
  • S301 The first device and the second device are synchronized.
  • the virtual local area network VLAN synchronization mode of the first device and the second device is set and the corresponding ports are connected.
  • the device on which the virtual local area network VLAN configuration is completed is set as the first device as the sender of the virtual local area network VLAN configuration information; the receiver of the virtual local area network VLAN information is set as the second device.
  • the first device and the second device are only named in the configuration of the VLAN information of the virtual local area network.
  • the first device and the second device establish a communication link.
  • DHCP can be used to connect.
  • the first device and the second device respectively start DHCPD and DHCPC processes.
  • the first device and the second device use the default untagged link to establish a communication link through DHCP.
  • the second device detects the subnet of the first device and its own subnet, and if a conflict is detected, further conflict avoidance processing is required.
  • S303 The first device and the second device confirm the VLAN information transmission mode.
  • the first device and the second device confirm the manner in which the VLAN information is transmitted.
  • the information of the virtual local area network VLAN includes: VLAN ID, IP subnet information corresponding to the network card, binding APN information and port type (Route/Bridge).
  • the transmission mode of the information of the virtual local area network VLAN includes the socket mode and the file form.
  • S304 The first device acquires the VLAN information and sends it to the second device.
  • the first device obtains the virtual local area network VLAN information and sends it to the second device.
  • the first device collects the virtual local area network VLAN configuration information of the corresponding network port, and sends it to the second device in the form of negotiation between the first device and the second device.
  • the network port on which the first device collects the VLAN information of the virtual local area network is the network port of the currently connected device.
  • the configuration process of the virtual local area network VLAN information is based on the virtual local area network VLAN configuration information of the port corresponding to the network port, and scans the address and routing information related to the logical network port corresponding to the virtual local area network VLAN.
  • S305 The second device configures its own VLAN information according to the VLAN information.
  • the second device configures its own VLAN information according to the VLAN information.
  • the configuration of the virtual local area network VLAN includes: establishing a virtual local area network VLAN logical network card, configuring the IP address of the logical network card, establishing an uplink APN link and adding a route.
  • FIG. 4 is a schematic flowchart of a conflict detection method provided by an embodiment of the present application.
  • the conflict detection method shown in FIG. 4 at least includes the following steps: S401: start a timer; S402: the second device sends a DHCP message to the first device; S403: whether the timer expires; S404: whether the second device receives DHCP message; S405: Parse the subnet and gateway of the first device; S406: Whether the gateways are the same; S407: Whether the subnets overlap; S408: Start address conflict avoidance; S409: End the process.
  • the collision detection method is based on timing detection.
  • the second device sends a DHCP packet to the first device.
  • the second device sends a DHCP Discovery message to the first device to request allocation of an IP address.
  • step S405 it is detected whether the timer has timed out, and if it has not timed out, step S405 is performed; otherwise, step S409 is performed.
  • step S405 it is detected whether the second device has received the DHCP Offer message sent by the first device. If yes, go to step S405, if no, go back to step S402, and continue to send the DHCP Discovery request message.
  • S405 Parse the subnet and gateway of the first device.
  • the second device parses the gateway and subnet address information of the first device from the received DHCP Offer message.
  • the second device detects whether the gateway address of its own device is the same as the gateway address of the first device. If they are the same, go to step S408; if not, go to step S407.
  • the second device detects whether its own subnet address is coincident with the subnet address of the first device, and if so, proceeds to step S408; if not, proceeds to step S409.
  • address conflict avoidance is enabled, and the gateway and subnet address configurations of the second device are modified.
  • the conflict detection process ends.
  • FIG. 5 is a schematic flowchart of an information collection method provided by an embodiment of the present application.
  • the information collection method shown in FIG. 5 at least includes the following steps: S501: the first device enables VLAN information collection; S502: obtains port information; S503: obtains the port VLAN ID and label; S504: whether the port has been added under the VLAN label; S505: obtain the network port corresponding to the VLAN ID; S506: obtain the IP address corresponding to the network port; S507: obtain the information of VLAN ID binding; S508: the first device produces a VLAN information file.
  • S501 The first device enables VLAN information collection.
  • the first device enables the collection of virtual local area network (VLAN) information.
  • VLAN virtual local area network
  • the first device obtains the port information of the currently inserted network cable working normally.
  • the first device obtains all the VLAN configuration information of the virtual local area network of the current device, and parses that the VLAN configuration of the virtual local area network includes all the VLAN ID information of the port obtained in step S502, and the label of the port in the VLAN configuration item of the virtual local area network. Status, i.e. tagged or untagged.
  • the first device determines whether the port attribute in the virtual local area network VLAN configuration information is tagged.
  • the first device obtains the network port name corresponding to the corresponding VLAN ID according to the system virtual local area network VLAN configuration information.
  • the acquisition method includes obtaining the network port name from information such as proc, net, vlan, and config.
  • the network port name is obtained by parsing the ifconfig command, or the IP address information set by the network port is obtained by other means.
  • S507 Acquire information about VLAN ID binding.
  • the bound APN information is obtained according to the VLAN ID.
  • the first device produces a VLAN information file.
  • the first device generates a virtual local area network VLAN information file.
  • FIG. 6 is a schematic flowchart of a method for transmitting network configuration information provided by an embodiment of the present application.
  • the method for transmitting network configuration information as shown in FIG. 6 at least includes the following steps: S601: the second device selects a readable and writable path and sends it to the first device; S602: the first device obtains the readable and writable path sent by the second device; S603: The first device sends a file with the same name according to the read-write path; S604: The second device obtains the read-write path of the first device; S605: The second device sends the format of the VLAN information to be obtained to the first device; S606: The first device Send the VLAN configuration file to the second device; S607: The second device performs adaptive configuration.
  • the second device selects a readable and writable path and sends it to the first device.
  • the second device selects a writable path, writes the path and the file name expected to be received into a file with the same name, and attempts to send the file to the first device in the same directory.
  • the first device obtains the readable and writable path sent by the second device.
  • the first device acquires the file name and storage path expected to be received by the second device through detection by the tftpd process.
  • S603 The first device sends a file with the same name according to a readable and writable path.
  • the first device selects a writable directory, writes the directory to a file of the same name sent by the second device, and then sends the directory to the requested directory by the second device.
  • the second device obtains the readable and writable path of the first device.
  • the second device detects that the first device pushes a file to perform parsing and obtains the writable directory of the first device.
  • the second device sends the VLAN information format to be acquired to the first device.
  • the second device writes the format of the virtual local area network VLAN information to be acquired into a file with the same name as the virtual local area network VLAN configuration to be acquired, and sends the file to the first device.
  • S606 The first device sends the VLAN configuration file to the second device.
  • the first device obtains the virtual local area network VLAN configuration format file sent by the second device, parses and sends the virtual local area network VLAN configuration file to the second device according to the file format.
  • S607 The second device performs adaptive configuration.
  • the second device receives the virtual local area network VLAN configuration file sent by the first device, parses the file, and performs adaptive configuration.
  • the self-adaptive configuration of the virtual local area network VLAN includes: establishing a virtual local area network VLAN logical network port, configuring the IP address of the logical network port, establishing an uplink APN link and adding a route.
  • FIG. 7 is a schematic flowchart of the operation of the second device provided by an embodiment of the present application.
  • the second device workflow shown in FIG. 7 includes at least the following steps: S701: set to the second device mode; S702: start UDHCPC or TFTPD; S703: start the timing mechanism; S704: whether to obtain an IP address; A device sends a writable directory file; S706: whether to receive a response from the first device; S707: to send the required VLAN information to the first device; S708: whether to receive a response from the first device; S709 configure VLAN according to the received VLAN information; S710: Whether it times out; S711: Waiting for a response; S712: Feeding back the configuration status result.
  • the device is set to the second device mode.
  • S702 Start UDHCPC or TFTPD.
  • the second device initiates the UDHCPC and TFTPD processes.
  • the UDHCPC process is used for the communication connection established by assigning the IP address to the second device.
  • UDHCPC selects the LAN port to be connected by the downstream device, and the downstream access device selects the upstream WAN port as the bound NIC.
  • the TFTPD process is used for file transfers. S703: Start the timing mechanism.
  • a timing mechanism is activated. Prevent the device from being in a waiting state under abnormal conditions. If the timer expires, the information about the failure of vlan information synchronization will be fed back.
  • the second device starts the UDHCPC process and the network port is connected, it initiates a DHCP process to the first device to obtain an IP address, and establishes a communication connection. If the second device receives the IP address sent by the first device, it goes to step S706; otherwise, it goes to step S705 to determine whether the timer has timed out, and if not, it keeps the monitoring state.
  • S705 Send the writable directory file to the first device.
  • the second device sends the writable directory file to the first device via a TFTP command.
  • the filename is set to the filename that the second device expects the first device to feed back.
  • the file includes a writable path and a file name where the second device expects to receive the file.
  • the second device judges whether the corresponding information of the first device is received, and if received, then proceeds to step S709; if not, then proceeds to step S711.
  • S707 Send the required VLAN information to the first device.
  • the second device sends the required virtual local area network VLAN information to the first device.
  • the second device determines whether the corresponding information of the first device is received, and if so, it proceeds to step S709; if not, it proceeds to step S711.
  • the virtual local area network VLAN information received by the second device configures the virtual local area network VLAN.
  • the second device determines whether it times out, and if it times out, it goes to step S712.
  • waiting for response information fed back by the first device waiting for response information fed back by the first device.
  • configuration status results are fed back. If successful, the feedback configuration is successful; if unsuccessful, the feedback configuration fails.
  • FIG. 8 is a schematic flowchart of the operation of the first device provided by an embodiment of the present application.
  • the second device workflow shown in FIG. 8 at least includes the following steps: S801: set to the first device mode; S802: start UDHCPC or TFTPD; S803: start the timing mechanism; S804: whether to obtain an IP address; The second device assigns an IP address and establishes a connection; S806: Whether the second device path file is received; S807: Select an available path and send a file with the same name to the second device; S808: Whether the second device responds; S809: According to the received VLAN configuration format Configure the VLAN and send it to the second device; S810: Whether it times out; S811: Waiting for a response; S812: Feeding back the configuration status result.
  • the device is set to the first device mode.
  • the first device initiates the UDHCPD and TFTPD processes.
  • the UDHCPD process is used for the communication connection established by assigning the IP address to the second device.
  • UDHCPD selects the LAN port to be connected by the downstream device, and the downstream access device selects the upstream WAN port as the bound NIC.
  • the TFTPD process is used for file transfers.
  • a timing mechanism is activated. Prevent the device from being in a waiting state under abnormal conditions. If the timer expires, the information about the failure of vlan information synchronization will be fed back.
  • the first device determines whether the first device receives the DHCP request message sent by the second device. After the first device starts the UDHCPD process, it starts to monitor the DHCP request message of the access device. If the first device receives the DHCP request message sent by the second device, it goes to step S806; otherwise, it goes to step S805 to determine whether the timer has timed out, and if not, it keeps the monitoring state.
  • S805 Assign an IP address to the second device and establish a connection.
  • the first device detects a DHCP request message sent by the second device, it sends a DHCP Offer message to the second device to assign an IP address to the second device. After the DHCP process is completed, a communication connection is established between the first device and the second device.
  • the first device determines whether a request from the second device to send a first attempt to file is received. If the file sending request from the second device is received, go to S807; if not, go to step S811, and wait until the timer times out.
  • S807 Select an available path and send a file with the same name to the second device.
  • the first device after receiving the request of the second device for the first attempt to send a file, the first device saves a writable path of the local machine in a file with the same name, and pushes the file to the second device for the first time Under the path corresponding to the file sending request.
  • the first device determines whether the corresponding information of the second device is received, and if so, it proceeds to step S809; if not, it proceeds to step S811.
  • S809 configures the VLAN according to the received VLAN configuration format and sends it to the second device.
  • the first device parses the received virtual local area network VLAN configuration file information and format file, collects the virtual local area network VLAN configuration information corresponding to the network port sent by the second device according to the virtual local area network VLAN information collection mechanism, and collects the virtual local area network VLAN configuration information according to the requirements of the second device.
  • the format is written into a file with the same name and sent to the corresponding directory of the second device.
  • the first device determines whether it times out, and if it times out, it goes to step S812.
  • waiting for response information fed back by the second device waiting for response information fed back by the second device.
  • configuration status results are fed back. If the file is successfully sent to the second device, the feedback configuration is successful; if it is unsuccessful, the feedback configuration fails.
  • FIG. 9 is a schematic diagram of a network configuration architecture provided by an embodiment of the present application.
  • the schematic diagram of network configuration architecture shown in FIG. 9 includes: Internet 100 , network access device 200 , user access device 300 , first access device 401 , second access device 402 , and third access device 403 .
  • multiple connections are established between the network access device 200 and the Internet 100 through multiple access point names, APNs, or multiple wired access links.
  • a single physical link is used for connection between the network access device 200 and the user access device 300 .
  • multiple logical link connections are realized.
  • the logical link corresponds to the link established between the network access device 200 and the Internet 100 .
  • the user access device 300 is connected to access devices such as a first access device 401 , a second access device 402 , and a third access device 403 . These devices can be terminals or functions.
  • the first access device 401 and the second access device 402 may use one data link for communication
  • the third access device 403 may use another data link for communication.
  • the virtual local area network VLAN configuration of the network access device 200 or the user access device 300 is completed according to the virtual local area network VLAN configuration information, and a VLAN logical link is established between the network access device 200 and the user access device 300, thereby Realize multi-logical link communication based on a single physical link.
  • the association between the user terminal or the service and the logical link may also be implemented by establishing multiple data links between the network access device 200 and the Internet 100 .
  • An embodiment of the present application provides a communication terminal, which is communicatively connected to a second terminal, and includes: an information acquisition module, configured to acquire first configuration information of a virtual local area network (VLAN); and an information sending module, configured to send the first configuration information to the first configuration information.
  • the second device a communication module, configured to establish a communication connection with the second terminal through the untagged interface.
  • VLAN virtual local area network
  • An embodiment of the present application provides a communication terminal, which is communicatively connected to a first terminal, and includes: an information acquisition module configured to acquire first configuration information of a virtual local area network VLAN from the first terminal; a network configuration module configured to obtain first configuration information according to the first terminal.
  • the first configuration information sets the VLAN information of the virtual local area network, and obtains the second configuration information;
  • the communication module is configured to establish a communication connection with the first terminal through the untagged interface.
  • Embodiments of the present application provide a computer-readable storage medium for computer-readable storage, where the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the foregoing Network configuration method.
  • the embodiment of the present application can realize the virtual local area network VLAN transmission between the master and slave devices, and the slave device can perform the self-adaptive configuration of the virtual local area network VLAN according to the information obtained from the master device, which simplifies the network architecture of the virtual local area network VLAN. Improved system stability.
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery media, as is well known to those of ordinary skill in the art .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种网络配置方法、终端、系统及存储介质,接收来自所述第一设备的第一配置信息;根据所述第一配置信息设置所述第二设备的虚拟局域网VLAN信息,并获取第二配置信息;所述第一设备通过未加标签untagged端口与所述第二设备建立通信连接。

Description

网络配置方法、终端、系统及存储介质
相关申请的交叉引用
本申请基于申请号为202010989901.3、申请日为2020年09月18日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及虚拟局域网(Virtual Local Area Network,VLAN),尤其涉及一种网络配置方法、终端、系统及存储介质。
背景技术
虚拟局域网VLAN是一种基于二层交换机的广播域分割技术,应用虚拟局域网VLAN可以根据网络用户的位置、作用、部门或者根据网络用户所使用的应用程序和协议来进行分组,提高网络设计的自由度。根据电气和电子工程师协会(Institute of Electrical and Electronics Engineers,IEEE)发布的802.1Q协议(dot1q),允许多个网桥(Bridge)在信息不被外泄的情况下公开的共享同一个实体网上。
随着无线技术的不断发展和无线网络速率的不断提升,智能设备正变得越来越普及。由于接入设备的不断增加,虚拟局域网VLAN因其可以不受网络用户的物理位置限制而根据用户需求进行网络分段的特性,正变得越来越普及。
目前,虚拟局域网VLAN通过虚拟局域网标识(VLAN Tagging)中的虚拟局域网VLAN唯一编号(Identity document,ID)实现接入设备的接入和切换。接入设备需要监听每个数据报文中虚拟局域网唯一编号VlAN ID的信息,会占用设备的资源,从而影响设备性能;虚拟局域网VLAN系统内需要发送大量的报文,降低了虚拟局域网VLAN系统的稳定性。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本申请实施例提供了一种网络配置方法、终端、系统及存储介质。
第一方面,本申请实施例提供了一种网络配置方法,应用于第一设备,所述第一设备与第二设备通信连接,包括:获取虚拟局域网VLAN的第一配置信息;发送所述第一配置信息至第二设备;所述第一设备与所述第二设备建立通信连接的方式包括通过未加标签untagged接口。
第二方面,本申请实施例提供了一种网络配置方法,应用于第二设备,所述第二设备与第一设备通信连接,包括:获取来自所述第一设备的第一配置信息;根据所述第一配置信息设置所述第二设备的虚拟局域网VLAN信息,并获取第二配置信息;所述第一设备与所述第二设备建立通信连接的方式包括通过未加标签untagged链路。
第三方面,本申请实施例提供了一种网络配置方法,应用于通信连接的第一设备和第 二设备,包括:所述第一设备获取虚拟局域网VLAN的第一配置信息;所述第一设备发送所述第一配置信息至第二设备;所述第二设备根据所述第一配置信息设置所述第二设备的虚拟局域网VLAN信息;所述第二设备根据所述第二设备的虚拟局域网VLAN信息获取第二配置信息;所述第二设备发送所述第二配置信息至所述第一设备;所述第一设备通过未加标签untagged端口与所述第二设备建立通信连接。
第四方面,本申请实施例提供了一种终端,通信连接第二终端,包括:信息获取模块,被设置成获取虚拟局域网VLAN的第一配置信息;信息发送模块,被设置成发送所述第一配置信息至第二设备;通信模块,被设置成通过未加标签untagged接口与第二终端建立通信连接。
第五方面,本申请实施例提供了一种终端,通信连接第一终端,包括:信息获取模块,被设置成获取来自第一终端的虚拟局域网VLAN的第一配置信息;网络配置模块,被设置成根据所述第一配置信息设置虚拟局域网VLAN信息,并获取第二配置信息;通信模块,被设置成通过未加标签untagged接口与第一终端建立通信连接。
第六方面,本申请实施例提供了一种网络配置系统,其特征在于,包括:至少一个如第三方面所述的第一终端;以及,至少一个如第四方面所述的第二终端;所述第一终端与所述第二终端通信连接。
第七方面,本申请实施例提供了一种计算机可读存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现第一方面所述的网络配置方法;或者,如第二方面所述的网络配置方法;或者,如第三方面所述的网络配置方法。
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。
附图说明
图1是本申请一实施例提供的网络配置方法的流程示意图;
图2是本申请另一实施例提供的网络配置方法的流程示意图;
图3是本申请另一实施例提供的网络配置方法的流程示意图;
图4是本申请一实施例提供的冲突检测方法的流程示意图;
图5是本申请一实施例提供的信息采集方法的流程示意图;
图6是本申请一实施例提供的网络配置信息传递方法的流程示意图;
图7是本申请一实施例提供的第二设备工作的流程示意图;
图8是本申请一实施例提供的第一设备工作的流程示意图;
图9是本申请一实施例提供的网络配置架构示意图。
附图标记:
互联网100;网络接入设备200;用户接入设备300;第一接入设备401;第二接入设备402;第三接入设备403。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本 申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
局域网(Local Area Network,LAN)可以是由少数几台家用计算机构成的网络,也可以是数以百计的计算机构成的企业网络。虚拟局域网VLAN中所指的局域网LAN特指使用路由器分割的网络,即广播域。广播域,指的是广播帧(目标MAC地址全部为1)所能传递到的范围,即能够直接通信的范围。二层交换机只能构建单一的广播域,在使用虚拟局域网VLAN功能后,它能够将网络分割成多个广播域。若只存在一个广播域,在交换机接收到广播帧后,会转发至除接收端口外的全部端口,而此时,需要获取该广播信息的端口可能只有一个,但是此时数据帧却传遍了整个网络。因此,广播信息消耗了网络整体的带宽,收到广播信息的计算机还要消耗一部分CPU时间来对它进行处理。造成了网络带宽和CPU运算能力的大量无谓消耗。应用虚拟局域网VLAN分割多个广播域可以提高网络整体的传输性能。
目前,应用虚拟局域网VLAN应用已加标签tagged数据帧进行虚拟局域网VLAN配置,已加标签tagged报文结构的变化是在源mac地址和目的mac地址之后,加上了4bytes的vlan信息,即vlan tag报头,这样的报文需要采用特定的设备进行接收,会提高虚拟局域网VLAN设备的要求,并提高系统的复杂度。
下面将结合附图对本申请的技术方案进行清楚、完整的描述,显然,以下所描述的实施例是本申请一部分实施例,并非全部实施例。
图1是本申请一实施例提供的网络配置方法的流程示意图。如图1所示的网络配置方法,至少包括以下步骤:S101:接收来自第一设备的第一配置信息;S102:根据第一配置信息设置第二设备的虚拟局域网VLAN信息;S103:生成第二配置信息。
S101:接收来自第一设备的第一配置信息。
在一些实施例中,第二设备接收来自第一设备的第一配置信息。第一配置信息包括虚拟局域网VLAN信息。
S102:根据第一配置信息设置第二设备的虚拟局域网VLAN信息。
在一些实施例中,第二设备根据第一配置信息设置第二设备的虚拟局域网VLAN信息。
S103:生成第二配置信息。
在一些实施例中,第二设备根据自身的虚拟局域网VLAN信息生成第二配置信息。
在一些实施例中,第一配置信息至少包括以下信息之一:虚拟局域网唯一编号VLANID、网际互连协议(Internet Protocol,IP)子网信息、接入点名称(Access Point Name,APN)信息、端口类型信息中。
在一些实施例中,获取来自第一设备的第一配置信息的方式包括接收套接字Socket和接收文件中的至少一种。
在一些实施例中,网络配置方法还至少包括以下信息之一:发送第二配置信息至第一设备,第二配置信息包括虚拟局域网唯一编号VLANID、网际互连协议IP子网信息、接入 点名称APN信息中。
图2是本申请另一实施例提供的网络配置方法的流程示意图。如图2所示的网络配置方法,至少包括以下步骤:S201:获取虚拟局域网VLAN信息的第一配置信息;S202:发送第一配置信息至第二设备。
S201:获取虚拟局域网VLAN信息的第一配置信息。
在一些实施例中,第一设备获取来自虚拟局域网VLAN信息的第一配置信息。
S202:发送第一配置信息至第二设备。
在一些实施例中,第一设备发送第一配置信息至第二设备。
在一些实施例中,第一配置信息至少包括以下信息之一:虚拟局域网唯一编号VLANID、网际互连协议IP子网信息、接入点名称APN信息、端口类型信息中。
在一些实施例中,发送第一配置信息至第二设备的方式包括发送套接字Socket和发送文件中的至少一种。
在一些实施例中,网络配置方法还包括:获取来自第二设备的第二配置信息。
在一些实施例中,网络配置方法还包括:根据第二配置信息检测第一配置信息与第二配置信息是否冲突;若不冲突,则结束流程;若冲突,则执行冲突规避方法。
在一些实施例中,冲突规避方法包括:进行子网地址重置;对第一设备的子网进行重新配置。
图3是本申请另一实施例提供的网络配置方法的流程示意图。如图3所示的网络配置方法,至少包括以下步骤:S301:第一设备和第二设备同步;S302:第一设备和第二设备建立通信链路;S303:第一设备和第二设备确认VLAN信息传输方式;S304:第一设备获取VLAN信息,并发送至第二设备;S305:第二设备根据VLAN信息配置自身VLAN信息。
S301:第一设备和第二设备同步。
在一些实施例中,设置第一设备和第二设备虚拟局域网VLAN同步模式并连接对应端口。虚拟局域网VLAN配置完成的设备作为虚拟局域网VLAN配置信息的发送方,设置为第一设备;虚拟局域网VLAN信息的接收方设置为第二设备。第一设备和第二设备仅为在虚拟局域网VLAN信息配置时的命名方式。
S302:第一设备和第二设备建立通信链路。
在一些实施例中,第一设备和第二设备建立通信链路。可采用DHCP方式进行连接。第一设备和第二设备分别启动DHCPD和DHCPC进程。在使用网线将两个设备正常使用时连接的两个网口相连时,第一设备和第二设备使用默认的untagged链路通过DHCP方式建立通信链路。在通信链路建立时,第二设备对第一设备的子网和自身子网进行检测,若检测到冲突需要做进一步的冲突规避处理。
S303:第一设备和第二设备确认VLAN信息传输方式。
在一些实施例中,第一设备和第二设备确认VLAN信息传输方式。虚拟局域网VLAN的信息包括:VLAN ID、网卡对应的IP子网信息、绑定APN信息及端口类型(Route/Bridge)。虚拟局域网VLAN的信息的传输方式包括以socket方式及文件形式。
S304:第一设备获取VLAN信息,并发送至第二设备。
在一些实施例中,第一设备获取虚拟局域网VLAN信息,并发送至第二设备。第一设备收集对应网口的虚拟局域网VLAN配置信息,并以第一设备和第二设备双方协商的形式 发送给第二设备。第一设备收集虚拟局域网VLAN信息的网口为当前连接设备的网口。虚拟局域网VLAN信息的配置过程根据网口对应端口的虚拟局域网VLAN配置信息,并扫描虚拟局域网VLAN对应的逻辑网口相关的地址和路由信息。
S305:第二设备根据VLAN信息配置自身VLAN信息。
在一些实施例中,第二设备根据VLAN信息配置自身VLAN信息。虚拟局域网VLAN的配置包括:建立虚拟局域网VLAN逻辑网卡,配置逻辑网卡IP地址,建立上行APN链路以及添加路由。
图4是本申请一实施例提供的冲突检测方法的流程示意图。如图4所示的冲突检测方法,至少包括以下步骤:S401:启动定时器;S402:第二设备向第一设备发送DHCP报文;S403:定时器是否超时;S404:第二设备是否收到DHCP报文;S405:解析第一设备的子网和网关;S406:网关是否相同;S407:子网是否重合;S408:启动地址冲突规避;S409:结束流程。
S401:启动定时器。
在一些实施例中,冲突检测方法基于定时检测。
S402:第二设备向第一设备发送DHCP报文。
在一些实施例中,第二设备向第一设备发送DHCP Discovery报文请求分配IP地址。
S403:定时器是否超时。
在一些实施例中,检测定时器是否超时,若未超时,则进行步骤S405;否则进行步骤S409。
S404:第二设备是否收到DHCP报文。
在一些实施例中,检测第二设备是否收到了第一设备发送的DHCP Offer报文。若是则进行步骤S405,若否,则重新回到步骤S402,继续发送DHCP Discovery请求报文。
S405:解析第一设备的子网和网关。
在一些实施例中,第二设备从收到的DHCP Offer报文中解析第一设备的网关和子网地址信息。
S406:网关是否相同。
在一些实施例中,第二设备检测自身设备网关地址是否与第一设备的网关地址相同。若相同,则进行步骤S408;若不相同,则进行步骤S407。
S407:子网是否重合。
在一些实施例中,第二设备检测自身子网地址是否与第一设备的子网地址是否重合,如果是,则进行步骤S408;若不相同,则进行步骤S409。
S408:启动地址冲突规避。
在一些实施例中,开启地址冲突规避,修改第二设备的网关和子网地址配置。
S409:结束流程。
在一些实施例中,结束冲突检测流程。
图5是本申请一实施例提供的信息采集方法的流程示意图。如图5所示的信息采集方法,至少包括以下步骤:S501:第一设备开启VLAN信息采集;S502:获取端口信息;S503:获取端口VLAN ID及标签;S504:端口在VLAN下是否为已加标签;S505:获取VLANID对应的网口;S506:获取网口对应IP地址;S507:获取VLAN ID绑定的信息;S508:第一 设备生产VLAN信息文件。
S501:第一设备开启VLAN信息采集。
在一些实施例中,第一设备开启虚拟局域网VLAN信息采集。
S502:获取端口信息。
在一些实施例中,第一设备获取当前插入网线正常工作的端口信息。
S503:获取端口VLAN ID及标签。
在一些实施例中,第一设备获取当前设备的所有虚拟局域网VLAN配置信息,并解析虚拟局域网VLAN配置中包含步骤S502获取的端口的所有VLAN ID信息,以及端口在虚拟局域网VLAN配置项中的标签状态,即已加标签tagged或者未加标签untagged。
S504:端口在VLAN下是否为已加标签。
在一些实施例中,第一设备判断端口在虚拟局域网VLAN配置信息中端口属性是否为已加标签tagged。
S505:获取VLAN ID对应的网口。
在一些实施例中,第一设备根据系统虚拟局域网VLAN配置信息中获取对应VLAN ID对应的网口名称。获取的方式包括,通过proc、net、vlan及config等信息中获取网口名称。
S506:获取网口对应IP地址。
在一些实施例中,通过解析ifconfig命令获取网口名称,或者其他手段获取该网口设置的IP地址信息。
S507:获取VLAN ID绑定的信息。
在一些实施例中,根据VLAN ID获取绑定的APN信息。
S508:第一设备生产VLAN信息文件。
在一些实施例中,第一设备生成虚拟局域网VLAN信息文件。
图6是本申请一实施例提供的网络配置信息传递方法的流程示意图。如图6所示的网络配置信息传递方法,至少包括以下步骤:S601:第二设备选取可读写路径并发送至第一设备;S602:第一设备获取第二设备发送的可读写路径;S603:第一设备根据可读写路径发送同名文件;S604:第二设备获取第一设备的可读写路径;S605:第二设备发送待获取VLAN信息格式至第一设备;S606:第一设备发送VLAN配置文件至第二设备;S607:第二设备进行自适应配置。
S601:第二设备选取可读写路径并发送至第一设备。
在一些实施例中,第二设备选取一个可写路径,并将路径和期望接收文件名写入一个同名文件,并尝试向第一设备相同目录下发送文件。
S602:第一设备获取第二设备发送的可读写路径。
在一些实施例中,第一设备通过tftpd进程检测,获取第二设备期望接收的文件名和存放路径。
S603:第一设备根据可读写路径发送同名文件。
在一些实施例中,第一设备选取一个可写目录,并将目录写入到第二设备发送的同名文件中,随后发送至第二设备请求的目录。
S604:第二设备获取第一设备的可读写路径。
在一些实施例中,第二设备检测到第一设备推送来文件开展解析并获取第一设备的可写目录。
S605:第二设备发送待获取VLAN信息格式至第一设备。
在一些实施例中,第二设备将要获取的虚拟局域网VLAN信息的格式写入要获取的虚拟局域网VLAN配置同名文件中,将文件发送至第一设备。
S606:第一设备发送VLAN配置文件至第二设备。
在一些实施例中,第一设备获取第二设备发送的虚拟局域网VLAN配置格式文件,解析并按照文件格式将虚拟局域网VLAN配置文件并发送至第二设备。
S607:第二设备进行自适应配置。
在一些实施例中,第二设备收到第一设备发送来的虚拟局域网VLAN配置文件,解析文件并进行自适应配置。虚拟局域网VLAN的自适应配置包括:建立虚拟局域网VLAN逻辑网口、配置逻辑网口IP地址、建立上行APN链路及添加路由。
图7是本申请一实施例提供的第二设备工作的流程示意图。如图7所示的第二设备工作流程,至少包括以下步骤:S701:设置为第二设备模式;S702:启动UDHCPC或者TFTPD;S703:启动定时机制;S704:是否获取IP地址;S705:向第一设备发送可写目录文件;S706:是否收到第一设备响应;S707:向第一设备发送需要的VLAN信息;S708:是否收到第一设备响应;S709根据接收到的VLAN信息配置VLAN;S710:是否超时;S711:等待响应;S712:反馈配置状态结果。
S701:设置为第二设备模式。
在一些实施例中,将设备设置为第二设备模式。
S702:启动UDHCPC或者TFTPD。
在一些实施例中,第二设备启动UDHCPC和TFTPD进程。UDHCPC进程用于为第二设备分配IP地址而建立的通信连接。对于上游接入设备,UDHCPC选择下游设备要接入的LAN口,下游接入设备则选择上行WAN口作为绑定网卡。TFTPD进程用于进行文件传输。S703:启动定时机制。
S703:启动定时机制。
在一些实施例中,启动定时机制。防止设备在异常情况下一直处于等待状态。若计时器超,则反馈vlan信息同步失败的信息。
S704:是否获取IP地址。
在一些实施例中,判断是否获取IP地址。第二设备启动UDHCPC进程且网口联通时,向第一设备发起DHCP过程获取IP地址,并建立通信连接。若第二设备收到第一设备发送的IP地址,则进入步骤S706,否则进入步骤S705,判断定时器是否超时,若没有,则保持监听状态。
S705:向第一设备发送可写目录文件。
在一些实施例中,第二设备通过TFTP命令向第一设备发送可写目录文件。文件名设置为第二设备期望第一设备反馈的文件名。文件中包括第二设备期望接收文件的可写路径及文件名。
S706:是否收到第一设备响应。
在一些实施例中,第二设备判断是否接收到第一设备的相应信息,若收到,则进入步 骤S709;若未收到,则进入步骤S711。
S707:向第一设备发送需要的VLAN信息。
在一些实施例中,第二设备向第一设备发送需求的虚拟局域网VLAN信息。
S708:是否收到第一设备响应。
在一些实施例中,第二设备判断是否接收到第一设备的相应信息,若收到,则进入步骤S709;若未收到,则进入步骤S711。
S709:根据接收到的VLAN信息配置VLAN。
在一些实施例中,第二设备人家接收到的虚拟局域网VLAN信息配置虚拟局域网VLAN。
S710:是否超时。
在一些实施例中,第二设备判断是否超时,若超时,则进入步骤S712。
S711:等待响应。
在一些实施例中,等待第一设备反馈的响应信息。
S712:反馈配置状态结果。
在一些实施例中,反馈配置状态结果。若成功则反馈配置成功;若不成功,则反馈配置失败。
图8是本申请一实施例提供的第一设备工作的流程示意图。如图8所示的第二设备工作流程,至少包括以下步骤:S801:设置为第一设备模式;S802:启动UDHCPC或者TFTPD;S803:启动定时机制;S804:是否获取IP地址;S805:为第二设备分配IP地址并建立连接;S806:是否收到第二设备路径文件;S807:选取可用路径并将同名文件发至第二设备;S808:是否收到第二设备响应;S809根据接收到的VLAN配置格式配置VLAN并发送至第二设备;S810:是否超时;S811:等待响应;S812:反馈配置状态结果。
S801:设置为第一设备模式。
在一些实施例中,将设备设置为第一设备模式。
S802:启动UDHCPD或者TFTPD。
在一些实施例中,第一设备启动UDHCPD和TFTPD进程。UDHCPD进程用于为第二设备分配IP地址而建立的通信连接。对于上游接入设备,UDHCPD选择下游设备要接入的LAN口,下游接入设备则选择上行WAN口作为绑定网卡。TFTPD进程用于进行文件传输。
S803:启动定时机制。
在一些实施例中,启动定时机制。防止设备在异常情况下一直处于等待状态。若计时器超,则反馈vlan信息同步失败的信息。
S804:是否获取IP地址。
在一些实施例中,判定第一设备是否收到第二设备发送的DHCP请求报文。第一设备启动UDHCPD进程后,开始监听接入设备的DHCP请求报文。若第一设备收到第二设备发送的DHCP请求报文则进入步骤S806,否则进入步骤S805,判断定时器是否超时,若没有,则保持监听状态。
S805:为第二设备分配IP地址并建立连接。
在一些实施例中,第一设备若检测到第二设备发送的DHCP请求报文,则向第二设备发送DHCP Offer报文,为第二设备分配IP地址。在DHCP过程完成后,第一设备和第二设备间建立通信连接。
S806:是否收到第二设备路径文件。
在一些实施例中,第一设备判断是否接收到第二设备发送尝试第一次文件的请求。若收到第二设备文件发送请求,则进入S807;若未收到,则进步步骤S811,等待直至定时器超时。
S807:选取可用路径并将同名文件发至第二设备。
在一些实施例中,第一设备在收到第二设备第一次文件发送尝试的请求后,在同名文件中保存本机的一个可写路径,并将该文件推送给第二设备第一次文件发送请求对应的路径下。
S808:是否收到第二设备响应。
在一些实施例中,第一设备判断是否接收到第二设备的相应信息,若收到,则进入步骤S809;若未收到,则进入步骤S811。
S809根据接收到的VLAN配置格式配置VLAN并发送至第二设备。
在一些实施例中,第一设备解析接收的虚拟局域网VLAN配置文件信息和格式文件,按照虚拟局域网VLAN信息收集机制采集第二设备发送网口对应的虚拟局域网VLAN配置信息并根据第二设备需求的格式写入同名文件并发送至第二设备对应目录下。
S810:是否超时。
在一些实施例中,第一设备判断是否超时,若超时,则进入步骤S812。
S811:等待响应。
在一些实施例中,等待第二设备反馈的响应信息。
S812:反馈配置状态结果。
在一些实施例中,反馈配置状态结果。若成功向第二设备发送文件,则反馈配置成功;若不成功,则反馈配置失败。
图9是本申请一实施例提供的网络配置架构示意图。如图9所示的网络配置架构示意图,包括:互联网100、网络接入设备200、用户接入设备300、第一接入设备401、第二接入设备402及第三接入设备403。
在一些实施例中,网络接入设备200和互联网100间通过多个接入点名称APN或者多有线接入链路建立多个连接。在网络接入设备200和用户接入设备300之间应用单一物理链接进行连接。并在物理链接上通过对虚拟局域网VLAN的配置,实现了多条逻辑链路连接。逻辑链路与网络接入设备200与互联网100间建立的链接对应。用户接入设备300连接了第一接入设备401、第二接入设备402及第三接入设备403等接入设备。这些设备可以是终端或者功能。例如,第一接入设备401和第二接入设备402可以采用一条数据链路进行通信,而第三接入设备403可以采用另外一条数据链路进行通信。
在一些实施例中,根据虚拟局域网VLAN配置信息完成网络接入设备200或者用户接入设备300的虚拟局域网VLAN配置,在网络接入设备200与用户接入设备300间建立VLAN逻辑链路,从而实现基于单一物理链路上开展多逻辑链路通信。
在一些实施例中,还可以通过建立网络接入设备200与互联网100间多数据链路,实现用户终端或者服务与逻辑链路的关联。
本申请实施例提供了一种通信终端,通信连接第二终端,包括:信息获取模块,被设置成获取虚拟局域网VLAN的第一配置信息;信息发送模块,被设置成发送第一配置信息 至第二设备;通信模块,被设置成通过未加标签untagged接口与第二终端建立通信连接。
本申请实施例提供了一种通信终端,通信连接第一终端,包括:信息获取模块,被设置成获取来自第一终端的虚拟局域网VLAN的第一配置信息;网络配置模块,被设置成根据第一配置信息设置虚拟局域网VLAN信息,并获取第二配置信息;通信模块,被设置成通过未加标签untagged接口与第一终端建立通信连接。
本申请实施例提供了一种计算机可读存储介质,用于计算机可读存储,存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述的网络配置方法。
本申请实施例基于虚拟局域网VLAN,可以实现主从设备之间的虚拟局域网VLAN传递,从设备可根据从主设备获取的信息进行虚拟局域网VLAN的自适应配置,简化了虚拟局域网VLAN的网络架构,提高了系统的稳定性。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
以上是对本申请的一些实施进行了具体说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请范围的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。

Claims (18)

  1. 一种网络配置方法,应用于第二设备,所述第二设备与第一设备通信连接,包括:
    接收来自所述第一设备的第一配置信息;
    根据所述第一配置信息设置所述第二设备的虚拟局域网VLAN信息,并获取第二配置信息;
    所述第一设备通过未加标签untagged端口与所述第二设备建立通信连接。
  2. 根据权利要求1所述的网络配置方法,其中,所述第一配置信息至少包括以下信息之一:
    虚拟局域网编号VLAN ID、网际互连协议IP子网信息、接入点名称APN信息、端口类型信息。
  3. 根据权利要求1所述的网络配置方法,其中,所述第二设备通过套接字Socket或文件等形式接收所述第一配置信息。
  4. 根据权利要求1至3任一项所述的网络配置方法,其中,还包括:
    发送第二配置信息至第一设备,所述第二配置信息至少包括以下信息之一虚拟局域网编号VLAN ID、网际互连协议IP子网信息、接入点名称APN信息中。
  5. 一种网络配置方法,应用于第一设备,所述第一设备与第二设备通信连接,包括:
    获取虚拟局域网VLAN的第一配置信息;
    发送所述第一配置信息至第二设备;
    所述第一设备与所述第二设备通过未加标签untagged接口通信连接。
  6. 根据权利要求5所述的网络配置方法,其中,所述第一配置信息至少包括一下信息之一:
    虚拟局域网唯一编号VLAN ID、网际互连协议IP子网信息、接入点名称APN信息、端口类型信息中。
  7. 根据权利要求5所述的网络配置方法,其中,所述发送所述第一配置信息至第二设备的方式包括发送套接字Socket和发送文件中的至少一种。
  8. 根据权利要求5至7中任一项所述的网络配置方法,其中,还包括:
    获取来自所述第二设备的第二配置信息。
  9. 根据权利要求8所述的网络配置方法,其中,还包括:
    根据所述第二配置信息检测所述第一配置信息与所述第二配置信息是否冲突;
    若不冲突,则结束流程;
    若冲突,则执行冲突规避方法。
  10. 根据权利要求9所述的网络配置方法,其中,所述冲突规避方法包括:
    进行子网地址重置;
    对所述第一设备的子网进行重新配置。
  11. 一种网络配置方法,应用于通信连接的第一设备和第二设备,包括:
    所述第一设备获取虚拟局域网VLAN的第一配置信息;
    所述第一设备发送所述第一配置信息至第二设备;
    所述第二设备根据所述第一配置信息设置所述第二设备的虚拟局域网VLAN信息;
    所述第二设备根据所述第二设备的虚拟局域网VLAN信息获取第二配置信息;
    所述第二设备发送所述第二配置信息至所述第一设备;
    所述第一设备通过未加标签untagged端口与所述第二设备建立通信连接。
  12. 根据权利要求11所述的网络配置方法,其中,还包括冲突检测;
    所述冲突检测至少包括以下步骤:
    所述第一设备发送第三配置信息至所述第二设备;
    所述第二设备根据所述第三配置信息获取所述第一设备的子网和网关;
    所述第二设备判断所述第一设备的子网和网关与所述第二设备的子网和网关是否相同;
    若相同,则修改所述第二设备的子网和网关;
    若不相同,则结束所述冲突检测。
  13. 根据权利要求11所述的网络配置方法,还包括:
    所述第二设备发送所述第一配置信息的获取方式至所述第一设备;
    所述第一设备根据所述获取方式发送所述第一配置信息至所述第二设备。
  14. 根据权利要求13所述的网络配置方法,其中,所述获取方式包括:
    通过套接字Socket或文件的形式发送所述第一配置信息。
  15. 一种通信终端,通信连接第二终端,包括:
    信息获取模块,被设置成获取虚拟局域网VLAN的第一配置信息;
    信息发送模块,被设置成发送所述第一配置信息至所述第二终端;
    通信模块,被设置成通过未加标签untagged接口与所述第二终端建立通信连接。
  16. 一种通信终端,通信连接第一终端,包括:
    信息获取模块,被设置成获取来自所述第一终端的虚拟局域网VLAN的第一配置信息;
    网络配置模块,被设置成根据所述第一配置信息设置虚拟局域网VLAN信息,并获取第二配置信息;
    通信模块,被设置成通过未加标签untagged接口与所述第一终端建立通信连接。
  17. 一种网络配置系统,包括:
    至少一个如权利要求15所述的第一通信终端;
    以及,至少一个如权利要求16所述的第二通信终端;其中,
    所述第一终端通过未加标签untagged端口与所述第二终端建立通信连接。
  18. 一种计算机可读存储介质,用于计算机可读存储,其中,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至4任一项所述的网络配置方法;或者,如权利要求6至10任一项所述的网络配置方法;或者,如权利要求11至14任一项所述的网络配置方法。
PCT/CN2021/110087 2020-09-18 2021-08-02 网络配置方法、终端、系统及存储介质 WO2022057477A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21868306.8A EP4117233A4 (en) 2020-09-18 2021-08-02 NETWORK CONFIGURATION METHOD, TERMINAL, SYSTEM AND STORAGE MEDIUM
US17/995,490 US20230179444A1 (en) 2020-09-18 2021-08-02 Network configuration method, terminal, system, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010989901.3A CN114205236A (zh) 2020-09-18 2020-09-18 网络配置方法、终端、系统及存储介质
CN202010989901.3 2020-09-18

Publications (1)

Publication Number Publication Date
WO2022057477A1 true WO2022057477A1 (zh) 2022-03-24

Family

ID=80645226

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/110087 WO2022057477A1 (zh) 2020-09-18 2021-08-02 网络配置方法、终端、系统及存储介质

Country Status (4)

Country Link
US (1) US20230179444A1 (zh)
EP (1) EP4117233A4 (zh)
CN (1) CN114205236A (zh)
WO (1) WO2022057477A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631062A (zh) * 2009-08-25 2010-01-20 北京东土科技股份有限公司 一种汇聚端口隔离的pvlan实现方法
CN103078770A (zh) * 2013-01-22 2013-05-01 浪潮电子信息产业股份有限公司 一种交换机稳定性测试方法
CN103812752A (zh) * 2014-03-03 2014-05-21 国家电网公司 一种电力通信网中vlan间资源共享的方法
CN103873374A (zh) * 2014-03-27 2014-06-18 杭州华三通信技术有限公司 虚拟化系统中的报文处理方法及装置
WO2018059503A1 (zh) * 2016-09-28 2018-04-05 中兴通讯股份有限公司 流量转发控制方法、装置及软件定义网络控制器和计算机存储介质
CN111614566A (zh) * 2020-06-02 2020-09-01 中电科航空电子有限公司 实现机载数据流转发的方法、装置、系统及可读存储介质

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7734736B2 (en) * 2003-08-19 2010-06-08 Alcatel Lucent Configuring virtual LANs on layer 2
CN102395056B (zh) * 2011-06-29 2017-09-26 中兴通讯股份有限公司 虚拟局域网模式的配置方法、系统
US8908698B2 (en) * 2012-01-13 2014-12-09 Cisco Technology, Inc. System and method for managing site-to-site VPNs of a cloud managed network
CN103763407A (zh) * 2014-01-28 2014-04-30 上海斐讯数据通信技术有限公司 二层虚拟局域网实现地址解析协议代理方法及局域网系统
US9432260B2 (en) * 2014-03-28 2016-08-30 Brocade Communications Systems, Inc. Automated configuration for network devices
US9473319B2 (en) * 2014-05-14 2016-10-18 International Business Machines Corporation Dynamic discovery and assignment of available virtual local area networks
AU2016201484A1 (en) * 2016-03-08 2017-09-28 Mazarick, Michael Emory MR System and method for resource allocation and configuration in cluster computing network
CN108400953A (zh) * 2017-02-06 2018-08-14 中兴通讯股份有限公司 控制终端上网及终端上网的方法,路由器设备及终端
US10616220B2 (en) * 2018-01-30 2020-04-07 Hewlett Packard Enterprise Development Lp Automatic onboarding of end devices using device profiles
CN109151916B (zh) * 2018-08-28 2023-06-20 北京佰才邦技术股份有限公司 移动网络业务的网络传输方法、装置和系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631062A (zh) * 2009-08-25 2010-01-20 北京东土科技股份有限公司 一种汇聚端口隔离的pvlan实现方法
CN103078770A (zh) * 2013-01-22 2013-05-01 浪潮电子信息产业股份有限公司 一种交换机稳定性测试方法
CN103812752A (zh) * 2014-03-03 2014-05-21 国家电网公司 一种电力通信网中vlan间资源共享的方法
CN103873374A (zh) * 2014-03-27 2014-06-18 杭州华三通信技术有限公司 虚拟化系统中的报文处理方法及装置
WO2018059503A1 (zh) * 2016-09-28 2018-04-05 中兴通讯股份有限公司 流量转发控制方法、装置及软件定义网络控制器和计算机存储介质
CN111614566A (zh) * 2020-06-02 2020-09-01 中电科航空电子有限公司 实现机载数据流转发的方法、装置、系统及可读存储介质

Also Published As

Publication number Publication date
EP4117233A4 (en) 2023-10-25
EP4117233A1 (en) 2023-01-11
CN114205236A (zh) 2022-03-18
US20230179444A1 (en) 2023-06-08

Similar Documents

Publication Publication Date Title
CN108574616B (zh) 一种处理路由的方法、设备及系统
US11941423B2 (en) Data processing method and related device
EP4040743B1 (en) Message transmission method and proxy node
CN107800602B (zh) 一种报文处理方法、设备及系统
CN103580980A (zh) 虚拟网络自动发现和自动配置的方法及其装置
CN113872845B (zh) 建立vxlan隧道的方法及相关设备
CN112751769B (zh) 发送报文的方法、装置及系统
WO2019080592A1 (zh) 一种发送报文的方法和设备
JP7124206B2 (ja) パケット処理方法およびゲートウェイ・デバイス
JP7483924B2 (ja) 接続ステータス検出方法、関連デバイス、コンピュータ記憶媒体、およびコンピュータプログラム
BR102020014994A2 (pt) Método para configuração de um sistema de extensão de cobertura de comunicação sem fio e um sistema de extensão de cobertura de comunicação sem fio que implementa o dito método
EP3038296A1 (en) Pool element status information synchronization method, pool register and pool element
US11929851B2 (en) Gateway selection method, device, and system
WO2024001701A1 (zh) 数据处理方法、装置及系统
CN107528788B (zh) 实现网络设备之间自动堆叠的方法和装置
CN116233279A (zh) 一种报文处理方法、设备及系统
WO2022057477A1 (zh) 网络配置方法、终端、系统及存储介质
US9998376B2 (en) Control device, communication system, control method, and non-transitory recording medium
EP3720078B1 (en) Anima network information processing method, device, and system
CN113590268B (zh) 虚拟机迁移方法、arp代理网关及vtep
WO2022083610A1 (zh) 一种ip地址分配方法、装置及系统
EP4184822A1 (en) Method and apparatus for keeping user terminal alive
US20240214308A1 (en) Data Transmission Method, System, and Apparatus
WO2023143186A1 (zh) 一种数据传输方法、系统及装置
WO2022068389A1 (zh) 一种基于用户组的报文转发方法、设备及系统

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021868306

Country of ref document: EP

Effective date: 20221005

NENP Non-entry into the national phase

Ref country code: DE