CN117376314A - Public network address penetration method of terminal equipment, terminal equipment and storage medium - Google Patents
Public network address penetration method of terminal equipment, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN117376314A CN117376314A CN202210768788.5A CN202210768788A CN117376314A CN 117376314 A CN117376314 A CN 117376314A CN 202210768788 A CN202210768788 A CN 202210768788A CN 117376314 A CN117376314 A CN 117376314A
- Authority
- CN
- China
- Prior art keywords
- address
- network
- public network
- area network
- equipment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 230000035515 penetration Effects 0.000 title claims abstract description 20
- 230000004044 response Effects 0.000 claims abstract description 4
- 230000006870 function Effects 0.000 claims description 18
- 238000004891 communication Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 13
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 230000000149 penetrating effect Effects 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 description 9
- 238000011330 nucleic acid test Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000007726 management method Methods 0.000 description 6
- 238000013519 translation Methods 0.000 description 6
- 230000014616 translation Effects 0.000 description 6
- 101000652292 Homo sapiens Serotonin N-acetyltransferase Proteins 0.000 description 3
- 102100030547 Serotonin N-acetyltransferase Human genes 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 230000002860 competitive effect Effects 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
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/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/256—NAT traversal
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a public network address penetration method of terminal equipment, the terminal equipment, a storage medium and a wireless router, wherein the method comprises the following steps: receiving a first application requesting allocation of I P addresses from a first device of a local area network; in response to the first application, a public network I P address obtained from a wide area network is assigned to the first device, and the first device is connected to the wide area network using the public network I P address. In this way, the public network address can pass through the terminal equipment and be transmitted to the equipment of the local area network.
Description
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to a public network address penetration method of a terminal device, a storage medium, and a wireless router.
Background
In the conventional technology, a public network IP address obtained from a wide area network (WAN, wide Area Network) by a wireless router is configured on a wide area network side network port of the wireless router, IP addresses obtained by users of a local area network (LAN, local Area Network) are private network IP addresses distributed by the wireless router, the wireless router maps the private network IP address and the public network IP address through a network address translation (NAT, network Address Translation) function, and after the source IP address (i.e., the private network IP address) of a data packet sent by the users of the local area network is subjected to NAT translation, the public network IP address is changed to be forwarded to the wide area network, thereby achieving communication between the local area network and the wide area network.
With the development of 5G networks, many special applications need to use public IP addresses for end-to-end communication, and in the conventional NAT mode, the wireless router cannot work normally.
Disclosure of Invention
Based on this, the embodiment of the application provides a public network address penetration method of terminal equipment, the terminal equipment, a storage medium and a wireless router, which can pass through the public network address through the terminal equipment and transmit the public network address to equipment of a local area network.
In a first aspect, the present application provides a method for penetrating a public network address of a terminal device, where the method includes:
receiving a first application of a first device of a local area network requesting to allocate an IP address;
and responding to the first application, distributing the public network IP address acquired from the wide area network to the first equipment, and enabling the first equipment to be connected with the wide area network by using the public network IP address.
In a second aspect, the present application provides a terminal device comprising a communication circuit, a memory, and a processor, the communication circuit being configured to communicate; the memory is used for storing a computer program; the processor is configured to execute the computer program and implement the public network address penetration method of the terminal device as described above when executing the computer program.
In a third aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement a public network address penetration method of a terminal device as described above.
In a fourth aspect, the present application provides a wireless router, the wireless router comprising:
the network bridge is provided with a private network gateway and a public network gateway, and the network bridge receives a first application of requesting to distribute an IP address of first equipment of a local area network through the private network gateway;
and a dynamic host configuration protocol (DHCP, dynamic Host Configuration Protocol) service module, responsive to the first application, for assigning a public network IP address obtained from a wide area network to the first device, so that the first device uses the public network IP address to connect to the wide area network through a public network gateway of the bridge.
The embodiment of the application provides a public network address penetration method of terminal equipment, the terminal equipment, a storage medium and a wireless router, wherein after a first application of a first equipment of a local area network requesting to allocate an IP address is received, the public network IP address acquired from a wide area network is allocated to the first equipment, so that the first equipment is connected with the wide area network by using the public network IP address; namely, the public network IP address which can be distributed to the terminal equipment by the wide area network is transmitted to one of the local area network equipment through the terminal equipment for use, so that the equipment can directly use the public network IP address to carry out the service function of special application. By the method, the terminal equipment can be suitable for new service requirements and use scenes, and the terminal competitiveness is improved.
Drawings
FIG. 1 is a block diagram of a wireless router in the prior art acquiring a public network IP address from a wide area network and assigning a private network IP address;
fig. 2 is a flow chart of a public network address penetration method of a terminal device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a wireless router according to an embodiment of the present application;
fig. 5 is another flow chart of a public network address penetration method of the terminal device according to the embodiment of the present application;
fig. 6 is a block diagram of public network IP address, private network IP address, public network gateway IP address, and private network gateway IP address allocation in the public network address penetration method of the terminal device according to the embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present application, and have no specific meaning in themselves. Thus, "module," "component," or "unit" may be used in combination.
Before describing embodiments of the present application in detail, techniques related to the embodiments of the present application are described.
Referring to fig. 1, in the conventional art, a public network IP address (for example, 1.1.1 in the drawing) acquired from a wide area network (WAN, wide Area Network) by a wireless router (for example, customer premise equipment (CPE, customer Premi se Equipment) in the drawing) is configured on a network port on the WAN side of the wireless router, IP addresses acquired by users (i.e., LAN devices) of a local area network (LAN, local Area Network) of the wireless router are private network IP addresses allocated by the wireless router (for example, private network IP addresses of two users of the local area network are 192.168.0.100 and 192.168.0.101 in the drawing, respectively), a private network gateway address on a Bridge is 192.168.0.1, one user is connected to the private network gateway of the Bridge through an RJ45 interface, one user is connected to the private network gateway of the Bridge through WIFI, the wireless router maps the private network IP address with the public network IP address through a network address translation (NAT, network Address Translation) function, and source IP of a packet sent by the user of the LAN is converted into a private network IP address, and the private network address is converted into a public network IP address through the NAT, thereby achieving communication between the public network address and the WAN.
With the explosive growth of mobile internet, internet of things and industry applications, future mobile communications will face thousands of data traffic increases and billions of device networking demands. The 5G is taken as the development direction of the new generation mobile communication technology, and further meets the mass requirements of the application of the Internet of things in the future on the basis of improving the service experience of the mobile Internet, and is deeply integrated with industries such as industry, medical treatment, traffic and the like, so that real 'everything interconnection' is realized.
The new trend of 5G networks, especially new services, new architecture, and new technology, requires the use of public IP addresses for end-to-end communication along with the application of new and old services such as voice over IP (VoIP, voice over Internet Protocol), interactive internet protocol television (IPTV, internet Protocol TV or Interactive Personal TV), IP telephone (IP Phone), TR069 protocol (TR 069, technical Report 069), and the like. In the traditional NAT mode wireless router, the IP address acquired by the user of the local area network is a private network IP address distributed by the wireless router, the private network IP address cannot be transmitted and used on the wide area network, and after NAT conversion, the source IP address of the data packet sent by the user of the local area network is replaced by a public network IP address from the private network IP address. In conventional NAT mode, wireless routers are unable to meet the needs of these services. Specific scenarios for these business requirements include: adapting older tablet devices; adapting downstream routers to realize the mobilization of the routers; an outdoor Unit (ODU, out Door Unit) device adapts to an indoor Unit (IDU, in Door Unit) device, and the like.
VoIP is a voice call technology that enables voice calls and multimedia conferences via internet protocol (IP, internet Protocol), i.e., communication via the internet. IPTV is a brand-new technology that utilizes a broadband cable network, integrates multiple technologies such as the internet, multimedia, communication, and the like, and provides multiple interactive services including digital television to home users. TR069 is a technical specification, which is a management protocol of an application layer, named "CPE wide area network management protocol"; TR069 defines a set of brand-new network management system structure, including management model, interaction interface and basic management parameters, which can effectively implement management of home network equipment. Both IDU and ODU are part of a microwave communication station; the IDU is responsible for completing service access, multiplexing and modulation demodulation and converting service signals into intermediate frequency analog signals indoors; the ODU is responsible for completing frequency conversion and amplification of signals, and then converts radio frequency signals into electromagnetic waves through an antenna, and radiates the electromagnetic waves into the air, or receives the electromagnetic waves, converts the electromagnetic waves into radio frequency signals, and sends the radio frequency signals to the IDU.
After receiving a first application of requesting to allocate an IP address from a first device of a local area network, the terminal device allocates a public network IP address acquired from a wide area network to the first device, so that the first device is connected with the wide area network by using the public network IP address; namely, the public network IP address which can be distributed to the terminal equipment by the wide area network is transmitted to one of the local area network equipment through the terminal equipment for use, so that the equipment can directly use the public network IP address to carry out the service function of special application. In this way, the terminal device can adapt to the service requirements and the service scene, and the terminal competitiveness is improved.
The method of the embodiments of the present application is described in detail below.
Referring to fig. 2, fig. 2 is a flow chart of an embodiment of a public network address penetration method of a terminal device of the present application. The terminal device in the embodiment of the present application may refer to a device capable of being connected between a local area network and a wide area network, and capable of being allocated with a public network IP address by the wide area network, where the terminal device includes, but is not limited to: CPE, data card, USB Fidelity (UFI), outdoor Unit (ODU), and other terminal devices.
The method comprises the following steps: step S101 and step S102. The method of the embodiment of the application is applied to the terminal equipment.
Step S101: a first application is received for a first device of a local area network requesting allocation of an IP address.
Step S102: and responding to the first application, distributing the public network IP address acquired from the wide area network to the first equipment, and enabling the first equipment to be connected with the wide area network by using the public network IP address.
In the embodiment of the application, the terminal device is connected between the local area network and the wide area network, and the wide area network can allocate the public network IP address to the terminal device. A local area network includes more than one device. The first device may be a device that first requests an assignment of an IP address when a current public network IP address is not assigned to the device.
After receiving a first application of requesting to allocate an IP address from a first device of a local area network, the terminal device allocates a public network IP address acquired from a wide area network to the first device, so that the first device is connected with the wide area network by using the public network IP address; namely, the public network IP address which can be distributed to the terminal equipment by the wide area network is transmitted to one of the equipment through the terminal equipment for use, so that the first equipment can directly use the public network IP address to carry out the service function of special application. In this way, the terminal device can adapt to the service requirements and the service scene, and the terminal competitiveness is improved.
In an embodiment, in step S102, after allocating, in response to the first application, the public network IP address acquired from the wide area network to the first device, the method further includes: step S103 and step S104.
Step S103: and receiving a second application of the second equipment of the local area network requesting to allocate the IP address.
Step S104: and under the condition that the first equipment is online, responding to the second application, distributing a first private network IP address to the second equipment, and enabling the second equipment to be connected with the local area network by using the first private network IP address.
In this embodiment of the present application, after the terminal device allocates a public network IP address to the first device, and when the first device is online, the terminal device also allocates a first private network IP address to other second devices in the local area network except for the first device that obtains the public network IP address, so that the second device uses the first private network IP address to connect with the local area network.
In an embodiment, the method further comprises: step S105, step S106, and step S107.
Step S105: and receiving the data packet of the second device, wherein the source IP address of the data packet of the second device is the first private network IP address, and the destination IP address of the data packet of the second device is the wide area network IP address.
Step S106: and replacing the source IP address of the data packet of the second device from the first private network IP address to the public network IP address.
Step S107: and sending the data packet after replacing the source IP address to the destination IP address through the wide area network.
In this embodiment of the present application, the terminal device further provides a function of connecting to a wide area network for a plurality of devices in the local area network, and in order to provide the function, after the terminal device allocates a first private network IP address to a non-public network user (i.e., a second device), receives a data packet of the second device, and after the terminal device passes through source network address conversion (SNAT, source Network Address Transl ation), replaces a source IP address of the data packet of the second device with the public network IP address from the first private network IP address, and sends the data packet after replacing the source IP address to the destination IP address through the wide area network, so that a user of the private network IP address of the local area network can also use network resources of the wide area network.
In an embodiment, the method further comprises: step S108.
Step S108: and distributing the second private network IP address to the terminal equipment.
In the embodiment of the application, the wide area network allocates a public network IP address to the terminal device, and after the terminal device allocates the public network IP address to the first device, the terminal device configures not the public network IP address but a private network IP address, so that a second private network IP address is allocated to the terminal device.
In an embodiment, the method further comprises: step S109.
Step S109: and replacing the source IP address of the terminal equipment with the public network IP address from the second private network IP address, so that the terminal equipment is connected with the wide area network by using the public network IP address.
After SNAT conversion is carried out on the application of the terminal equipment, the source IP address of the terminal equipment is replaced by the public network IP address from the second private network IP address, so that the terminal equipment is connected with the wide area network by using the public network IP address, and the terminal equipment can also use the network resources of the wide area network.
For example: the terminal device can also work normally by applying The air firmware download (FOTA, fi rmware Over-The-air), the simple network time protocol (SNTP, simple Network Time Protocol), the TR069 protocol, and The like. FOTA is a means by which a user's firmware system can be updated over a network. SNTP is mainly used to synchronize computer clocks in the internet.
In an embodiment, the method further comprises: step S110.
Step S110: and under the condition that the first equipment is monitored to be offline, retrieving the public network IP address allocated to the first equipment.
In the embodiment of the application, after the first device is allocated to the public network IP address, whether the first device is online or not is monitored, if the first device is monitored to be offline, that is, offline, it is indicated that the first device no longer needs the public network IP address, so that the public network IP address allocated to the first device is retracted, and resource waste of the public network IP address is avoided.
In an embodiment, the method further comprises: step S111 and step S112.
Step S111: and receiving a third application of the third equipment of the local area network requesting to allocate the IP address.
Step S112: and under the condition that the first equipment is offline, responding to the third application, distributing the retracted public network IP address to the third equipment, and enabling the third equipment to be connected with the wide area network by using the public network IP address.
In this embodiment of the present application, after the first device goes offline and retrieves the public network IP address allocated to the first device, a third application for requesting to allocate an IP address of a next third device may also be accepted, and the retrieved public network IP address is allocated to the third device, so that the third device uses the public network IP address to connect with the wide area network. Thus, the equipment can fully utilize the public network IP address resource.
In an embodiment, if the terminal device has not acquired the public network IP address allocated by the wide area network, before the first application for requesting to allocate the IP address by the first device of the receiving local area network in step S101, the method may further include: step S113.
Step S113: and after the public network is connected with the wide area network, acquiring a public network IP address from the wide area network. I.e. the terminal device may first establish a connection with the wide area network and then obtain the public network IP address from the wide area network.
In an embodiment, the method further comprises: step S114.
Step S114: and deleting the public network IP address after disconnecting from the wide area network, and notifying a first device for distributing the public network IP address to re-request to distribute the private network IP address.
In the embodiment of the application, if the terminal device is disconnected from the wide area network, the public network IP address is deleted, and the first device for distributing the public network IP address is notified to re-request to distribute the private network IP address.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an embodiment of a terminal device of the present application, and it should be noted that, in the embodiment of the present application, the terminal device can implement a public network address penetration method of the terminal device, and for details of related content, please refer to the above method section, which is not described herein again. The terminal device in the embodiment of the application includes, but is not limited to: CPE, data card, USB Fidelity (UFI), outdoor Unit (ODU), and other terminal devices.
The terminal device 100 comprises a communication circuit 3, a memory 1 and a processor 2, the communication circuit 3 being for communication; the memory 1 is used for storing a computer program; the processor 2 is configured to execute the computer program and implement the public network address penetration method of the terminal device according to any one of the above when executing the computer program.
The processor 2 may be a micro control unit, a central processing unit or a digital signal processor, among others. The memory 1 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a usb disk, a removable hard disk, or the like.
The wireless router is one of the terminal devices in the embodiments of the present application, and the application of the method in the embodiments of the present application to the wireless router is described in detail below.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an embodiment of a wireless router, including: a bridge 10 and a DHCP service module 20.
The network bridge 10 is provided with a private network gateway and a public network gateway, and the network bridge 10 receives a first application of requesting to distribute an IP address of a first device of a local area network through the private network gateway; the DHCP service module 20 assigns a public network IP address acquired from the wide area network to the first device in response to the first application, so that the first device connects to the wide area network through a public network gateway of the bridge using the public network IP address.
In an embodiment, the wireless router further comprises: wireless dialing module 30, routing module 40, and subscriber access list module 50.
The wireless dialing module 30 is configured to obtain the public network IP address from the wide area network after being connected to the wide area network, broadcast a dialing success event, and send the public network IP address to other modules; and broadcasting a disconnection message after disconnecting from the wide area network.
The wireless dialing module 30 is mainly responsible for establishing or disconnecting a packet data protocol (PDP, packet Data Protocol) connection with a wide area network, after establishing the PDP connection, the wireless dialing module 30 obtains a public network IP address from the wide area network, and then broadcasts a successful dialing event and sends information carrying the public network IP address to other modules. After receiving the dialing success event, the other DHCP service module 20 and the routing module 40 perform corresponding processing.
The routing module 40 is configured to calculate a public network gateway address by using a subnet mask and the public network IP address and add the public network gateway address to the bridge 10 when the public network IP address penetration function is turned on after receiving the dialing success event; replacing the IP address of the wide area network card of the wireless router with a second private network IP address; configuring a downlink public network routing rule to enable a data packet with a destination IP address being the public network IP address from the wide area network to be routed to an interface of a public network gateway of the bridge 10; and adding a source address conversion function to enable the second equipment which acquires the first private network IP address and the wireless router of the second private network IP address to be connected with the wide area network.
In the embodiment of the application, a source address conversion function is added, so that the source IP address of the data packet of the second device can be replaced by the public network IP address from the first private network IP address, and the data packet after the source IP address is replaced is sent to the destination IP address, wherein the destination IP address is the wide area network IP address, so that the second device can be connected with the wide area network, and the source IP address of the wireless router can be replaced by the public network IP address from the second private network IP address, and is connected with the wide area network through the public network IP address.
The DHCP service module 20 is further configured to assign a first private IP address to a second device of the local area network; before a dialing success event is received, a second address pool with at least one private network IP address is configured; after receiving the dialing success event, under the condition that the public network IP address penetrating function is started, adding a first address pool with the public network IP address, and restarting to enable the DHCP service module 20 to preferentially allocate the public network IP address to the first accessed first equipment; and deleting the first address pool after receiving the disconnection message, and notifying the first equipment allocated with the public network IP address to re-request for allocation of the private network IP address.
The subscriber access list module 50 is configured to notify the DHCP service module 20 to release the public network IP address when it is monitored that the first device allocated with the public network IP address is offline, and clear the recording time of allocating the public network IP address so that the next third device requesting to allocate the IP address obtains the public network IP address again.
According to the embodiment of the application, the wide area network is allocated to the public network IP address of the wireless router, and the public network IP address is transmitted to the first equipment in the local area network equipment through the wireless router, so that the problem that the public network IP address needs to be used by the local area network equipment in a special application scene can be effectively solved, the use scene of the wireless router is enlarged, and the competition capability of the wireless router is improved.
The following describes the method flow and steps in the embodiment of the present application in detail with reference to fig. 4, 5 and 6, and the detailed steps of the intercommunication flow between the modules of the wireless router are as follows:
step C100: the wireless dialing module 30 establishes a PDP connection with the wide area network, acquires a public network IP address (1.1.1.1 is a public network IP address shown in fig. 6) from the wide area network, then broadcasts a dialing success event, and sends information carrying the public network IP address to the other routing module 40 and the DHCP service module 20.
Step C101: the routing module 40 receives the dial-up success event, if the public network IP penetration function is turned on, calculates a public network gateway address (1.1.1.2 is shown in fig. 6 as a public network gateway address) using the subnet mask and the public network IP address, and adds the public network gateway to the bridge by commanding "IP addr add wan_gateway/32scope link dev bridge0". At this time, the bridge 10 has two addresses (192.168.0.1 in fig. 6 is a private gateway address) of a public gateway and a private gateway.
Step C102: the routing module 40 replaces the wireless router wide area network WAN network card IP address with the second private network IP address by the command "if config wan_interface 169.254.3.2netmask255.255.255.255up" (169.254.3.2 shown in fig. 6 is the second private network IP address). The wireless router no longer uses the public network IP address but uses the second private network IP address.
Step C103: the routing module 40 configures a downstream public network routing rule to route packets from the wide area network, whose destination address is a public network IP address, to the interface of the public network gateway of the bridge 10 using the command "IP route add wan_ipaddr/32dev bridge0". And an SNAT function is added, so that a second device which acquires the IP address of the first private network can access the network resource of the wide area network, and a command of 'iptables-t nat-IPOSTROUTING-o wan_interface-j SNAT-to wan_ipaddr' is used. After the routing module 40 has configured the routing rules, it notifies the DHCP service module 20 to update the address pool information.
Step C104: after the DHCP service module 20 receives the notification, it adds a first address pool of public network IP addresses, where only the public network IP addresses, that is, the public network IP addresses obtained from the wide area network by the wireless dialer module 30, in the first address pool, and then restarts the DHCP service module 20, so that the DHCP service module 20 preferentially allocates the public network IP addresses to the first accessed first device.
Step C105: after the public network IP address is assigned to the first device, the subscriber access list module 50 monitors whether the first device is online, if the first device is offline, notifies the DHCP service module 20 to immediately release the public network address, clears the recording time of the assigned public network IP address, and after clearing the assigned recording time, the next third device can acquire the public network IP address again.
Step C106: when the wireless dialing module 30 broadcasts a disconnect PDP connection message, the routing module 40 deletes the public network gateway address on the bridge 10, retains the private network gateway address, and deletes the public network routing rule information; the DHCP service module 20 deletes the first address pool and notifies the first device that acquires the public network address to re-request allocation of the private network IP address, and all lan devices can only acquire the private network IP address.
The embodiment of the application can improve the application scene and the competitive capacity of the wireless router, does not relate to hardware, and has universal portability.
The application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program when executed by a processor causes the processor to implement the public network address penetration method of the terminal device according to any one of the above.
The computer readable storage medium may be an internal storage unit of the terminal device or the wireless router, such as a hard disk or a memory. The computer readable storage medium may also be the terminal device described above, an external storage device of the wireless router, such as a plug-in hard disk equipped, a smart memory card, a secure digital card, a flash memory card, etc.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and are not thereby limiting the scope of the claims of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the present application shall fall within the scope of the claims of the present application.
Claims (10)
1. A method for penetrating a public network address of a terminal device, the method comprising:
receiving a first application of a first device of a local area network requesting to allocate an IP address;
and responding to the first application, distributing the public network IP address acquired from the wide area network to the first equipment, and enabling the first equipment to be connected with the wide area network by using the public network IP address.
2. The method of claim 1, wherein in response to the first application, after assigning a public network IP address obtained from a wide area network to the first device, the method further comprises:
receiving a second application of the second equipment of the local area network requesting to allocate an IP address;
under the condition that the first equipment is online, responding to the second application, distributing a first private network IP address to the second equipment, and enabling the second equipment to be connected with the local area network by using the first private network IP address;
and/or the number of the groups of groups,
the method further comprises the steps of:
and distributing the second private network IP address to the terminal equipment.
3. The method according to claim 2, wherein the method further comprises:
receiving a data packet of the second device, wherein a source IP address of the data packet of the second device is the first private network IP address, and a destination IP address of the data packet of the second device is the wide area network IP address;
replacing a source IP address of a data packet of the second device with the public network IP address from the first private network IP address;
transmitting the data packet after the source IP address is replaced to the destination IP address through the wide area network;
and/or the number of the groups of groups,
the method further comprises the steps of:
and replacing the source IP address of the terminal equipment with the public network IP address from the second private network IP address, so that the terminal equipment is connected with the wide area network by using the public network IP address.
4. The method according to claim 1, wherein the method further comprises:
and under the condition that the first equipment is monitored to be offline, retrieving the public network IP address allocated to the first equipment.
5. The method according to claim 4, wherein the method further comprises:
receiving a third application of a third device of the local area network requesting allocation of an IP address;
and under the condition that the first equipment is offline, responding to the third application, distributing the retracted public network IP address to the third equipment, and enabling the third equipment to be connected with the wide area network by using the public network IP address.
6. The method of claim 1, wherein prior to the first application requesting assignment of the IP address by the first device of the receiving local area network, further comprising:
after being connected with the wide area network, the public network IP address is acquired from the wide area network;
and/or the number of the groups of groups,
the method further comprises the steps of:
and deleting the public network IP address after disconnecting from the wide area network, and notifying a first device for distributing the public network IP address to re-request to distribute the private network IP address.
7. A terminal device, comprising a communication circuit, a memory, and a processor, the communication circuit configured to communicate; the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the public network address penetration method of a terminal device according to any of claims 1-6 when the computer program is executed.
8. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which when executed by a processor causes the processor to implement the public network address penetration method of a terminal device according to any of claims 1-6.
9. A wireless router, the wireless router comprising:
the network bridge is provided with a private network gateway and a public network gateway, and the network bridge receives a first application of requesting to distribute an IP address of first equipment of a local area network through the private network gateway;
and the dynamic host configuration protocol service module responds to the first application and distributes the public network IP address acquired from the wide area network to the first equipment so that the first equipment is connected with the wide area network through the public network gateway of the network bridge by using the public network IP address.
10. The wireless router of claim 9, wherein said wireless router further comprises:
the wireless dialing module is used for acquiring the public network IP address from the wide area network after being connected with the wide area network, broadcasting a dialing success event and sending the public network IP address to other modules; broadcasting a disconnection message after disconnecting from the wide area network;
the routing module is used for calculating a public network gateway address by using a subnet mask and the public network IP address under the condition that a public network IP address penetration function is started after a dialing success event is received, and adding the public network gateway address to the network bridge; replacing the IP address of the wide area network card of the wireless router with a second private network IP address; configuring a downlink public network routing rule to enable a data packet with a destination IP address of the public network IP address from the wide area network to be routed to an interface of a public network gateway of the network bridge; adding a source address conversion function to enable the second device which acquires the first private network IP address and the wireless router of the second private network IP address to be connected with the wide area network;
the user access list module is used for notifying the DHCP service module to release the public network IP address when the first equipment distributed with the public network IP address is monitored to be offline, and clearing the record time distributed with the public network IP address so that the third equipment requiring to distribute the IP address next can acquire the public network IP address again;
the dynamic host configuration protocol service module is further used for distributing the first private network IP address to the second equipment of the local area network; before a dialing success event is received, a second address pool with at least one private network IP address is configured; after a dialing success event is received, under the condition that a public network IP address penetrating function is started, a first address pool with the public network IP address is additionally configured, and then the first device is restarted, so that the dynamic host configuration protocol service module preferentially distributes the public network IP address to first accessed first equipment; and deleting the first address pool after receiving the disconnection message, and notifying the first equipment allocated with the public network IP address to re-request for allocation of the private network IP address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210768788.5A CN117376314A (en) | 2022-07-01 | 2022-07-01 | Public network address penetration method of terminal equipment, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210768788.5A CN117376314A (en) | 2022-07-01 | 2022-07-01 | Public network address penetration method of terminal equipment, terminal equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117376314A true CN117376314A (en) | 2024-01-09 |
Family
ID=89406465
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210768788.5A Pending CN117376314A (en) | 2022-07-01 | 2022-07-01 | Public network address penetration method of terminal equipment, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117376314A (en) |
-
2022
- 2022-07-01 CN CN202210768788.5A patent/CN117376314A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109600246B (en) | Network slice management method and device | |
US6317584B1 (en) | Controlling communication in wireless and satellite networks | |
CN101296203B (en) | Device, system and method for automatically configuring application terminal in family network | |
US10103982B2 (en) | System and method for automatic routing of dynamic host configuration protocol (DHCP) traffic | |
US6400701B2 (en) | Asymmetric internet access over fixed wireless access | |
CN113596191B (en) | Data processing method, network element equipment and readable storage medium | |
CN102257772B (en) | Method, device and system for service configuration | |
CN110326345B (en) | Method, device and system for configuring network slice | |
CN102511145B (en) | Method, system and corresponding apparatus for implementing policy and charging control | |
WO2022237280A1 (en) | Dns server discovery method and apparatus, computer device, computer readable storage medium, and computer program product | |
EP2426966B1 (en) | Wireless extension of broadband acces | |
CN105052075B (en) | Service distribution method, equipment and system in a kind of coaxial cable Cable system | |
CN117376314A (en) | Public network address penetration method of terminal equipment, terminal equipment and storage medium | |
CN111064594B (en) | Gateway information processing method, gateway, account management system and storage medium | |
KR20030058267A (en) | An IP Automatic Assignment's Method in the way of Central IP Management thorugh Intermediate DHCP Server | |
KR100719162B1 (en) | Method of voice over internet protocol modem, and system thereof | |
CN114928590B (en) | IPv6 address configuration method and routing equipment | |
US20030016633A1 (en) | Bandwidth allocation and management system for satellite networks and method therefor | |
CN116192742B (en) | Routing acceleration method and system based on application | |
KR100262313B1 (en) | Method and apparatus for accessing to call using ip address | |
CN111294111B (en) | Method and system for utilizing satellite resources sharing forward carrier | |
CN116866985A (en) | Data forwarding method, network system and computer readable storage medium | |
CN116980874A (en) | Local area network bidirectional discovery method | |
CN113438641A (en) | Group processing method, equipment and storage medium | |
CN104301124B (en) | Implementation method, system and the relevant device of strategy and charging control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication |