WO2016179950A1 - Internet protocol ip address allocation method and device - Google Patents

Internet protocol ip address allocation method and device Download PDF

Info

Publication number
WO2016179950A1
WO2016179950A1 PCT/CN2015/091292 CN2015091292W WO2016179950A1 WO 2016179950 A1 WO2016179950 A1 WO 2016179950A1 CN 2015091292 W CN2015091292 W CN 2015091292W WO 2016179950 A1 WO2016179950 A1 WO 2016179950A1
Authority
WO
WIPO (PCT)
Prior art keywords
network card
client
cpe
network
address
Prior art date
Application number
PCT/CN2015/091292
Other languages
French (fr)
Chinese (zh)
Inventor
高飞
刘威
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016179950A1 publication Critical patent/WO2016179950A1/en

Links

Images

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/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • 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]

Definitions

  • the present invention relates to the field of communications, and in particular to a method and an apparatus for allocating an IP address of an Internet Protocol.
  • the Customer Premise EquIPment (CPE) device is a relatively portable communication terminal capable of one or more Users provide network access.
  • the CPE dials successfully and accesses the CPE to obtain the assigned private network IP (for example, 192.168.0.100), it can access the Internet.
  • the public IP address such as 74.125.239.15 assigned by the network side after the CPE dials successfully after accessing the CPE, instead of the private IP address assigned by the CPE, so as to implement enterprise-level applications.
  • the CPE acts as a bridge connecting the wan side network card and the network cable NIC.
  • the traditional approach is to use the CPE as a HUB hub so that the client accessing the CPE product can directly apply for an IP address to the fixed network, saying that the CPE is in the "traditional bridge mode" state.
  • the traditional bridge mode has the following problem: all clients accessing the CPE (including some non-enterprise users) cannot access the CPE intranet resources because the client obtains the IP address assigned by the public network instead of the IP address assigned by the Router product. And the Router product does not process the data packet at this time. Assume that there are some video resources available for access on the intranet at this time. However, because the client obtains the public IP address, the intranet resources cannot be accessed. Switching from the traditional bridge mode to other modes requires manual assignment of an IP address and other complicated operations, and the user experience is not good.
  • the main purpose of the embodiments of the present invention is to provide a method and a device for allocating Internet Protocol IP addresses, so as to at least solve the problem that some clients in the related art can only access public network resources while other clients cannot access resources in the Router product. And it is difficult to assign a public network IP address to the client.
  • a method for allocating an Internet Protocol IP address including: dividing a physical network card inside a CPE of a user equipment into a first preset mode of a first logical network card and a second logical network card; When the client requests access to the CPE, the client is assigned a private network IP address of the CPE through a first bridge connected to the first logical network card, or is connected to the second logical network card by using a first bridge connected to the first logical network card. The second bridge allocates a public network IP address to the client.
  • the second bridge is connected to the WAN side network card of the WAN, and the public network IP address is allocated to the client by using the second bridge connected to the second logical network card, including: receiving, sent by the client a request for applying for a public network IP address; obtaining the public network IP from the WAN side network card by using the second bridge according to the request, and distributing the public network IP to the client by using the second logical network card.
  • the first logical network card includes: a network cable network card and a wireless fidelity WIFI network card.
  • the method further includes: when receiving a request for the user to switch the current preset mode sent by the client, triggering, by the client, the web application user interface webUI of the CPE according to the private network IP address; After the operation corresponding to the request is triggered on the webUI, the CPE is restarted.
  • the method further includes: selecting the first A preset mode is initialized.
  • an apparatus for allocating an Internet Protocol IP address includes: a dividing module, configured to divide a physical network card inside the customer equipment CPE into a first logical network card and a second logical network card a first preset mode; an allocation module, configured to allocate, by the first bridge connected to the first logical network card, the private network IP address of the CPE to the client when the client requests access to the CPE, Or, the client is assigned a public network IP address by using a second bridge connected to the second logical network card.
  • the allocating module includes: a receiving unit, configured to receive a request sent by the client for applying for a public network IP address; and an allocating unit, configured to pass the second bridge according to the request
  • the WAN side network card acquires the public network IP, and is allocated to the client by using the second logical network card.
  • the first logical network card includes: a network cable network card and a wireless fidelity WIFI network card.
  • the device further includes: a triggering module, configured to trigger the client to access the webpage application of the CPE according to the private network IP address when receiving a request for the user to switch the current preset mode sent by the client a program user interface webUI; a restarting module, configured to restart the CPE after triggering an operation corresponding to the request on the webUI.
  • a triggering module configured to trigger the client to access the webpage application of the CPE according to the private network IP address when receiving a request for the user to switch the current preset mode sent by the client a program user interface webUI
  • a restarting module configured to restart the CPE after triggering an operation corresponding to the request on the webUI.
  • the device before the physical network card inside the CPE is divided into the first preset mode of the first logical network card and the second logical network card, the device further includes: selecting the first A preset mode is initialized.
  • the physical network card inside the CPE is divided into the first logical network card and the second logical network card, and the two logical network cards are respectively allocated with the internal network IP address and the public network IP address for the client, thereby solving the problem.
  • some clients only access the public network resources, and other clients cannot access the problem source of the resources in the Router product, thereby improving the user experience.
  • FIG. 1 is a flowchart of a method for allocating an Internet Protocol IP address according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of an apparatus for allocating an Internet Protocol IP address according to an embodiment of the present invention
  • FIG. 3 is a block diagram 1 of an optional structure of an Internet Protocol IP address allocation apparatus according to an embodiment of the present invention.
  • FIG. 4 is a block diagram 2 of an optional structure of an apparatus for allocating an Internet Protocol IP address according to an embodiment of the present invention
  • FIG. 5 is a block diagram of a 4G gateway mode bridge in the related art
  • FIG. 6 is a structural block diagram of a CPE internal bridge in an LTE-Bridge mode according to an alternative embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for allocating an Internet Protocol IP address according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 The physical network card inside the CPE of the user equipment is divided into a first preset mode of the first logical network card and the second logical network card;
  • Step S104 When the client requests access to the CPE, the client is assigned a private network IP address of the CPE through the first bridge connected to the first logical network card, or the second bridge connected to the second logical network card is used as the client. The end assigns a public network IP address.
  • the physical network card inside the CPE is divided into a first logical network card and a second logical network card, and the internal network IP address and the public network IP address are respectively assigned to the client through the two logical network cards.
  • it solves the problem that some clients in the related technology only access the public network resources while other clients cannot access the resources in the Router product, thereby improving the user experience.
  • the second bridge involved in the embodiment is connected to the WAN side network card of the wide area network. Therefore, the second bridge connected to the second logical network card in step S104 in this embodiment allocates a public network IP to the client.
  • the way of the address can be achieved as follows:
  • Step S11 receiving a request sent by the client for applying for a public network IP address
  • Step S12 Obtain a public network IP from the WAN side network card through the second bridge according to the request, and allocate the same to the client through the second logical network card.
  • the manner of the foregoing steps S11 and S12 may be: after the dialing is successful, the CPE responds to the request of the application IP address sent by the client, and the current connection is performed.
  • the second logical network card of the enterprise-level client is in the same local area network as the network-side network card. Therefore, the broadcast request for the application IP address sent by the enterprise-level client reaches the network-side network card through the second logical network card, and then reaches the network side through the network-side network card. After receiving the request for the IP address, the network side allocates the public network IP address to the client, so that the CPE can assign the public network IP address to the client.
  • the first logical network card involved in this embodiment includes: a network cable network card and a wireless fidelity WIFI network card. That is to say, the WIFI user and the network cable user respectively access the CPE through the WIFI network card and the network cable, and the two network cards are mounted under the same bridge, and the client obtains the private IP address assigned by the CPE.
  • the private network IP address of the CPE is allocated to the client through the first logical network card, or the public network IP address is allocated to the client through the second logical network card.
  • the method in this embodiment further includes:
  • Step S21 When receiving a request sent by the client for switching the current preset mode, the triggering client accesses the web application user interface webUI of the CPE according to the private network IP address;
  • Step S22 After triggering the operation corresponding to the request on the webUI, restart the CPE.
  • the client only needs to access the CPE through the WIFI network card or insert the network port through the network cable to access the network port of the CPE internal network, perform corresponding operations on the webUI, and then the device automatically restarts to complete the mode switching, and saves the process.
  • the "traditional bridge mode" allows the client to access the CPE manually by specifying the IP address through the network cable to implement professional and cumbersome operations such as logging in to the CPE webUI.
  • the method in this embodiment further includes: selecting the first pre-selection from the plurality of preset modes. Set the mode to initialize. That is to say, after the CPE device is powered on, it needs to perform mode judgment, and perform different initialization work for different modes.
  • a device for allocating an Internet Protocol IP address is further provided, and the device is used to implement the foregoing.
  • the embodiments and optional embodiments have not been described again.
  • the term “module” "unit” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • the apparatus includes: a dividing module 22, configured to divide a physical network card inside a client equipment CPE into a first logic. a first preset mode of the network card and the second logical network card; the distribution module 24 is coupled to the partitioning module 22, and is configured to allocate the client by using the first bridge connected to the first logical network card when the client requests to access the CPE.
  • the private IP address of the CPE, or the public network IP address is assigned to the client through the second bridge connected to the second logical network card.
  • the distribution module 24 includes: a receiving unit 32, configured to receive a client for sending an application. The request of the network IP address; the allocating unit 34 is coupled to the receiving unit 32, and is configured to obtain the public network IP from the WAN side network card through the second bridge according to the request, and allocate the public network IP to the client through the second logical network card.
  • the first logical network card involved in this embodiment includes: a network cable and a wireless fidelity WIFI network card.
  • FIG. 4 is a block diagram 2 of an optional structure of an Internet Protocol IP address allocation apparatus according to an embodiment of the present invention.
  • a private network IP address of a CPE is allocated to a client through a first logical network card, or After the second logical network card allocates the public network IP address to the client, the device further includes: a triggering module 42 coupled to the distribution module 24, configured to receive the request sent by the client for switching the current preset mode by the client, The triggering client accesses the web application user interface webUI of the CPE according to the private network IP address; the restarting module 44 is coupled to the triggering module 42 and is configured to restart the CPE after triggering the operation corresponding to the request on the webUI.
  • the device further includes: selecting the first preset mode from the multiple preset modes. Initialize.
  • This alternative embodiment proposes a new mode "LTE-Bridge mode" for meeting the different needs of ordinary consumers and enterprise users, and at the same time being more user-friendly and better user experience in mode switching.
  • the LTE-Bridge mode must be able to provide access to the internal network resources (such as accessing the webUI) for other clients accessing the CPE while accessing the CPE to obtain access to the external network.
  • the CPE internal bridge structure diagram in 4G gateway mode needs to be modified;
  • FIG. 5 is a block diagram of a 4G gateway mode bridge in the related art: as shown in FIG. 5, after the CPE dials successfully, the module The IP address obtained by the public network base station (for example, 74.125.239.15) is allocated to the WAN side network card usb0 of the large board; the WIFI user and the network line user respectively access the CPE through the network card ra0 and eth2, and the two network cards ra0 and eth2 are mounted on the network card. Under the same bridge br0, the client obtains the private IP assigned by the CPE (for example, 192.168.0.100).
  • the public network base station for example, 74.125.239.15
  • the WIFI user and the network line user respectively access the CPE through the network card ra0 and eth2
  • the two network cards ra0 and eth2 are mounted on the network card.
  • the client obtains the private IP assigned by the CPE (for example, 192.168.0.100).
  • the private network IP packet arrives at br0, and the CPE performs NAT conversion internally, and converts the private IP address 192.168.0.100 into a public network IP address: 74.125.239.15 and then sends it to the external network, thereby realizing access to the network.
  • the bridge structure can only assign a private IP address to the client through the CPE. Because the public IP address on the network side cannot be assigned to the client, it does not meet the needs of enterprise users.
  • the bridge structure needs to be modified.
  • 6 is a block diagram of a CPE internal bridge structure in an LTE-Bridge mode according to an alternative embodiment of the present invention. As shown in FIG. 6 , a physical network eth2 is first divided into two logical NICs according to a port by using a VLAN technology. Eth2.1 and eth2.2, where eth2.1 is used to access clients that can access only the intranet resources of the CPE, and eth2.2 is used to access clients that can access external network resources.
  • Figure 6 retains the bridge in Figure 5 for accessing intranet resources.
  • the two network cards ra0 and eth2.1 mounted under br0 are used to access wifi users and network cable users to form a local area network.
  • FIG. 6 deletes the path between the bridge br0 and the wan side network card usb0, which means that the user accessing through ra0 and eth2.1 cannot access the external network resources and can only access the internals of the CPE.
  • Resources which meet the needs of some users to access intranet resources (such as: open webUI) at any time.
  • CPE equipment should be able to provide Internet access services to clients accessing CPE, especially for enterprise-level users accessing enterprise-level clients (such as Cisco routers).
  • Public network IP address so add a new bridge network card br1, mount the wan side network card usb0 and another network cable network card eth2.2 connected to the CPE to the same bridge br1, and then make eth2.2 and usb0 Make up another LAN.
  • the CPE module acts as the Dynamic Host Configuration Protocol (DHCP) server in the process of assigning IP addresses, and responds after receiving the request for the IP address sent by the client.
  • DHCP Dynamic Host Configuration Protocol
  • the network card eth2.2 and usb0 currently connected to the enterprise client are in the same local area network.
  • the broadcast request of the application IP sent by the enterprise client reaches the wan side network card usb0 via eth2.2, and then reaches the module through usb0, and the module receives the application IP.
  • the client is assigned a public network IP, so that the CPE can allocate the public IP address to the enterprise client. After obtaining the public IP address, the client can access the network and implement related applications of the enterprise router.
  • the client when the user wants to switch the CPE from the LTE-Bridge mode to another mode, the client only needs to access the CPE through the WIFI or insert the network cable through the network cable to access the network port of the CPE intranet (corresponding to eth2.2 in Figure 6).
  • NIC the corresponding operation is performed on the webUI, and then the device automatically restarts to complete the mode switching, eliminating the need for the "traditional bridge mode" to connect the client to the CPE manually designated IP through the network cable to realize the professional and cumbersome operation of logging in to the CPE webUI.
  • Step S202 Perform mode determination after the device is powered on, and perform different initialization operations for the LTE-Bridge mode and other modes (including 4G gateway mode, traditional bridge mode, etc.).
  • Step S204 For the LTE-bridge mode, the bridge configuration is performed as shown in FIG. 6 above. First, two bridge network cards br0 and br1 are configured, and two network cards ra0 and eth2.1 mounted under br0 are passed through the two. Users accessing the NIC can only access the internal resources of the CPE. Two NICs usb0 and eth2.2 are mounted on the br1. The usb0 is the CPE wan side network card. The client accessing the eth2.2 obtains the public network after the CPE dials successfully. The assigned IP address is used to access the Internet. The eth2.1 NIC corresponds to the LAN cable socket of the device enclosure, and the eth2.2 NIC corresponds to the LAN/WAN cable socket on the device enclosure.
  • Step S206 The CPE successfully dials, and the dialing action here is performed by the user accessing the CPE through the wifi or eth2.1 network card to log in to the webUI of the CPE.
  • Step S208 After the dialing is successful, for the LTE-Bridge mode, only the users accessing the eth2.2 network card can access the external network resources, and the users accessing through the WIFI and the users accessing the eth2.1 network card can only access the network. Intranet resources.
  • Step S210 If the user needs to complete the mode switching, only the client that can log in to the webUI logs in to the webUI to complete the mode switching, and the mode switching succeeds after the device restarts.
  • the purpose of allocating the public network IP to the client is achieved, which satisfies the needs of the enterprise user. That is, a network card and a CPE wan side network card are mounted on the same bridge to form a local area network, so that the client directly applies for IP to the CPE module and obtains the public network IP. 2) While allocating the public network IP to some clients, the private network IP can be allocated to other clients, which satisfies the purpose of other users accessing the CPE intranet resources; that is, the wifi network card and the network cable are attached.
  • the other bridge is formed under the same bridge, and the IP address of the bridge is configured as the gateway address of the CPE, which realizes the purpose of some users accessing the CPE intranet resources.
  • the client can access the intranet IP address allocated by the CPE through the wifi or network cable to access the CPE intranet, so as to log in to the webUI for mode switching. This circumvents the cumbersome operation of manually specifying an IP address in the traditional bridge mode, and the user experience is better.
  • a storage medium is further provided, where the software is stored in the storage medium.
  • the storage medium includes, but is not limited to, an optical disk, a floppy disk, a hard disk, a rewritable memory, and the like.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device for execution by the computing device and, in some cases, may be performed in a different order than herein.
  • the steps shown or described are either made separately into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
  • the physical network card inside the CPE is divided into the first logical network card and the second logical network card, and the two logical network cards are respectively allocated with the internal network IP address and the public network IP address for the client, thereby solving the problem.
  • some clients only access the public network resources, and other clients cannot access the problem source of the resources in the Router product, thereby improving the user experience.

Abstract

Provided in the present invention are an internet protocol (IP) address allocation method and device. The method comprises: dividing a physical network card in a customer premise equipment (CPE) into a first logic network card and a second logic network card as a first preset mode; when a client terminal requests access to the CPE, allocating a private network IP address of the CPE for a client terminal via a first network bridge connected to the first logic network card, or allocating a public network IP address to the client terminal via a second network bridge connected to the second logic network card. The present invention addresses a problem in related art in which, when a part of client terminals only accesses a public resource, the other client terminals cannot access a resource in a router product, thereby improving user experience.

Description

互联网协议IP地址的分配方法及装置Internet protocol IP address allocation method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种互联网协议IP地址的分配方法及装置。The present invention relates to the field of communications, and in particular to a method and an apparatus for allocating an IP address of an Internet Protocol.
背景技术Background technique
随着互联网的快速发展,尤其是3G/4G、无线局域网WLAN业务的快速发展与普及,用户端设备(Customer Premise EquIPment简称为CPE)设备作为一种较为便携式的通讯终端,能够为一个或多个用户提供网络接入的功能。对于普通用户来说,在CPE拨号成功并接入CPE获得分配的私网IP(如:192.168.0.100)后即可上网。对于企业级用户来说,需要在接入CPE后获得CPE拨号成功后网络侧分配的公网IP地址(如:74.125.239.15),而不是CPE分配的私网IP地址,进而实现企业级应用,此时CPE充当连接wan侧网卡与网线网卡的桥接。为了满足企业级用户的需要,传统的做法是将CPE当做一个HUB集线器使得接入CPE产品的客户端直接向固网申请IP地址,称此时的CPE处于“传统桥模式”状态。但是传统桥模式存在如下问题:所有接入CPE的客户端(包括部分非企业级用户)无法访问CPE内网资源,因为客户端获取的是公网分配的IP地址而非Router产品分配的IP地址,且Router产品此时不对数据包做处理。假设此时内网有一些视频资源可供访问,但是由于客户端获取的是公网IP地址,因此无法访问内网资源。从传统桥模式切换到其它模式需要手动指定IP地址等过于复杂的操作,用户体验不好。With the rapid development of the Internet, especially the rapid development and popularization of 3G/4G and WLAN services, the Customer Premise EquIPment (CPE) device is a relatively portable communication terminal capable of one or more Users provide network access. For ordinary users, after the CPE dials successfully and accesses the CPE to obtain the assigned private network IP (for example, 192.168.0.100), it can access the Internet. For enterprise users, you need to obtain the public IP address (such as 74.125.239.15) assigned by the network side after the CPE dials successfully after accessing the CPE, instead of the private IP address assigned by the CPE, so as to implement enterprise-level applications. At this time, the CPE acts as a bridge connecting the wan side network card and the network cable NIC. In order to meet the needs of enterprise users, the traditional approach is to use the CPE as a HUB hub so that the client accessing the CPE product can directly apply for an IP address to the fixed network, saying that the CPE is in the "traditional bridge mode" state. However, the traditional bridge mode has the following problem: all clients accessing the CPE (including some non-enterprise users) cannot access the CPE intranet resources because the client obtains the IP address assigned by the public network instead of the IP address assigned by the Router product. And the Router product does not process the data packet at this time. Assume that there are some video resources available for access on the intranet at this time. However, because the client obtains the public IP address, the intranet resources cannot be accessed. Switching from the traditional bridge mode to other modes requires manual assignment of an IP address and other complicated operations, and the user experience is not good.
针对相关技术中的上述问题,目前尚未提出有效的解决方案。In view of the above problems in the related art, an effective solution has not yet been proposed.
发明内容Summary of the invention
本发明实施例的主要目的在于提供一种互联网协议IP地址的分配方法及装置,以至少解决相关技术中部分客户端仅访问公网资源的同时其他客户端无法访问Router产品内的资源的问题源以及难以为客户端分配公网IP地址的问题。The main purpose of the embodiments of the present invention is to provide a method and a device for allocating Internet Protocol IP addresses, so as to at least solve the problem that some clients in the related art can only access public network resources while other clients cannot access resources in the Router product. And it is difficult to assign a public network IP address to the client.
根据本发明实施例的一个方面,提供了一种互联网协议IP地址的分配方法,包括:将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式;在客户端请求访问所述CPE时,通过与所述第一逻辑网卡连接的第一网桥为所述客户端分配所述CPE的私网IP地址,或,通过与所述第二逻辑网卡连接的第二网桥为所述客户端分配公网IP地址。 According to an aspect of the embodiments of the present invention, a method for allocating an Internet Protocol IP address is provided, including: dividing a physical network card inside a CPE of a user equipment into a first preset mode of a first logical network card and a second logical network card; When the client requests access to the CPE, the client is assigned a private network IP address of the CPE through a first bridge connected to the first logical network card, or is connected to the second logical network card by using a first bridge connected to the first logical network card. The second bridge allocates a public network IP address to the client.
可选地,所述第二网桥与广域网WAN侧网卡连接,通过与所述第二逻辑网卡连接的第二网桥为所述客户端分配公网IP地址包括:接收所述客户端发送的用于申请公网IP地址的请求;依据所述请求通过所述第二网桥从所述WAN侧网卡获取所述公网IP,并通过所述第二逻辑网卡分配给所述客户端。Optionally, the second bridge is connected to the WAN side network card of the WAN, and the public network IP address is allocated to the client by using the second bridge connected to the second logical network card, including: receiving, sent by the client a request for applying for a public network IP address; obtaining the public network IP from the WAN side network card by using the second bridge according to the request, and distributing the public network IP to the client by using the second logical network card.
可选地,所述第一逻辑网卡包括:网线网卡和无线保真WIFI网卡。Optionally, the first logical network card includes: a network cable network card and a wireless fidelity WIFI network card.
可选地,通过所述第一逻辑网卡为所述客户端分配所述CPE的私网IP地址,或,通过所述第二逻辑网卡为所述客户端分配公网IP地址之后,所述方法还包括:在接收到用户通过所述客户端发送的用于切换当前预设模式的请求时,触发所述客户端依据所述私网IP地址访问所述CPE的网页应用程序用户界面webUI;在所述webUI上触发执行与所述请求对应的操作后,重启所述CPE。Optionally, after the first logical network card allocates a private network IP address of the CPE to the client, or after the second logical network card allocates a public network IP address to the client, the method The method further includes: when receiving a request for the user to switch the current preset mode sent by the client, triggering, by the client, the web application user interface webUI of the CPE according to the private network IP address; After the operation corresponding to the request is triggered on the webUI, the CPE is restarted.
可选地,在将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式之前,所述方法还包括:从多种预设模式中选择所述第一预设模式进行初始化。Optionally, before the physical network card inside the CPE is divided into the first preset mode of the first logical network card and the second logical network card, the method further includes: selecting the first A preset mode is initialized.
根据本发明实施例的另一个方面,提供了一种互联网协议IP地址的分配装置,包括:划分模块,设置为将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式;分配模块,设置为在客户端请求访问所述CPE时,通过与所述第一逻辑网卡连接的第一网桥为所述客户端分配所述CPE的私网IP地址,或,通过与所述第二逻辑网卡连接的第二网桥为所述客户端分配公网IP地址。According to another aspect of the embodiments of the present invention, an apparatus for allocating an Internet Protocol IP address includes: a dividing module, configured to divide a physical network card inside the customer equipment CPE into a first logical network card and a second logical network card a first preset mode; an allocation module, configured to allocate, by the first bridge connected to the first logical network card, the private network IP address of the CPE to the client when the client requests access to the CPE, Or, the client is assigned a public network IP address by using a second bridge connected to the second logical network card.
可选地,所述分配模块包括:接收单元,设置为接收所述客户端发送的用于申请公网IP地址的请求;分配单元,设置为依据所述请求通过所述第二网桥从所述WAN侧网卡获取所述公网IP,并通过所述第二逻辑网卡分配给所述客户端。Optionally, the allocating module includes: a receiving unit, configured to receive a request sent by the client for applying for a public network IP address; and an allocating unit, configured to pass the second bridge according to the request The WAN side network card acquires the public network IP, and is allocated to the client by using the second logical network card.
可选地,所述第一逻辑网卡包括:网线网卡和无线保真WIFI网卡。Optionally, the first logical network card includes: a network cable network card and a wireless fidelity WIFI network card.
可选地,在通过所述第一逻辑网卡为所述客户端分配所述CPE的私网IP地址,或,通过所述第二逻辑网卡为所述客户端分配公网IP地址之后,所述装置还包括:触发模块,设置为在接收到用户通过所述客户端发送的用于切换当前预设模式的请求时,触发所述客户端依据所述私网IP地址访问所述CPE的网页应用程序用户界面webUI;重启模块,设置为在所述webUI上触发执行与所述请求对应的操作后,重启所述CPE。Optionally, after the private network IP address of the CPE is allocated to the client by using the first logical network card, or after the public network IP address is allocated to the client by using the second logical network card, The device further includes: a triggering module, configured to trigger the client to access the webpage application of the CPE according to the private network IP address when receiving a request for the user to switch the current preset mode sent by the client a program user interface webUI; a restarting module, configured to restart the CPE after triggering an operation corresponding to the request on the webUI.
可选地,在将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式之前,所述装置还包括:从多种预设模式中选择所述第一预设模式进行初始化。 Optionally, before the physical network card inside the CPE is divided into the first preset mode of the first logical network card and the second logical network card, the device further includes: selecting the first A preset mode is initialized.
通过本发明实施例,采用将CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡,通过这两个逻辑网卡分别与为客户端分配内网IP地址和公网IP地址,进而解决了相关技术中部分客户端仅访问公网资源的同时其他客户端无法访问Router产品内的资源的问题源的问题,提高了用户的体验效果。According to the embodiment of the present invention, the physical network card inside the CPE is divided into the first logical network card and the second logical network card, and the two logical network cards are respectively allocated with the internal network IP address and the public network IP address for the client, thereby solving the problem. In the related art, some clients only access the public network resources, and other clients cannot access the problem source of the resources in the Router product, thereby improving the user experience.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的互联网协议IP地址的分配方法的流程图;1 is a flowchart of a method for allocating an Internet Protocol IP address according to an embodiment of the present invention;
图2是根据本发明实施例的互联网协议IP地址的分配装置的结构框图;2 is a structural block diagram of an apparatus for allocating an Internet Protocol IP address according to an embodiment of the present invention;
图3是根据本发明实施例的互联网协议IP地址的分配装置的可选结构框图一;3 is a block diagram 1 of an optional structure of an Internet Protocol IP address allocation apparatus according to an embodiment of the present invention;
图4是根据本发明实施例的互联网协议IP地址的分配装置的可选结构框图二;4 is a block diagram 2 of an optional structure of an apparatus for allocating an Internet Protocol IP address according to an embodiment of the present invention;
图5相关技术中4G网关模式网桥结构框图;Figure 5 is a block diagram of a 4G gateway mode bridge in the related art;
图6是本发明可选实施例的LTE-Bridge模式下CPE内部网桥结构框图。FIG. 6 is a structural block diagram of a CPE internal bridge in an LTE-Bridge mode according to an alternative embodiment of the present invention.
具体实施方式detailed description
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The invention will be described in detail below with reference to the drawings in conjunction with the embodiments.
在本实施例中提供了一种互联网协议IP地址的分配方法,图1是根据本发明实施例的互联网协议IP地址的分配方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a method for allocating an Internet Protocol IP address is provided. FIG. 1 is a flowchart of a method for allocating an Internet Protocol IP address according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102:将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式;Step S102: The physical network card inside the CPE of the user equipment is divided into a first preset mode of the first logical network card and the second logical network card;
步骤S104:在客户端请求访问CPE时,通过与第一逻辑网卡连接的第一网桥为客户端分配CPE的私网IP地址,或,通过与第二逻辑网卡连接的第二网桥为客户端分配公网IP地址。Step S104: When the client requests access to the CPE, the client is assigned a private network IP address of the CPE through the first bridge connected to the first logical network card, or the second bridge connected to the second logical network card is used as the client. The end assigns a public network IP address.
通过本实施例步骤S102和步骤S104,采用将CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡,通过这两个逻辑网卡分别与为客户端分配内网IP地址和公网IP地址,同时解决了相关技术中部分客户端仅访问公网资源的同时其他客户端无法访问Router产品内的资源的问题源的问题,提高了用户的体验效果。 Through the steps S102 and S104 in this embodiment, the physical network card inside the CPE is divided into a first logical network card and a second logical network card, and the internal network IP address and the public network IP address are respectively assigned to the client through the two logical network cards. At the same time, it solves the problem that some clients in the related technology only access the public network resources while other clients cannot access the resources in the Router product, thereby improving the user experience.
对于本实施例中涉及到的第二网桥是与广域网WAN侧网卡连接的,因此,本实施例中步骤S104中的通过与第二逻辑网卡连接的第二网桥为客户端分配公网IP地址的方式可以通过如下方式来实现:The second bridge involved in the embodiment is connected to the WAN side network card of the wide area network. Therefore, the second bridge connected to the second logical network card in step S104 in this embodiment allocates a public network IP to the client. The way of the address can be achieved as follows:
步骤S11:接收客户端发送的用于申请公网IP地址的请求;Step S11: receiving a request sent by the client for applying for a public network IP address;
步骤S12:依据请求通过第二网桥从WAN侧网卡获取公网IP,并通过第二逻辑网卡分配给客户端。Step S12: Obtain a public network IP from the WAN side network card through the second bridge according to the request, and allocate the same to the client through the second logical network card.
在本实施例的一个应用场景中,上述步骤S11和步骤S12的方式,具体可以是:在拨号成功后,对于受到收到客户端发来的申请IP地址的请求后CPE做出回应,当前连接企业级客户端的网卡第二逻辑网卡与网络侧网卡处于同一个局域网,因此企业级客户端发出的申请IP地址的广播请求经由第二逻辑网卡到达网络侧网卡,再通过网络侧网卡到达网络侧,网络侧收到申请IP地址的请求后为客户端分配公网IP地址,从而实现CPE为客户端分配公网IP地址的目的。In an application scenario of the embodiment, the manner of the foregoing steps S11 and S12 may be: after the dialing is successful, the CPE responds to the request of the application IP address sent by the client, and the current connection is performed. The second logical network card of the enterprise-level client is in the same local area network as the network-side network card. Therefore, the broadcast request for the application IP address sent by the enterprise-level client reaches the network-side network card through the second logical network card, and then reaches the network side through the network-side network card. After receiving the request for the IP address, the network side allocates the public network IP address to the client, so that the CPE can assign the public network IP address to the client.
而在本实施例的另一个可选实施方式中,本实施例中涉及到的第一逻辑网卡包括:网线网卡和无线保真WIFI网卡。也就是说,WIFI用户、网线用户分别通过WIFI网卡、网线网卡接入CPE,两张网卡挂载在同一个网桥下,客户端获得CPE分配的私有IP地址。In another optional implementation manner of this embodiment, the first logical network card involved in this embodiment includes: a network cable network card and a wireless fidelity WIFI network card. That is to say, the WIFI user and the network cable user respectively access the CPE through the WIFI network card and the network cable, and the two network cards are mounted under the same bridge, and the client obtains the private IP address assigned by the CPE.
为了解决传统桥模式切换到其它模式很复杂的问题,在本实施例中的通过第一逻辑网卡为客户端分配CPE的私网IP地址,或,通过第二逻辑网卡为客户端分配公网IP地址之后,本实施例的方法还包括:In the embodiment, the private network IP address of the CPE is allocated to the client through the first logical network card, or the public network IP address is allocated to the client through the second logical network card. After the address, the method in this embodiment further includes:
步骤S21:在接收到用户通过客户端发送的用于切换当前预设模式的请求时,触发客户端依据私网IP地址访问CPE的网页应用程序用户界面webUI;Step S21: When receiving a request sent by the client for switching the current preset mode, the triggering client accesses the web application user interface webUI of the CPE according to the private network IP address;
步骤S22:在webUI上触发执行与请求对应的操作后,重启CPE。Step S22: After triggering the operation corresponding to the request on the webUI, restart the CPE.
通过上述步骤S21和步骤S22可知,只需要将客户端通过WIFI网卡接入CPE或通过网线网卡插入访问CPE内网的网口,在webUI上进行相应操作,然后设备自动重启完成模式切换,省去了“传统桥模式”将客户端通过网线接入CPE手动指定IP地址实现登陆CPE webUI等专业而繁琐的操作。Through the above steps S21 and S22, it is known that the client only needs to access the CPE through the WIFI network card or insert the network port through the network cable to access the network port of the CPE internal network, perform corresponding operations on the webUI, and then the device automatically restarts to complete the mode switching, and saves the process. The "traditional bridge mode" allows the client to access the CPE manually by specifying the IP address through the network cable to implement professional and cumbersome operations such as logging in to the CPE webUI.
此外,在将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式之前,本实施例的方法还包括:从多种预设模式中选择第一预设模式进行初始化。也就是说,CPE设备开机后需要进行模式判断,针对不同的模式进行不同的初始化工作。In addition, before the physical network card of the user equipment CPE is divided into the first preset mode of the first logical network card and the second logical network card, the method in this embodiment further includes: selecting the first pre-selection from the plurality of preset modes. Set the mode to initialize. That is to say, after the CPE device is powered on, it needs to perform mode judgment, and perform different initialization work for different modes.
在本实施例中还提供了一种互联网协议IP地址的分配装置,该装置用于实现上述 实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”“单元”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a device for allocating an Internet Protocol IP address is further provided, and the device is used to implement the foregoing. The embodiments and optional embodiments have not been described again. As used below, the term "module" "unit" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的互联网协议IP地址的分配装置的结构框图,如图2所示,该装置包括:划分模块22,设置为将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式;分配模块24,与划分模块22耦合连接,设置为在客户端请求访问CPE时,通过与第一逻辑网卡连接的第一网桥为客户端分配CPE的私网IP地址,或,通过与第二逻辑网卡连接的第二网桥为客户端分配公网IP地址。2 is a structural block diagram of an apparatus for allocating an Internet Protocol IP address according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes: a dividing module 22, configured to divide a physical network card inside a client equipment CPE into a first logic. a first preset mode of the network card and the second logical network card; the distribution module 24 is coupled to the partitioning module 22, and is configured to allocate the client by using the first bridge connected to the first logical network card when the client requests to access the CPE. The private IP address of the CPE, or the public network IP address is assigned to the client through the second bridge connected to the second logical network card.
图3是根据本发明实施例的互联网协议IP地址的分配装置的可选结构框图一,如图3所示,该分配模块24包括:接收单元32,设置为接收客户端发送的用于申请公网IP地址的请求;分配单元34,与接收单元32耦合连接,设置为依据请求通过第二网桥从WAN侧网卡获取公网IP,并通过第二逻辑网卡分配给客户端。3 is a block diagram of an optional structure of an Internet Protocol IP address allocation apparatus according to an embodiment of the present invention. As shown in FIG. 3, the distribution module 24 includes: a receiving unit 32, configured to receive a client for sending an application. The request of the network IP address; the allocating unit 34 is coupled to the receiving unit 32, and is configured to obtain the public network IP from the WAN side network card through the second bridge according to the request, and allocate the public network IP to the client through the second logical network card.
需要说明的是,本实施例中涉及到的第一逻辑网卡包括:网线网卡和无线保真WIFI网卡。It should be noted that the first logical network card involved in this embodiment includes: a network cable and a wireless fidelity WIFI network card.
图4是根据本发明实施例的互联网协议IP地址的分配装置的可选结构框图二,如图4所示,在通过第一逻辑网卡为客户端分配CPE的私网IP地址,或,通过第二逻辑网卡为客户端分配公网IP地址之后,装置还包括:触发模块42,与分配模块24耦合连接,设置为在接收到用户通过客户端发送的用于切换当前预设模式的请求时,触发客户端依据私网IP地址访问CPE的网页应用程序用户界面webUI;重启模块44,与触发模块42耦合连接,设置为在webUI上触发执行与请求对应的操作后,重启CPE。4 is a block diagram 2 of an optional structure of an Internet Protocol IP address allocation apparatus according to an embodiment of the present invention. As shown in FIG. 4, a private network IP address of a CPE is allocated to a client through a first logical network card, or After the second logical network card allocates the public network IP address to the client, the device further includes: a triggering module 42 coupled to the distribution module 24, configured to receive the request sent by the client for switching the current preset mode by the client, The triggering client accesses the web application user interface webUI of the CPE according to the private network IP address; the restarting module 44 is coupled to the triggering module 42 and is configured to restart the CPE after triggering the operation corresponding to the request on the webUI.
可选地,在将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式之前,装置还包括:从多种预设模式中选择第一预设模式进行初始化。Optionally, before the physical network card inside the CPE is divided into the first preset mode of the first logical network card and the second logical network card, the device further includes: selecting the first preset mode from the multiple preset modes. Initialize.
下面结合本发明的可选实施例对本发明进行举例说明;The invention is exemplified below in conjunction with an alternative embodiment of the invention;
本可选实施例提出了一种新的模式“LTE-Bridge模式”用于满足普通消费者、企业级用户的不同需求,同时在模式切换方面更加人性化、用户体验更好。This alternative embodiment proposes a new mode "LTE-Bridge mode" for meeting the different needs of ordinary consumers and enterprise users, and at the same time being more user-friendly and better user experience in mode switching.
LTE-Bridge模式要同时满足在部分网线用户接入CPE获得公网IP地址可以访问外网的情况下,仍然可以为其它接入CPE的客户端提供仅可以访问内网资源(如:访问webUI)的服务,此时需要对4G网关模式下CPE内部网桥结构图进行改造;The LTE-Bridge mode must be able to provide access to the internal network resources (such as accessing the webUI) for other clients accessing the CPE while accessing the CPE to obtain access to the external network. Service, at this time, the CPE internal bridge structure diagram in 4G gateway mode needs to be modified;
图5相关技术中4G网关模式网桥结构框图:如图5所示,CPE拨号成功后模块 将从公网基站获得的IP地址(如:74.125.239.15)分配给大板的WAN侧网卡usb0;WIFI用户、网线用户分别通过网卡ra0、eth2接入CPE,两张网卡ra0、eth2挂载在同一个网桥br0下,客户端获得CPE分配的私有IP(如:192.168.0.100)。用户访问外网时私网IP数据包到达br0,CPE内部进行NAT转换,将私有IP地址192.168.0.100转换成公网IP地址:74.125.239.15然后发送到外网,从而实现对网络的访问。FIG. 5 is a block diagram of a 4G gateway mode bridge in the related art: as shown in FIG. 5, after the CPE dials successfully, the module The IP address obtained by the public network base station (for example, 74.125.239.15) is allocated to the WAN side network card usb0 of the large board; the WIFI user and the network line user respectively access the CPE through the network card ra0 and eth2, and the two network cards ra0 and eth2 are mounted on the network card. Under the same bridge br0, the client obtains the private IP assigned by the CPE (for example, 192.168.0.100). When the user accesses the external network, the private network IP packet arrives at br0, and the CPE performs NAT conversion internally, and converts the private IP address 192.168.0.100 into a public network IP address: 74.125.239.15 and then sends it to the external network, thereby realizing access to the network.
这种网桥结构只能通过CPE为客户端分配私有IP地址,由于无法将网络侧的公网IP地址分配给客户端因此不满足企业级用户的需要,需要对网桥结构进行改造,如图6是本发明可选实施例的LTE-Bridge模式下CPE内部网桥结构框图,如图6所示,首先通过VLAN技术按照端口将物理上的一张网卡eth2划分为逻辑上的两张不同网卡eth2.1和eth2.2,其中eth2.1用于接入只能访问CPE内网资源的客户端,eth2.2用于接入可以访问外网资源的客户端。The bridge structure can only assign a private IP address to the client through the CPE. Because the public IP address on the network side cannot be assigned to the client, it does not meet the needs of enterprise users. The bridge structure needs to be modified. 6 is a block diagram of a CPE internal bridge structure in an LTE-Bridge mode according to an alternative embodiment of the present invention. As shown in FIG. 6 , a physical network eth2 is first divided into two logical NICs according to a port by using a VLAN technology. Eth2.1 and eth2.2, where eth2.1 is used to access clients that can access only the intranet resources of the CPE, and eth2.2 is used to access clients that can access external network resources.
图6保留了图5中br0这张用于访问内网资源的网桥,同时br0下挂载的两张网卡ra0、eth2.1分别用于接入wifi用户、网线用户,组成一个局域网。但是与图5不同的是图6删除了从网桥br0到wan侧网卡usb0之间的通路,这意味着通过ra0、eth2.1接入的用户无法访问外网资源,只能访问CPE的内部资源,这满足了部分用户随时可以访问内网资源(如:打开webUI)的需求。Figure 6 retains the bridge in Figure 5 for accessing intranet resources. At the same time, the two network cards ra0 and eth2.1 mounted under br0 are used to access wifi users and network cable users to form a local area network. However, unlike FIG. 5, FIG. 6 deletes the path between the bridge br0 and the wan side network card usb0, which means that the user accessing through ra0 and eth2.1 cannot access the external network resources and can only access the internals of the CPE. Resources, which meet the needs of some users to access intranet resources (such as: open webUI) at any time.
另一方面,CPE设备要能够为接入CPE的客户端提供上网服务,特别是对于企业级用户来说接入的企业级客户端(如:Cisco路由器)获得的是CPE拨号成功后基站分配的公网IP地址,因此新增加一张网桥网卡br1,将wan侧网卡usb0与连接到CPE的另外一张网线网卡eth2.2挂载到同一个网桥br1下,进而使得eth2.2与usb0组成另一个局域网。拨号成功后CPE的模块在分配IP过程中充当的是动态主机配置协议(Dynamic Host Configuration Protocol简称为DHCP)服务器的作用,在收到客户端发来的申请IP地址的请求后做出回应。当前连接企业级客户端的网卡eth2.2与usb0处于同一个局域网,因此企业级客户端发出的申请IP的广播请求经由eth2.2到达wan侧网卡usb0,再通过usb0到达模块,模块收到申请IP的请求后为客户端分配公网IP,从而实现CPE为企业级客户端分配公网IP地址的目的。客户端获得公网IP后既可以正常访问网络又可以实现企业级路由器的相关应用。On the other hand, CPE equipment should be able to provide Internet access services to clients accessing CPE, especially for enterprise-level users accessing enterprise-level clients (such as Cisco routers). Public network IP address, so add a new bridge network card br1, mount the wan side network card usb0 and another network cable network card eth2.2 connected to the CPE to the same bridge br1, and then make eth2.2 and usb0 Make up another LAN. After the dialup is successful, the CPE module acts as the Dynamic Host Configuration Protocol (DHCP) server in the process of assigning IP addresses, and responds after receiving the request for the IP address sent by the client. The network card eth2.2 and usb0 currently connected to the enterprise client are in the same local area network. Therefore, the broadcast request of the application IP sent by the enterprise client reaches the wan side network card usb0 via eth2.2, and then reaches the module through usb0, and the module receives the application IP. After the request is made, the client is assigned a public network IP, so that the CPE can allocate the public IP address to the enterprise client. After obtaining the public IP address, the client can access the network and implement related applications of the enterprise router.
另外,当用户希望将CPE由“LTE-Bridge模式”切换到其它模式时,只需要将客户端通过WIFI接入CPE或通过网线插入访问CPE内网的网口(对应图6中的eth2.2网卡),在webUI上进行相应操作,然后设备自动重启完成模式切换,省去了“传统桥模式”将客户端通过网线接入CPE手动指定IP实现登陆CPE webUI等专业而繁琐的操作。In addition, when the user wants to switch the CPE from the LTE-Bridge mode to another mode, the client only needs to access the CPE through the WIFI or insert the network cable through the network cable to access the network port of the CPE intranet (corresponding to eth2.2 in Figure 6). NIC), the corresponding operation is performed on the webUI, and then the device automatically restarts to complete the mode switching, eliminating the need for the "traditional bridge mode" to connect the client to the CPE manually designated IP through the network cable to realize the professional and cumbersome operation of logging in to the CPE webUI.
下面结合本可选实施例的通过桥接方式分配公网IP地址的方法步骤进行详细的 说明,该方法的步骤包括:The method steps of assigning a public network IP address by bridging in combination with the optional embodiment are described in detail below. Explain that the steps of the method include:
步骤S202:设备开机后进行模式判断,针对LTE-Bridge模式以及其它模式(包括4G网关模式、传统桥模式等)进行不同的初始化工作。Step S202: Perform mode determination after the device is powered on, and perform different initialization operations for the LTE-Bridge mode and other modes (including 4G gateway mode, traditional bridge mode, etc.).
需要说明的是,本可选实施例以LTE-Bridge模式进行详细论述,对其它模式不做具体论述。It should be noted that the present optional embodiment is discussed in detail in the LTE-Bridge mode, and other modes are not specifically discussed.
步骤S204:对于LTE-bridge模式则按照如上图6所示进行网桥配置,首先配置两张网桥网卡br0、br1,其中br0下挂载的两张网卡ra0、eth2.1,通过这两张网卡接入的用户只能访问CPE内部资源;br1下挂载两张网卡usb0、eth2.2,其中usb0是CPE wan侧网卡,通过eth2.2接入的客户端在CPE拨号成功后获得公网分配的IP地址进行上网。其中,eth2.1网卡对应设备外壳标注LAN的网线插口,eth2.2网卡对应设备外壳上标注LAN/WAN的网线插口。Step S204: For the LTE-bridge mode, the bridge configuration is performed as shown in FIG. 6 above. First, two bridge network cards br0 and br1 are configured, and two network cards ra0 and eth2.1 mounted under br0 are passed through the two. Users accessing the NIC can only access the internal resources of the CPE. Two NICs usb0 and eth2.2 are mounted on the br1. The usb0 is the CPE wan side network card. The client accessing the eth2.2 obtains the public network after the CPE dials successfully. The assigned IP address is used to access the Internet. The eth2.1 NIC corresponds to the LAN cable socket of the device enclosure, and the eth2.2 NIC corresponds to the LAN/WAN cable socket on the device enclosure.
步骤S206:CPE成功拨号,此处的拨号动作都是通过wifi或eth2.1网卡接入CPE的用户登陆到CPE的webUI完成。Step S206: The CPE successfully dials, and the dialing action here is performed by the user accessing the CPE through the wifi or eth2.1 network card to log in to the webUI of the CPE.
步骤S208:拨号成功后,对于LTE-Bridge模式来说,只有通过eth2.2网卡接入的用户可以访问外网资源,通过WIFI接入的用户以及通过eth2.1网卡接入的用户只能访问内网资源。Step S208: After the dialing is successful, for the LTE-Bridge mode, only the users accessing the eth2.2 network card can access the external network resources, and the users accessing through the WIFI and the users accessing the eth2.1 network card can only access the network. Intranet resources.
步骤S210:若用户需要完成模式切换则只需要通过可以登陆到webUI的客户端登陆到webUI即可完成模式切换,设备重启后模式切换成功。Step S210: If the user needs to complete the mode switching, only the client that can log in to the webUI logs in to the webUI to complete the mode switching, and the mode switching succeeds after the device restarts.
由上述本实施例采用的方式可知,1)实现了为客户端分配公网IP的目的,满足了企业级用户的需要。即通过将一张网卡与CPE wan侧网卡挂载在同一个网桥下组成一个局域网,从而达到客户端直接向CPE的模块申请IP并获得公网IP的目的。2)在实现为部分客户端分配公网IP的同时,可以为其它客户端分配私网IP,满足了其它用户访问CPE内网资源的目的;也即是,将wifi网卡与网线网卡挂载在同一个网桥下组成另外一个局域网,并将该网桥的IP地址配置为CPE的网关地址,实现了部分用户访问CPE内网资源的目的。3)不同模式之间的切换更加方便,用户体验更好。LTE-Bridge模式下,客户端可以通过wifi或网线接入CPE内网获得由CPE分配的内网IP,从而登陆webUI进行模式切换。这规避了传统桥模式下必须要通过手动指定IP地址等繁琐的操作,用户体验更好。According to the manner adopted by the foregoing embodiment, 1) the purpose of allocating the public network IP to the client is achieved, which satisfies the needs of the enterprise user. That is, a network card and a CPE wan side network card are mounted on the same bridge to form a local area network, so that the client directly applies for IP to the CPE module and obtains the public network IP. 2) While allocating the public network IP to some clients, the private network IP can be allocated to other clients, which satisfies the purpose of other users accessing the CPE intranet resources; that is, the wifi network card and the network cable are attached. The other bridge is formed under the same bridge, and the IP address of the bridge is configured as the gateway address of the CPE, which realizes the purpose of some users accessing the CPE intranet resources. 3) Switching between different modes is more convenient and the user experience is better. In LTE-Bridge mode, the client can access the intranet IP address allocated by the CPE through the wifi or network cable to access the CPE intranet, so as to log in to the webUI for mode switching. This circumvents the cumbersome operation of manually specifying an IP address in the traditional bridge mode, and the user experience is better.
在另外一个实施例中,还提供了一种软件,该软件用于执行上述实施例及可选实施方式中描述的技术方案。In another embodiment, software is also provided for performing the technical solutions described in the above embodiments and alternative embodiments.
在另外一个实施例中,还提供了一种存储介质,该存储介质中存储有上述软件, 该存储介质包括但不限于:光盘、软盘、硬盘、可擦写存储器等。In another embodiment, a storage medium is further provided, where the software is stored in the storage medium. The storage medium includes, but is not limited to, an optical disk, a floppy disk, a hard disk, a rewritable memory, and the like.
显然,本领域的技术人员应该明白,上述本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device for execution by the computing device and, in some cases, may be performed in a different order than herein. The steps shown or described are either made separately into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
上述仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above is only an alternative embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
通过本发明实施例,采用将CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡,通过这两个逻辑网卡分别与为客户端分配内网IP地址和公网IP地址,进而解决了相关技术中部分客户端仅访问公网资源的同时其他客户端无法访问Router产品内的资源的问题源的问题,提高了用户的体验效果。 According to the embodiment of the present invention, the physical network card inside the CPE is divided into the first logical network card and the second logical network card, and the two logical network cards are respectively allocated with the internal network IP address and the public network IP address for the client, thereby solving the problem. In the related art, some clients only access the public network resources, and other clients cannot access the problem source of the resources in the Router product, thereby improving the user experience.

Claims (10)

  1. 一种互联网协议IP地址的分配方法,包括:A method for allocating an IP address of an internet protocol, comprising:
    将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式;The physical network card inside the CPE of the user equipment is divided into a first preset mode of the first logical network card and the second logical network card;
    在客户端请求访问所述CPE时,通过与所述第一逻辑网卡连接的第一网桥为所述客户端分配所述CPE的私网IP地址,或,通过与所述第二逻辑网卡连接的第二网桥为所述客户端分配公网IP地址。When the client requests access to the CPE, the client is assigned a private network IP address of the CPE through a first bridge connected to the first logical network card, or is connected to the second logical network card by using a first bridge connected to the first logical network card. The second bridge allocates a public network IP address to the client.
  2. 根据权利要求1所述的方法,其中,所述第二网桥与广域网WAN侧网卡连接,通过与所述第二逻辑网卡连接的第二网桥为所述客户端分配公网IP地址包括:The method of claim 1, wherein the second bridge is connected to the WAN side network card of the wide area network, and the public network IP address is allocated to the client by the second bridge connected to the second logical network card.
    接收所述客户端发送的用于申请公网IP地址的请求;Receiving a request sent by the client for applying for a public network IP address;
    依据所述请求通过所述第二网桥从所述WAN侧网卡获取所述公网IP,并通过所述第二逻辑网卡分配给所述客户端。Obtaining the public network IP from the WAN side network card by using the second bridge according to the request, and distributing the public network IP to the client by using the second logical network card.
  3. 根据权利要求1所述的方法,其中,所述第一逻辑网卡包括:网线网卡和无线保真WIFI网卡。The method of claim 1, wherein the first logical network card comprises: a network cable network card and a wireless fidelity WIFI network card.
  4. 根据权利要求1所述的方法,其中,通过所述第一逻辑网卡为所述客户端分配所述CPE的私网IP地址,或,通过所述第二逻辑网卡为所述客户端分配公网IP地址之后,所述方法还包括:The method of claim 1, wherein the client is assigned a private network IP address of the CPE by using the first logical network card, or the public network is allocated to the client by using the second logical network card. After the IP address, the method further includes:
    在接收到用户通过所述客户端发送的用于切换当前预设模式的请求时,触发所述客户端依据所述私网IP地址访问所述CPE的网页应用程序用户界面webUI;Receiving, by the user, a request for switching the current preset mode sent by the client, the client is triggered to access the web application user interface webUI of the CPE according to the private network IP address;
    在所述webUI上触发执行与所述请求对应的操作后,重启所述CPE。After the operation corresponding to the request is triggered on the webUI, the CPE is restarted.
  5. 根据权利要求1所述的方法,其中,在将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式之前,所述方法还包括:The method of claim 1, wherein before the dividing the physical network card of the user equipment CPE into the first preset mode of the first logical network card and the second logical network card, the method further comprises:
    从多种预设模式中选择所述第一预设模式进行初始化。The first preset mode is selected from a plurality of preset modes for initialization.
  6. 一种互联网协议IP地址的分配装置,包括:A device for allocating an IP address of an internet protocol, comprising:
    划分模块,设置为将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式;a dividing module, configured to divide the physical network card inside the CPE of the customer equipment into a first preset mode of the first logical network card and the second logical network card;
    分配模块,设置为在客户端请求访问所述CPE时,通过与所述第一逻辑网卡连接的第一网桥为所述客户端分配所述CPE的私网IP地址,或,通过与所述第二逻辑网卡连接的第二网桥为所述客户端分配公网IP地址。 An allocation module, configured to allocate, by the first bridge connected to the first logical network card, the private network IP address of the CPE to the client when the client requests to access the CPE, or The second bridge connected to the second logical network card allocates a public network IP address to the client.
  7. 根据权利要求6所述的装置,其中,所述第二网桥与广域网WAN侧网卡连接,所述分配模块包括:The device of claim 6, wherein the second bridge is connected to a WAN side network card of the wide area network, and the distribution module comprises:
    接收单元,设置为接收所述客户端发送的用于申请公网IP地址的请求;a receiving unit, configured to receive a request sent by the client for applying for a public network IP address;
    分配单元,设置为依据所述请求通过所述第二网桥从所述WAN侧网卡获取所述公网IP,并通过所述第二逻辑网卡分配给所述客户端。And an allocating unit, configured to acquire the public network IP from the WAN side network card by using the second bridge according to the request, and allocate the public network IP to the client by using the second logical network card.
  8. 根据权利要求6所述的装置,其中,所述第一逻辑网卡包括:网线网卡和无线保真WIFI网卡。The apparatus of claim 6, wherein the first logical network card comprises: a network cable network card and a wireless fidelity WIFI network card.
  9. 根据权利要求6所述的装置,其中,在通过所述第一逻辑网卡为所述客户端分配所述CPE的私网IP地址,或,通过所述第二逻辑网卡为所述客户端分配公网IP地址之后,所述装置还包括:The apparatus according to claim 6, wherein the private network IP address of the CPE is allocated to the client by the first logical network card, or the public is allocated to the client by the second logical network card After the network IP address, the device further includes:
    触发模块,设置为在接收到用户通过所述客户端发送的用于切换当前预设模式的请求时,触发所述客户端依据所述私网IP地址访问所述CPE的网页应用程序用户界面webUI;a triggering module, configured to trigger the client to access the web application web UI of the CPE according to the private network IP address when receiving a request for the user to switch the current preset mode sent by the client ;
    重启模块,设置为在所述webUI上触发执行与所述请求对应的操作后,重启所述CPE。And restarting the module, configured to restart the CPE after triggering an operation corresponding to the request on the webUI.
  10. 根据权利要求6所述的装置,其中,在将用户端设备CPE内部的物理网卡划分为第一逻辑网卡和第二逻辑网卡的第一预设模式之前,所述装置还包括:The device of claim 6, wherein before the dividing the physical network card of the user equipment CPE into the first preset mode of the first logical network card and the second logical network card, the device further comprises:
    从多种预设模式中选择所述第一预设模式进行初始化。 The first preset mode is selected from a plurality of preset modes for initialization.
PCT/CN2015/091292 2015-05-12 2015-09-30 Internet protocol ip address allocation method and device WO2016179950A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510240915.4A CN106302839B (en) 2015-05-12 2015-05-12 Internet protocol IP address allocation method and device
CN201510240915.4 2015-05-12

Publications (1)

Publication Number Publication Date
WO2016179950A1 true WO2016179950A1 (en) 2016-11-17

Family

ID=57247656

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/091292 WO2016179950A1 (en) 2015-05-12 2015-09-30 Internet protocol ip address allocation method and device

Country Status (2)

Country Link
CN (1) CN106302839B (en)
WO (1) WO2016179950A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261165A (en) * 2020-09-10 2021-01-22 深圳市广和通无线股份有限公司 Communication method, system, apparatus, computer device and storage medium
CN112565357A (en) * 2020-11-25 2021-03-26 中国银联股份有限公司 Method, device and storage medium for connecting service virtual machine and object storage system
CN113301179A (en) * 2021-04-28 2021-08-24 武汉大塔技术有限公司 Method for realizing LTE/5G bridge mode and wireless routing equipment
CN113873503A (en) * 2021-11-08 2021-12-31 深圳市共进电子股份有限公司 Gateway bridging networking method, device and router
CN115529221A (en) * 2022-08-15 2022-12-27 广州通则康威智能科技有限公司 Method and device for fast switching between wired network and cellular network

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108696546B (en) * 2017-02-15 2021-08-24 中兴通讯股份有限公司 Method and device for accessing public network by user terminal of enterprise mobile private network
CN108737585B (en) * 2017-04-19 2022-04-19 中兴通讯股份有限公司 IP address allocation method and device
CN110505316B (en) * 2018-05-17 2022-03-01 中兴通讯股份有限公司 Internet protocol IP address allocation method and wireless routing equipment
CN110572817B (en) * 2019-07-30 2021-01-12 华为技术有限公司 Communication method and electronic equipment
CN111786826A (en) * 2020-06-29 2020-10-16 杭州安恒信息技术股份有限公司 Industrial control equipment operation and maintenance auditing system, industrial control equipment operation and maintenance method and computer equipment
CN117411650A (en) * 2022-07-08 2024-01-16 中兴通讯股份有限公司 Network access control method, user terminal device and storage medium
CN115412428B (en) * 2022-08-04 2023-09-12 广州通则康威智能科技有限公司 Hot backup method and device between mobile cellular network and wired network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106611A (en) * 2007-07-26 2008-01-16 北京佳讯飞鸿电气股份有限公司 Voip inter-network switching system based on H323 protocol
CN103747115A (en) * 2013-12-30 2014-04-23 武汉邮电科学研究院 Method of discovering IP (Internet Protocol) address of virtual machine based on virtual network interface card
CN104407913A (en) * 2014-11-12 2015-03-11 国云科技股份有限公司 Method for implementing two-wire access through virtual machine with single network card

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1192552C (en) * 2001-09-16 2005-03-09 华为技术有限公司 Combined address resolving scheme and combined address route device thereof
EP2051473B1 (en) * 2007-10-19 2018-04-25 Deutsche Telekom AG Method and system to trace the ip traffic back to the sender or receiver of user data in public wireless networks
CN103731308A (en) * 2013-12-29 2014-04-16 国云科技股份有限公司 Virtual machine public network management method
CN104581419B (en) * 2014-12-29 2018-08-21 成都卓影科技有限公司 Double net implementation methods based on android Intelligent set top boxes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106611A (en) * 2007-07-26 2008-01-16 北京佳讯飞鸿电气股份有限公司 Voip inter-network switching system based on H323 protocol
CN103747115A (en) * 2013-12-30 2014-04-23 武汉邮电科学研究院 Method of discovering IP (Internet Protocol) address of virtual machine based on virtual network interface card
CN104407913A (en) * 2014-11-12 2015-03-11 国云科技股份有限公司 Method for implementing two-wire access through virtual machine with single network card

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261165A (en) * 2020-09-10 2021-01-22 深圳市广和通无线股份有限公司 Communication method, system, apparatus, computer device and storage medium
CN112261165B (en) * 2020-09-10 2023-05-05 深圳市广和通无线股份有限公司 Communication method, system, device, computer equipment and storage medium
CN112565357A (en) * 2020-11-25 2021-03-26 中国银联股份有限公司 Method, device and storage medium for connecting service virtual machine and object storage system
CN113301179A (en) * 2021-04-28 2021-08-24 武汉大塔技术有限公司 Method for realizing LTE/5G bridge mode and wireless routing equipment
CN113873503A (en) * 2021-11-08 2021-12-31 深圳市共进电子股份有限公司 Gateway bridging networking method, device and router
CN113873503B (en) * 2021-11-08 2023-12-15 深圳市共进电子股份有限公司 Gateway bridging networking method, device and router
CN115529221A (en) * 2022-08-15 2022-12-27 广州通则康威智能科技有限公司 Method and device for fast switching between wired network and cellular network
CN115529221B (en) * 2022-08-15 2023-08-15 广州通则康威智能科技有限公司 Method and device for fast switching between wired network and cellular network

Also Published As

Publication number Publication date
CN106302839B (en) 2020-06-26
CN106302839A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
WO2016179950A1 (en) Internet protocol ip address allocation method and device
US9210124B2 (en) Method, apparatus, and system for allocating public IP address
CN106464534B (en) Sheet for provisioning and managing customer premises equipment devices
WO2019218865A1 (en) Internet protocol address allocation method, wireless routing device, and storage medium
WO2018192179A1 (en) Ip address allocation method and device
WO2018113591A1 (en) Scheduling method, system, controller and computer storage medium
US10104134B2 (en) Automatic configuration of endpoint communication devices to set up a VOIP network
WO2017166936A1 (en) Method and device for implementing address management, and aaa server and sdn controller
WO2011059770A2 (en) Smart client routing
WO2015192563A1 (en) Method and device for implementing load balancing and load balancing service system
WO2018019299A1 (en) Virtual broadband access method, controller, and system
TW201517563A (en) Could gateway establishing and configuring system and method
WO2019080320A1 (en) Multi-system network interconnection device, method and apparatus
US20180183754A1 (en) Address Allocation
WO2018006704A1 (en) Public network ip allocation method and apparatus, and virtual data center system
CN110995886A (en) Network address management method, device, electronic equipment and medium
US20210321253A1 (en) Virtual tenant for multiple dwelling unit
WO2015184853A1 (en) Authentication method and apparatus for ipv6 stateless auto-configuration
WO2011095079A1 (en) Method, device and system for allocating ip address
CN104780229A (en) Method of setting cloud server IP address through cloud terminal, system and cloud system
CN104506368A (en) Method and equipment for managing switchboard equipment in unified manner
WO2017206575A1 (en) Communication protocol access method, apparatus and system
WO2016177185A1 (en) Method and apparatus for processing media access control (mac) address
WO2024000975A1 (en) Session establishment system and method, electronic device, and storage medium
US20130086259A1 (en) Method for acquiring an ip address and network access device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15891652

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15891652

Country of ref document: EP

Kind code of ref document: A1