[go: up one dir, main page]

CN120128572A - Local area network address sharing allocation method, device and medium - Google Patents

Local area network address sharing allocation method, device and medium Download PDF

Info

Publication number
CN120128572A
CN120128572A CN202510435959.6A CN202510435959A CN120128572A CN 120128572 A CN120128572 A CN 120128572A CN 202510435959 A CN202510435959 A CN 202510435959A CN 120128572 A CN120128572 A CN 120128572A
Authority
CN
China
Prior art keywords
area network
local area
network address
address
local
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
Application number
CN202510435959.6A
Other languages
Chinese (zh)
Inventor
金泰石
于秋思
彭锐
潘桂新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202510435959.6A priority Critical patent/CN120128572A/en
Publication of CN120128572A publication Critical patent/CN120128572A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5038Address allocation for local use, e.g. in LAN or USB networks, or in a controller area network [CAN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a local area network address sharing allocation method, a device and a medium, and relates to the technical field of networks. The method comprises the steps that a cloud gateway establishes local area network address sharing allocation definition using the same gateway address, the cloud gateway obtains a first sharing account number and a second sharing account number of the local area network address to be shared using the same gateway address, the cloud gateway obtains the local area network address which is allocated according to the local area network address sharing allocation definition under the first sharing account number and the second sharing account number, the cloud gateway allocates a new terminal which requests to allocate the address under the first sharing account number and/or the second sharing account number, the local area network address which is allocated is eliminated according to the local area network address sharing allocation definition, and the new local area network address is allocated. The application realizes that the multiple accounts share the same address pool and are in the same broadcast domain through the cloud gateway, and the terminals of the multiple accounts can keep the same kind of address intercommunication by using the same gateway address.

Description

Local area network address sharing allocation method, device and medium
Technical Field
The present application relates to the field of network technologies, and in particular, to a method, an apparatus, and a medium for sharing and allocating addresses of a local area network.
Background
In the scenario of implementing multi-lan interworking, if two or more families are to be implemented in the same lan, the prior art mostly adopts CIDR (generic inter-Domain Routing) technology to implement address allocation of home terminals in different places, reconstruct the original/24-bit network routes of two or more families, and divide the network routes by using/22-bit addresses.
When the CIDR technology is adopted for address allocation, three problems are brought, namely, the CIDR technology breaks through the traditional address fixed division mode, the allocated address types are changed, partial household terminals are possibly incompatible, two or more families use the CIDR technology to realize the intercommunication of the same broadcast domain, the broadcast domain is increased, the broadcast copy amount in a network environment is increased, the cognitive deviation of a user is caused when the home gateway address is changed, the internet surfing in the original lease of the terminal is also caused, and user dissatisfaction and complaint are caused.
Disclosure of Invention
The application provides a local area network address sharing allocation method, a device and a medium for solving the technical problem of how to realize local area network address sharing allocation using the same gateway address.
In a first aspect, the present application provides a method for sharing and allocating addresses of a local area network, where the method includes:
the cloud gateway establishes local area network address sharing allocation definition using the same gateway address;
the cloud gateway obtains a first sharing account number and a second sharing account number of a local area network address to be shared and using the same gateway address;
The cloud gateway obtains the distributed local area network addresses according to local area network address sharing distribution definition under the first shared account and the second shared account;
And the cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the new terminal requesting to allocate the address under the first shared account and/or the second shared account.
Further, the method specifically comprises the following steps:
The first cloud gateway establishes local area network address sharing allocation definition by using the same gateway address;
The method comprises the steps that a first cloud gateway obtains a first shared account and a second shared account which are connected to a local area network address to be shared and use the same gateway address, and the first shared account and the second shared account correspond to different physical local area networks;
The first cloud gateway obtains local area network addresses which are distributed for the terminals under the first shared account and the second shared account according to local area network address sharing distribution definition;
and the first cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the new terminal which requests to allocate the address under the first shared account and the second shared account.
Further, the method specifically comprises the following steps:
the second cloud gateway establishes a local area network address sharing allocation definition shared with a third cloud gateway and using the same gateway address;
The second cloud gateway obtains a local sharing account number of a local area network address which is to be shared with a third cloud gateway and uses the same gateway address, and a remote sharing account number of the local area network address which is to be shared with the second cloud gateway by the third cloud gateway and uses the same gateway address;
the second cloud gateway obtains local network addresses which are distributed for the terminals under the local sharing account number and the remote sharing account number according to local network address sharing distribution definition;
And the second cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the terminal which allocates the address for the new request under the local sharing account and the remote sharing account.
Further, the method specifically comprises the following steps:
the fourth cloud gateway establishes the same local area network address sharing allocation definition using the same gateway address as the fifth cloud gateway;
the method comprises the steps that a fourth cloud gateway obtains a local sharing account number of a local area network address which is to be shared with a fifth cloud gateway and uses the same gateway address, and a remote sharing account number of the local area network address which is to be shared with the fourth cloud gateway and uses the same gateway address;
The fourth cloud gateway obtains a local area network address which is self-assigned according to local area network address sharing assignment definition for the terminal under the local sharing account, and the fifth cloud gateway defines an assigned remote local area network address according to local area network address sharing assignment definition for the terminal under the remote sharing account;
and the fourth cloud gateway eliminates the allocated local area network address and the allocated remote local area network address according to the local area network address sharing allocation definition for the terminal which has a new request for allocating the address under the own local sharing account number, and allocates the new local area network address.
Further, the fourth cloud gateway establishes the same local area network address sharing allocation definition using the same gateway address as the fifth cloud gateway, and specifically includes:
Establishing an interconnection tunnel between a fourth virtual switch vswitch of the fourth cloud gateway and a fifth vswitch of the fifth cloud gateway;
Writing a local area network address sharing allocation definition in fourth terminal access equipment vcpe of the fourth cloud gateway and synchronizing the local area network address sharing allocation definition to fifth vcpe of the fifth cloud gateway through an interconnection tunnel, or acquiring the local area network address sharing allocation definition written in fifth vcpe by fourth vcpe through the interconnection tunnel, or writing the same local area network address sharing allocation definition in fourth vcpe and fifth vcpe;
the local area network address sharing allocation definition comprises a terminal available address range network, a subnet mask, a gateway address gateway and a release time release, and the local area network address is a class-C address.
Further, the fourth cloud gateway obtains a local sharing account number of a local area network address to be shared with the fifth cloud gateway by itself and using the same gateway address, and a remote sharing account number of the local area network address to be shared with the fifth cloud gateway by the fifth cloud gateway and using the same gateway address, specifically including:
Fourth vcpe establishes a local account for each physical lan accessed to itself, identifies each local account as the same local outer layer virtual lan pvlan and different local inner layer virtual lans cvlan, obtains a local shared account from the local accounts, and if there is a local non-shared account, allocates to use different gateway addresses for each local non-shared account;
Fourth vcpe obtains the remote shared account number and the remote pvlan and the remote cvlan thereof established by the fifth cloud gateway through the interconnection tunnel, and establishes a shared group to record the local shared account number and the local pvlan and the local cvlan thereof and the remote shared account number and the remote pvlan and the remote cvlan thereof.
Further, the fourth cloud gateway obtains a local area network address which is self-assigned for the terminal under the local sharing account according to the local area network address sharing assignment definition, and the fifth cloud gateway defines a remote local area network address which is assigned for the terminal under the remote sharing account according to the local area network address sharing assignment definition, which specifically includes:
A terminal under a fourth vcpe and a local shared account number completes local area network address allocation according to local area network address sharing allocation definition through a local dynamic Host Configuration Protocol (HCP) discover message, a HCP offer message, a HCP request message and a HCP ack message, records the allocated local area network address, copies the local HCP discover message, the HCP offer message, the HCP request message and the HCP ack message to a remote shared account number in a shared group, encapsulates a remote end pvlan and a remote end cvlan and then sends the remote end cvlan to a fifth vcpe through an interconnection tunnel;
Fourth vcpe receives remote dhcp discover message, dhcp offer message, dhcp request message and dhcp ack message sent by fifth vcpe and encapsulating local pvlan and local cvlan, and obtains fifth vcpe as a terminal under the remote shared account number, which defines the allocated remote local area network address according to the local area network address sharing allocation.
Further, the fourth cloud gateway obtains a local area network address which is self-assigned for the terminal under the local sharing account according to the local area network address sharing assignment definition, and the fifth cloud gateway defines a remote local area network address which is assigned for the terminal under the remote sharing account according to the local area network address sharing assignment definition, which specifically includes:
A fourth vcpe and a terminal under a local shared account number complete local area network address allocation according to local area network address sharing allocation definition through a local dynamic host configuration protocol dhcp discover message, a dhcp offer message, a dhcp request message and a dhcp ack message, record the allocated local area network address, copy the allocated local area network address to a far-end shared account number in a shared group, encapsulate a far-end pvlan and a far-end cvlan, and send to a fifth vcpe through an interconnection tunnel;
Fourth vcpe receives the remote lan address sent by fifth vcpe, encapsulates local pvlan and local cvlan, and records the remote lan address already allocated.
In a second aspect, the present application provides a local area network address sharing allocation apparatus, the apparatus being a cloud gateway, and comprising:
the definition module is used for establishing local area network address sharing allocation definition using the same gateway address;
the account module is connected with the definition module and used for acquiring a first shared account and a second shared account which are to be shared and use the local area network address of the same gateway address;
the recording module is connected with the account module and used for acquiring the distributed local area network addresses according to local area network address sharing distribution definition under the first shared account and the second shared account;
The distribution module is connected with the recording module and is used for distributing the new terminal requesting for distributing the address under the first shared account and/or the second shared account, eliminating the distributed local area network address according to the local area network address sharing distribution definition and distributing the new local area network address.
In a third aspect, the present application provides a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements a local area network address sharing allocation method as described above.
The application provides a local area network address sharing and distributing method, a device and a medium, which realize that multiple accounts share the same address pool through a cloud gateway, are positioned in the same broadcast domain, and use the same gateway address, so that terminals of the multiple accounts can keep the same kind of address intercommunication.
Drawings
FIG. 1 is a flow chart of a local area network address sharing allocation method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a local area network address sharing and allocating device according to an embodiment of the present application;
Fig. 3 is a schematic diagram of a cloud gateway establishment definition and account number according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a cloud gateway establishing a shared group according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a cloud gateway sharing group dhcp discover message replication according to an embodiment of the present application;
Fig. 6 is a schematic diagram of a cloud gateway sharing group dhcp offer message replication according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a cloud gateway shared group dhcp request message replication according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a cloud gateway shared group dhcp ack message replication according to an embodiment of the present application;
Fig. 9 is a schematic diagram of a cloud gateway sharing group implementing local area network address sharing allocation according to an embodiment of the present application;
Fig. 10 is a flowchart of another lan address sharing allocation method according to an embodiment of the present application.
Detailed Description
In order to make the technical scheme of the present application better understood by those skilled in the art, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It is to be understood that the specific embodiments and figures described herein are merely illustrative of the application, and are not limiting of the application.
It is to be understood that the various embodiments of the application and the features of the embodiments may be combined with each other without conflict.
It is to be understood that only the portions relevant to the present application are shown in the drawings for convenience of description, and the portions irrelevant to the present application are not shown in the drawings.
It should be understood that each module and unit referred to in the embodiments of the present application may correspond to only one physical structure, may be formed by a plurality of physical structures, or may be integrated into one physical structure.
It will be appreciated that the functions and steps noted in the flowcharts and block diagrams of the subject application can occur out of the order noted in the figures without conflict.
It is to be understood that the flowcharts and block diagrams of the present application illustrate the architecture, functionality, and operation of possible implementations of systems, apparatuses, devices, methods according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, unit, segment, or code, which comprises executable instructions for implementing the specified functions. Moreover, each block or combination of blocks in the block diagrams and flowchart illustrations can be implemented by hardware-based devices that perform the specified functions, or by combinations of hardware and computer instructions.
It should be understood that the modules and units involved in the embodiments of the present application may be implemented in software, or may be implemented in hardware, for example, the modules and units may be located in a processor.
Example 1:
as shown in fig. 1, the present application provides a method for sharing and allocating addresses of a local area network, which includes:
s1, a cloud gateway establishes local area network address sharing allocation definition using the same gateway address;
S2, the cloud gateway acquires a first sharing account number and a second sharing account number which are to be shared and use local area network addresses of the same gateway address;
s3, the cloud gateway acquires the distributed local area network addresses according to local area network address sharing distribution definition under the first shared account and the second shared account;
s4, the cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the new terminal requesting to allocate the address under the first shared account and/or the second shared account.
In the embodiment, the method realizes that multiple accounts share the same address pool through the cloud gateway, are in the same broadcast domain, and use the same gateway address, so that the terminals of the multiple accounts can keep the same kind of address intercommunication. The method shown in fig. 1 is correspondingly applied to the apparatus shown in fig. 2.
More specifically, the present embodiment provides a method for implementing a cloud gateway to share a DHCP (Dynamic Host Configuration Protocol ) address pool in a home in different places, and some technical terms related to this embodiment are explained as follows:
Dynamic host configuration protocol DHCP is a standard protocol that allows servers to dynamically allocate IP (Internet Protocol ) addresses and configuration information to clients, DHCP is an important network protocol for local area networks, operating using UDP (User Datagram Protocol ) protocols, and is mainly used for automatically allocating IP addresses to internal networks or network service providers, as a means of central management for all computers for users or internal network administrators, and accepting IP leases for internal network users.
In a conventional home network, home ONU (Optical Network Unit ) devices of a telecom operator or home router devices purchased by users provide DHCP services for home mobile phone terminals, computer terminals, internet of things terminals, and the like. In the cloud broadband network architecture, the DHCP capability of the ONU device is moved up to a cloud gateway, the cloud gateway uniformly provides the DHCP service of the home terminal of a certain zone, and in the cloud gateway, QINQ (a technology of adding a layer of 802.1Q tag on the basis of the original 802.1Q message) is used to distinguish different families.
In the prior art, when the address allocation of the home terminal in different places is realized, the CIDR technology is mostly adopted, the fixed division mode of traditional class A, class B and class C IP addresses is broken through by introducing the concept of variable-length subnet masks, and a 'diagonal notation' is used, for example, a mask bit is 24 bits, the existing home terminal mostly adopts a method of acquiring a class C address, one class C address is a network number in four sections of numbers of the IP address, the first three sections of numbers are numbers of a local computer, the remaining section of numbers are numbers of a local computer, and the class C address comprises class A addresses of 1.0.0.1-126.255.255.254, and class B addresses of 128.0.0.0.255.255.254, class D addresses of 224.0.1-239.255.255.254, and class E addresses of 240.0.0.1-255.255.254.
In the cloud gateway scene, the embodiment realizes the sharing of the address pool by the home DHCP in different places, so that the home terminals in different places still keep the use mode of the class C address, the incompatibility condition of the terminals is avoided, the original gateway address is adopted by different families, the problem of network interruption is avoided, and the use cognition of users is kept.
In one embodiment, the method specifically includes:
The first cloud gateway establishes local area network address sharing allocation definition by using the same gateway address;
The method comprises the steps that a first cloud gateway obtains a first shared account and a second shared account which are connected to a local area network address to be shared and use the same gateway address, and the first shared account and the second shared account correspond to different physical local area networks;
The first cloud gateway obtains local area network addresses which are distributed for the terminals under the first shared account and the second shared account according to local area network address sharing distribution definition;
and the first cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the new terminal which requests to allocate the address under the first shared account and the second shared account.
In this embodiment, the method may be applied to a cloud gateway providing DHCP services of terminals of a plurality of households in a certain zone, where two or more households in the same zone need to share a local area network, at this time, in the cloud gateway, an account is created for each household, and for the households needing to share the local area network, the account is marked as a shared account, and defining local area network address sharing allocation definitions of two or more sharing accounts, and using the same gateway address to enable the home terminals under the sharing accounts to be located in the same network segment, and allocating local area network addresses to the home terminals in the sharing accounts in the same network segment to realize sharing allocation of the local area network addresses.
In one embodiment, the method specifically includes:
the second cloud gateway establishes a local area network address sharing allocation definition shared with a third cloud gateway and using the same gateway address;
The second cloud gateway obtains a local sharing account number of a local area network address which is to be shared with a third cloud gateway and uses the same gateway address, and a remote sharing account number of the local area network address which is to be shared with the second cloud gateway by the third cloud gateway and uses the same gateway address;
the second cloud gateway obtains local network addresses which are distributed for the terminals under the local sharing account number and the remote sharing account number according to local network address sharing distribution definition;
And the second cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the terminal which allocates the address for the new request under the local sharing account and the remote sharing account.
In this embodiment, the method may be applied to two or more cloud gateways to provide DHCP services for terminals of multiple households of two or more slices, where a scene of sharing a local area network for two or more households of the two or more slices is required, at this time, in each cloud gateway, an account is created for each household of the slice where the cloud gateway is located, the account is marked as a shared account for the household needing to share the local area network, and a local area network address sharing allocation definition of two or more shared accounts is defined, sharing allocation of local area network addresses is achieved through interaction of two cloud gateways, one cloud gateway is responsible for address allocation, and the other cloud gateways receive the allocated addresses.
In one embodiment, the method specifically includes:
the fourth cloud gateway establishes the same local area network address sharing allocation definition using the same gateway address as the fifth cloud gateway;
the method comprises the steps that a fourth cloud gateway obtains a local sharing account number of a local area network address which is to be shared with a fifth cloud gateway and uses the same gateway address, and a remote sharing account number of the local area network address which is to be shared with the fourth cloud gateway and uses the same gateway address;
The fourth cloud gateway obtains a local area network address which is self-assigned according to local area network address sharing assignment definition for the terminal under the local sharing account, and the fifth cloud gateway defines an assigned remote local area network address according to local area network address sharing assignment definition for the terminal under the remote sharing account;
and the fourth cloud gateway eliminates the allocated local area network address and the allocated remote local area network address according to the local area network address sharing allocation definition for the terminal which has a new request for allocating the address under the own local sharing account number, and allocates the new local area network address.
In this embodiment, the scenario of application of the method is the same as that of the previous embodiment, except that each cloud gateway is responsible for address allocation of the shared account under its own patch, and informs other cloud gateways of the process or result of its own address allocation, and the actions of each cloud gateway are corresponding to each other.
In an embodiment, the fourth cloud gateway establishes the same local area network address sharing allocation definition using the same gateway address as the fifth cloud gateway, and specifically includes:
Establishing an interconnection tunnel between a fourth virtual switch vswitch of the fourth cloud gateway and a fifth vswitch of the fifth cloud gateway;
Writing a local area network address sharing allocation definition in fourth terminal access equipment vcpe of the fourth cloud gateway and synchronizing the local area network address sharing allocation definition to fifth vcpe of the fifth cloud gateway through an interconnection tunnel, or acquiring the local area network address sharing allocation definition written in fifth vcpe by fourth vcpe through the interconnection tunnel, or writing the same local area network address sharing allocation definition in fourth vcpe and fifth vcpe;
the local area network address sharing allocation definition comprises a terminal available address range network, a subnet mask, a gateway address gateway and a release time release, and the local area network address is a class-C address.
In this embodiment, the detailed implementation steps of the method may be as shown in fig. 3-8 or fig. 9, where vswitch and vcpe are both components of a cloud gateway, and the device for allocating an address is on the cloud gateway. As shown in fig. 3, first, the definition of the lan address sharing allocation is performed in the cloud gateway, that is, the contents in the table homecpe dhcp pool in fig. 3. homecpe is a home CPE (Customer Premise Equipment), a wireless terminal access device for use in a home or small business environment, and vcpe in fig. 3 is a virtual cpe in a cloud gateway. In order to implement communication connection in the plurality of cloud gateways, an interconnection tunnel is also established through a vSwitch (Virtual Switch), and the access tunnel in fig. 3 is used to access the home terminal. In fig. 3, the network represents a usable address range of a terminal, the mask represents a subnet mask, the gateway represents a gateway address, the release represents a release time in s units, and the same network, mask, gateway and the same release are defined in the shared cloud gateway under the scenario that the cloud gateway allocates addresses for the terminals of the present patch.
In an embodiment, the fourth cloud gateway obtains a local sharing account number of a local area network address to be shared with the fifth cloud gateway using the same gateway address and a remote sharing account number of the fifth cloud gateway to be shared with the fourth cloud gateway using the same gateway address, and specifically includes:
Fourth vcpe establishes a local account for each physical lan accessed to itself, identifies each local account as the same local outer layer virtual lan pvlan and different local inner layer virtual lans cvlan, obtains a local shared account from the local accounts, and if there is a local non-shared account, allocates to use different gateway addresses for each local non-shared account;
Fourth vcpe obtains the remote shared account number and the remote pvlan and the remote cvlan thereof established by the fifth cloud gateway through the interconnection tunnel, and establishes a shared group to record the local shared account number and the local pvlan and the local cvlan thereof and the remote shared account number and the remote pvlan and the remote cvlan thereof.
In this embodiment, as shown in fig. 3, one account (account) in the homecpe account table provides DHCP service for a family, and uses QINQ to identify each account, and each account uses the same DHCP address pool and gateway address. In fig. 3, each account records its own pvlan and cvlan, pvlan outer VLAN (Virtual Local Area Network ), cvlan inner VLAN, outer VLAN distinguishes cloud gateway, inner VLAN distinguishes different families, if there is also a non-shared family, i.e. a normal family, the segments of the shared family and the normal family are different. As shown in fig. 4, a sharing group is created on vcpe where the accounts needing to implement the intercommunication need are located, the accounts needing to implement the family intercommunication all join the sharing group, the local accounts vcpe are identified by the identification accounts in the sharing group, the remote vcpe accounts are identified by remote, pvlan and cvlan are carried in the account attributes in the sharing group, and the process obtains the shared account information of the opposite end through the interconnection tunnel.
In an embodiment, the fourth cloud gateway obtains a local lan address which is already allocated for the terminal under the local shared account according to the lan address sharing allocation definition, and the fifth cloud gateway defines a remote lan address which is already allocated for the terminal under the remote shared account according to the lan address sharing allocation definition, which specifically includes:
A terminal under a fourth vcpe and a local shared account number completes local area network address allocation according to local area network address sharing allocation definition through a local dynamic Host Configuration Protocol (HCP) discover message, a HCP offer message, a HCP request message and a HCP ack message, records the allocated local area network address, copies the local HCP discover message, the HCP offer message, the HCP request message and the HCP ack message to a remote shared account number in a shared group, encapsulates a remote end pvlan and a remote end cvlan and then sends the remote end cvlan to a fifth vcpe through an interconnection tunnel;
Fourth vcpe receives remote dhcp discover message, dhcp offer message, dhcp request message and dhcp ack message sent by fifth vcpe and encapsulating local pvlan and local cvlan, and obtains fifth vcpe as a terminal under the remote shared account number, which defines the allocated remote local area network address according to the local area network address sharing allocation.
In this embodiment, as shown in fig. 5-8, after the found message of one home terminal reaches vcpe, vcpe copies the found message of the terminal to each remote type account in the shared group, encapsulates pvlan and cvlan of each remote account, and forwards the messages to the shared group of other vcpe for monitoring by using the interconnection tunnel, and simultaneously, the provided message of the dhcp and the subsequent request message of the dhcp and the confirmed message of the home terminal vcpe are copied to the remote account in this way. As in fig. 5, the left cloud gateway receives the dhcp discover message sent through its own access tunnel, which carries pvlan and cvlan, indicating that it is a terminal under ACCOUNT account number 1, the left side vcpe changes the message to pvlan2 and cvlan4 of ACCOUNT3 under encapsulation, pvlan and cvlan5 of ACCOUNT4, and sends it to the right side vcpe, so that the right side vcpe monitors the message, and the process of fig. 6-8 is similar. After the above steps are completed, the dhcp pool of the local site vcpe normally allocates an IP address to the terminal of the local site, marks the IP address as allocated, copies the complete dhcp flow message to other sites, marks the IP address as allocated in the shared group monitoring table of other sites, the remote site shared group notifies the local vcpe of the monitoring table change message, the dhcp pool mark IP of the local vcpe is used, the vcpe does not reallocate the corresponding IP to its own family members, and the dhcp table and the shared group monitoring table change.
In an embodiment, the fourth cloud gateway obtains a local lan address which is already allocated for the terminal under the local shared account according to the lan address sharing allocation definition, and the fifth cloud gateway defines a remote lan address which is already allocated for the terminal under the remote shared account according to the lan address sharing allocation definition, which specifically includes:
A fourth vcpe and a terminal under a local shared account number complete local area network address allocation according to local area network address sharing allocation definition through a local dynamic host configuration protocol dhcp discover message, a dhcp offer message, a dhcp request message and a dhcp ack message, record the allocated local area network address, copy the allocated local area network address to a far-end shared account number in a shared group, encapsulate a far-end pvlan and a far-end cvlan, and send to a fifth vcpe through an interconnection tunnel;
Fourth vcpe receives the remote lan address sent by fifth vcpe, encapsulates local pvlan and local cvlan, and records the remote lan address already allocated.
In this embodiment, another example is shown in fig. 9, where ue-IP indicates an IP address already allocated locally, and exposed-IP indicates an IP address already allocated at a remote end, and the process includes:
① . Vcpe of station 1 (left side) allocates 192.168.71.2 address to its own home terminal, and the address pool of the present station dhcp pool records the ip;
② . The vcpe of the site 1 monitors and judges that the flow of the 192.168.71.2 address allocated to the terminal is complete by the sharing group of the remote site 2 (right side), and determines that the ip is effectively allocated;
③ . Site 2 recognizes that the effectively allocated address 192.168.71.2, synchronizes to the dhcp pool address pool of vcpe of the site, and is not allocated subsequently;
④ . Vcpe of the station 2 allocates addresses 192.168.71.3 and 192.168.71.4 for the home terminals of the station, and the address pool of the dhcp pool of the station records the ip;
⑤ . Vcpe of site 2 allocates 192.168.71.3 and 192.168.71.4 addresses for the terminals, monitors and judges that the flow is complete for the shared group of the remote site 1, and determines that the ip is effectively allocated;
⑥ . Site 1 recognizes that addresses 192.168.71.3 and 192.168.71.4, which have been effectively allocated, synchronize to the dhcp pool address pool of the present site vcpe and are not subsequently allocated;
⑦ . Vcpe of the station 1 allocates an address 192.168.71.5 for the home terminal of the station again, and the address pool of the dhcp pool of the station records the ip;
⑧ . The vcpe of the site 1 monitors the flow of the 192.168.71.5 address allocated to the terminal by the sharing group of the remote site 2 and judges that the flow is complete, and determines that the ip is effectively allocated;
⑨ . Site 2 recognizes that the effectively allocated address 192.168.71.5, synchronizes to the dhcp pool address pool of vcpe of the present site, and is not allocated subsequently.
As shown in FIG. 10, the shared group in this embodiment may acquire the allocated address by monitoring the message, and the action flow of Shan Ceyun gateway includes receiving the DHCP message, locating the account, judging whether the account is in the shared group, if not, directly replying to the DHCP message, completing the address allocation, if so, replying to the DHCP message, and copying the message according to the remote account attribute of the shared group, judging whether the message attribute received by the interconnected tunnel is in the shared group, if not, discarding the message, if so, monitoring the DHCP message flow, judging whether the DHCP message flow is complete, if not, not marking the IP, marking the IP and synchronizing to the DHCP address pool, and if so, not allocating the marked IP to the terminal. In theory, after the VCPE allocates the local address, the opposite end VCPE may be directly told that the local end has allocated the address.
According to the embodiment, the DHCP flow of the account is copied to other accounts in the sharing group by controlling the copying mode and range of the DHCP message, and the effect of real-time synchronization of the use condition of the cloud gateway home address pool is achieved by the integrity monitoring and message pushing of the DHCP flow, so that the multi-account home terminal shares the same C-type address pool, multiple households are in the same broadcasting domain, the same gateway address is used, and home users in a home intercommunication scene keep the original use mode and internet surfing experience. Based on the concept of the sharing group, based on the information implementation of intercommunication IP and pvlan/cvlan among cloud gateways, the cloud gateway network among all places is opened, so that the local and remote IP allocation achieves the result of intercommunication sharing in different places based on the same address pool.
Example 2:
As shown in fig. 2, the present application provides a local area network address sharing allocation device, which is a cloud gateway and includes:
A definition module 1, configured to establish a local area network address sharing allocation definition using the same gateway address;
The account module 2 is connected with the definition module 1 and is used for acquiring a first shared account and a second shared account which are to be shared and use local area network addresses of the same gateway address;
the recording module 3 is connected with the account module 2 and is used for acquiring the distributed local area network addresses defined according to local area network address sharing distribution under the first shared account and the second shared account;
the allocation module 4 is connected with the recording module 3, and is used for allocating a new terminal for requesting to allocate an address under the first shared account and/or the second shared account, eliminating the allocated local area network address according to the local area network address sharing allocation definition, and allocating the new local area network address.
In an embodiment, the cloud gateway is specifically a first cloud gateway, and includes:
The definition module 1 is used for establishing local area network address sharing allocation definition using the same gateway address;
The account module 2 is connected with the definition module 1 and is used for acquiring a first shared account and a second shared account which are connected to the local area network address to be shared and use the same gateway address, and the first shared account and the second shared account correspond to different physical local area networks;
The recording module 3 is connected with the account module 2 and is used for acquiring local area network addresses which are allocated for the terminals under the first shared account and the second shared account according to local area network address sharing allocation definition;
The allocation module 4 is connected with the recording module 3, and is used for allocating the new terminals requesting to allocate addresses for the first shared account and the second shared account, eliminating the allocated local area network addresses according to the local area network address sharing allocation definition, and allocating the new local area network addresses.
In an embodiment, the cloud gateway is specifically a second cloud gateway, and includes:
a definition module 1, configured to establish a local area network address sharing allocation definition shared with a third cloud gateway and using the same gateway address;
The account module 2 is connected with the definition module 1 and is used for acquiring a local sharing account number of a local area network address which is to be shared with the third cloud gateway and uses the same gateway address and a remote sharing account number of the local area network address which is to be shared by the third cloud gateway with the second cloud gateway and uses the same gateway address;
The recording module 3 is connected with the account module 2 and is used for acquiring local network addresses which are allocated for the local sharing account and the terminal under the remote sharing account according to local network address sharing allocation definition;
the allocation module 4 is connected with the recording module 3, and is used for allocating the new terminal requesting the address for the local shared account and the remote shared account, eliminating the allocated local area network address according to the local area network address sharing allocation definition, and allocating the new local area network address.
In an embodiment, the cloud gateway is specifically a fourth cloud gateway, and includes:
a definition module 1, configured to establish a local area network address sharing allocation definition that uses the same gateway address as the fifth cloud gateway;
The account module 2 is connected with the definition module 1 and is used for acquiring a local sharing account number of a local area network address which is to be shared with the fifth cloud gateway and uses the same gateway address and a remote sharing account number of the local area network address which is to be shared by the fifth cloud gateway and the fourth cloud gateway and uses the same gateway address;
The recording module 3 is connected with the account module 2 and is used for acquiring a local area network address which is allocated for a terminal under a local shared account according to local area network address sharing allocation definition, and a fifth cloud gateway is used for defining the allocated remote local area network address for the terminal under a remote shared account according to local area network address sharing allocation;
The allocation module 4 is connected with the recording module 3 and is used for allocating the new local area network address to the terminal which has a new request under the own local shared account, eliminating the allocated local area network address and the allocated remote local area network address according to the local area network address sharing allocation definition, and allocating the new local area network address.
In an embodiment, the definition module 1 of the fourth cloud gateway specifically includes:
A tunnel unit, configured to establish an interconnection tunnel with a fourth virtual switch vswitch of the fourth cloud gateway and a fifth vswitch of the fifth cloud gateway;
The writing unit is connected with the tunnel unit and is used for writing a local area network address sharing allocation definition in fourth terminal access equipment vcpe of the fourth cloud gateway and synchronizing the local area network address sharing allocation definition to fifth vcpe of the fifth cloud gateway through the interconnection tunnel, or fourth vcpe acquires the local area network address sharing allocation definition written in fifth vcpe through the interconnection tunnel, or the same local area network address sharing allocation definition is written in fourth vcpe and fifth vcpe;
the local area network address sharing allocation definition comprises a terminal available address range network, a subnet mask, a gateway address gateway and a release time release, and the local area network address is a class-C address.
In an embodiment, the account module 2 of the fourth cloud gateway specifically includes:
a local account unit, configured to establish a local account for each physical lan accessed to the fourth vcpe, identify each local account as the same local outer layer virtual lan pvlan and different local inner layer virtual lans cvlan, obtain a local shared account from the local accounts, and if a local non-shared account also exists, allocate a different gateway address for each local non-shared account;
The shared account unit is connected with the local account unit and is used for acquiring a remote shared account established by the fifth cloud gateway and a remote end pvlan and a remote end cvlan thereof through an interconnection tunnel by the fourth vcpe, and establishing a shared group to record the local shared account and a local pvlan and a local cvlan thereof and the remote shared account and a remote end pvlan and a remote end cvlan thereof.
In an embodiment, the recording module 3 of the fourth cloud gateway specifically includes:
The local information recording unit is used for a terminal under a fourth vcpe and a local shared account, completing local area network address allocation according to local area network address sharing allocation definition through a local dynamic host configuration protocol (DCP discover), a DCP refer message, a DCP request message and a DCP ack message, recording the allocated local area network address, copying the local DCP discover message, the DCP refer message, the DCP request message and the DCP ack message to a remote shared account in a shared group, packaging a remote end pvlan and a remote end cvlan, and then transmitting to a fifth vcpe through an interconnection tunnel;
The remote information recording unit is configured to receive, by the fourth vcpe, a remote dhcp discover message, a dhcp offer message, a dhcp request message, and a dhcp ack message sent by the fifth vcpe and encapsulating the local pvlan and the local cvlan, and obtain, by the fourth vcpe, a remote local area network address that has been allocated for a terminal under the remote shared account according to the remote dhcp discover message, the dhcp offer message, the dhcp request message, and the dhcp ack message, and define the remote local area network address that has been allocated according to the local area network address sharing allocation.
In an embodiment, the recording module 3 of the fourth cloud gateway specifically includes:
The local information recording unit is used for a terminal under a fourth vcpe and local shared account, completing local area network address allocation according to local area network address sharing allocation definition through a local dynamic host configuration protocol dhcp discover message, a dhcp offer message, a dhcp request message and a dhcp ack message, recording the allocated local area network address, copying the allocated local area network address to a remote shared account in a sharing group, packaging a remote end pvlan and a remote end cvlan, and then sending to a fifth vcpe through an interconnection tunnel;
The remote information recording unit is configured to receive, from the fourth vcpe, the remote lan address sent by the fifth vcpe and encapsulated with the local pvlan and local cvlan, and record the allocated remote lan address.
Example 3:
Embodiment 3 of the present application provides a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the local area network address sharing allocation method described in embodiment 1 or implements the local area network address sharing allocation apparatus described in embodiment 2.
The computer-readable storage media includes volatile or nonvolatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program elements, or other data. Computer-readable storage media includes, but is not limited to, RAM (Random Access Memory ), ROM (Read-Only Memory), EEPROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ ONLY MEMORY, charged erasable programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact Disc Read-Only Memory), 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.
In addition, the present application may also provide a computer apparatus including a memory and a processor, where the memory stores a computer program, and the processor executes the lan address sharing allocation method described in embodiment 1 when the processor runs the computer program stored in the memory. The computer device may be a local area network address sharing allocation device as described in example 2.
The memory is connected with the processor, the memory can be flash memory or read-only memory or other memories, and the processor can be a central processing unit or a singlechip.
Embodiments 1-3 of the present application provide a method, an apparatus, and a medium for sharing and allocating addresses of a local area network, which implement sharing of the same address pool by multiple accounts through a cloud gateway, and are in the same broadcast domain, and using the same gateway address, terminals of the multiple accounts can maintain similar address intercommunication.
It is to be understood that the above embodiments are merely illustrative of the application of the principles of the present application, but not in limitation thereof. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the application, and are also considered to be within the scope of the application.

Claims (10)

1.A method for sharing and assigning addresses of a local area network, the method comprising:
the cloud gateway establishes local area network address sharing allocation definition using the same gateway address;
the cloud gateway obtains a first sharing account number and a second sharing account number of a local area network address to be shared and using the same gateway address;
The cloud gateway obtains the distributed local area network addresses according to local area network address sharing distribution definition under the first shared account and the second shared account;
And the cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the new terminal requesting to allocate the address under the first shared account and/or the second shared account.
2. The method according to claim 1, characterized in that it comprises in particular:
The first cloud gateway establishes local area network address sharing allocation definition by using the same gateway address;
The method comprises the steps that a first cloud gateway obtains a first shared account and a second shared account which are connected to a local area network address to be shared and use the same gateway address, and the first shared account and the second shared account correspond to different physical local area networks;
The first cloud gateway obtains local area network addresses which are distributed for the terminals under the first shared account and the second shared account according to local area network address sharing distribution definition;
and the first cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the new terminal which requests to allocate the address under the first shared account and the second shared account.
3. The method according to claim 1, characterized in that it comprises in particular:
the second cloud gateway establishes a local area network address sharing allocation definition shared with a third cloud gateway and using the same gateway address;
The second cloud gateway obtains a local sharing account number of a local area network address which is to be shared with a third cloud gateway and uses the same gateway address, and a remote sharing account number of the local area network address which is to be shared with the second cloud gateway by the third cloud gateway and uses the same gateway address;
the second cloud gateway obtains local network addresses which are distributed for the terminals under the local sharing account number and the remote sharing account number according to local network address sharing distribution definition;
And the second cloud gateway excludes the allocated local area network address and allocates a new local area network address according to the local area network address sharing allocation definition for the terminal which allocates the address for the new request under the local sharing account and the remote sharing account.
4. The method according to claim 1, characterized in that it comprises in particular:
the fourth cloud gateway establishes the same local area network address sharing allocation definition using the same gateway address as the fifth cloud gateway;
the method comprises the steps that a fourth cloud gateway obtains a local sharing account number of a local area network address which is to be shared with a fifth cloud gateway and uses the same gateway address, and a remote sharing account number of the local area network address which is to be shared with the fourth cloud gateway and uses the same gateway address;
The fourth cloud gateway obtains a local area network address which is self-assigned according to local area network address sharing assignment definition for the terminal under the local sharing account, and the fifth cloud gateway defines an assigned remote local area network address according to local area network address sharing assignment definition for the terminal under the remote sharing account;
and the fourth cloud gateway eliminates the allocated local area network address and the allocated remote local area network address according to the local area network address sharing allocation definition for the terminal which has a new request for allocating the address under the own local sharing account number, and allocates the new local area network address.
5. The method of claim 4, wherein the fourth cloud gateway establishes the same local area network address sharing allocation definition using the same gateway address as the fifth cloud gateway, and specifically comprises:
Establishing an interconnection tunnel between a fourth virtual switch vswitch of the fourth cloud gateway and a fifth vswitch of the fifth cloud gateway;
Writing a local area network address sharing allocation definition in fourth terminal access equipment vcpe of the fourth cloud gateway and synchronizing the local area network address sharing allocation definition to fifth vcpe of the fifth cloud gateway through an interconnection tunnel, or acquiring the local area network address sharing allocation definition written in fifth vcpe by fourth vcpe through the interconnection tunnel, or writing the same local area network address sharing allocation definition in fourth vcpe and fifth vcpe;
the local area network address sharing allocation definition comprises a terminal available address range network, a subnet mask, a gateway address gateway and a release time release, and the local area network address is a class-C address.
6. The method according to claim 5, wherein the fourth cloud gateway obtains a local sharing account number of a local area network address to be shared with the fifth cloud gateway using the same gateway address and a remote sharing account number of the fifth cloud gateway to be shared with the fourth cloud gateway using the same gateway address, specifically comprising:
Fourth vcpe establishes a local account for each physical lan accessed to itself, identifies each local account as the same local outer layer virtual lan pvlan and different local inner layer virtual lans cvlan, obtains a local shared account from the local accounts, and if there is a local non-shared account, allocates to use different gateway addresses for each local non-shared account;
Fourth vcpe obtains the remote shared account number and the remote pvlan and the remote cvlan thereof established by the fifth cloud gateway through the interconnection tunnel, and establishes a shared group to record the local shared account number and the local pvlan and the local cvlan thereof and the remote shared account number and the remote pvlan and the remote cvlan thereof.
7. The method of claim 6, wherein the fourth cloud gateway obtains a local lan address that has been allocated for the terminal under the local shared account according to the lan address sharing allocation definition, and the fifth cloud gateway defines a remote lan address that has been allocated for the terminal under the remote shared account according to the lan address sharing allocation definition, specifically including:
A terminal under a fourth vcpe and a local shared account number completes local area network address allocation according to local area network address sharing allocation definition through a local dynamic Host Configuration Protocol (HCP) discover message, a HCP offer message, a HCP request message and a HCP ack message, records the allocated local area network address, copies the local HCP discover message, the HCP offer message, the HCP request message and the HCP ack message to a remote shared account number in a shared group, encapsulates a remote end pvlan and a remote end cvlan and then sends the remote end cvlan to a fifth vcpe through an interconnection tunnel;
Fourth vcpe receives remote dhcp discover message, dhcp offer message, dhcp request message and dhcp ack message sent by fifth vcpe and encapsulating local pvlan and local cvlan, and obtains fifth vcpe as a terminal under the remote shared account number, which defines the allocated remote local area network address according to the local area network address sharing allocation.
8. The method of claim 6, wherein the fourth cloud gateway obtains a local lan address that has been allocated for the terminal under the local shared account according to the lan address sharing allocation definition, and the fifth cloud gateway defines a remote lan address that has been allocated for the terminal under the remote shared account according to the lan address sharing allocation definition, specifically including:
A fourth vcpe and a terminal under a local shared account number complete local area network address allocation according to local area network address sharing allocation definition through a local dynamic host configuration protocol dhcp discover message, a dhcp offer message, a dhcp request message and a dhcp ack message, record the allocated local area network address, copy the allocated local area network address to a far-end shared account number in a shared group, encapsulate a far-end pvlan and a far-end cvlan, and send to a fifth vcpe through an interconnection tunnel;
Fourth vcpe receives the remote lan address sent by fifth vcpe, encapsulates local pvlan and local cvlan, and records the remote lan address already allocated.
9. A local area network address sharing allocation apparatus, wherein the apparatus is a cloud gateway, and comprises:
the definition module is used for establishing local area network address sharing allocation definition using the same gateway address;
the account module is connected with the definition module and used for acquiring a first shared account and a second shared account which are to be shared and use the local area network address of the same gateway address;
the recording module is connected with the account module and used for acquiring the distributed local area network addresses according to local area network address sharing distribution definition under the first shared account and the second shared account;
The distribution module is connected with the recording module and is used for distributing the new terminal requesting for distributing the address under the first shared account and/or the second shared account, eliminating the distributed local area network address according to the local area network address sharing distribution definition and distributing the new local area network address.
10. A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, which when executed by a processor, implements the local area network address sharing allocation method according to any of claims 1-8.
CN202510435959.6A 2025-04-08 2025-04-08 Local area network address sharing allocation method, device and medium Pending CN120128572A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510435959.6A CN120128572A (en) 2025-04-08 2025-04-08 Local area network address sharing allocation method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510435959.6A CN120128572A (en) 2025-04-08 2025-04-08 Local area network address sharing allocation method, device and medium

Publications (1)

Publication Number Publication Date
CN120128572A true CN120128572A (en) 2025-06-10

Family

ID=95924873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510435959.6A Pending CN120128572A (en) 2025-04-08 2025-04-08 Local area network address sharing allocation method, device and medium

Country Status (1)

Country Link
CN (1) CN120128572A (en)

Similar Documents

Publication Publication Date Title
US9847967B2 (en) DHCP proxy in a subscriber environment
EP2241091B1 (en) Combining locally addressed devices and wide area network (wan) addressed devices on a single network
US8122113B2 (en) Dynamic host configuration protocol (DHCP) message interception and modification
US7577146B2 (en) Network element modifying the DHCP lease timer
CN102025798B (en) Address allocation processing method, device and system
CN104468625B (en) Dialing tunnel agent device, the method for utilizing the tunnel pass through NAT that dials
US10038646B2 (en) Method and apparatus for acquiring port range resource, and method and apparatus for allocating port range resource
JP2011515945A (en) Method and apparatus for communicating data packets between local networks
CA2774281C (en) User access method, system, access server, and access device
CN101494669B (en) Method and apparatus for distributing IP address for user terminal
US20250286859A1 (en) Proxy address resolution protocol for distributed local area network communications
EP2806598B1 (en) Method and system for managing address resources
US7570647B2 (en) LAN type internet access network and subscriber line accommodation method for use in the same network
CN105635335A (en) Social resource access method, apparatus, and system
CN109803028B (en) A method and apparatus for configuring service flow
WO2005083959A1 (en) Network access router, network access method, program, and recording medium
CN120128572A (en) Local area network address sharing allocation method, device and medium
CN114928590B (en) An IPv6 address configuration method and routing device
CN111315037B (en) Communication link establishing method and device, computer equipment and storage medium
CN119342086B (en) Device connection method and device, storage medium and electronic device
CN111147345B (en) Cloud environment network isolation device and method and cloud system
CN117376314A (en) Public network address penetration method of terminal equipment, terminal equipment, and storage media
CN114024939A (en) Network address allocation method and device and router
CN118057860A (en) Address translation method, address translation device, communication equipment and readable storage medium
CN118101551A (en) Multi-router LAN network aggregation method and device, storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination