WO2020038325A1 - Network access method, wireless customer premise equipment, and access device - Google Patents
Network access method, wireless customer premise equipment, and access device Download PDFInfo
- Publication number
- WO2020038325A1 WO2020038325A1 PCT/CN2019/101350 CN2019101350W WO2020038325A1 WO 2020038325 A1 WO2020038325 A1 WO 2020038325A1 CN 2019101350 W CN2019101350 W CN 2019101350W WO 2020038325 A1 WO2020038325 A1 WO 2020038325A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- address
- cpe
- arp
- wan
- gateway
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Definitions
- This application relates to the field of wireless access communication technology, and in particular, to a network access method, a wireless terminal access device, and a downlink device.
- Wireless network-based terminal access equipment called wireless terminal access equipment (CPE)
- CPE wireless terminal access equipment
- IP Internet protocol
- the current method for a CPE to access a wireless wide area network is to use a CPE from The core network obtains a WAN IP address, and then the CPE calculates the mask of the WAN IP address and the gateway IP address from the WAN IP address, and then the CPE configures the calculated mask and gateway IP address to the CPE's local area network (local area network, LAN) interface, this LAN port is the port where the CPE is connected to the downstream device, that is, the CPE is directly used as the gateway, and the CPE uses the gateway IP address to communicate with the downstream device.
- the connected device can be connected to the CPE to provide users with wireless fidelity (WIFI), internet protocol television (IPTV), voice over internet (Internet protocol, VOIP), standard Ethernet interfaces, etc. device.
- WIFI wireless fidelity
- IPTV internet protocol television
- VOIP voice over internet
- the downstream device communicates with an A device on the WAN network
- the CPE occupies the gateway IP.
- the download device cannot send service data to the A device in the WAN network through the gateway IP address, but to the CPE.
- the download device cannot be a device in the WAN network with the same gateway IP address and gateway IP address of the CPE. Perform normal communication.
- the embodiments of the present application provide a network access method, a wireless terminal access device, and a downlink device, which can send the MAC address of the CPE to the downlink device according to the ARP learning rule set by the CPE, so that the downlink device passes the MAC of the CPE
- the address communicates with the devices on the WAN network.
- the first aspect of the embodiments of the present application provides a network access method, which may include:
- the CPE can first obtain the WAN IP address of the WAN from the core network.
- the CPE calculates the mask of the WAN IP address and the gateway IP address based on the WAN IP address.
- the CPE can set an address resolution protocol (ARP) learning rule.
- ARP learning rule is that when the CPE receives an ARP request from a connected device, the CPE determines whether the ARP request contains a WAN IP address and Gateway IP address. If so, the CPE masquerades as a gateway and sends the MAC address information of the CPE to the downstream device through the gateway IP address through an ARP response.
- the ARP request includes the MAC address of the downstream device, the WAN IP address, and the gateway.
- the IP address, the ARP request is used to request the MAC address of the gateway.
- the CPE can receive a dynamic host configuration protocol (DHCP) request sent by the next device. It carries the MAC address of the downstream device.
- DHCP dynamic host configuration protocol
- the CPE records the MAC address of the downstream device, and sets the ARP information of the downstream device on the CPE.
- ARP information belongs to static ARP information.
- the ARP information includes the WAN IP address and the MAC address of the connected device.
- the WAN IP address is the WAN IP address of the WAN network assigned by the core network to the CPE.
- the CPE It is set to the IP address of the downlink device, and the MAC address of the downlink device is obtained from the DHCP request. Then, the CPE sends the WAN IP address, the calculated mask, and the gateway IP address to the downlink according to the DHCP request. Connect the device to use.
- the download device sets its own mask and gateway IP address according to the obtained mask and gateway IP address, and then the CPE receives the ARP request sent by the download device.
- the MAC address, gateway IP address, and WAN IP address of the downstream device that is, the IP address of the downstream device
- the CPE can determine the transmission according to the ARP learning rules.
- downstream device information in the ARP request matches the downstream device set in the CPE that matches the ARP information, that is, determines whether the ARP request contains the WAN IP address (that is, the IP address of the downstream device) and the gateway IP address. If the CPE determines that the downstream device that sends the ARP request is a downstream device that matches the ARP information set in the CPE, the CPE masquerades as a gateway and sends the MAC address of the CPE itself to the downstream device.
- the downstream device receives the CPE After considering the MAC address of the CPE, the MAC address of the CPE is considered to be the MAC address of the gateway, so the MAC address information of the CPE is learned, and the service data is sent to the CPE through the MAC address of the CPE. After receiving the service data sent by the downstream device, the CPE , The business data is directly forwarded to the server of the WAN network device. Conversely, when the WAN network device needs to send the business data to the downstream device, the business data is sent to the CPE through the server of the WAN network device, and then the The CPE sends the MAC address of the downstream device recorded in the CPE to the downstream device, so that the downstream device can communicate with the WAN network device.
- the embodiments of the present application have the following advantages: According to the ARP learning rules set by the CPE, the CPE can learn and set the IP address of the connected device (that is, the WAN IP address) and the gateway IP address in the CPE.
- the receiving device sends an ARP request to the CPE, after determining whether the ARP request contains the WAN IP address and the gateway IP address, the CPE can disguise itself as a gateway and send the MAC address of the CPE to the receiving device.
- the receiving device then considers it to have received
- the MAC address of the CPE is the MAC address of the gateway, then learn the MAC address of the CPE, and send the business data to the CPE through the MAC address of the CPE, and the CPE then forwards the device to the WAN network, so as to realize the device connected to the WAN network.
- the downlink device can communicate with the WAN network device through the MAC address of the CPE, without the CPE occupying the gateway IP address and the downlink device cannot have the same IP address as the gateway.
- the devices on the WAN network with the IP address perform normal communication, thereby improving the success rate of communication between the downstream device and the devices on the WAN network.
- the ARP learning rule may include that when the CPE receives the ARP request from the downlink device, the CPE may determine a source in the ARP request. Whether the IP address is a WAN IP address and the destination IP address is a gateway IP address;
- the CPE can determine the downstream connection that sends the ARP request.
- the device is the downstream device marked in the ARP information of the CPE, so the CPE can send the MAC address of the CPE to the downstream device through the gateway IP address, so that the downstream device can use the MAC address of the CPE Sending service data to the CPE, and then the CPE forwards the service data to a device of the WAN network.
- a specific implementation scheme is provided for how the CPE determines whether the information of the downstream device in the ARP request matches the downstream device in the ARP information set in the CPE.
- ARP rules provide a more specific implementation, which further improves the realizability of this solution.
- the CPE when the CPE determines that the ARP request includes a WAN IP address and a gateway IP address according to a preset ARP learning rule, the CPE forwards to the downlink.
- the device sends an ARP response including:
- the CPE may determine, according to the preset ARP learning rule, whether the source IP address in the ARP request is the WAN IP address in the ARP information, and whether the destination IP address is the gateway. IP address
- the CPE can determine that the downstream device that sent the ARP request is the CPE's ARP information. Device, so the CPE can send the MAC address of the CPE to the device through the gateway IP address, so that the device can use the MAC address of the CPE to send business data to the CPE. , And then the CPE forwards the service data to a device of the WAN network.
- the CPE can implement mutual learning of information between the device and the connected device according to a more specific ARP rule, the implementation of this solution is further improved.
- the method may further include:
- the CPE receives the service data sent by the downstream device through the MAC address of the CPE, and forwards the received service data to the server of the WAN network device.
- the CPE receives the service data sent by the WAN network device, it passes the The MAC address of the downstream device forwards the service data sent by the device on the WAN network to the downstream device.
- the CPE only serves as a pipe to forward data between the downstream device and the device on the WAN network.
- the downlink device can send service data to the device of the WAN network through the MAC address of the CPE, it is solved that when the IP address of the downlink device is the same as the WAN IP address of a device on the WAN network, The problem that the device cannot communicate normally with the device on the WAN network. As long as the connected device can communicate with each device on the WAN network through the MAC address of the CPE, the WAN network can also forward data to the connected device through the CPE. A more specific scheme for implementing the communication between the downstream equipment and the WAN network equipment through the CPE is achieved, further improving the practicability of the scheme.
- a second aspect of the embodiments of the present application provides a network access method, which may include: when a downlink device needs to send service data to a WAN network device, it may first send an ARP request to the CPE to request a gateway MAC address, and the ARP request includes There is the IP address of the downstream device (that is, the WAN IP address sent by the CPE to the downstream device) and the gateway IP address. After the CPE receives the request from the downstream device, it can judge according to the preset ARP learning rules. The ARP request sent by the receiving device contains the same source IP address as the WAN IP address and the destination IP address is the same as the gateway IP address. Then the receiving device can receive the ARP response sent by the CPE.
- the CPE fills its own MAC address in the ARP response packet, so the downstream device will consider the MAC address of the CPE to be the MAC address of the gateway.
- the service data is sent to the CPE through the MAC address of the CPE.
- the CPE which in turn can forward the service data to the devices on the WAN network.
- the downlink device uses the MAC address of the CPE to send service data
- the service data can be smoothly forwarded to the device on the WAN network through the CPE, thereby overcoming that the gateway device cannot be connected with the IP address of the gateway by the CPE Devices in the WAN network with the same IP address as the gateway IP address perform normal communication, thereby improving the success rate of communication between the downstream device and the devices in the WAN network.
- the receiving the device receiving the ARP response sent by the CPE may include: the receiving device may receive the ARP response sent by the CPE through a gateway IP address.
- a third aspect of the embodiments of the present application provides a wireless terminal access device CPE, and the wireless terminal access device has a function of implementing the foregoing first aspect and any one of the possible design methods in the first aspect.
- the functions may be implemented by hardware, and may also be implemented by hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the functions described above.
- a fourth aspect of the embodiments of the present application provides a downlink device, and the downlink device has a function of realizing any one of the foregoing second aspect and the method in the second aspect.
- the functions may be implemented by hardware, and may also be implemented by hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the functions described above.
- a fifth aspect of the embodiments of the present application provides a computer storage medium for storing computer software instructions used by the wireless terminal access device CPE of the first aspect described above, which includes instructions for executing a design for the CPE. program.
- a computer storage medium is provided.
- the computer storage medium is used to store computer software instructions used by the download device of the second aspect, and includes a program for executing a program designed for the download device. .
- a seventh aspect of the embodiments of the present application provides a computer program product.
- the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method flow in the first aspect.
- An eighth aspect of the embodiments of the present application provides a computer program product.
- the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method flow in the second aspect.
- FIG. 1 is a system architecture diagram applied to an embodiment of this application
- FIG. 2 is a schematic diagram of an embodiment of a network access method according to an embodiment of the present application.
- FIG. 3 is a schematic diagram of another embodiment of a network access method according to an embodiment of the present application.
- FIG. 4 is a schematic diagram of an embodiment of a wireless terminal access device according to an embodiment of the present application.
- FIG. 5 is a schematic diagram of another embodiment of a wireless terminal access device according to an embodiment of the present application.
- FIG. 6 is a schematic diagram of an embodiment of a downlink device according to an embodiment of the present application.
- FIG. 7 is a schematic diagram of another embodiment of a downlink device according to an embodiment of the present application.
- the embodiments of the present application provide a network access method and a wireless terminal access device, which can send the MAC address of the CPE to the downstream device according to the ARP learning rule set by the CPE, so that the downstream device can communicate with the WAN through the MAC address of the CPE. Device communication.
- the participation of the access device 101, the access device 102, and the device 103 of the WAN network is required.
- the device 103 of the WAN network can allocate the WAN IP address of the WAN network to the access device 102; the access device 102 and the downstream device 101 can communicate with each other through the WAN IP address.
- the access device 102 does not need to communicate with the device 103 in the WAN network, and in the process of transmitting business data, the access device 102 can send the The service data is forwarded to the device 103 on the WAN network.
- the device 103 on the WAN network can also forward the packet to the downstream device 101 through the CPE.
- the downlink device 101 in the embodiment of the present application may be a router, an indoor CPE device, and an augmented reality (AR) device, and is not specifically limited herein;
- the access device 102 in the embodiment of the application It may be a wireless CPE; there may be one or multiple devices 103 on the WAN network, which is not limited here.
- the access device is a CPE serving as a wireless access device, and the CPE serves as a wireless access device. Its working mode is divided into an IP transparent transmission mode and a routing mode.
- the CPE of the wireless access device uses the IP passthrough mode in the single access point name (APN) scenario. (Also known as bridge mode) wireless network access.
- APN access point name
- the core network allocates only one WAN IP address to the downstream device.
- the IP transparent transmission mode means that the access device sends the WAN IP address allocated by the core network to the downstream device in the IP transparent transmission mode.
- the uplink data is that the CPE transparently transmits the service data sent from the downlink device to the WAN network device
- the downlink data is that the CPE forwards the service data sent from the WAN network device to the downlink device. device.
- FIG. 2 is a schematic diagram of an embodiment of a network access method according to an embodiment of the present application.
- An embodiment of the network access method in the embodiments of the present application includes:
- the CPE obtains the WAN IP address of the WAN network from the core network;
- the core network in order to realize the normal communication between the connected device and each device of the WAN network, the core network will allocate a WAN IP address of the WAN network to the CPE.
- the CPE may first insert a Subscriber Identification Module (SIM) card After that, it accesses a wireless network Long Term Evolution (LTE) base station, and then obtains the WAN IP address from the core network. Because it is a single APN application scenario, the core network will only allocate one WAN IP address to the CPE.
- SIM Subscriber Identification Module
- the CPE calculates the mask of the WAN IP address and the gateway IP address according to the WAN IP address.
- the CPE After the CPE obtains the WAN IP address, it can calculate the mask of the WAN IP address and the gateway IP address based on the WAN IP address.
- the calculation method of the mask can be to record the value of the bit of the WAN IP as "0", that is, bit [0], and sequentially read the value of each bit of the WAN IP until a certain bit bit [x] If the value is not equal to "0", the masked host bits are 0-x bits.
- the WAN IP obtained from the core network is 10.10.19.16
- it will be converted into a hexadecimal integer of 0x0a0a1310, a binary of 1010000010100001001100010000, and bit0 ⁇ from right to left.
- bit31 it can be clearly seen that bit0 and bit4 are inconsistent.
- 0 to 4 are the host bits, so the mask is 11111111111111111111111111100000, and the hexadecimal number is 0xffffffe0, which is 255.255.255.224.
- the gateway IP address can be calculated by masking the WAN IP with the calculated mask and adding "1". If this address is not equal to the WAN IP, it is the gateway IP, otherwise it will be added with "1" As the gateway address.
- the WAN IP is masked with the mask: that is, the & operation ( Judging that each bit is 1, it is 1, otherwise it is 0), then the masked value is 1010000010100001001100000000, converted into hexadecimal is 0x0a0a1300, after performing +1 operation is 0x0a0a1301, which is 10.10.19.1.
- the mask needs to be calculated because the downstream device needs to use the mask to set when it sets the WAN IP address to its own IP address.
- the CPE sets an ARP learning rule.
- the CPE After the CPE calculates the mask of the WAN IP address and the gateway IP address, it can set an ARP learning rule.
- the ARP learning rule is that when the CPE receives an ARP request from a connected device, the CPE determines whether the ARP request contains a WAN. The IP address and gateway IP address.
- the reason why the CPE needs to determine whether there is a WAN IP is that if the CPE determines that the ARP request contains a WAN IP address, it means that the CPE can determine the IP address of the downstream device, because the downstream device uses the WAN IP address.
- the address is set to its own IP address; the reason why the CPE needs to determine whether there is a gateway IP is that if the CPE determines that the ARP request contains the gateway IP address, the CPE sends the MAC address of the CPE through the gateway IP address in subsequent steps
- the CPE sends the MAC address of the CPE to the downstream device through the gateway IP address through the ARP response.
- the ARP request includes the downstream device MAC address, WAN IP address, and gateway IP address.
- the ARP request sent by the device is used to request the MAC address of the gateway.
- the CPE determines whether the WAN IP address and gateway IP address in the ARP request are related to the ARP information of the downstream device set in the CPE. The WAN IP address and the gateway IP address match. If they match, the CPE sends the MAC address of the CPE to the device through the gateway IP address.
- the downlink device sends a DHCP request to the CPE.
- the downstream device can send a DHCP request to the CPE.
- the DHCP request carries the MAC address of the downstream device.
- the DHCP request is used to request the CPE to mask the WAN IP address and WAN IP address. Code and gateway IP address.
- the CPE sets the ARP information of the connected device on the CPE.
- the CPE After the CPE obtains the WAN IP address and receives the DHCP request sent by the downstream device, it can set ARP information on the CPE.
- This ARP information belongs to the information of the downstream device.
- the CPE can set the MAC address of the downstream device in the DHCP request in the ARP information, so that subsequent packets sent from the WAN network device to the CPE can be forwarded to the downstream device through the MAC address of the downstream device.
- the CPE can set the WAN IP address in the ARP information, and the WAN IP address can be set by the downloading device as the IP address of the downloading device in the subsequent operation steps.
- the ARP information is static ARP information.
- the purpose of setting the ARP information of the downstream device in the CPE is to prepare for the subsequent judgment steps to determine whether the information of the downstream device that sends the ARP request matches the information of the downstream device set in the CPE.
- the CPE sends the WAN IP address, mask, and gateway IP address to the connected device for use according to the DHCP request.
- the CPE After the CPE records the MAC address of the downstream device on the CPE and sets the ARP information of the downstream device, it can send the WAN IP address, mask, and gateway IP address to the downstream device for use according to the DHCP request. After the receiving device receives the WAN IP address, it can set the WAN IP address as the IP address of the connecting device itself. When setting the WAN IP address as its own WAN IP address, it needs to use the received mask for setting , And the gateway IP address received by the downstream device is used to send the MAC address of the downstream device to the CPE.
- the receiving device sends an ARP request to the CPE.
- a downlink device When a downlink device needs to send data to a device on the WAN network, it first sends an ARP request to the CPE, requesting the CPE to send the MAC address of the gateway to the downlink device.
- the ARP request message includes a source MAC address, a source IP address, a destination IP address, and a destination MAC address.
- the source MAC address, source IP address, and destination IP address are filled with the corresponding address information.
- the source MAC address is filled with the MAC address information of the connected device.
- the source IP address is filled with the WAN IP address information.
- the destination IP address is filled with the gateway IP address information, and the destination MAC address is empty.
- the receiving device requests the CPE to send the MAC address of the gateway to the receiving device.
- the CPE determines that the ARP request includes the WAN IP address and the gateway IP address according to the preset ARP learning rules, the CPE sends an ARP response to the downstream device;
- the CPE After receiving the ARP request sent by the downstream device, the CPE can determine whether the ARP request contains the WAN IP address and the gateway IP address according to the ARP learning rules. If the CPE determines that the ARP request contains the WAN IP address (the WAN IP address has been set to the IP address of the downstream device) and the gateway IP address, the CPE sends an ARP response to the downstream device.
- the ARP response includes the MAC address of the CPE, and the MAC address of the CPE is used by the downstream device to the WAN. Network equipment sends business data.
- the equipment of the WAN network includes IP multimedia subsystem (IMS), domain name system (DNS) server, session initialization protocol (SIP) server, Baidu server, WeChat server Wait.
- IMS IP multimedia subsystem
- DNS domain name system
- SIP session initialization protocol
- the CPE can determine whether the WAN IP address and gateway IP address in the ARP request and the WAN in the ARP information of the downstream device set in the CPE according to the ARP learning rules.
- the IP address (used as the IP address of the downstream device) and the gateway IP address match. If they match, the CPE sends the MAC address of the CPE to the downstream device via the gateway IP address through the ARP response, so that the downstream device can use the CPE.
- the MAC address forwards business data to the devices on the WAN network, enabling the downstream device to communicate with the devices on the WAN network.
- the CPE sets an ARP learning rule, sets the WAN IP address allocated by the core network and the calculated gateway IP address on the CPE as the ARP information of the connected device, and sends the DHCP request through the connected device.
- the downstream device sets the WAN IP address to the WAN IP address of the downstream device, and uses the mask to set the gateway IP address to the gateway IP of the downstream device. Address.
- the CPE determines whether the ARP information of the downstream device set in the CPE matches the WAN IP and gateway IP information in the ARP request according to the set ARP learning rules.
- the CPE sends the MAC address of the CPE to the downstream device through the gateway IP address, so that the downstream device sends the business data to the CPE through the MAC address of the CPE, and the CPE sends the business data to the device on the WAN network without any processing.
- the downstream device can forward the business data to the device on the WAN through the MAC address of the CPE, thereby overcoming the gateway ’s IP address caused by the CPE ’s access to the downstream device.
- Preparation impossible to perform normal communication devices and the WAN gateway IP address has the same IP address, thereby improving the success rate of the device connected to communicate with each other device in the WAN.
- FIG. 3 describes the embodiment in FIG. 3 as an example of a scenario where a device sends service data to a device on a WAN network via a CPE.
- FIG. 3 is a schematic diagram of another embodiment of a network access method according to an embodiment of the present application. It should be noted that steps 301 to 308 in the embodiment shown in FIG. 3 are similar to steps 201 to 208 in the embodiment shown in FIG. 2, and details are not described herein again.
- the CPE obtains the WAN IP address of the WAN network from the core network.
- the CPE calculates the mask of the WAN IP address and the gateway IP address according to the WAN IP address.
- the CPE sets an ARP learning rule.
- the receiving device sends a DHCP request to the CPE.
- the CPE sets the ARP information of the connected device on the CPE.
- the CPE sends the WAN IP address, mask, and gateway IP address to the connected device for use according to the DHCP request.
- the receiving device sends an ARP request to the CPE.
- the CPE determines that the ARP request includes the WAN IP address and the gateway IP address according to the ARP learning rule, the CPE sends an ARP response to the downstream device;
- the downlink device sends service data to the CPE.
- the downlink device after receiving the MAC address of the CPE, the downlink device mistakenly believes that the MAC address of the CPE is the MAC address of the gateway, so the downlink device sends service data to the CPE through the MAC address of the CPE.
- the MAC address of the CPE is set in the ARP response message.
- the CPE does not fill any data before filling the data.
- the downstream device can get the MAC address of the CPE through the message, but what the downstream device originally wanted was Gateway MAC address. Therefore, the downstream device incorrectly believes that the MAC address of the CPE filled in the destination MAC address is the gateway MAC address. Therefore, the downstream device attempts to send service data to the CPE through the MAC address of the CPE.
- the CPE sends service data to a device on the WAN network.
- the CPE After receiving the service data sent by the downstream device, the CPE does not perform any processing on the service data, but forwards the service data to the devices on the WAN network, and the devices on the WAN network process the service data. In this way, the downstream device can forward service data to the device on the WAN network through the CPE.
- the WAN network device sends service data to the CPE.
- a device on the WAN network may also send service data to the downstream device.
- the CPE sends service data to the downstream device.
- the CPE After receiving the message sent by the downstream device, the CPE can send service data to the downstream device by using the MAC address of the downstream device recorded in the CPE.
- the CPE when the receiving device sends an ARP request to the CPE, the CPE may determine the information of the receiving device that sends the ARP request according to the ARP learning rule preset in the CPE, that is, the source IP in the ARP request message.
- the CPE can masquerade as a gateway and use the CPE's own MAC.
- the address is sent to the downstream device.
- the downstream device sends the business data to the CPE through the MAC address of the CPE, and then the CPE forwards the business data to the device on the WAN network.
- the device on the WAN network can also forward the packet to the device through the CPE.
- the downlink device can forward the business data to the device on the WAN through the MAC address of the CPE, thereby overcoming that the gateway device cannot occupy the gateway IP address due to the CPE occupying the gateway IP address and the gateway device cannot have the same IP address as the gateway.
- the problem of normal communication between devices on the WAN network with the same IP address thereby improving the success rate of communication between the downstream device and the devices on the WAN network.
- the network access method in the embodiment of the present application has been described above.
- the wireless terminal access device in the embodiment of the present application is described below. Please refer to FIG.
- a first receiving unit 401 is configured to receive an ARP request sent by a receiving device, where the ARP request is used to request a media access control MAC address of a gateway, and the ARP request includes an Internet Internet Protocol IP address and a gateway IP address of a wide area network WAN.
- the WAN IP address is an IP address set by the downlink device for the downlink device itself;
- the first sending unit 402 is configured to: when the determining unit 403 determines that the ARP request includes a WAN IP address and a gateway IP address according to a preset ARP learning rule, send an ARP response to the downstream device through the gateway IP address.
- the ARP response includes The MAC address of the CPE.
- the MAC address of the CPE is used by the downstream device to send service data to the device on the WAN network.
- the ARP learning rule includes that when the first receiving unit 401 receives an ARP request from a connected device, if the determining unit 403 determines that the source IP address in the ARP request is a WAN IP address and the destination IP address is a gateway IP address, the first sending unit 402 sends an ARP response to the downstream device.
- the first sending unit 402 is specifically configured to: when the CPE determines that the source IP address in the ARP request is the WAN IP address in the ARP information and the destination IP address is the gateway IP address according to a preset ARP learning rule, The CPE sends an ARP response to the downstream device.
- the CPE further includes:
- a second receiving unit 404 configured to receive service data sent by a downlink device
- the second sending unit 405 is configured to send service data to a device on the WAN network.
- the first sending Unit 402 will send an ARP response to the downstream device.
- the ARP response contains the MAC address of the CPE, but the ARP request actually wants to request the MAC address of the gateway. Therefore, when the receiving device receives the MAC address of the CPE, it will The CPE's MAC address is mistakenly considered to be the MAC address of the gateway, so the second receiving unit 404 can receive the service data sent by the downstream device through the CPE's MAC address, and the second sending unit 405 sends the business data to the WAN network device. This improves the success rate of communication between the downstream device and the WAN network device through the MAC address of the CPE.
- FIG. 5 is a schematic diagram of another embodiment of a CPE in the embodiment of the present application.
- the CPE500 may have a large difference due to different configurations or performance, and may include one or more central processing units (CPUs) 501 (for example, one or more processors) and a memory 505.
- the memory 505 Stores one or more applications or data.
- the memory 505 may be volatile storage or persistent storage.
- the program stored in the memory 505 may include one or more modules, and each module may include a series of instruction operations in the server.
- the central processing unit 501 may be configured to communicate with the memory 505, and execute a series of instruction operations in the memory 505 on the CPE 500.
- CPE500 may also include one or more power sources 502, one or more wired or wireless network interfaces 503, one or more transceivers 504, and / or, one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM , LinuxTM, FreeBSDTM, and more.
- operating systems such as Windows ServerTM, Mac OS XTM, UnixTM , LinuxTM, FreeBSDTM, and more.
- the process performed by the central processing unit 501 in the CPE 500 in this embodiment is similar to the method process described in the foregoing embodiments shown in FIG. 2 and FIG. 3, and details are not described herein again.
- An embodiment of the present application further provides a computer storage medium for storing computer software instructions used by the aforementioned CPE, which includes a program for executing a program designed for the CPE.
- the embodiment of the present application further provides a computer program product, the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method flow in the embodiments shown in FIG. 2 and FIG. 3.
- FIG. 6 is a schematic diagram of an embodiment of a downlink device according to an embodiment of the present application.
- a first sending unit 601 is configured to send an ARP request to a CPE, where the ARP request is used to request a media access control MAC address of a gateway, and the ARP request includes an Internet Internet IP address and a gateway IP address of a wide area network WAN, the WAN
- the IP address is an IP address set by the downlink device for the downlink device itself;
- a receiving unit 602 configured to receive an ARP response sent by a CPE through a gateway IP address, where the ARP response includes a CPE MAC address;
- the second sending unit 603 is configured to send service data to the CPE through the CPE MAC address.
- the receiving unit 602 is specifically configured to receive a large ARP response sent by the CPE through the gateway IP address.
- the first sending unit 601 sends an ARP request to the CPE, requesting the gateway MAC address, and then the receiving unit 602 can receive the ARP response sent by the CPE.
- the ARP response includes the MAC address of the CPE, and the second sending unit 603 will
- the service data is sent to the CPE through the MAC address of the CPE, so that the download device can successfully forward the service data to the device on the WAN network through the CPE, thereby overcoming the failure of the download device and the
- the devices on the WAN network with the same IP address as the gateway IP address perform normal communication, thereby improving the success rate of communication between the device connected to the WAN network and the devices on the WAN network.
- FIG. 7 is a schematic diagram of another embodiment of a downlink device according to an embodiment of the present application.
- the downlink device 700 may have a relatively large difference due to different configurations or performance, and may include one or more central processing units (CPUs) 701 (for example, one or more processors) and a memory 705.
- the memory 705 stores one or more application programs or data.
- the memory 705 may be volatile storage or persistent storage.
- the program stored in the memory 705 may include one or more modules, and each module may include a series of instruction operations on the server.
- the central processing unit 701 may be configured to communicate with the memory 705, and execute a series of instruction operations in the memory 705 on the access device 700.
- the downlink device 700 may also include one or more power sources 702, one or more wired or wireless network interfaces 703, one or more transceivers 704, and / or, one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
- operating systems such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
- the process performed by the central processing unit 701 in the access device 700 in this embodiment is similar to the method process described in the foregoing embodiments shown in FIG. 2 and FIG. 3, and details are not described herein again.
- An embodiment of the present application further provides a computer storage medium, which is used to store computer software instructions used by the aforementioned access device, and includes a program for executing the program designed for the access device.
- An embodiment of the present application further provides a computer program product, the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method flow in the embodiment shown in FIG. 2 and FIG. 3.
- the disclosed systems, devices, and methods may be implemented in other ways.
- the device embodiments described above are only schematic.
- the division of the unit is only a logical function division.
- multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
- the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
- the integrated unit When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium. , Including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
- the foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Embodiments of the present application disclose a network access method, wireless customer premise equipment (CPE), and an access device, used to transmit a Media Access Control (MAC) address of CPE to an access device according to an ARP learning rule configured by the CPE, allowing the access device to communicate with a device of a wide area network (WAN) via the MAC address of the CPE. The method of an embodiment of the present application comprises: CPE receiving an ARP request transmitted by an access device, the ARP request being used to request a MAC address of a gateway, the ARP request comprising a WAN Internet Protocol (IP) address and a gateway IP address, and the WAN IP address being an IP address configured by the access device for itself; upon determining, according to a preconfigured ARP learning rule, that the ARP request comprises the WAN IP address and the gateway IP address, the CPE transmitting an ARP response to the access device via the gateway IP address, the ARP response comprising a MAC address of the CPE, and the MAC address of the CPE being used by the access device to transmit service data to a device of a WAN.
Description
本申请要求于2018年8月20日提交中国专利局、申请号为201810951425.9、发明名称为“网络接入方法、无线终端接入设备以及下接设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on August 20, 2018 with the Chinese Patent Office, application number 201810951425.9, and the invention name is "Network Access Method, Wireless Terminal Access Device, and Access Device". Incorporated by reference in this application.
本申请涉及无线接入通信技术领域,尤其涉及网络接入方法、无线终端接入设备以及下接设备。This application relates to the field of wireless access communication technology, and in particular, to a network access method, a wireless terminal access device, and a downlink device.
基于无线网络的终端接入设备,称为无线终端接入设备(customer premise equipment,CPE),具有无线网络的接入能力,能够从核心网获取互联网协议(internet protocol,IP)地址,必须依赖于接入设备才能使用无线网络。Wireless network-based terminal access equipment, called wireless terminal access equipment (CPE), has wireless network access capabilities and can obtain Internet protocol (IP) addresses from the core network. It must depend on Only connected devices can use the wireless network.
在单接入点名称(access point name,APN)场景下,基于IP透传(internet protocol passthrough,IP passthrough)模式,目前CPE接入无线广域网络(wide area network,WAN)的方法是,CPE从核心网获取一个WAN IP地址,接着CPE通过该WAN IP地址计算出WAN IP地址的掩码和网关IP地址,然后CPE将计算出的掩码和网关IP地址配置到CPE的局域网(local area network,LAN)接口使用,该LAN口是CPE与下接设备连接的端口,也就是说,直接将CPE作为网关使用,CPE用该网关IP地址与下接设备进行通信。下接设备可以与CPE对接,为用户提供无线保真(wireless fldelity,WIFI)、网路协议电视(internet protocol television,IPTV)、网络电话(voice over internet protocol,VOIP)、标准以太网络接口等的设备。In the single access point name (APN) scenario, based on the IP protocol passthrough (IP passthrough) mode, the current method for a CPE to access a wireless wide area network (WAN) is to use a CPE from The core network obtains a WAN IP address, and then the CPE calculates the mask of the WAN IP address and the gateway IP address from the WAN IP address, and then the CPE configures the calculated mask and gateway IP address to the CPE's local area network (local area network, LAN) interface, this LAN port is the port where the CPE is connected to the downstream device, that is, the CPE is directly used as the gateway, and the CPE uses the gateway IP address to communicate with the downstream device. The connected device can be connected to the CPE to provide users with wireless fidelity (WIFI), internet protocol television (IPTV), voice over internet (Internet protocol, VOIP), standard Ethernet interfaces, etc. device.
然而,下接设备在与WAN网的某个A设备进行通信时,如果该A设备的IP地址和CPE用来与下接设备进行通信的网关IP地址刚好相同时,由于CPE占用了该网关IP地址,因此下接设备无法将业务数据通过该网关IP地址发送给WAN网的A设备,而是发送给CPE,导致下接设备无法与网关IP地址和CPE的网关IP地址相同的WAN网的设备进行正常的通信。However, when the downstream device communicates with an A device on the WAN network, if the IP address of the A device and the gateway IP address used by the CPE to communicate with the downstream device are exactly the same, the CPE occupies the gateway IP. Address, the download device cannot send service data to the A device in the WAN network through the gateway IP address, but to the CPE. As a result, the download device cannot be a device in the WAN network with the same gateway IP address and gateway IP address of the CPE. Perform normal communication.
发明内容Summary of the Invention
本申请实施例提供了网络接入方法、无线终端接入设备以及下接设备,能够根据CPE设置的ARP学习规则,将CPE的MAC地址发送给下接设备,以使得下接设备通过CPE的MAC地址与WAN网的设备通信。The embodiments of the present application provide a network access method, a wireless terminal access device, and a downlink device, which can send the MAC address of the CPE to the downlink device according to the ARP learning rule set by the CPE, so that the downlink device passes the MAC of the CPE The address communicates with the devices on the WAN network.
有鉴于此,本申请实施例第一方面提供了一种网络接入方法,可以包括:In view of this, the first aspect of the embodiments of the present application provides a network access method, which may include:
为了使下接设备和CPE都能正常和WAN中各个设备正常通信,CPE首先可以从核心网获取WAN的WAN IP地址,CPE根据该WAN IP地址计算得到WAN IP地址的掩码和网关IP地址,然后CPE可以设置地址解析协议(address resolution protocol,ARP)学习规则,所述ARP学习规则为,当CPE接收到下接设备的ARP请求时,CPE判断所述ARP请求中是否包含有WAN IP地址和网关IP地址,若是,则CPE伪装成网关,将CPE的MAC地址信息通过ARP响 应经由网关IP地址发送给下接设备,所述ARP请求中包含有下接设备的MAC地址、WAN IP地址以及网关IP地址,所述ARP请求用于请求网关的MAC地址,CPE在设置好ARP学习规则之后,可以接收下接设备发送的动态主机配置协议(dynamic host configuration protocol,DHCP)请求,所述DHCP请求中携带有下接设备的MAC地址,CPE将下接设备的MAC地址记录下来,并在CPE上设置下接设备的ARP信息,所述ARP信息属于静态ARP信息,所述ARP信息中包含有WAN IP地址和下接设备的MAC地址,WAN IP地址是核心网分配给CPE的WAN网的WAN IP地址,下接设备将该WAN IP地址设置为下接设备自身的IP地址,下接设备的MAC地址从所述DHCP请求中获知,接着,CPE根据所述DHCP请求,将WAN IP地址、计算得到的掩码和网关IP地址发送给下接设备使用,下接设备在将WAN IP地址设置为自身的IP地址时,同时根据获取的掩码和网关IP地址设置自身的掩码和网关IP地址,然后CPE接收下接设备发送的ARP请求,在所述ARP请求中,包含有下接设备的MAC地址、网关IP地址以及WAN IP地址(即下接设备的IP地址),CPE在接收到ARP请求后,可以根据ARP学习规则,判断发送ARP请求中的下接设备信息是否与设置在CPE中的与ARP信息相符的下接设备,即判断ARP请求中是否包含有WAN IP地址(即下接设备的IP地址)和网关IP地址,如果CPE确定发送ARP请求的下接设备是与CPE中设置的ARP信息相符的下接设备,则CPE伪装成网关,将CPE自身的MAC地址发送给下接设备,下接设备在接收到CPE的MAC地址后,会认为CPE的MAC地址是网关的MAC地址,于是学习CPE的MAC地址信息,并将业务数据通过CPE的MAC地址发送至CPE,CPE在接收到下接设备发送的业务数据后,将业务数据直接转发到WAN网的设备的服务器上,反之,WAN网的设备需要将业务数据发送到下接设备时,则是通过WAN网设备的服务器将业务数据发送到CPE上,再由CPE通过记录在CPE中的下接设备的MAC地址发送到下接设备中,从而使下接设备实现和WAN网的设备进行相互通信。In order to ensure that the connected device and the CPE can normally communicate with each device in the WAN, the CPE can first obtain the WAN IP address of the WAN from the core network. The CPE calculates the mask of the WAN IP address and the gateway IP address based on the WAN IP address. Then, the CPE can set an address resolution protocol (ARP) learning rule. The ARP learning rule is that when the CPE receives an ARP request from a connected device, the CPE determines whether the ARP request contains a WAN IP address and Gateway IP address. If so, the CPE masquerades as a gateway and sends the MAC address information of the CPE to the downstream device through the gateway IP address through an ARP response. The ARP request includes the MAC address of the downstream device, the WAN IP address, and the gateway. The IP address, the ARP request is used to request the MAC address of the gateway. After setting the ARP learning rules, the CPE can receive a dynamic host configuration protocol (DHCP) request sent by the next device. It carries the MAC address of the downstream device. The CPE records the MAC address of the downstream device, and sets the ARP information of the downstream device on the CPE. ARP information belongs to static ARP information. The ARP information includes the WAN IP address and the MAC address of the connected device. The WAN IP address is the WAN IP address of the WAN network assigned by the core network to the CPE. It is set to the IP address of the downlink device, and the MAC address of the downlink device is obtained from the DHCP request. Then, the CPE sends the WAN IP address, the calculated mask, and the gateway IP address to the downlink according to the DHCP request. Connect the device to use. When setting the WAN IP address to its own IP address, the download device sets its own mask and gateway IP address according to the obtained mask and gateway IP address, and then the CPE receives the ARP request sent by the download device. In the ARP request, the MAC address, gateway IP address, and WAN IP address of the downstream device (that is, the IP address of the downstream device) are included in the ARP request. After receiving the ARP request, the CPE can determine the transmission according to the ARP learning rules. Whether the downstream device information in the ARP request matches the downstream device set in the CPE that matches the ARP information, that is, determines whether the ARP request contains the WAN IP address (that is, the IP address of the downstream device) and the gateway IP address. If the CPE determines that the downstream device that sends the ARP request is a downstream device that matches the ARP information set in the CPE, the CPE masquerades as a gateway and sends the MAC address of the CPE itself to the downstream device. The downstream device receives the CPE After considering the MAC address of the CPE, the MAC address of the CPE is considered to be the MAC address of the gateway, so the MAC address information of the CPE is learned, and the service data is sent to the CPE through the MAC address of the CPE. After receiving the service data sent by the downstream device, the CPE , The business data is directly forwarded to the server of the WAN network device. Conversely, when the WAN network device needs to send the business data to the downstream device, the business data is sent to the CPE through the server of the WAN network device, and then the The CPE sends the MAC address of the downstream device recorded in the CPE to the downstream device, so that the downstream device can communicate with the WAN network device.
从以上技术方案可以看出,本申请实施例具有以下优点:根据CPE设置的ARP学习规则,CPE能够学习并在CPE中设置下接设备的IP地址(即WAN IP地址)以及网关IP地址,当下接设备发送ARP请求给CPE时,CPE能够在确定ARP请求中是否包含有WAN IP地址和网关IP地址之后,伪装成网关,将CPE的MAC地址发送给下接设备,下接设备于是认为接收到的CPE的MAC地址是网关的MAC地址,然后学习CPE的MAC地址,并通过CPE的MAC地址将业务数据发送给CPE,CPE再转发给WAN网的设备,从而实现下接设备与WAN网的设备进行通信,由此可见,通过上述方法,下接设备可以通过CPE的MAC地址与WAN网的设备通信,而不会出现CPE占用了网关IP地址导致下接设备无法和具有与网关IP地址相同的IP地址的WAN网的设备进行正常的通信,由此提高了下接设备与WAN网的设备相互通信的成功率。As can be seen from the above technical solutions, the embodiments of the present application have the following advantages: According to the ARP learning rules set by the CPE, the CPE can learn and set the IP address of the connected device (that is, the WAN IP address) and the gateway IP address in the CPE. When the receiving device sends an ARP request to the CPE, after determining whether the ARP request contains the WAN IP address and the gateway IP address, the CPE can disguise itself as a gateway and send the MAC address of the CPE to the receiving device. The receiving device then considers it to have received The MAC address of the CPE is the MAC address of the gateway, then learn the MAC address of the CPE, and send the business data to the CPE through the MAC address of the CPE, and the CPE then forwards the device to the WAN network, so as to realize the device connected to the WAN network. For communication, it can be seen that, through the above method, the downlink device can communicate with the WAN network device through the MAC address of the CPE, without the CPE occupying the gateway IP address and the downlink device cannot have the same IP address as the gateway. The devices on the WAN network with the IP address perform normal communication, thereby improving the success rate of communication between the downstream device and the devices on the WAN network.
可选地,在本申请的一些实施例中,所述ARP学习规则可以包括,当所述CPE接收到所述下接设备的所述ARP请求时,所述CPE可以判断所述ARP请求中源IP地址是否为WAN IP地址,目的IP地址是否为网关IP地址;Optionally, in some embodiments of the present application, the ARP learning rule may include that when the CPE receives the ARP request from the downlink device, the CPE may determine a source in the ARP request. Whether the IP address is a WAN IP address and the destination IP address is a gateway IP address;
如果ARP请求中的源IP地址为设置在CPE中的ARP信息中的WAN IP地址,由于下接设备将WAN IP地址设置为下接设备自身的IP地址,则CPE可以确定发送ARP请求的下接设备就是CPE的ARP信息中标记的下接设备,于是所述CPE可以通过网关IP地址向所述下接设备发送所述CPE的MAC地址,这样所述下接设备可以使用所述CPE的MAC地址将业务数据发送给所述CPE,然后所述CPE将业务数据转发给所述WAN网的设备。If the source IP address in the ARP request is the WAN IP address set in the ARP information in the CPE, since the downstream device sets the WAN IP address to the IP address of the downstream device itself, the CPE can determine the downstream connection that sends the ARP request. The device is the downstream device marked in the ARP information of the CPE, so the CPE can send the MAC address of the CPE to the downstream device through the gateway IP address, so that the downstream device can use the MAC address of the CPE Sending service data to the CPE, and then the CPE forwards the service data to a device of the WAN network.
本申请实施例中,由于提供了CPE如何判断ARP请求中的下接设备信息是否与设置在CPE中的ARP信息中的下接设备相符的具体实现方案,因此为本申请实施例中关键所在的ARP规则提供了更具体的实现方式,从而进一步提升了本方案的可实现性。In the embodiment of the present application, a specific implementation scheme is provided for how the CPE determines whether the information of the downstream device in the ARP request matches the downstream device in the ARP information set in the CPE. ARP rules provide a more specific implementation, which further improves the realizability of this solution.
可选地,在本申请的一些实施例中,当所述CPE根据预置的ARP学习规则,确定所述ARP请求中包含有WAN IP地址和网关IP地址时,所述CPE向所述下接设备发送ARP响应包括:Optionally, in some embodiments of the present application, when the CPE determines that the ARP request includes a WAN IP address and a gateway IP address according to a preset ARP learning rule, the CPE forwards to the downlink. The device sends an ARP response including:
所述CPE可以根据预置的所述ARP学习规则,判断所述ARP请求中的所述源IP地址是否为所述ARP信息中的所述WAN IP地址,所述目的IP地址是否为所述网关IP地址;The CPE may determine, according to the preset ARP learning rule, whether the source IP address in the ARP request is the WAN IP address in the ARP information, and whether the destination IP address is the gateway. IP address
如果ARP请求中的源IP地址为设置在CPE中的WAN IP地址,该WAN IP地址被设置为下接设备的IP地址,则CPE可以确定发送ARP请求的下接设备就是CPE的ARP信息中标记的下接设备,于是所述CPE可以通过网关IP地址向所述下接设备发送所述CPE的MAC地址,这样所述下接设备可以使用所述CPE的MAC地址将业务数据发送给所述CPE,然后所述CPE将业务数据转发给所述WAN网的设备。If the source IP address in the ARP request is the WAN IP address set in the CPE, and the WAN IP address is set to the IP address of the downstream device, the CPE can determine that the downstream device that sent the ARP request is the CPE's ARP information. Device, so the CPE can send the MAC address of the CPE to the device through the gateway IP address, so that the device can use the MAC address of the CPE to send business data to the CPE. , And then the CPE forwards the service data to a device of the WAN network.
本申请实施例中,由于CPE可以根据更具体的ARP规则实现和下接设备之间的信息的相互学习,因此进一步提升了本方案的可实现性。In the embodiment of the present application, since the CPE can implement mutual learning of information between the device and the connected device according to a more specific ARP rule, the implementation of this solution is further improved.
可选地,在本申请的一些实施例中,在所述CPE通过所述网关IP地址向所述下接设备发送所述ARP响应之后,该方法还可以包括:Optionally, in some embodiments of the present application, after the CPE sends the ARP response to the downlink device through the gateway IP address, the method may further include:
CPE接收下接设备通过CPE的MAC地址发送的业务数据,并将接收到的业务数据转发至WAN网的设备的服务器上,反之,当CPE接收到WAN网的设备发送的业务数据时,则通过下接设备的MAC地址将WAN网的设备发送的业务数据转发到下接设备中,此种情况下,可以理解为CPE仅作为管道将数据进行下接设备与WAN网的设备之间的转发。The CPE receives the service data sent by the downstream device through the MAC address of the CPE, and forwards the received service data to the server of the WAN network device. On the contrary, when the CPE receives the service data sent by the WAN network device, it passes the The MAC address of the downstream device forwards the service data sent by the device on the WAN network to the downstream device. In this case, it can be understood that the CPE only serves as a pipe to forward data between the downstream device and the device on the WAN network.
本申请实施例中,由于下接设备可以通过CPE的MAC地址将业务数据发送到WAN网的设备上,因此解决了当下接设备的IP地址与WAN网的某个设备的WAN IP地址相同时,无法与WAN网的该设备进行正常通信的问题,下接设备只要通过CPE的MAC地址就可以顺利与WAN网的各个设备通信,同时WAN网也可以通过CPE将数据转发给下接设备,因此提供了实现下接设备通过CPE与WAN网设备通信的更具体的方案,进一步提升了方案的实用性。In the embodiment of the present application, since the downlink device can send service data to the device of the WAN network through the MAC address of the CPE, it is solved that when the IP address of the downlink device is the same as the WAN IP address of a device on the WAN network, The problem that the device cannot communicate normally with the device on the WAN network. As long as the connected device can communicate with each device on the WAN network through the MAC address of the CPE, the WAN network can also forward data to the connected device through the CPE. A more specific scheme for implementing the communication between the downstream equipment and the WAN network equipment through the CPE is achieved, further improving the practicability of the scheme.
本申请实施例第二方面提供一种网络接入方法,可以包括:当下接设备需要向WAN网设备发送业务数据时,可以首先向CPE发送ARP请求,请求获取网关MAC地址,该ARP请求中包含有下接设备的IP地址(即CPE发送给下接设备的WAN IP地址)以及网关IP地址,当CPE接收到下接设备的请求后,就可以根据预置的ARP学习规则进行判断,如果下接设备发送的ARP请求中包含的源IP地址与WAN IP地址相同且目的IP地址与网关IP地址相同,则下接设备就可以接收到CPE发送的ARP响应,在该ARP响应的报文中,CPE将自身的MAC地址填入了ARP响应的报文中,于是下接设备就会将CPE的MAC地址认为是网关的MAC地址,在发送业务数据时,将业务数据通过CPE的MAC地址发送给CPE,进而CPE可向WAN网的设备转发该业务数据。A second aspect of the embodiments of the present application provides a network access method, which may include: when a downlink device needs to send service data to a WAN network device, it may first send an ARP request to the CPE to request a gateway MAC address, and the ARP request includes There is the IP address of the downstream device (that is, the WAN IP address sent by the CPE to the downstream device) and the gateway IP address. After the CPE receives the request from the downstream device, it can judge according to the preset ARP learning rules. The ARP request sent by the receiving device contains the same source IP address as the WAN IP address and the destination IP address is the same as the gateway IP address. Then the receiving device can receive the ARP response sent by the CPE. In the ARP response packet, The CPE fills its own MAC address in the ARP response packet, so the downstream device will consider the MAC address of the CPE to be the MAC address of the gateway. When sending service data, the service data is sent to the CPE through the MAC address of the CPE. The CPE, which in turn can forward the service data to the devices on the WAN network.
在本申请实施例中,由于下接设备使用CPE的MAC地址发送业务数据,因此可以通过CPE将业务数据顺利转发到WAN网的设备中,从而克服了CPE占用网关IP地址导致下接设备无法和具有与网关IP地址相同的IP地址的WAN网的设备进行正常的通信,由此提高了下接 设备与WAN网的设备相互通信的成功率。In the embodiment of the present application, because the downlink device uses the MAC address of the CPE to send service data, the service data can be smoothly forwarded to the device on the WAN network through the CPE, thereby overcoming that the gateway device cannot be connected with the IP address of the gateway by the CPE Devices in the WAN network with the same IP address as the gateway IP address perform normal communication, thereby improving the success rate of communication between the downstream device and the devices in the WAN network.
可选地,在本申请的一些实施例中,所述下接设备接收所述CPE发送的ARP响应可以包括:所述下接设备可以通过网关IP地址接收所述CPE发送的所述ARP响应。Optionally, in some embodiments of the present application, the receiving the device receiving the ARP response sent by the CPE may include: the receiving device may receive the ARP response sent by the CPE through a gateway IP address.
在本申请实施例中,由于提供了具体的下接设备如果接收CPE发送的ARP响应的方式,因此提升了本方案的可实现性。In the embodiment of the present application, since a specific way for the downlink device to receive the ARP response sent by the CPE is provided, the implementability of this solution is improved.
本申请实施例第三方面提供一种无线终端接入设备CPE,该无线终端接入设备具有实现上述第一方面和第一方面的任一种可能的设计中方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。A third aspect of the embodiments of the present application provides a wireless terminal access device CPE, and the wireless terminal access device has a function of implementing the foregoing first aspect and any one of the possible design methods in the first aspect. The functions may be implemented by hardware, and may also be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
本申请实施例第四方面提供一种下接设备,该下接设备具有实现上述第二方面和第二方面的任一种可能的设计中方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。A fourth aspect of the embodiments of the present application provides a downlink device, and the downlink device has a function of realizing any one of the foregoing second aspect and the method in the second aspect. The functions may be implemented by hardware, and may also be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
本申请实施例第五方面提供了一种计算机存储介质,该计算机存储介质用于储存为上述第一方面的无线终端接入设备CPE所用的计算机软件指令,其包括用于执行为CPE所设计的程序。A fifth aspect of the embodiments of the present application provides a computer storage medium for storing computer software instructions used by the wireless terminal access device CPE of the first aspect described above, which includes instructions for executing a design for the CPE. program.
本申请实施例第六方面提供了一种计算机存储介质,该计算机存储介质用于储存为上述第二方面的下接设备所用的计算机软件指令,其包括用于执行为下接设备所设计的程序。According to a sixth aspect of the embodiments of the present application, a computer storage medium is provided. The computer storage medium is used to store computer software instructions used by the download device of the second aspect, and includes a program for executing a program designed for the download device. .
本申请实施例第七方面提供了一种计算机程序产品,该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现上述第一方面中的方法流程。A seventh aspect of the embodiments of the present application provides a computer program product. The computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method flow in the first aspect.
本申请实施例第八方面提供了一种计算机程序产品,该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现上述第二方面中的方法流程。An eighth aspect of the embodiments of the present application provides a computer program product. The computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method flow in the second aspect.
图1为本申请实施例所应用的系统架构图;FIG. 1 is a system architecture diagram applied to an embodiment of this application;
图2为本申请实施例中网络接入方法的一个实施例示意图;2 is a schematic diagram of an embodiment of a network access method according to an embodiment of the present application;
图3为本申请实施例中网络接入方法的另一个实施例示意图;3 is a schematic diagram of another embodiment of a network access method according to an embodiment of the present application;
图4为本申请实施例中无线终端接入设备的一个实施例示意图;4 is a schematic diagram of an embodiment of a wireless terminal access device according to an embodiment of the present application;
图5为本申请实施例中无线终端接入设备的另一个实施例示意图;5 is a schematic diagram of another embodiment of a wireless terminal access device according to an embodiment of the present application;
图6为本申请实施例中下接设备的一个实施例示意图;FIG. 6 is a schematic diagram of an embodiment of a downlink device according to an embodiment of the present application; FIG.
图7为本申请实施例中下接设备的另一个实施例示意图。FIG. 7 is a schematic diagram of another embodiment of a downlink device according to an embodiment of the present application.
本申请实施例提供了网络接入方法以及无线终端接入设备,能够根据CPE设置的ARP学习规则,将CPE的MAC地址发送给下接设备,以使得下接设备通过CPE的MAC地址与WAN的设备通信。The embodiments of the present application provide a network access method and a wireless terminal access device, which can send the MAC address of the CPE to the downstream device according to the ARP learning rule set by the CPE, so that the downstream device can communicate with the WAN through the MAC address of the CPE. Device communication.
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the application. The examples are not all examples. Based on the embodiments in this application, they should all belong to the protection scope of this application.
请参阅图1,在网络接入的实现过程中,需要有下接设备101、接入设备102以及WAN网的设备103的参与。Referring to FIG. 1, in the process of implementing network access, the participation of the access device 101, the access device 102, and the device 103 of the WAN network is required.
WAN网的设备103可以将WAN网的WAN IP地址分配给接入设备102;接入设备102和下接设备101之间可以通过该WAN IP地址相互进行通信。在进行近端维管的数据传送过程中,则接入设备102无需和WAN网的设备103进行通信,而在进行业务数据传送过程中,则接入设备102可以将下接设备101发送过来的业务数据转发给WAN网的设备103,同样WAN网的设备103也可以通过CPE将报文转发给下接设备101。The device 103 of the WAN network can allocate the WAN IP address of the WAN network to the access device 102; the access device 102 and the downstream device 101 can communicate with each other through the WAN IP address. In the process of data transmission of the near-end maintenance, the access device 102 does not need to communicate with the device 103 in the WAN network, and in the process of transmitting business data, the access device 102 can send the The service data is forwarded to the device 103 on the WAN network. Similarly, the device 103 on the WAN network can also forward the packet to the downstream device 101 through the CPE.
需要说明的是,本申请实施例中的下接设备101可以为路由器、室内CPE设备以及增强现实(augmented reality,AR)设备,具体此处不做限定;本申请实施例中的接入设备102可以为无线CPE;WAN网的设备103可以为一个,也可以为多个,具体此处不做限定。It should be noted that the downlink device 101 in the embodiment of the present application may be a router, an indoor CPE device, and an augmented reality (AR) device, and is not specifically limited herein; the access device 102 in the embodiment of the application It may be a wireless CPE; there may be one or multiple devices 103 on the WAN network, which is not limited here.
基于上述的系统框架,以下对本申请实施例进行详细描述。Based on the above system framework, the embodiments of the present application are described in detail below.
首先,需要说明的是,本申请实施例的应用场景中,接入设备是作为无线接入设备的CPE,CPE作为无线接入设备,其工作模式分为IP透传模式和路由模式,入网方式有单APN、2APN、3APN等,而本申请实施例的应用场景中,无线接入设备CPE是在单接入点名称(access point name,APN)场景下,使用IP透传(IP passthrough)模式(也可称为桥模式)进行的无线网络接入。单APN场景是核心网只分配一个WAN IP地址给下接设备,IP透传模式指的是接入设备在IP透传模式下将核心网分配的WAN IP地址发送给下接设备。IP透传模式下的上行方向数据是CPE将从下接设备发送过来的业务数据透传到WAN网的设备中,而下行方向数据是CPE将从WAN网的设备发送的业务数据转发给下接设备。First of all, it should be noted that in the application scenario of the embodiment of the present application, the access device is a CPE serving as a wireless access device, and the CPE serves as a wireless access device. Its working mode is divided into an IP transparent transmission mode and a routing mode. There are single APN, 2APN, 3APN, etc. In the application scenario of the embodiment of this application, the CPE of the wireless access device uses the IP passthrough mode in the single access point name (APN) scenario. (Also known as bridge mode) wireless network access. In the single APN scenario, the core network allocates only one WAN IP address to the downstream device. The IP transparent transmission mode means that the access device sends the WAN IP address allocated by the core network to the downstream device in the IP transparent transmission mode. In the IP transparent transmission mode, the uplink data is that the CPE transparently transmits the service data sent from the downlink device to the WAN network device, and the downlink data is that the CPE forwards the service data sent from the WAN network device to the downlink device. device.
请参阅图2,图2为本申请实施例中网络接入方法的一个实施例示意图。本申请实施例中网络接入方法的一个实施例包括:Please refer to FIG. 2, which is a schematic diagram of an embodiment of a network access method according to an embodiment of the present application. An embodiment of the network access method in the embodiments of the present application includes:
201、CPE从核心网获取WAN网的WAN IP地址;201. The CPE obtains the WAN IP address of the WAN network from the core network;
本实施例中,为了实现下接设备与WAN网的各个设备的正常通信,核心网会分配WAN网的一个WAN IP地址给CPE,CPE可以先通过插入用户识别模块(Subscriber Identification Module,SIM)卡之后,接入无线网络长期演进(Long Term Evolution,LTE)基站,然后从核心网获取该WAN IP地址。由于是单APN的应用场景,因此核心网只会分配一个WAN IP地址给CPE。In this embodiment, in order to realize the normal communication between the connected device and each device of the WAN network, the core network will allocate a WAN IP address of the WAN network to the CPE. The CPE may first insert a Subscriber Identification Module (SIM) card After that, it accesses a wireless network Long Term Evolution (LTE) base station, and then obtains the WAN IP address from the core network. Because it is a single APN application scenario, the core network will only allocate one WAN IP address to the CPE.
202、CPE根据WAN IP地址计算得到WAN IP地址的掩码和网关IP地址;202. The CPE calculates the mask of the WAN IP address and the gateway IP address according to the WAN IP address.
CPE在获取到该WAN IP地址之后,可以根据该WAN IP地址计算得到WAN IP地址的掩码和网关IP地址。After the CPE obtains the WAN IP address, it can calculate the mask of the WAN IP address and the gateway IP address based on the WAN IP address.
掩码的计算方法可以是,记录WAN IP的比特位为“0”的值,即bit[0],依次读取WAN IP的每个比特位的值,直到某个比特位bit[x]的值不等于“0”,则掩码主机位为0-x位。举一个更具体的掩码的计算方法的实例,假设从核心网获取的WAN IP为10.10.19.16,则转换成16进制整数为0x0a0a1310,转换为二进制为1010000010100001001100010000,从右到左依次是bit0~bit31,可以清晰的看出bit0和bit4不一致,那么0~4就是主机位,从而掩码就是11111111111111111111111111100000,转成16进制就是0xffffffe0,即是255.255.255.224。The calculation method of the mask can be to record the value of the bit of the WAN IP as "0", that is, bit [0], and sequentially read the value of each bit of the WAN IP until a certain bit bit [x] If the value is not equal to "0", the masked host bits are 0-x bits. For a more specific example of the calculation method of the mask, assuming that the WAN IP obtained from the core network is 10.10.19.16, it will be converted into a hexadecimal integer of 0x0a0a1310, a binary of 1010000010100001001100010000, and bit0 ~ from right to left. For bit31, it can be clearly seen that bit0 and bit4 are inconsistent. Then 0 to 4 are the host bits, so the mask is 11111111111111111111111111111100000, and the hexadecimal number is 0xffffffe0, which is 255.255.255.224.
网关IP地址的计算方法可以是,WAN IP与计算得到的掩码相掩后再加上“1”,如果这 个地址与WAN IP不相等,则为网关IP,否则再将加上“1”后的地址作为网关地址。举一个更具体的网关的计算方法的实例,按照上述的WAN IP(10.10.19.16)和计算出来的掩码(255.255.255.224),则WAN IP与掩码做相掩操作:即做&操作(判断每一位都为1则为1,否则为0),那么相掩后的值为1010000010100001001100000000,转换成16进制为0x0a0a1300,执行+1操作后为0x0a0a1301,即为10.10.19.1。The gateway IP address can be calculated by masking the WAN IP with the calculated mask and adding "1". If this address is not equal to the WAN IP, it is the gateway IP, otherwise it will be added with "1" As the gateway address. As an example of a more specific gateway calculation method, according to the above-mentioned WAN IP (10.10.19.16) and the calculated mask (255.255.255.224), the WAN IP is masked with the mask: that is, the & operation ( Judging that each bit is 1, it is 1, otherwise it is 0), then the masked value is 1010000010100001001100000000, converted into hexadecimal is 0x0a0a1300, after performing +1 operation is 0x0a0a1301, which is 10.10.19.1.
需要说明的是,需要计算得到掩码是因为下接设备在将WAN IP地址设置为自身的IP地址时,需要使用掩码进行设置。It should be noted that the mask needs to be calculated because the downstream device needs to use the mask to set when it sets the WAN IP address to its own IP address.
203、CPE设置ARP学习规则;203. The CPE sets an ARP learning rule.
CPE在计算的到WAN IP地址的掩码和网关IP地址之后,可以设置ARP学习规则,该ARP学习规则为,当CPE接收到下接设备的ARP请求时,CPE判断ARP请求中是否包含有WAN IP地址以及网关IP地址,CPE需要判断是否有WAN IP的原因是,如果CPE确定ARP请求中包含有WAN IP地址,则说明CPE能够确定下接设备的IP地址,因为下接设备将该WAN IP地址设置为自身的IP地址;而CPE需要判断是否有网关IP的原因是,如果CPE确定ARP请求中包含有网关IP地址,则CPE在后续的步骤中通过该网关IP地址将CPE的MAC地址发送给下接设备,若CPE可以确定ARP请求中包含有WAN IP地址以及网关IP地址,则CPE通过ARP响应经由网关IP地址向下接设备发送CPE的MAC地址,该ARP请求中包含有下接设备的MAC地址、WAN IP地址以及网关IP地址。下接设备发送的ARP请求用于请求网关的MAC地址。After the CPE calculates the mask of the WAN IP address and the gateway IP address, it can set an ARP learning rule. The ARP learning rule is that when the CPE receives an ARP request from a connected device, the CPE determines whether the ARP request contains a WAN. The IP address and gateway IP address. The reason why the CPE needs to determine whether there is a WAN IP is that if the CPE determines that the ARP request contains a WAN IP address, it means that the CPE can determine the IP address of the downstream device, because the downstream device uses the WAN IP address. The address is set to its own IP address; the reason why the CPE needs to determine whether there is a gateway IP is that if the CPE determines that the ARP request contains the gateway IP address, the CPE sends the MAC address of the CPE through the gateway IP address in subsequent steps For the downstream device, if the CPE can determine that the ARP request contains the WAN IP address and the gateway IP address, the CPE sends the MAC address of the CPE to the downstream device through the gateway IP address through the ARP response. The ARP request includes the downstream device MAC address, WAN IP address, and gateway IP address. The ARP request sent by the device is used to request the MAC address of the gateway.
进一步地,在CPE设置的ARP学习规则中,CPE在接收到下接设备发送的ARP请求后,判断ARP请求中的WAN IP地址、网关IP地址是否与设置在CPE中的下接设备的ARP信息中的WAN IP地址、网关IP地址相符,如果相符,则CPE通过网关IP地址向下接设备发送CPE的MAC地址。Further, in the ARP learning rule set by the CPE, after receiving the ARP request sent by the downstream device, the CPE determines whether the WAN IP address and gateway IP address in the ARP request are related to the ARP information of the downstream device set in the CPE. The WAN IP address and the gateway IP address match. If they match, the CPE sends the MAC address of the CPE to the device through the gateway IP address.
204、下接设备向CPE发送DHCP请求;204. The downlink device sends a DHCP request to the CPE.
CPE在CPE上设置好ARP学习规则后,下接设备可以向CPE发送DHCP请求,该DHCP请求中携带有下接设备的MAC地址,DHCP请求用于向CPE请求WAN IP地址、WAN IP地址的掩码以及网关IP地址。After the CPE sets the ARP learning rules on the CPE, the downstream device can send a DHCP request to the CPE. The DHCP request carries the MAC address of the downstream device. The DHCP request is used to request the CPE to mask the WAN IP address and WAN IP address. Code and gateway IP address.
205、CPE在CPE上设置下接设备的ARP信息;205. The CPE sets the ARP information of the connected device on the CPE.
CPE在获取到WAN IP地址并且接收到下接设备发送的DHCP请求之后,可以在CPE上设置ARP信息,该ARP信息属于下接设备的信息。CPE可以将DHCP请求中的下接设备的MAC地址设置在ARP信息中,以供后续将WAN网的设备发送到CPE的报文通过下接设备的MAC地址转发到下接设备中。另外,CPE可以将WAN IP地址设置在ARP信息中,该WAN IP地址可以在后续的操作步骤中被下接设备设置为下接设备自身的IP地址。该ARP信息属于静态ARP信息。CPE设置下接设备的ARP信息的目的,是为了后续的判断中,对发送ARP请求的下接设备的信息是否与设置在CPE中的下接设备的信息相符进行判断的步骤做好准备工作。After the CPE obtains the WAN IP address and receives the DHCP request sent by the downstream device, it can set ARP information on the CPE. This ARP information belongs to the information of the downstream device. The CPE can set the MAC address of the downstream device in the DHCP request in the ARP information, so that subsequent packets sent from the WAN network device to the CPE can be forwarded to the downstream device through the MAC address of the downstream device. In addition, the CPE can set the WAN IP address in the ARP information, and the WAN IP address can be set by the downloading device as the IP address of the downloading device in the subsequent operation steps. The ARP information is static ARP information. The purpose of setting the ARP information of the downstream device in the CPE is to prepare for the subsequent judgment steps to determine whether the information of the downstream device that sends the ARP request matches the information of the downstream device set in the CPE.
206、CPE根据DHCP请求,将WAN IP地址、掩码和网关IP地址发送给下接设备使用;206. The CPE sends the WAN IP address, mask, and gateway IP address to the connected device for use according to the DHCP request.
CPE在CPE上记录好下接设备的MAC地址,并设置好下接设备的ARP信息后,可以根据DHCP请求,将WAN IP地址、掩码和网关IP地址发送给下接设备使用。下接设备在接收到WAN IP地址后,可以将该WAN IP地址设置为下接设备自身的IP地址,在将WAN IP地址设置为自身的WAN IP地址时,需要使用接收到的掩码进行设置,而下接设备接收到的网关IP 地址,则用来将下接设备的MAC地址发送给CPE。After the CPE records the MAC address of the downstream device on the CPE and sets the ARP information of the downstream device, it can send the WAN IP address, mask, and gateway IP address to the downstream device for use according to the DHCP request. After the receiving device receives the WAN IP address, it can set the WAN IP address as the IP address of the connecting device itself. When setting the WAN IP address as its own WAN IP address, it needs to use the received mask for setting , And the gateway IP address received by the downstream device is used to send the MAC address of the downstream device to the CPE.
207、下接设备向CPE发送ARP请求;207. The receiving device sends an ARP request to the CPE.
当下接设备需要向WAN网的设备发送数据时,首先会向CPE发送ARP请求,请求CPE将网关的MAC地址发送给下接设备。在该ARP请求的报文中,包含有源MAC地址、源IP地址、目的IP地址以及目的MAC地址。在源MAC地址、源IP地址、目的IP地址中都已填入相应的地址信息,在源MAC地址中填入了下接设备的MAC地址信息,在源IP地址中填入了WAN IP地址信息,在目的IP地址中填入了网关IP地址信息,而目的MAC地址则是空着的,下接设备通过发送ARP请求,就是请求CPE将网关的MAC地址发送给下接设备。When a downlink device needs to send data to a device on the WAN network, it first sends an ARP request to the CPE, requesting the CPE to send the MAC address of the gateway to the downlink device. The ARP request message includes a source MAC address, a source IP address, a destination IP address, and a destination MAC address. The source MAC address, source IP address, and destination IP address are filled with the corresponding address information. The source MAC address is filled with the MAC address information of the connected device. The source IP address is filled with the WAN IP address information. The destination IP address is filled with the gateway IP address information, and the destination MAC address is empty. By sending an ARP request, the receiving device requests the CPE to send the MAC address of the gateway to the receiving device.
208、当CPE根据预置的ARP学习规则,确定ARP请求中包含有WAN IP地址和网关IP地址时,CPE向下接设备发送ARP响应;208. When the CPE determines that the ARP request includes the WAN IP address and the gateway IP address according to the preset ARP learning rules, the CPE sends an ARP response to the downstream device;
CPE在接收到下接设备发送的ARP请求后,可以根据ARP学习规则,判断ARP请求中是否包含有WAN IP地址和网关IP地址,如果CPE确定ARP请求中包含有设置为WAN IP地址(该WAN IP地址已设置为下接设备的IP地址)以及网关IP地址,则CPE向下接设备发送ARP响应,该ARP响应包括CPE的MAC地址,该CPE的MAC地址用于所述下接设备向WAN网的设备发送业务数据。After receiving the ARP request sent by the downstream device, the CPE can determine whether the ARP request contains the WAN IP address and the gateway IP address according to the ARP learning rules. If the CPE determines that the ARP request contains the WAN IP address (the WAN IP address has been set to the IP address of the downstream device) and the gateway IP address, the CPE sends an ARP response to the downstream device. The ARP response includes the MAC address of the CPE, and the MAC address of the CPE is used by the downstream device to the WAN. Network equipment sends business data.
需要说明的是,WAN网的设备包括IP多媒体子系统(IP multimedia subsystem,IMS)、域名系统(domain name system,DNS)服务器、会话初始协议(session initation protocol,SIP)服务器、百度服务器、微信服务器等。It should be noted that the equipment of the WAN network includes IP multimedia subsystem (IMS), domain name system (DNS) server, session initialization protocol (SIP) server, Baidu server, WeChat server Wait.
进一步地,CPE在接收到下接设备发送的ARP请求后,可以根据ARP学习规则,判断ARP请求中的WAN IP地址、网关IP地址是否与设置在CPE中的下接设备的ARP信息中的WAN IP地址(用于作为下接设备的IP地址)、网关IP地址相符,如果相符,则CPE通过ARP响应经由网关IP地址向下接设备发送CPE的MAC地址,从而使下接设备可以使用CPE的MAC地址将业务数据转发到WAN网的设备上,实现下接设备与WAN网的设备进行通信。Further, after receiving the ARP request sent by the downstream device, the CPE can determine whether the WAN IP address and gateway IP address in the ARP request and the WAN in the ARP information of the downstream device set in the CPE according to the ARP learning rules. The IP address (used as the IP address of the downstream device) and the gateway IP address match. If they match, the CPE sends the MAC address of the CPE to the downstream device via the gateway IP address through the ARP response, so that the downstream device can use the CPE. The MAC address forwards business data to the devices on the WAN network, enabling the downstream device to communicate with the devices on the WAN network.
在本申请实施例中,CPE设置了ARP学习规则,将核心网分配的WAN IP地址以及计算得到的网关IP地址在CPE上设置为下接设备的ARP信息,并通过下接设备发送的DHCP请求将WAN IP地址、网关IP地址以及掩码发送给下接设备,下接设备将WAN IP地址设置为下接设备的WAN IP地址,并使用掩码将网关IP地址设置为下接设备的网关IP地址,当CPE接收到下接设备的ARP请求时,CPE根据设置的ARP学习规则,判断设置在CPE中的下接设备的ARP信息是否与ARP请求中的WAN IP和网关IP信息匹配,若是,则CPE通过网关IP地址将CPE的MAC地址发送给下接设备,从而使下接设备通过CPE的MAC地址把业务数据发送给CPE,然后CPE将业务数据不做任何处理,向WAN网的设备发送,由此可见,通过上述方法,下接设备可以通过CPE的MAC地址将业务数据转发到WAN网的设备,从而克服了CPE占用了网关IP地址导致下接设备无法和具有与网关IP地址相同的IP地址的WAN网的设备进行正常通信的问题,由此提高了下接设备与WAN网的设备相互通信的成功率。In the embodiment of the present application, the CPE sets an ARP learning rule, sets the WAN IP address allocated by the core network and the calculated gateway IP address on the CPE as the ARP information of the connected device, and sends the DHCP request through the connected device. Send the WAN IP address, gateway IP address, and mask to the downstream device. The downstream device sets the WAN IP address to the WAN IP address of the downstream device, and uses the mask to set the gateway IP address to the gateway IP of the downstream device. Address. When the CPE receives the ARP request from the downstream device, the CPE determines whether the ARP information of the downstream device set in the CPE matches the WAN IP and gateway IP information in the ARP request according to the set ARP learning rules. If so, The CPE sends the MAC address of the CPE to the downstream device through the gateway IP address, so that the downstream device sends the business data to the CPE through the MAC address of the CPE, and the CPE sends the business data to the device on the WAN network without any processing. It can be seen that, through the above method, the downstream device can forward the business data to the device on the WAN through the MAC address of the CPE, thereby overcoming the gateway ’s IP address caused by the CPE ’s access to the downstream device. Preparation impossible to perform normal communication devices and the WAN gateway IP address has the same IP address, thereby improving the success rate of the device connected to communicate with each other device in the WAN.
进一步地,下面以下接设备经由CPE向WAN网的设备发送业务数据的场景作为举例,对图3中的实施例进行描述。Further, the following describes the embodiment in FIG. 3 as an example of a scenario where a device sends service data to a device on a WAN network via a CPE.
参见图3,图3为本申请实施例中网络接入方法的另一个实施例示意图。需要说明的是,图3所示的实施例中步骤301至步骤308与前述图2所示的实施例中的步骤201至步骤208 类似,具体此处不再赘述。Referring to FIG. 3, FIG. 3 is a schematic diagram of another embodiment of a network access method according to an embodiment of the present application. It should be noted that steps 301 to 308 in the embodiment shown in FIG. 3 are similar to steps 201 to 208 in the embodiment shown in FIG. 2, and details are not described herein again.
本申请实施例中网络接入方法的另一个实施例包括:Another embodiment of the network access method in the embodiments of the present application includes:
301、CPE从核心网获取WAN网的WAN IP地址;301. The CPE obtains the WAN IP address of the WAN network from the core network.
302、CPE根据WAN IP地址计算得到WAN IP地址的掩码和网关IP地址;302. The CPE calculates the mask of the WAN IP address and the gateway IP address according to the WAN IP address.
303、CPE设置ARP学习规则;303. The CPE sets an ARP learning rule.
304、下接设备向CPE发送DHCP请求;304. The receiving device sends a DHCP request to the CPE.
305、CPE在CPE上设置下接设备的ARP信息;305. The CPE sets the ARP information of the connected device on the CPE.
306、CPE根据DHCP请求,将WAN IP地址、掩码和网关IP地址发送给下接设备使用;306. The CPE sends the WAN IP address, mask, and gateway IP address to the connected device for use according to the DHCP request.
307、下接设备向CPE发送ARP请求;307. The receiving device sends an ARP request to the CPE.
308、当CPE根据ARP学习规则,确定ARP请求中包含有WAN IP地址和网关IP地址时,CPE向下接设备发送ARP响应;308. When the CPE determines that the ARP request includes the WAN IP address and the gateway IP address according to the ARP learning rule, the CPE sends an ARP response to the downstream device;
309、下接设备向CPE发送业务数据;309. The downlink device sends service data to the CPE.
本实施例中,下接设备在接收到CPE的MAC地址之后,会误认为该CPE的MAC地址就是网关的MAC地址,于是下接设备就会通过CPE的MAC地址向CPE发送业务数据。In this embodiment, after receiving the MAC address of the CPE, the downlink device mistakenly believes that the MAC address of the CPE is the MAC address of the gateway, so the downlink device sends service data to the CPE through the MAC address of the CPE.
具体地,该CPE的MAC地址设置在ARP响应的报文中,在报文中的目的MAC地址的位置,CPE在填入数据之前是没有填入任何数据的,在CPE接收到ARP请求后,就可以将自身的MAC地址填入目的MAC地址的位置,再通过报文发送给下接设备,下接设备通过报文,就可以获知CPE的MAC地址,但是下接设备原先想要的其实是网关MAC地址,所以下接设备会错误的认为填入在目的MAC地址中的CPE的MAC地址就是网关MAC地址,于是下接设备就通过CPE的MAC地址试图将业务数据发送给CPE。Specifically, the MAC address of the CPE is set in the ARP response message. At the position of the destination MAC address in the message, the CPE does not fill any data before filling the data. After the CPE receives the ARP request, You can fill your own MAC address in the destination MAC address, and then send the message to the downstream device. The downstream device can get the MAC address of the CPE through the message, but what the downstream device originally wanted was Gateway MAC address. Therefore, the downstream device incorrectly believes that the MAC address of the CPE filled in the destination MAC address is the gateway MAC address. Therefore, the downstream device attempts to send service data to the CPE through the MAC address of the CPE.
310、CPE向WAN网的设备发送业务数据;310. The CPE sends service data to a device on the WAN network.
CPE在接收到下接设备发送的业务数据之后,不会对业务数据做任何处理,而是向WAN网的设备转发业务数据,由WAN网的设备对业务数据进行处理。这样,下接设备通过CPE就能够将业务数据转发到WAN网的设备。After receiving the service data sent by the downstream device, the CPE does not perform any processing on the service data, but forwards the service data to the devices on the WAN network, and the devices on the WAN network process the service data. In this way, the downstream device can forward service data to the device on the WAN network through the CPE.
311、WAN网的设备向CPE发送业务数据;311. The WAN network device sends service data to the CPE.
本实施例中,WAN网的设备也可以向下接设备发送业务数据。In this embodiment, a device on the WAN network may also send service data to the downstream device.
312、CPE向下接设备发送业务数据。312. The CPE sends service data to the downstream device.
CPE在接收到下接设备发送的报文后,可以通过记录在CPE中的下接设备的MAC地址向下接设备发送业务数据。After receiving the message sent by the downstream device, the CPE can send service data to the downstream device by using the MAC address of the downstream device recorded in the CPE.
在本申请实施例中,当下接设备向CPE发送ARP请求时,CPE可以根据预设在CPE中的ARP学习规则,在确定发送ARP请求的下接设备信息,即ARP请求的报文中源IP地址处填写的WAN IP地址以及目的IP地址处填写的网关IP地址与设置在CPE中的ARP信息(即WAN IP地址以及网关IP地址)相同时,CPE就可以伪装成网关,将CPE自身的MAC地址发送给下接设备,下接设备通过CPE的MAC地址将业务数据发送到CPE,然后CPE向WAN网的设备转发该业务数据,反之,WAN网的设备也可以将报文经由CPE转发给下接设备,由此可见,通过上述方法,下接设备可以通过CPE的MAC地址将业务数据转发到WAN网的设备,从而克服了CPE占用了网关IP地址导致下接设备无法和具有与网关IP地址相同的IP地址的WAN网的设备进行正常通信的问题,由此提高了下接设备与WAN网的设备相互通信的成功率。In the embodiment of the present application, when the receiving device sends an ARP request to the CPE, the CPE may determine the information of the receiving device that sends the ARP request according to the ARP learning rule preset in the CPE, that is, the source IP in the ARP request message. When the WAN IP address filled in the address and the gateway IP address filled in the destination IP address are the same as the ARP information (that is, the WAN IP address and the gateway IP address) set in the CPE, the CPE can masquerade as a gateway and use the CPE's own MAC. The address is sent to the downstream device. The downstream device sends the business data to the CPE through the MAC address of the CPE, and then the CPE forwards the business data to the device on the WAN network. Conversely, the device on the WAN network can also forward the packet to the device through the CPE. It can be seen that through the above method, the downlink device can forward the business data to the device on the WAN through the MAC address of the CPE, thereby overcoming that the gateway device cannot occupy the gateway IP address due to the CPE occupying the gateway IP address and the gateway device cannot have the same IP address as the gateway. The problem of normal communication between devices on the WAN network with the same IP address, thereby improving the success rate of communication between the downstream device and the devices on the WAN network.
上面对本申请实施例中的网络接入方法进行了描述,下面对本申请实施例中的无线终端接入设备进行描述,请参阅图4,图4为本申请实施例中CPE的一个实施例示意图。The network access method in the embodiment of the present application has been described above. The wireless terminal access device in the embodiment of the present application is described below. Please refer to FIG.
本申请实施例中CPE的一个实施例包括:An embodiment of the CPE in the embodiments of the present application includes:
第一接收单元401,用于接收下接设备发送的ARP请求,所述ARP请求用于请求网关的媒体访问控制MAC地址,所述ARP请求包含有广域网WAN的因特网互联网协议IP地址和网关IP地址,所述WAN IP地址为所述下接设备为所述下接设备自身设置的IP地址;A first receiving unit 401 is configured to receive an ARP request sent by a receiving device, where the ARP request is used to request a media access control MAC address of a gateway, and the ARP request includes an Internet Internet Protocol IP address and a gateway IP address of a wide area network WAN. The WAN IP address is an IP address set by the downlink device for the downlink device itself;
第一发送单元402,用于当确定单元403根据预置的ARP学习规则,确定ARP请求中包含有WAN IP地址和网关IP地址时,通过网关IP地址向下接设备发送ARP响应,ARP响应包括CPE的MAC地址,CPE的MAC地址用于下接设备向WAN网的设备发送业务数据。The first sending unit 402 is configured to: when the determining unit 403 determines that the ARP request includes a WAN IP address and a gateway IP address according to a preset ARP learning rule, send an ARP response to the downstream device through the gateway IP address. The ARP response includes The MAC address of the CPE. The MAC address of the CPE is used by the downstream device to send service data to the device on the WAN network.
本实施例中,所述ARP学习规则包括,当第一接收单元401接收到下接设备的ARP请求时,若确定单元403确定ARP请求中的源IP地址为WAN IP地址,目的IP地址为网关IP地址,则第一发送单元402向下接设备发送ARP响应。In this embodiment, the ARP learning rule includes that when the first receiving unit 401 receives an ARP request from a connected device, if the determining unit 403 determines that the source IP address in the ARP request is a WAN IP address and the destination IP address is a gateway IP address, the first sending unit 402 sends an ARP response to the downstream device.
本实施例中,第一发送单元402具体用于,当CPE根据预置的ARP学习规则,确定ARP请求中的源IP地址为ARP信息中的WAN IP地址,目的IP地址为网关IP地址时,CPE向下接设备发送ARP响应。In this embodiment, the first sending unit 402 is specifically configured to: when the CPE determines that the source IP address in the ARP request is the WAN IP address in the ARP information and the destination IP address is the gateway IP address according to a preset ARP learning rule, The CPE sends an ARP response to the downstream device.
本实施例中,CPE还包括:In this embodiment, the CPE further includes:
第二接收单元404,用于接收下接设备发送的业务数据;A second receiving unit 404, configured to receive service data sent by a downlink device;
第二发送单元405,用于向WAN网的设备发送业务数据。The second sending unit 405 is configured to send service data to a device on the WAN network.
本实施例中,由于第一接收单元401在接收到下接设备发送的ARP请求之后,当根据预置的ARP学习规则,确定ARP请求中包含有WAN IP地址和网关IP地址时,第一发送单元402就会向下接设备发送ARP响应,该ARP响应中包含有CPE的MAC地址,但ARP请求实际想请求的是网关的MAC地址,因此当下接设备接收到CPE的MAC地址时,就会误认为该CPE的MAC地址就是网关的MAC地址,于是第二接收单元404可以通过CPE的MAC地址接收下接设备发送的业务数据,第二发送单元405再向WAN网的设备发送业务数据,由此通过CPE的MAC地址,提高了下接设备与WAN网的设备相互通信的成功率。In this embodiment, after the first receiving unit 401 receives the ARP request sent by the receiving device, when it is determined that the ARP request includes a WAN IP address and a gateway IP address according to a preset ARP learning rule, the first sending Unit 402 will send an ARP response to the downstream device. The ARP response contains the MAC address of the CPE, but the ARP request actually wants to request the MAC address of the gateway. Therefore, when the receiving device receives the MAC address of the CPE, it will The CPE's MAC address is mistakenly considered to be the MAC address of the gateway, so the second receiving unit 404 can receive the service data sent by the downstream device through the CPE's MAC address, and the second sending unit 405 sends the business data to the WAN network device. This improves the success rate of communication between the downstream device and the WAN network device through the MAC address of the CPE.
上面对本申请实施例中CPE的一个实施例进行了描述,下面对本申请实施例中CPE的另一个实施例进行描述。请参阅图5,图5是本申请实施例中CPE的另一个实施例示意图。One embodiment of the CPE in the embodiments of the present application has been described above, and another embodiment of the CPE in the embodiments of the present application is described below. Please refer to FIG. 5, which is a schematic diagram of another embodiment of a CPE in the embodiment of the present application.
本申请实施例中CPE的一个实施例包括:An embodiment of the CPE in the embodiments of the present application includes:
该CPE500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)501(例如,一个或一个以上处理器)和存储器505,该存储器505中存储有一个或一个以上的应用程序或数据。The CPE500 may have a large difference due to different configurations or performance, and may include one or more central processing units (CPUs) 501 (for example, one or more processors) and a memory 505. The memory 505 Stores one or more applications or data.
其中,存储器505可以是易失性存储或持久存储。存储在存储器505的程序可以包括一个或一个以上模块,每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器501可以设置为与存储器505通信,在CPE500上执行存储器505中的一系列指令操作。The memory 505 may be volatile storage or persistent storage. The program stored in the memory 505 may include one or more modules, and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 501 may be configured to communicate with the memory 505, and execute a series of instruction operations in the memory 505 on the CPE 500.
CPE500还可以包括一个或一个以上电源502,一个或一个以上有线或无线网络接口503,一个或一个以上收发器504,和/或,一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。CPE500 may also include one or more power sources 502, one or more wired or wireless network interfaces 503, one or more transceivers 504, and / or, one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM , LinuxTM, FreeBSDTM, and more.
本实施例中CPE500中的中央处理器501所执行的流程与前述图2和图3所示的实施例中 描述的方法流程类似,此处不再赘述。The process performed by the central processing unit 501 in the CPE 500 in this embodiment is similar to the method process described in the foregoing embodiments shown in FIG. 2 and FIG. 3, and details are not described herein again.
本申请实施例还提供一种计算机存储介质,该计算机存储介质用于储存为前述CPE所用的计算机软件指令,其包括用于执行为CPE所设计的程序。An embodiment of the present application further provides a computer storage medium for storing computer software instructions used by the aforementioned CPE, which includes a program for executing a program designed for the CPE.
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现前述图2和图3所示的实施例中的方法流程。The embodiment of the present application further provides a computer program product, the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method flow in the embodiments shown in FIG. 2 and FIG. 3.
上面从CPE侧对本申请实施例进行了描述,下面从下接设备侧对本申请实施例进行描述。请参阅图6,图6是本申请实施例中下接设备的一个实施例示意图。The embodiment of the present application is described above from the CPE side, and the embodiment of the present application is described from the side of the downstream device. Please refer to FIG. 6, which is a schematic diagram of an embodiment of a downlink device according to an embodiment of the present application.
本申请实施例中下接设备的一个实施例包括:An embodiment of the downlink device in the embodiments of the present application includes:
第一发送单元601,用于向CPE发送ARP请求,所述ARP请求用于请求网关的媒体访问控制MAC地址,所述ARP请求包含有广域网WAN的因特网互联网IP地址和网关IP地址,所述WAN IP地址为所述下接设备为所述下接设备自身设置的IP地址;A first sending unit 601 is configured to send an ARP request to a CPE, where the ARP request is used to request a media access control MAC address of a gateway, and the ARP request includes an Internet Internet IP address and a gateway IP address of a wide area network WAN, the WAN The IP address is an IP address set by the downlink device for the downlink device itself;
接收单元602,用于通过网关IP地址接收CPE发送的ARP响应,该ARP响应包括CPE MAC地址;A receiving unit 602, configured to receive an ARP response sent by a CPE through a gateway IP address, where the ARP response includes a CPE MAC address;
第二发送单元603,用于通过CPE MAC地址向CPE发送业务数据。The second sending unit 603 is configured to send service data to the CPE through the CPE MAC address.
本实施例中,接收单元602具体用于通过网关IP地址接收CPE发送大的ARP响应。In this embodiment, the receiving unit 602 is specifically configured to receive a large ARP response sent by the CPE through the gateway IP address.
本实施例中,第一发送单元601向CPE发送ARP请求,请求网关MAC地址,接着接收单元602可以接收CPE发送的ARP响应,该ARP响应中包括CPE的MAC地址,第二发送单元603就会通过该CPE的MAC地址将业务数据向CPE发送业务数据,由此下接设备可以通过CPE将业务数据顺利转发到WAN网的设备中,从而克服了CPE占用网关IP地址导致下接设备无法和具有与网关IP地址相同的IP地址的WAN网的设备进行正常的通信,因此提高了下接设备与WAN网的设备相互通信的成功率。In this embodiment, the first sending unit 601 sends an ARP request to the CPE, requesting the gateway MAC address, and then the receiving unit 602 can receive the ARP response sent by the CPE. The ARP response includes the MAC address of the CPE, and the second sending unit 603 will The service data is sent to the CPE through the MAC address of the CPE, so that the download device can successfully forward the service data to the device on the WAN network through the CPE, thereby overcoming the failure of the download device and the The devices on the WAN network with the same IP address as the gateway IP address perform normal communication, thereby improving the success rate of communication between the device connected to the WAN network and the devices on the WAN network.
上面对本申请实施例中下接设备的一个实施例进行了描述,下面对本申请实施例中下接设备的另一个实施例进行描述。请参阅图7,图7是本申请实施例中下接设备的另一个实施例示意图。One embodiment of the downlink device in the embodiment of the present application has been described above, and another embodiment of the downlink device in the embodiment of the present application is described below. Please refer to FIG. 7, which is a schematic diagram of another embodiment of a downlink device according to an embodiment of the present application.
该下接设备700可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)701(例如,一个或一个以上处理器)和存储器705,该存储器705中存储有一个或一个以上的应用程序或数据。The downlink device 700 may have a relatively large difference due to different configurations or performance, and may include one or more central processing units (CPUs) 701 (for example, one or more processors) and a memory 705. The memory 705 stores one or more application programs or data.
其中,存储器705可以是易失性存储或持久存储。存储在存储器705的程序可以包括一个或一个以上模块,每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器701可以设置为与存储器705通信,在下接设备700上执行存储器705中的一系列指令操作。The memory 705 may be volatile storage or persistent storage. The program stored in the memory 705 may include one or more modules, and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 701 may be configured to communicate with the memory 705, and execute a series of instruction operations in the memory 705 on the access device 700.
下接设备700还可以包括一个或一个以上电源702,一个或一个以上有线或无线网络接口703,一个或一个以上收发器704,和/或,一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。The downlink device 700 may also include one or more power sources 702, one or more wired or wireless network interfaces 703, one or more transceivers 704, and / or, one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
本实施例中下接设备700中的中央处理器701所执行的流程与前述图2和图3所示的实施例中描述的方法流程类似,此处不再赘述。The process performed by the central processing unit 701 in the access device 700 in this embodiment is similar to the method process described in the foregoing embodiments shown in FIG. 2 and FIG. 3, and details are not described herein again.
本申请实施例还提供一种计算机存储介质,该计算机存储介质用于储存为前述下接设备所用的计算机软件指令,其包括用于执行为下接设备所设计的程序。An embodiment of the present application further provides a computer storage medium, which is used to store computer software instructions used by the aforementioned access device, and includes a program for executing the program designed for the access device.
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现前述图图2和图3所示的实施例中的方法流程。An embodiment of the present application further provides a computer program product, the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method flow in the embodiment shown in FIG. 2 and FIG. 3.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium. , Including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application. The foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes .
Claims (14)
- 一种网络接入方法,其特征在于,包括:A network access method, comprising:无线终端接入设备CPE接收下接设备发送的地址解析协议ARP请求,所述ARP请求用于请求网关的媒体访问控制MAC地址,所述ARP请求包含有广域网WAN的因特网互联网协议IP地址和网关IP地址,所述WAN IP地址为所述下接设备为所述下接设备自身设置的IP地址;The wireless terminal access device CPE receives an address resolution protocol ARP request sent by the access device, the ARP request is used to request a media access control MAC address of the gateway, and the ARP request includes an Internet Internet Protocol IP address and a gateway IP of a WAN Address, the WAN IP address is an IP address set by the downlink device for the downlink device itself;当所述CPE根据预置的ARP学习规则,确定所述ARP请求中包含有WAN IP地址和网关IP地址时,所述CPE通过所述网关IP地址向所述下接设备发送ARP响应,所述ARP响应包括所述CPE的MAC地址,所述CPE的MAC地址用于所述下接设备向WAN网的设备发送业务数据。When the CPE determines that the ARP request includes a WAN IP address and a gateway IP address according to a preset ARP learning rule, the CPE sends an ARP response to the connected device through the gateway IP address. The ARP response includes the MAC address of the CPE, and the MAC address of the CPE is used by the downlink device to send service data to a device on the WAN network.
- 根据权利要求1所述的方法,其特征在于,所述ARP学习规则包括,当所述CPE接收到所述下接设备的所述ARP请求时,若所述CPE确定所述ARP请求中的源IP地址为WAN IP地址,目的IP地址为网关IP地址,则所述CPE向所述下接设备发送所述ARP响应。The method according to claim 1, wherein the ARP learning rule comprises: when the CPE receives the ARP request from the downlink device, if the CPE determines the source in the ARP request If the IP address is a WAN IP address and the destination IP address is a gateway IP address, the CPE sends the ARP response to the downstream device.
- 根据权利要求2所述的方法,其特征在于,当所述CPE根据预置的ARP学习规则,确定所述ARP请求中包含有WAN IP地址和网关IP地址时,所述CPE向所述下接设备发送ARP响应包括:The method according to claim 2, characterized in that, when the CPE determines that the ARP request includes a WAN IP address and a gateway IP address according to a preset ARP learning rule, the CPE connects to the downlink. The device sends an ARP response including:当所述CPE根据预置的所述ARP学习规则,确定所述ARP请求中的所述源IP地址为所述ARP信息中的所述WAN IP地址,所述目的IP地址为所述网关IP地址时,所述CPE向所述下接设备发送ARP响应。When the CPE determines that the source IP address in the ARP request is the WAN IP address in the ARP information, and the destination IP address is the gateway IP address according to the preset ARP learning rule At that time, the CPE sends an ARP response to the connected device.
- 根据权利要求1至3中任意一项所述的方法,其特征在于,在所述CPE通过所述网关IP地址向所述下接设备发送所述ARP响应之后,所述方法还包括:The method according to any one of claims 1 to 3, wherein after the CPE sends the ARP response to the downlink device through the gateway IP address, the method further comprises:所述CPE接收所述下接设备发送的业务数据;Receiving, by the CPE, service data sent by the downlink device;所述CPE向所述WAN网的设备发送所述业务数据。The CPE sends the service data to a device on the WAN network.
- 一种网络接入方法,其特征在于,包括:A network access method, comprising:下接设备向无线终端接入设备CPE发送地址解析协议ARP请求,所述ARP请求用于请求网关的媒体访问控制MAC地址,所述ARP请求包含有广域网WAN的因特网互联网IP地址和网关IP地址,所述WAN IP地址为所述下接设备为所述下接设备自身设置的IP地址;The receiving device sends an address resolution protocol ARP request to the wireless terminal access device CPE, where the ARP request is used to request a media access control MAC address of the gateway, and the ARP request includes an Internet Internet IP address and a gateway IP address of a WAN The WAN IP address is an IP address set by the downlink device for the downlink device itself;所述下接设备通过所述网关IP地址接收所述CPE发送的ARP响应,所述ARP响应包括CPE的MAC地址;Receiving, by the downlink device, an ARP response sent by the CPE through the gateway IP address, where the ARP response includes a MAC address of the CPE;所述下接设备通过所述CPE MAC地址向所述CPE发送业务数据。The downlink device sends service data to the CPE through the CPE MAC address.
- 一种无线终端接入设备CPE,其特征在于,包括:A wireless terminal access device CPE, comprising:处理器、存储器、收发器以及总线;Processors, memories, transceivers, and buses;所述处理器、存储器、收发器分别与所述总线相连;The processor, the memory, and the transceiver are respectively connected to the bus;所述收发器用于接收下接设备发送的地址解析协议ARP请求,所述ARP请求用于请求网关的媒体访问控制MAC地址,所述ARP请求包含有广域网WAN的因特网协议IP地址和网关IP地址,所述WAN IP地址为所述下接设备为所述下接设备自身设置的IP地址;The transceiver is configured to receive an address resolution protocol ARP request sent by a downlink device, the ARP request is used to request a media access control MAC address of a gateway, and the ARP request includes an Internet protocol IP address and a gateway IP address of a wide area network WAN, The WAN IP address is an IP address set by the downlink device for the downlink device itself;所述处理器用于当根据预置的ARP学习规则,确定所述ARP请求中包含有WAN IP地址和网关IP地址时,所述收发器通过所述网关IP地址向所述下接设备发送ARP响应,所述ARP响应包括所述CPE的MAC地址,所述CPE的MAC地址用于所述下接设备向WAN网的设备发送 业务数据。The processor is configured to: when it is determined that the ARP request includes a WAN IP address and a gateway IP address according to a preset ARP learning rule, the transceiver sends an ARP response to the connected device through the gateway IP address. The ARP response includes a MAC address of the CPE, and the MAC address of the CPE is used by the downlink device to send service data to a device on a WAN network.
- 根据权利要求6所述的无线终端接入设备,其特征在于,所述ARP学习规则包括,当所述收发器接收到下接设备的ARP请求时,如果所述处理器确定所述ARP请求中的源IP地址为WAN IP地址,目的IP地址为网关IP地址,则所述收发器向所述下接设备发送所述ARP响应。The wireless terminal access device according to claim 6, wherein the ARP learning rule comprises: when the transceiver receives an ARP request from a connected device, if the processor determines that the ARP request is If the source IP address is a WAN IP address and the destination IP address is a gateway IP address, the transceiver sends the ARP response to the downstream device.
- 根据权利要求7所述的无线终端接入设备,其特征在于,所述处理器具体用于当根据预置的所述ARP学习规则,确定所述ARP请求中的所述源IP地址为所述ARP信息中的所述WAN IP地址,所述目的IP地址为所述网关IP地址时,所述收发器向所述下接设备发送ARP响应。The wireless terminal access device according to claim 7, wherein the processor is specifically configured to determine that the source IP address in the ARP request is the according to the preset ARP learning rule. When the WAN IP address and the destination IP address in the ARP information are the gateway IP address, the transceiver sends an ARP response to the connected device.
- 根据权利要求6至8中任一项所述的无线终端接入设备,其特征在于,所述收发器还用于接收所述下接设备发送的业务数据;向所述WAN网的设备发送所述业务数据。The wireless terminal access device according to any one of claims 6 to 8, wherein the transceiver is further configured to receive service data sent by the downlink device; and send the data to a device on the WAN network. The business data.
- 一种下接设备,其特征在于,包括:A downlink device, comprising:处理器、存储器、收发器以及总线;Processors, memories, transceivers, and buses;所述处理器、存储器、收发器分别与所述总线相连;The processor, the memory, and the transceiver are respectively connected to the bus;所述收发器向无线终端接入设备CPE发送地址解析协议ARP请求,所述ARP请求用于请求网关的媒体访问控制MAC地址,所述ARP请求包含有广域网WAN的因特网互联网IP地址和网关IP地址,所述WAN IP地址为所述下接设备为所述下接设备自身设置的IP地址;通过所述网关IP地址接收所述CPE发送的ARP响应,所述ARP响应包括CPE的MAC地址;通过所述CPE MAC地址向所述CPE发送业务数据。The transceiver sends an address resolution protocol ARP request to the wireless terminal access device CPE, the ARP request is used to request a media access control MAC address of the gateway, and the ARP request includes a wide area network WAN Internet Internet IP address and a gateway IP address The WAN IP address is the IP address set by the downlink device for the downlink device itself; receiving the ARP response sent by the CPE through the gateway IP address, and the ARP response includes the MAC address of the CPE; The CPE MAC address sends service data to the CPE.
- 一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得所述计算机执行如权利要求1至4中任一项所述的方法。A computer program product containing instructions, which, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 4.
- 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1至4中任一项所述的方法。A computer-readable storage medium, comprising instructions, which, when run on a computer, cause the computer to execute the method according to any one of claims 1 to 4.
- 一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得所述计算机执行如权利要求5所述的方法。A computer program product containing instructions, which, when run on a computer, causes the computer to perform the method of claim 5.
- 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算机上运行时,使得计算机执行如权利要求5所述的方法。A computer-readable storage medium, comprising instructions, which, when run on a computer, cause the computer to execute the method according to claim 5.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810951425.9 | 2018-08-20 | ||
CN201810951425.9A CN110855804A (en) | 2018-08-20 | 2018-08-20 | Network access method, wireless terminal access device and downlink device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020038325A1 true WO2020038325A1 (en) | 2020-02-27 |
Family
ID=69592259
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/101350 WO2020038325A1 (en) | 2018-08-20 | 2019-08-19 | Network access method, wireless customer premise equipment, and access device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110855804A (en) |
WO (1) | WO2020038325A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112261165A (en) * | 2020-09-10 | 2021-01-22 | 深圳市广和通无线股份有限公司 | Communication method, system, apparatus, computer device and storage medium |
CN112714027A (en) * | 2021-01-26 | 2021-04-27 | 浙江简捷物联科技有限公司 | Method and system for accessing terminal equipment of Internet of things to gateway |
CN113132993A (en) * | 2021-04-23 | 2021-07-16 | 杭州网银互联科技股份有限公司 | Data stealing identification system applied to wireless local area network and use method thereof |
CN113783976A (en) * | 2021-09-24 | 2021-12-10 | 阿里巴巴达摩院(杭州)科技有限公司 | Address allocation method, and address allocation method and device of live broadcast terminal |
CN114285522A (en) * | 2021-12-23 | 2022-04-05 | 中国电信股份有限公司 | Access control method, system and medium for local service area |
CN115150363A (en) * | 2022-06-27 | 2022-10-04 | 中兴通讯股份有限公司 | IP address updating method, gateway device, gateway drop device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101197763A (en) * | 2006-12-08 | 2008-06-11 | 昂达博思公司 | System and method for data transmission through air interface using reduced address head |
WO2009098530A1 (en) * | 2008-02-05 | 2009-08-13 | Telefonaktiebolaget Lm Ericsson (Publ) | Combining locally addressed devices and wide area network (wan) addressed devices on a single network |
CN103227787A (en) * | 2013-04-09 | 2013-07-31 | 清华大学 | Automatic 4over6 tunnel establishment method based on ARP proxy |
CN103458067A (en) * | 2013-09-27 | 2013-12-18 | 武汉虹信通信技术有限责任公司 | Method and system for masquerading of WLAN and MAC address |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9577797B1 (en) * | 2014-02-28 | 2017-02-21 | CSC Holdings, LLC | System and method for the detection and remediation of non-responsive customer premises equipment |
-
2018
- 2018-08-20 CN CN201810951425.9A patent/CN110855804A/en active Pending
-
2019
- 2019-08-19 WO PCT/CN2019/101350 patent/WO2020038325A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101197763A (en) * | 2006-12-08 | 2008-06-11 | 昂达博思公司 | System and method for data transmission through air interface using reduced address head |
WO2009098530A1 (en) * | 2008-02-05 | 2009-08-13 | Telefonaktiebolaget Lm Ericsson (Publ) | Combining locally addressed devices and wide area network (wan) addressed devices on a single network |
CN103227787A (en) * | 2013-04-09 | 2013-07-31 | 清华大学 | Automatic 4over6 tunnel establishment method based on ARP proxy |
CN103458067A (en) * | 2013-09-27 | 2013-12-18 | 武汉虹信通信技术有限责任公司 | Method and system for masquerading of WLAN and MAC address |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112261165A (en) * | 2020-09-10 | 2021-01-22 | 深圳市广和通无线股份有限公司 | Communication method, system, apparatus, computer device and storage medium |
CN112261165B (en) * | 2020-09-10 | 2023-05-05 | 深圳市广和通无线股份有限公司 | Communication method, system, device, computer equipment and storage medium |
CN112714027A (en) * | 2021-01-26 | 2021-04-27 | 浙江简捷物联科技有限公司 | Method and system for accessing terminal equipment of Internet of things to gateway |
CN113132993A (en) * | 2021-04-23 | 2021-07-16 | 杭州网银互联科技股份有限公司 | Data stealing identification system applied to wireless local area network and use method thereof |
CN113132993B (en) * | 2021-04-23 | 2023-03-24 | 杭州网银互联科技股份有限公司 | Data stealing identification system applied to wireless local area network and use method thereof |
CN113783976A (en) * | 2021-09-24 | 2021-12-10 | 阿里巴巴达摩院(杭州)科技有限公司 | Address allocation method, and address allocation method and device of live broadcast terminal |
CN113783976B (en) * | 2021-09-24 | 2024-05-03 | 杭州阿里云飞天信息技术有限公司 | Address allocation method, address allocation method and equipment for live broadcast terminal |
CN114285522A (en) * | 2021-12-23 | 2022-04-05 | 中国电信股份有限公司 | Access control method, system and medium for local service area |
CN114285522B (en) * | 2021-12-23 | 2024-04-30 | 中国电信股份有限公司 | Access control method, system and medium for local service area |
CN115150363A (en) * | 2022-06-27 | 2022-10-04 | 中兴通讯股份有限公司 | IP address updating method, gateway device, gateway drop device and storage medium |
CN115150363B (en) * | 2022-06-27 | 2024-05-10 | 中兴通讯股份有限公司 | IP address updating method, gateway device, gateway down-hanging device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110855804A (en) | 2020-02-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020038325A1 (en) | Network access method, wireless customer premise equipment, and access device | |
US10855654B2 (en) | Session identifier for a communication session | |
WO2019085803A1 (en) | Method, device and system for internet of things communication | |
US20220078122A1 (en) | Method and apparatus for accessing gateway | |
US8706908B2 (en) | System, method and apparatus for media access control (MAC) address proxying | |
WO2019205952A1 (en) | Information processing method and apparatus | |
WO2018059284A1 (en) | Data transmission method and network equipment | |
US20200119941A1 (en) | BRAS System-Based Packet Encapsulation Method and Apparatus | |
EP2536092A1 (en) | Method and device for port mapping, and communications system | |
EP2858313B1 (en) | Method, device, and system for routing function activation and data transmission | |
US10574477B2 (en) | Priority tagging based solutions in fc sans independent of target priority tagging capability | |
US8543706B2 (en) | Communication module for connecting application program to virtual private network | |
US10348624B2 (en) | Virtual machine data flow management method and system | |
US7421506B2 (en) | Load balancer for multiprocessor platforms | |
CN108259632B (en) | CGN implementation method and device | |
WO2020253631A1 (en) | Configuration method, device, and system for ip address | |
EP3823255B1 (en) | Access apparatus and access apparatus-performed method for connecting user device to network | |
CN110012118B (en) | Method and controller for providing Network Address Translation (NAT) service | |
JP6665190B2 (en) | Network sharing implementation method and apparatus | |
JP2023530190A (en) | IPv6 network communication method, device and system | |
WO2017166038A1 (en) | Communication method and terminal | |
US11005706B2 (en) | Method for configuring forwarding table for user equipment, apparatus, and system | |
WO2016034006A1 (en) | Packet sending method and access device | |
US20050232273A1 (en) | Communications system and a gateway device | |
EP3796602B1 (en) | Network system, network operation center, network device, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19851282 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19851282 Country of ref document: EP Kind code of ref document: A1 |