Method and apparatus for network access of msap devices
Patent Information
- Application Number
- CN202210234120.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-10
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-03-10
AI Technical Summary
[0005]本发明提供一种MSAP设备网络接入方法和装置,用于解决现有技术中MSAP设备的上线依靠人工实现,上线效率低的技术问题
[0031] The present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the MSAP device network access method.
Smart Images

Figure CN116781668B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network operation and maintenance technology, and in particular to a method and apparatus for network access of MSAP devices. Background Technology
[0002] The Multi Service Access Platform (MSAP) equipment is based on the traditional Synchronous Digital Hierarchy (SDH) technology and adopts advanced technologies such as Generic Framing Procedure (GFP), Virtual Concatenation (VCAT), and Link Capacity Adjustment Scheme (LCAS). It integrates Ethernet switching technology and Asynchronous Transfer Mode (ATM) switching technology to achieve integrated access and transmission of multiple services such as Time Division Multiplexing (TDM), Ethernet, and ATM. It fully considers the application needs of different users and can meet the network operation needs in various scenarios.
[0003] Maintaining MSAP devices is crucial for carrier networks due to their numerous network nodes and devices; therefore, a unified remote management approach is essential. MSAP devices support a variety of management methods, including remote management of device alarms, performance, and service activation / deactivation via the Simple Network Management Protocol (SNMP), significantly improving maintenance efficiency.
[0004] Most existing MSAP devices are manually connected, requiring manual configuration of IP (Internet Protocol) address, subnet mask, gateway address, and other information. This necessitates engineers having specialized serial port tools and familiarity with device configuration commands, resulting in low efficiency for MSAP device connection, a heavy workload for engineers, and inconvenient maintenance. Summary of the Invention
[0005] This invention provides a method and apparatus for network access of MSAP devices, which solves the technical problem that the online access of MSAP devices relies on manual operation and has low efficiency in the prior art.
[0006] This invention provides a method for MSAP device network access, comprising:
[0007] Receive the first message sent by the MSAP device;
[0008] If the private message type in the first message is a network access message and the message command is an IP address request, then the first message is determined to be an IP address request message, and the IP address of the MSAP device is determined based on the source MAC address in the IP address request message.
[0009] An IP address allocation message is generated based on the IP address and the source MAC address, and the IP address allocation message is sent to the MSAP device;
[0010] The IP address allocation message is used to enable the MSAP device to access the network.
[0011] According to the MSAP device network access method provided by the present invention, after sending the IP address allocation message to the MSAP device, the method further includes:
[0012] Receive the second message sent by the MSAP device;
[0013] If the private message type in the second message is a network access message and the message command is an IP address confirmation, then the second message is determined to be an IP address confirmation message fed back by the MSAP device based on the IP address allocation message;
[0014] Based on the IP address confirmation message and the network management server, the VLAN IF of the MSAP device is determined.
[0015] According to the MSAP device network access method provided by the present invention, determining the IP address of the MSAP device based on the source MAC address in the IP address request message includes:
[0016] The source MAC address in the IP address request message is compared with the candidate MAC addresses in the preset IP address list;
[0017] If the source MAC address is the same as the candidate MAC address, then the IP address corresponding to the candidate MAC address in the preset IP address list is determined as the IP address of the MSAP device;
[0018] If the source MAC address is different from all candidate MAC addresses in the preset IP address list, then an IP address is assigned to the MSAP device, and the assigned IP address is associated with the source MAC address and stored in the preset IP address list.
[0019] According to the MSAP device network access method provided by the present invention, receiving the first message sent by the MSAP device includes:
[0020] Based on the target VLAN in the operator's transmission network, receive the first message sent by the MSAP device;
[0021] The operator transmission network is configured as follows:
[0022] If the VLAN value in the first message is the same as the VLAN ID of the target VLAN in the operator's transmission network, then the first message is allowed to be transmitted through the target VLAN.
[0023] According to the MSAP device network access method provided by the present invention, the message content of the IP address request message includes the destination MAC address, source MAC address, Ethernet message type, VLAN value, private message type, message command, and check MAC address.
[0024] According to the MSAP device network access method provided by the present invention, the message content of the IP address allocation message includes the destination MAC address, source MAC address, Ethernet message type, VLAN value, private message type, message command, check MAC address, device IP address, device IP mask and gateway IP address.
[0025] This invention provides a network access device for MSAP equipment, comprising:
[0026] The receiving unit is used to receive the first message sent by the MSAP device;
[0027] The allocation unit is configured to determine that the first message is an IP address request message if the private message type in the first message is a network access message and the message command is an IP address request, and to determine the IP address of the MSAP device based on the source MAC address in the IP address request message.
[0028] The sending unit is configured to generate an IP address allocation message based on the IP address and the source MAC address, and send the IP address allocation message to the MSAP device;
[0029] The IP address allocation message is used to enable the MSAP device to access the network.
[0030] The present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the MSAP device network access method.
[0031] The present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the MSAP device network access method.
[0032] The present invention provides a computer program product, including a computer program that, when executed by a processor, implements the MSAP device network access method.
[0033] The MSAP device network access method and apparatus provided by this invention parses the first message sent by the MSAP device. If the private message type in the first message is a network access message and the message command is an IP address request, then the first message is determined to be an IP address request message, and the IP address of the MSAP device is determined. An IP address allocation message is generated and sent to the MSAP device, realizing automatic network access for the MSAP device without manual configuration by engineers. This improves the efficiency of MSAP device deployment and activation, and reduces the workload of engineers. In addition, the IP address request message uses a privately defined protocol, which is simpler than other general protocol messages, simplifying the message interaction process and reducing the workload of message maintenance. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0035] Figure 1 This is a flowchart illustrating the MSAP device network access method provided by the present invention;
[0036] Figure 2 This is an implementation framework diagram of the MSAP device network access method provided by the present invention;
[0037] Figure 3 This is a schematic diagram illustrating the entire process of MSAP device network access provided by the present invention;
[0038] Figure 4 This is a schematic diagram of the structure of the MSAP device network access device provided by the present invention;
[0039] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0041] It should be noted that the terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0042] Figure 1 This is a flowchart illustrating the MSAP device network access method provided by the present invention, as shown below. Figure 1 As shown, the method includes steps 110, 120 and 130.
[0043] Step 110: Receive the first message sent by the MSAP device.
[0044] Specifically, MSAP devices are primarily used to solve access problems in carrier transmission networks. MSAP devices can include central office equipment, user-end equipment, and network element management equipment, providing network services to users. Structurally, MSAP devices reside at the access layer of the carrier transmission network. Virtual Local Area Networks (VLANs) logically divide different users within the same physical local area network into different broadcast domains. Broadcast and unicast traffic within a VLAN is not forwarded to other VLANs, thus helping to improve traffic control, reduce equipment investment, simplify network management, and enhance network security.
[0045] Figure 2 This is an implementation framework diagram of the MSAP device network access method provided by the present invention, as shown below. Figure 2 As shown, several MSAP devices 210 are connected to a carrier transmission network 220. The carrier transmission network 220 may include multiple VLANs. Each MSAP device 210 is connected to a designated VLAN, where a gateway 230 assigns an IP address and determines a Virtual Local Area Network Interface (VLAN IF), enabling each MSAP device 210 to communicate with the network management server 240 in its corresponding VLAN. The MSAP device network access method provided in this embodiment is applied to the gateway 230.
[0046] The gateway receives the first message sent by the MSAP device via the VLAN. The gateway needs to parse the content of the first message to determine its purpose.
[0047] Step 120: If the private message type in the first message is a network access message and the message command is an IP address request, then the first message is determined to be an IP address request message, and the IP address of the MSAP device is determined based on the source MAC address (Media Access Control Address, also known as the LAN address) in the IP address request message.
[0048] Specifically, MSAP devices require an IP address to access the network and provide network services to users. After the MSAP device is powered on, it actively sends an IP address request message to the gateway through the operator's transmission network. The IP address request message is used to request an IP address from the gateway for the MSAP device.
[0049] If the IP address request message uses a Dynamic Host Configuration Protocol (DHCP) message or a Bridge Protocol Data Unit (BPDU) message, the IP address request message may be terminated by intermediate devices in the network during transmission by the operator and may not reach the gateway.
[0050] Therefore, IP address request messages can use privately defined protocols to define certain fields in Ethernet data packets, which are used to instruct the gateway to allocate IP addresses to MSAP devices based on the content of the IP address request message.
[0051] One field can be defined as a private message type, indicating that the message's application scenario is to automatically assign IP addresses to MSAP devices, i.e., MSAP device network access processing. Another field can be defined as a message command, used to confirm the message's role in MSAP device network access processing, i.e., instructing the gateway to perform the corresponding operation based on the message.
[0052] After receiving the first message, the gateway parses it. If the private message type in the first message is a network access message and the message command is an IP address request, then the gateway can determine that the first message is an IP address request message.
[0053] The gateway determines the IP address for the MSAP device based on the source MAC address in the IP address request message. Here, the source MAC address is the MAC address of the sender of the IP address request message, i.e., the MAC address of the MSAP device.
[0054] For example, the gateway can store the MAC addresses of MSAP devices that have previously connected to it, as well as the IP addresses those MSAP devices have used. When it's determined that the first message is an IP address request message from a previously connected MSAP device, the gateway can reassign that previously used IP address to the MSAP device if it's not currently in use. Conversely, if the MSAP device has never connected to the gateway, the gateway can assign it a new IP address.
[0055] Step 130: Generate an IP address allocation message based on the IP address and source MAC address, and send the IP address allocation message to the MSAP device; wherein, the IP address allocation message is used to enable the MSAP device to access the network.
[0056] Specifically, after determining the IP address of the MSAP device, the gateway can associate the IP address with the source MAC address (i.e., the MAC address of the MSAP device) in the IP address request message, generate an IP address allocation message, and send it to the MSAP device.
[0057] The MSAP device parses the received IP address allocation message, obtains the IP address, and establishes a connection with the gateway based on the IP address to perform data interaction and provide network services.
[0058] The MSAP device network access method provided in this embodiment of the invention parses the first message sent by the MSAP device. If the private message type in the first message is a network access message and the message command is an IP address request, then the first message is determined to be an IP address request message, and the IP address of the MSAP device is determined. An IP address allocation message is generated and sent to the MSAP device, realizing automatic network access for the MSAP device without manual configuration by engineers. This improves the efficiency of MSAP device deployment and activation, and reduces the workload of engineers. In addition, the IP address request message uses a privately defined protocol, which is simpler than other general protocol messages, simplifying the message interaction process and reducing the workload of message maintenance.
[0059] Based on the above embodiments, step 130 is followed by:
[0060] Receive the second message sent by the MSAP device;
[0061] If the private message type in the second message is a network access message and the message command is an IP address acknowledgment, then the second message is determined to be an IP address acknowledgment message fed back by the MSAP device based on the IP address allocation message;
[0062] Based on the IP address confirmation message and the network management server, determine the VLAN IF of the MSAP device.
[0063] Specifically, in order to improve the reliability and stability of the network access process of MSAP devices, an acknowledgment mechanism can be added, that is, the MSAP device sends back an IP address acknowledgment message to acknowledge the IP address.
[0064] The gateway receives and parses the second message sent by the MSAP device. If the private message type in the second message is a network access message and the message command is an IP address acknowledgment message, then it can be determined that the message is an IP address acknowledgment message. In other words, after receiving the IP address allocation message, the MSAP device parses the IP address in the message, sends its device IP address, device IP mask, and gateway address to the underlying chip of the MSAP device, and establishes a stable connection with the gateway through the IP address.
[0065] After receiving the IP address confirmation message, the gateway, together with the network management server, configures VLAN IF for the MSAP device so that the MSAP device can be managed by the network management server, and completes the cross-network segment and cross-VLAN forwarding function from the network management server to the MSAP device.
[0066] Based on any of the above embodiments, step 120 includes:
[0067] The source MAC address in the IP address request message is compared with the candidate MAC addresses in the preset IP address list;
[0068] If the source MAC address is the same as the candidate MAC address, then the IP address corresponding to the candidate MAC address in the preset IP address list will be determined as the IP address of the MSAP device.
[0069] If the source MAC address is different from all candidate MAC addresses in the preset IP address list, an IP address is assigned to the MSAP device, and the assigned IP address is associated with the source MAC address and stored in the preset IP address list.
[0070] Specifically, a preset IP address list can be configured in the gateway. This list stores the mapping between the MAC addresses and IP addresses of MSAP devices. The MAC addresses of the MSAP devices in the preset IP address list can be pre-set or obtained by saving the MAC addresses of MSAP devices that have previously connected.
[0071] When the first message is determined to be an IP address request message, the gateway can compare the source MAC address in the message with the candidate MAC addresses in the preset IP address list.
[0072] If the source MAC address is the same as the candidate MAC address, it indicates that the gateway has previously assigned an IP address to the MSAP device corresponding to the source MAC address, or that the gateway has pre-stored the IP address corresponding to the MSAP device. The gateway can then determine the IP address corresponding to the candidate MAC address as the IP address of the MSAP device.
[0073] If the source MAC address is different from all candidate MAC addresses in the preset IP address list, it indicates that the MSAP device corresponding to the source MAC address has never been connected to the gateway. The gateway should assign an IP address to the MSAP device and associate the newly assigned IP address with the MAC address (source MAC address) of the MSAP device, and store it in the preset IP address list.
[0074] In addition, the preset IP address list can also record the online time and number of times of MSAP devices with candidate MAC addresses, so that users can easily query them.
[0075] Based on any of the above embodiments, step 110 includes:
[0076] Based on the target VLAN in the operator's transmission network, receive the first message sent by the MSAP device;
[0077] The operator's transmission network is configured as follows:
[0078] If the VLAN value in the first packet is the same as the VLAN ID of the target VLAN in the operator's transmission network, then the first packet is allowed to be transmitted through the target VLAN.
[0079] Specifically, multiple VLANs may exist within a carrier's transmission network. When the MSAP device powers on, it doesn't know which VLAN it will use to access the carrier's transmission network; that is, the MSAP device cannot determine which VLAN the gateway it needs to connect to belongs to. In this case, the MSAP device can traverse all VLANs in the carrier's transmission network and send a first packet to each VLAN. For example, if the carrier's transmission network supports a maximum of 4094 VLANs, the MSAP device will traverse all VLANs to send packets.
[0080] Network transmission equipment in the operator's transmission network, such as Packet Transport Network (PTN) equipment, can parse the first message sent by the MSAP equipment.
[0081] If the VLAN value in the first packet is the same as the VLAN identifier (VLAN ID) of the target VLAN in the operator's transmission network, it indicates that the first packet is sent to a device in the target VLAN, and the first packet should be allowed to be sent through the target VLAN in the operator's transmission network.
[0082] If the VLAN value in the first packet is different from the VLAN ID of the target VLAN in the operator's transmission network, it indicates that the first packet is not sent to a device in the target VLAN and should be discarded in the target VLAN.
[0083] Based on any of the above embodiments, the IP address request message, IP address allocation message, and IP address confirmation message all adopt a privately defined protocol, which can avoid the possibility of being terminated by the operator's transmission network during transmission and can pass through intermediate devices in the operator's transmission network without obstacles.
[0084] The three types of messages can be set based on the same message structure, with private definitions for the same fields and different values used to distinguish them.
[0085] Based on any of the above embodiments, the message content of the IP address request message includes the destination MAC address, source MAC address, Ethernet message type, VLAN value, private message type, message command, and check MAC address.
[0086] Specifically, the message content of the IP address request message is shown in Table 1.
[0087] Table 1 IP Address Request Messages
[0088]
[0089]
[0090] The destination MAC address is the MAC address of the receiving device. This MAC address is a reserved multicast address and will not be terminated by ordinary switches. The destination MAC address in the IP address request message is the MAC address of the gateway, for example, it can be filled in as 01-80-C2-00-00-22.
[0091] The source MAC address is the MAC address of the device that sent the message. The destination MAC address in an IP address request message is the MAC address of the gateway.
[0092] The destination MAC address and the source MAC address are encapsulated in a Layer 2 header format.
[0093] Ethernet packet type, indicating whether the packet is a VLAN packet. For example, you can define the character 0x8100 to represent a VLAN packet.
[0094] The VLAN value represents the VLAN ID of the target VLAN.
[0095] Private message type indicates the application scenario of this message: to automatically assign IP addresses to MSAP devices, i.e., MSAP device network access processing. For example, the character 0x8888 can be customized to indicate that the private message type is a network access message.
[0096] The message command is used to confirm the role of the message in the network access processing of the MSAP device, that is, to instruct the gateway to perform the operation based on the message. For example, the number 1 can be customized to represent an IP address request, the number 2 to represent an IP address allocation, and the number 3 to represent an IP address confirmation.
[0097] The MAC address is verified to validate the packet. Here, the MAC address of the MSAP device can be used to verify if it matches the source MAC address in the packet header, thus validating the IP address request packet.
[0098] Based on any of the above embodiments, the message content of the IP address allocation message includes the destination MAC address, source MAC address, Ethernet message type, VLAN value, private message type, message command, check MAC address, device IP address, device IP mask, and gateway IP address.
[0099] Specifically, in addition to having some of the same message content as the IP address request message, the IP address allocation message may also include the device IP address, the device IP mask, and the gateway IP address.
[0100] The device IP address is the IP address assigned to the MSAP device by the gateway. The device IP mask is the mask configured for the gateway's VLAN IF interface. The gateway IP address is the gateway's IP address. The MSAP device can only come online normally after the gateway address, mask, and IP address are all configured correctly.
[0101] The message content of the IP address allocation message is shown in Table 2.
[0102] Table 2 IP Address Allocation Messages
[0103] Destination MAC address 6 MSAP device MAC address Source MAC address 6 Gateway MAC address Ethernet packet types 2 Custom value VLAN value 2 VLAN ID Private message type 2 Custom value Message Command 2 Custom value Verify MAC address 6 Gateway MAC address Device IP address 4 IP address assigned to MSAP Device IP mask 4 IP mask set for MSAP Gateway IP address 4 gateway IP address
[0104] When MSAP devices interact with the gateway, the IP address allocation message is compared with the IP address request message:
[0105] Because the IP address allocation message is sent from the gateway to the MSAP device, the values of the destination MAC address, source MAC address, and checksum MAC address are different from the corresponding values in the IP address request message. The values of the Ethernet packet type, VLAN value, and private packet type are the same as the corresponding values in the IP address request message. However, the values of the message commands are different from the corresponding values in the IP address request message.
[0106] Accordingly, the IP address acknowledgment message is shown in Table 3.
[0107] Table 3 IP Address Acknowledgment Messages
[0108] Destination MAC address 6 Gateway MAC address Source MAC address 6 MSAP device MAC address Ethernet packet types 2 Custom value VLAN value 2 VLAN ID Private message type 2 Custom value Message Command 2 Custom value Verify MAC address 6 MAC address of MSAP device Device IP address 4 IP address assigned to MSAP Device IP mask 4 IP mask set for MSAP Gateway IP address 4 gateway IP address
[0109] When MSAP devices interact with the gateway, the IP address acknowledgment message is compared with the IP address allocation message:
[0110] Because the IP address allocation message is sent from the MSAP device to the gateway, the values of the destination MAC address, source MAC address, and checksum MAC address are different from the corresponding values in the IP address allocation message. The values of Ethernet packet type, VLAN value, private packet type, device IP address, device IP mask, and gateway IP address are the same as the corresponding values in the IP address allocation message. The values of the message commands are different from the corresponding values in the IP address allocation message.
[0111] Based on any of the above embodiments Figure 3 This is a schematic diagram illustrating the entire process of network access for MSAP devices provided by this invention, as shown below. Figure 3 As shown, the entire process of MSAP device network access includes:
[0112] Step 301: The MSAP device sends a VLAN packet based on a private protocol.
[0113] Step 302: The operator's transmission network discards VLAN packets whose VLAN IDs do not match the target VLAN and transparently transmits matching VLAN packets.
[0114] Step 303: The VLAN packet is delivered to the gateway.
[0115] Step 304: After the gateway resolves the VLAN, it identifies it as an IP address request message, allocates an IP address based on the source MAC address in the message, and sends an IP address allocation message.
[0116] Step 305: The IP address allocation message is sent to the MSAP device.
[0117] Step 306: The MSAP device sends back an IP address confirmation message.
[0118] Step 307: Configure the MSAP device IP address as the management IP and configure the received VLAN as the management VLAN.
[0119] Step 308: MSAP device is reachable from the gateway.
[0120] Step 309: Configure VLAN IF between the gateway and the network management server.
[0121] Step 310: The MSAP device becomes reachable from the network management server, connects to the network, and provides services, automatically completing the online process.
[0122] Based on any of the above embodiments Figure 4 This is a schematic diagram of the network access device for MSAP equipment provided by the present invention, as shown below. Figure 4 As shown, the device includes:
[0123] The receiving unit 410 is used to receive the first message sent by the MSAP device;
[0124] The allocation unit 420 is used to determine that the first message is an IP address request message if the private message type in the first message is a network access message and the message command is an IP address request, and to determine the IP address of the MSAP device based on the source MAC address in the IP address request message.
[0125] The sending unit 430 is used to generate an IP address allocation message based on the IP address and the source MAC address, and send the IP address allocation message to the MSAP device; wherein, the IP address allocation message is used to enable the MSAP device to access the network.
[0126] The MSAP device network access device provided in this embodiment of the invention parses the first message sent by the MSAP device. If the private message type in the first message is a network access message and the message command is an IP address request, then the first message is determined to be an IP address request message. The IP address of the MSAP device is determined, an IP address allocation message is generated, and sent to the MSAP device. This realizes automatic network access for the MSAP device without the need for manual configuration by engineers, improving the efficiency of MSAP device deployment and activation, and reducing the workload of engineers. In addition, the IP address request message uses a privately defined protocol, which is simpler than other general protocol messages, simplifying the message interaction process and reducing the workload of message maintenance.
[0127] Based on any of the above embodiments, the device further includes:
[0128] The confirmation unit is used to receive the second message sent by the MSAP device; if the private message type in the second message is a network access message and the message command is an IP address confirmation, then the second message is determined to be an IP address confirmation message fed back by the MSAP device based on the IP address allocation message; based on the IP address confirmation message and the network management server, the VLAN IF of the MSAP device is determined.
[0129] Based on any of the above embodiments, the allocation unit is specifically used for:
[0130] The source MAC address in the IP address request message is compared with the candidate MAC addresses in the preset IP address list;
[0131] If the source MAC address is the same as the candidate MAC address, then the IP address corresponding to the candidate MAC address in the preset IP address list will be determined as the IP address of the MSAP device.
[0132] If the source MAC address is different from all candidate MAC addresses in the preset IP address list, an IP address is assigned to the MSAP device, and the assigned IP address is associated with the source MAC address and stored in the preset IP address list.
[0133] Based on any of the above embodiments, the receiving unit is specifically used for:
[0134] Based on the target VLAN in the operator's transmission network, receive the first message sent by the MSAP device;
[0135] The operator's transmission network is configured as follows:
[0136] If the VLAN value in the first packet is the same as the VLAN ID of the target VLAN in the operator's transmission network, then the first packet is allowed to be transmitted through the target VLAN.
[0137] Based on any of the above embodiments, the message content of the IP address request message includes the destination MAC address, source MAC address, Ethernet message type, VLAN value, private message type, message command, and check MAC address.
[0138] Based on any of the above embodiments, the message content of the IP address allocation message includes the destination MAC address, source MAC address, Ethernet message type, VLAN value, private message type, message command, check MAC address, device IP address, device IP mask, and gateway IP address.
[0139] Based on any of the above embodiments Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 5As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communications bus 540. The processor 510 can call logical commands stored in the memory 530 to execute the following methods:
[0140] Receive the first message sent by the MSAP device; if the private message type in the first message is a network access message and the message command is an IP address request, then determine that the first message is an IP address request message, and determine the IP address of the MSAP device based on the source MAC address in the IP address request message; generate an IP address allocation message based on the IP address and the source MAC address, and send the IP address allocation message to the MSAP device; wherein, the IP address allocation message is used to enable the MSAP device to access the network.
[0141] Furthermore, the logical commands in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several commands to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0142] The processor in the electronic device provided in this embodiment of the invention can call logical instructions in the memory to implement the above method. Its specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effects, which will not be repeated here.
[0143] This invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it is implemented to perform the methods provided in the above embodiments. The specific implementation method is consistent with the aforementioned method implementation method and can achieve the same beneficial effects, which will not be repeated here.
[0144] This invention provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described above.
[0145] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several commands to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for network access of an MSAP device, characterized in that, include: Receive the first message sent by the MSAP device; If the private message type in the first message is a network access message and the message command is an IP address request, then the first message is determined to be an IP address request message, and the IP address of the MSAP device is determined based on the source MAC address in the IP address request message. An IP address allocation message is generated based on the IP address and the source MAC address, and the IP address allocation message is sent to the MSAP device; The first message received from the MSAP device includes: Based on the target VLAN in the operator's transmission network, receive the first message sent by the MSAP device; The IP address allocation message is used to allow the MSAP device to access the network; the carrier transmission network is configured such that if the VLAN value in the first message is the same as the VLAN ID of the target VLAN in the carrier transmission network, the first message is allowed to be transmitted through the target VLAN; the network access message is not a Dynamic Host Configuration Protocol (DHCP) message or a Bridge Protocol Data Unit (BDAC) message.
2. The MSAP device network access method according to claim 1, characterized in that, After sending the IP address allocation message to the MSAP device, the method further includes: Receive the second message sent by the MSAP device; If the private message type in the second message is a network access message and the message command is an IP address confirmation, then the second message is determined to be an IP address confirmation message fed back by the MSAP device based on the IP address allocation message; Based on the IP address confirmation message and the network management server, the VLAN IF of the MSAP device is determined.
3. The MSAP device network access method according to claim 1, characterized in that, Determining the IP address of the MSAP device based on the source MAC address in the IP address request message includes: The source MAC address in the IP address request message is compared with the candidate MAC addresses in the preset IP address list; If the source MAC address is the same as the candidate MAC address, then the IP address corresponding to the candidate MAC address in the preset IP address list is determined as the IP address of the MSAP device; If the source MAC address is different from all candidate MAC addresses in the preset IP address list, then an IP address is assigned to the MSAP device, and the assigned IP address is associated with the source MAC address and stored in the preset IP address list.
4. The MSAP device network access method according to any one of claims 1 to 3, characterized in that, The content of the IP address request message includes the destination MAC address, source MAC address, Ethernet message type, VLAN value, private message type, message command, and checksum MAC address.
5. The MSAP device network access method according to any one of claims 1 to 3, characterized in that, The message content of the IP address allocation message includes the destination MAC address, source MAC address, Ethernet message type, VLAN value, private message type, message command, check MAC address, device IP address, device IP mask, and gateway IP address.
6. A network access device for an MSAP equipment, characterized in that, include: The receiving unit is used to receive the first message sent by the MSAP device; The allocation unit is configured to determine that the first message is an IP address request message if the private message type in the first message is a network access message and the message command is an IP address request, and to determine the IP address of the MSAP device based on the source MAC address in the IP address request message. The sending unit is configured to generate an IP address allocation message based on the IP address and the source MAC address, and send the IP address allocation message to the MSAP device; The first message received from the MSAP device includes: Based on the target VLAN in the operator's transmission network, receive the first message sent by the MSAP device; The IP address allocation message is used to allow the MSAP device to access the network; the carrier transmission network is configured such that if the VLAN value in the first message is the same as the VLAN ID of the target VLAN in the carrier transmission network, the first message is allowed to be transmitted through the target VLAN; the network access message is not a Dynamic Host Configuration Protocol (DHCP) message or a Bridge Protocol Data Unit (BDAC) message.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the MSAP device network access method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the MSAP device network access method as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the MSAP device network access method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Address distribution method and device
CN104580029A