A campus network login method and device based on cloud gateway

Through the campus network login method based on cloud gateway, the traffic packets of the terminal and the IP address of the portal authentication server are redirected, which solves the security risks of campus network servers in the existing technology, and achieves the effect of security management and resource utilization reduction .

CN118713937BActive Publication Date: 2024-11-26WUHAN ZHIYUN INFINITE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411201013.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-26
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

In the prior art, the website address of the campus network authentication page is transparent, resulting in a major security risk on the server and is prone to attack by the outside world.

Method used

Using the campus network login method based on cloud gateway, by receiving the terminal's traffic messages, determine whether the terminal has logged in, and redirects the traffic messages to the portal authentication server of the campus network, hide the IP address of the portal authentication server to ensure its security. .

Benefits of technology

The real IP address of the portal authentication server is effectively hidden, reducing the risk of network attacks, and reducing network resource usage through the reuse of cloud gateways, realizing the management and security of campus network login.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118713937B_ABST
    Figure CN118713937B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of Internet technology, and provides a campus network login method and device based on a cloud gateway, the method comprising: judging whether the terminal is a logged-in terminal according to a login information table item and the MAC address; redirecting the traffic message to a portal authentication server of the campus network, so that a portal authentication page is displayed on the terminal, which is convenient for a user to log in to the terminal on the portal authentication page, and after the user successfully logs in, the portal authentication server returns an authentication success message to the cloud gateway; if it is judged that the terminal is a logged-in terminal, the traffic message is released, so that the terminal uses the traffic message to access network resources. The present invention intercepts the traffic message through a cloud gateway, and redirects it, thereby hiding the IP address of the portal authentication server, thereby ensuring the security of the portal authentication server and reducing the risk of being attacked by the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a campus network login method and device based on a cloud gateway. Background Art

[0002] Campus network is a network service solution that provides high-speed broadband access to schools and other related organizations. The use of campus network is similar to home broadband, both of which are achieved by logging into broadband access services to connect to the Internet.

[0003] Operators provide campus network services to students and make profits by charging a certain fee. In the prior art, campus network login is often done by users opening a specific web page (i.e., authentication page). After logging in on the authentication page, the campus network can be used. However, this method directly exposes the URL of the authentication page (including domain name and IP address) to the user. In this implementation method, since the URL of the authentication page is transparent, the outside world can use the URL to attack the server where the authentication page is located, resulting in a major security risk to the server where the authentication page is located.

[0004] In view of this, overcoming the defects of the prior art is an urgent problem to be solved in the field of this technology. Summary of the invention

[0005] The technical problem to be solved by the present invention is that in the prior art, the URL of the authentication page is transparent, which leads to security risks in the server where the authentication page is located.

[0006] The present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a campus network login method based on a cloud gateway, comprising:

[0008] The cloud gateway receives a traffic message from the terminal; wherein the traffic message carries the MAC address of the terminal;

[0009] Determine whether the terminal is a logged-in terminal according to the login information table entry and the MAC address;

[0010] If it is determined that the terminal is not logged in, the traffic message is redirected to the portal authentication server of the campus network, so that the portal authentication page is displayed on the terminal, which is convenient for the user to log in to the terminal on the portal authentication page. After the user logs in successfully, the portal authentication server returns an authentication success message to the cloud gateway;

[0011] The cloud gateway also receives an authentication success message from the portal authentication server, and adds the MAC address of the terminal to the login information table item according to the authentication success message, so that when a traffic message is subsequently received from the terminal, the terminal can be identified as a logged-in terminal;

[0012] If it is determined that the terminal is a logged-in terminal, the traffic message is released so that the terminal can use the traffic message to access network resources.

[0013] Preferably, the traffic message includes a DNS request and / or a transmission message; wherein the transmission message is an http message or an https message;

[0014] The redirecting of the traffic message to the portal authentication server of the campus network specifically includes:

[0015] When the traffic message is a DNS request, returning the cloud gateway IP address to the terminal so that the terminal uses the cloud gateway IP address as the destination address to send the first transmission message;

[0016] When the traffic message is the first transmission message, the destination address of the first transmission message is updated to the IP address of the portal authentication server, and the source address of the first transmission message is updated to the NAT address of the corresponding campus network, a second transmission message is generated, and the second transmission message is transmitted to the portal authentication server.

[0017] Preferably, the traffic message also carries QinQ information; the NAT address of the corresponding campus network is obtained according to the QinQ information, specifically including:

[0018] Determine whether the terminal is within the school range according to the QinQ information;

[0019] If it is determined that the terminal is located within the school, a NAT address is taken from the school's NAT address pool as the NAT address of the campus network.

[0020] Preferably, the cloud gateway stores a school information table item, wherein the school information table item includes QinQ information of each campus of the school; and determining whether the terminal is located within the school range according to the QinQ information specifically includes:

[0021] Determining whether the QinQ information has been stored in the school information table item;

[0022] If the QinQ information has been stored in the school information table item, it is determined that the terminal is located within the school.

[0023] Preferably, the login information table item includes a plurality of table item information, each table item information includes a MAC address and a last login time; and judging whether the terminal is a logged-in terminal according to the login information table item and the MAC address specifically includes:

[0024] Determine whether the MAC address carried in the traffic message meets a preset condition. If the preset condition is met, determine that the terminal is a logged-in terminal; wherein the preset condition is: the MAC address carried in the traffic message is stored in the login information table item, and the time difference between the last login time in the table item information where the MAC address is located and the current time is less than the preset time difference.

[0025] Preferably, the method further comprises:

[0026] Receive an authentication expiration message from a campus network management server, and search for first table item information in the login information table item according to the first MAC address in the authentication expiration message;

[0027] If the first table entry information exists, the first table entry information is deleted; wherein the first table entry information is the table entry information carrying the first MAC address.

[0028] In a second aspect, this embodiment further provides a campus network login method based on a cloud gateway, including:

[0029] Monitor the authentication information of each user, and when it is detected that the authentication of the first user has expired, send an authentication expiration message to the cloud gateway of the school; wherein the authentication expiration message carries the MAC information of all terminals that the first user has logged in to historically, so that the cloud gateway can delete the corresponding table entry information according to the authentication expiration message.

[0030] In a third aspect, the present invention further provides a campus network login device based on a cloud gateway, which is used to implement the campus network login method based on a cloud gateway described in the first aspect, and the device includes:

[0031] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to execute the cloud gateway-based campus network login method described in the first aspect.

[0032] In a fourth aspect, the present invention further provides a campus network login device based on a cloud gateway, which is used to implement the campus network login method based on a cloud gateway described in the second aspect, and the device includes:

[0033] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to execute the cloud gateway-based campus network login method described in the second aspect.

[0034] In a fifth aspect, the present invention further provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, which are executed by one or more processors to complete the method described in the first aspect and / or the method described in the second aspect.

[0035] In a sixth aspect, a chip is provided, comprising: a processor and an interface, for calling and running a computer program stored in the memory from a memory, and executing the method as described in the first aspect to the second aspect and any one of them.

[0036] In a seventh aspect, a computer program product comprising instructions is provided, which, when executed on a computer or a processor, causes the computer or the processor to execute a method as in the first to sixth aspects and any one of the methods.

[0037] In the eighth aspect, a cloud gateway-based campus network login system is provided, including a cloud gateway-based campus network login device as in the third aspect and a cloud gateway-based campus network login device as in the fourth aspect, and each of the cloud gateway-based campus network login method as in the first aspect and the cloud gateway-based campus network login method as in the second aspect are used respectively to complete the interaction between the cloud gateway-based campus network login device as in the third aspect and the cloud gateway-based campus network login device as in the fourth aspect.

[0038] The present invention intercepts traffic messages through a cloud gateway and redirects them. On the one hand, it can realize the management of campus network login, and on the other hand, it hides the IP address of the portal authentication server, thereby not exposing the real IP address of the core server, ensuring the security of the portal authentication server, and reducing the risk of network attacks. In addition, by multiplexing the cloud gateway to perform the redirection function, it can reduce network resource occupation. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0041] Figure 2 It is a schematic diagram of a login information table item in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0042] Figure 3 It is a network architecture diagram of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0043] Figure 4 It is a schematic diagram of the interaction between a terminal and a cloud gateway in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0044] Figure 5 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0045] Figure 6 It is a schematic diagram of the interaction among a terminal, a cloud gateway and a portal authentication server in a cloud gateway-based campus network login method provided in an embodiment of the present invention;

[0046] Figure 7 It is a schematic diagram of message information interacting among a terminal, a cloud gateway and a portal authentication server in a cloud gateway-based campus network login method provided in an embodiment of the present invention;

[0047] Figure 8 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0048] Fig. 9 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0049] Fig.10 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0050] Fig.11 It is a network architecture diagram of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0051] Fig.12 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0052] Fig.13 It is a schematic diagram of message information interacting among a terminal, a cloud gateway and a portal authentication server in a cloud gateway-based campus network login method provided in an embodiment of the present invention;

[0053] Fig.14It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0054] Fig.15 It is a schematic diagram of a school information table item in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0055] Fig.16 It is a schematic diagram of a login information table item in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0056] Fig.17 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0057] Fig.18 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0058] Fig.19 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0059] Fig. 20 It is a schematic diagram of a first roaming entry in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0060] Fig.21 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0061] Fig. 22 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0062] Fig.23 It is a schematic diagram of a login information table item in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0063] Fig.24 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0064] Fig.25 It is a schematic diagram of a school option interface in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0065] Fig.26 It is a network architecture diagram of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0066] Fig. 27 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0067] Fig.28 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0068] Fig.29 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0069] Fig.30 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0070] Fig.31 It is a network architecture diagram of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0071] Fig.32 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0072] Fig.33 It is a network architecture diagram of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0073] Fig.34 It is a flow chart of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0074] Fig.35 It is a schematic diagram of PPPoE+ information in a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0075] Fig.36 It is a schematic diagram of traffic flow in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0076] Fig.37 It is a schematic diagram of traffic flow in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0077] Fig.38 It is a schematic diagram of traffic flow in a campus network login method based on a cloud gateway provided in an embodiment of the present invention;

[0078] Fig.39 It is a scenario diagram of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0079] Fig.40 It is a scenario diagram of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0080] Fig.41 It is a scenario diagram of a campus network login method based on a cloud gateway provided by an embodiment of the present invention;

[0081] Fig.42 It is a schematic diagram of the architecture of a campus network login device based on a cloud gateway provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0083] Unless the context requires otherwise, throughout the specification and claims, the term "including" is to be interpreted as open inclusion, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "examples", "specific examples" or "some examples" and the like are intended to indicate that specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner, that is, although they may be carried in the embodiments or examples of the above terms due to reasons such as the order and position of appearance, it is not limited to that they can be carried in combination by one embodiment or example.

[0084] In the description of the present invention, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "multiple" is two or more. In addition, for example, the same type of nouns may be described as two independent individuals by adding "A" and "B" at the end. In this case, the corresponding features defined as "A" and "B" are only used to distinguish the same type of individuals for description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.

[0085] In the description of the present invention, the expression "A and / or B" (where A and B are used to formally represent specific characteristic contents) is involved, and the corresponding expressions include the following three combinations: only A, only B, and a combination of A and B.

[0086] As used herein, "about," "substantially," or "approximately" includes the stated value and an average value that is within an acceptable range of deviation from the particular value as determined by one of ordinary skill in the art taking into account the measurements in question and the errors associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).

[0087] In order to make the technical solution of the present invention more clear, some terms used in the present invention are explained here:

[0088] QinQ is a Layer 2 VPN technology that encapsulates the user's private network message with an outer VLAN tag (Tag) on ​​the edge device of the operator's network, so that the message carries two layers of VLAN tags through the operator's backbone network (public network). The network equipment in the public network only forwards the message according to the outer VLAN tag, and learns the source MAC address table of the message into the MAC address table of the VLAN where the outer tag is located, while the user's private network VLAN tag will be transmitted as the data part of the message during the transmission process.

[0089] MAC address is the media access control address, also known as the physical address or hardware address, which is used to define the location of a network device. In a local area network, each network device has a unique MAC address, which is used to identify the location of the network device in the network.

[0090] NAT stands for "Network Address Translation" in English, which means "Network Address Translation" in Chinese. It is an IETF (Internet Engineering Task Force) standard that allows an entire organization to appear on the Internet with a public IP (Internet Protocol) address. As the name suggests, it is a technology that translates internal private network addresses (IP addresses) into legal network IP addresses. Therefore, we can believe that NAT can effectively solve the problem of insufficient public network addresses to a certain extent.

[0091] SRv6 stands for "Segment Routing IPv6", which is an SR network architecture based on IPv6 data plane forwarding.

[0092] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0093] Embodiment 1:

[0094] Embodiment 1 of the present invention provides a campus network login method based on a cloud gateway, such as Figure 1As shown, including:

[0095] In step 201, the cloud gateway receives a traffic message from a terminal; wherein the traffic message carries a MAC address of the terminal; wherein the traffic message includes a DNS request for obtaining an IP address, and an http / https message for obtaining network resources.

[0096] It should be noted here that the receiving of traffic messages from the terminal actually refers to the initial source of the message being the terminal. However, during the transmission process, the message sent by the terminal will pass through one or more network devices before reaching the cloud gateway. During the transmission process, the structure of the message may also change. For example, when the message sent by the terminal passes through the QinQ switch, the QinQ switch will add a double-layer VLAN to the message.

[0097] The cloud gateway is often also connected to a cloud gateway management platform. The cloud gateway can be understood as a network device, such as a switch. In actual use, multiple network devices may be used as a cloud gateway. At this time, the method described in this embodiment may be executed by one of the network devices contained therein, or multiple network devices may coordinate with each other to complete the method described in this embodiment.

[0098] In step 202, it is determined whether the terminal is a logged-in terminal according to the login information table item and the MAC address; wherein the login information table item is stored in the cloud gateway, and the login information table item stores the MAC address of the logged-in terminal, such as Figure 2 shown.

[0099] In step 203, if it is determined that the terminal is not logged in, the traffic message is redirected to the portal authentication server of the campus network, so that the portal authentication page is displayed on the terminal, which is convenient for the user to log in to the terminal on the portal authentication page. After the user logs in successfully, the portal authentication server returns an authentication success message to the cloud gateway; the portal resource can be understood as the web resource of the portal authentication page. Figure 3As shown, the cloud gateway is connected to the portal authentication server through the network, so that the cloud gateway can obtain portal resources from the portal authentication server and return the portal resources to the terminal. It should be noted that the redirection refers to transmitting the traffic message to the portal authentication server in the form of a proxy, and still transmitting the response message of the portal authentication server to the terminal in the form of a proxy. In this process, the portal authentication server is invisible to the terminal. For the terminal itself, the object of its interaction is the cloud gateway. It is precisely because of the redirection of the cloud gateway that the IP address of the portal authentication server is hidden from the terminal, thereby improving security.

[0100] In step 204, the cloud gateway also receives an authentication success message from the portal authentication server, and adds the MAC address of the terminal to the login information table item according to the authentication success message, so that when a traffic message is subsequently received from the terminal, the terminal can be identified as a logged-in terminal; the authentication success message includes at least the MAC address of the terminal.

[0101] In step 205, if it is determined that the terminal is a logged-in terminal, the traffic message is released so that the terminal can use the traffic message to access network resources. The traffic message includes DNS request and http / https request message, such as Figure 4 As shown, after receiving the DNS request from the terminal, the cloud gateway searches the DNS server to obtain the IP address of the domain name carried in the DNS request, and returns the IP address to the terminal through the DNS response. The terminal directly obtains network resources through the IP address.

[0102] This embodiment intercepts traffic messages through the cloud gateway and redirects them. On the one hand, it can realize the management of campus network login, and on the other hand, it hides the IP address of the portal authentication server, thereby not exposing the real IP address of the core server (i.e., the portal authentication server), ensuring the security of the portal authentication server, and reducing the risk of network attacks. In addition, by reusing the cloud gateway to perform the redirection function, it can reduce network resource usage.

[0103] In most cases, the terminal accesses network resources through the Domain Name System (DNS), that is, the user enters the corresponding URL into the terminal browser, which is the domain name. At this time, the browser will first request the DNS server, so that the DNS server returns the IP address corresponding to the domain name, and then the http / https message can be exchanged through the IP address, so as to access the network resources of the IP address. That is, in the actual application scenario, the traffic message includes DNS request and / or transmission message; wherein, the transmission message is an http message or an https message.

[0104] The traffic message is redirected to the portal authentication server of the campus network, such as Figure 5 As shown, specifically including:

[0105] In step 301, when the traffic message is a DNS request, the cloud gateway IP address is returned to the terminal so that the terminal uses the cloud gateway IP address as the destination address to send a first transmission message.

[0106] In step 302, when the traffic message is the first transmission message, the destination address of the first transmission message is updated to the IP address of the portal authentication server, and the source address of the first transmission message is updated to the NAT address of the corresponding campus network, a second transmission message is generated, and the second transmission message is transmitted to the portal authentication server.

[0107] The first transmission message and the second transmission message are both http / https request messages, where "first" and "second" are used to refer to different transmission stages. The overall interaction process is as follows: Figure 6 and Figure 7 As shown, after receiving the second transmission message, the portal authentication server verifies that the message comes from a terminal within the school based on the NAT address in the second transmission message, and then returns the portal resource to the cloud gateway in a response message, which is then returned to the terminal by the cloud gateway in an HTTP / HTTPS response message.

[0108] The traffic message also carries QinQ information; the NAT address of the corresponding campus network is obtained based on the QinQ information, such as Figure 8 As shown, specifically including:

[0109] In step 401, it is determined whether the terminal is located within the school scope according to the QinQ information; a campus has unique QinQ information, which is pre-allocated by the operator in the QinQ switch of the campus. The message sent by the terminal to the cloud gateway passes through the QinQ switch during transmission, and the QinQ switch will mark the message with a double VLAN, carrying the QinQ information in the outer VLAN, and the MAC address of the terminal carried in the DNS request is also read by the QinQ switch and added to the outer VLAN, so that the cloud gateway can directly obtain the MAC address and QinQ information according to the outer VLAN of the traffic message.

[0110] In step 402, if it is determined that the terminal is located within the school, a NAT address is taken from the school's NAT address pool as the NAT address of the campus network.

[0111] Among them, the cloud gateway stores school information items, and the school information items include QinQ information of each campus of the school; the method of determining whether the terminal is located within the school based on the QinQ information specifically includes: judging whether the QinQ information has been stored in the school information item; if the QinQ information has been stored in the school information item, it is determined that the terminal is located within the school. In actual use, a school may also have multiple campuses, and the school as a whole is managed by a portal authentication server and a campus network management server. By using the school information item for QinQ information management, multi-campus roaming can also be supported, that is, the same user can log in to the school's campus network when logging in at different campuses.

[0112] In order to further improve security, this embodiment also provides a preferred implementation, that is, the login information table item includes multiple table item information, each table item information includes a MAC address and a last login time; the determining whether the terminal is a logged-in terminal according to the login information table item and the MAC address specifically includes:

[0113] Determine whether the MAC address carried in the traffic message meets a preset condition. If the preset condition is met, determine that the terminal is a logged-in terminal; wherein the preset condition is: the MAC address carried in the traffic message is stored in the login information table item, and the time difference between the last login time in the table item information where the MAC address is located and the current time is less than the preset time difference.

[0114] The preset time difference is obtained by technical personnel in this field based on empirical analysis. When the time difference is greater than or equal to the preset time difference, it is considered that the terminal has been logged in for a long time. In order to ensure information security, the terminal is required to log in again, that is, the terminal is judged as a non-logged in terminal.

[0115] The login information table in the cloud gateway is also synchronized with the user information in the campus network management server. It can be understood that the login information table in the cloud gateway is managed by the campus network management server. For example, when receiving a successful authentication message from the campus network management server, the MAC address of the terminal that successfully logged in is added to the login information table, and, Fig. 9 As shown, the method also includes:

[0116] In step 501, an authentication expiration message is received from a campus network management server, and based on the first MAC address in the authentication expiration message, a search is performed to determine whether the login information table contains first table item information.

[0117] In step 502, if the first table entry information exists, the first table entry information is deleted; wherein the first table entry information is the table entry information carrying the first MAC address.

[0118] Before the cloud gateway receives the first authentication expiration message, the login information table items stored in the cloud gateway are as follows: Figure 2 For example, if the first MAC address contained in the received first authentication expiration message is C1:C4:xx:xx:00:5D, that is, Figure 2 If the MAC address of sequence number 4 is the same, the row of sequence number 4 is deleted.

[0119] After providing a campus network login method based on a cloud gateway in the above-mentioned embodiments, the embodiments of the present invention will further provide another campus network login method based on a cloud gateway, in order to make relevant explanations on the above-mentioned method from the perspective of the redirection server, and further make relevant in-depth analysis on its design principles.

[0120] Another campus network login method based on cloud gateway provided in this embodiment includes: monitoring the authentication information of each user, and when monitoring that the authentication of the first user has expired, sending an authentication expiration message to the cloud gateway of the school; wherein the authentication expiration message carries the MAC information of all terminals that the first user has logged in to in the past, so that the cloud gateway can delete the corresponding table information according to the authentication expiration message. Among them, the executor of this embodiment is the portal authentication server, and the campus network login process is realized through the mutual cooperation between the cloud gateway and the portal authentication server. There can be many reasons for the expiration of the authentication of the first user, including: insufficient funds in the user's campus network account, user deregistration and other reasons.

[0121] Embodiment 2:

[0122] In the prior art, the campus networks of multiple schools are often operated independently, which results in each school needing an independent user login system, thereby repeatedly occupying resources. In order to solve this problem, based on Example 1, the embodiment of the present invention further provides a campus network login method based on a cloud gateway, such as Fig.10 As shown, including:

[0123] In step 601, the cloud gateway receives a traffic message from the terminal; wherein the traffic message carries the MAC address of the terminal; wherein the traffic message includes a DNS request for obtaining an IP address, and an http / https message for obtaining network resources.

[0124] It should be noted here that the receiving of traffic messages from the terminal actually refers to the initial source of the message being the terminal. However, during the transmission process, the message sent by the terminal will pass through one or more network devices before reaching the cloud gateway. During the transmission process, the structure of the message may also change. For example, when the message sent by the terminal passes through the QinQ switch, the QinQ switch will add a double-layer VLAN to the message.

[0125] The cloud gateway does not simply refer to the hardware device of the cloud gateway device, but rather a cloud gateway management system consisting of the cloud gateway device and the cloud gateway management platform.

[0126] In step 602, it is determined whether the terminal is a logged-in terminal according to the login information table item and the MAC address; wherein the login information table item is stored in the cloud gateway, and the login information table item stores the MAC address of the logged-in terminal, such as Figure 2 shown.

[0127] In step 603, if it is determined that the terminal is not logged in, the traffic message is intercepted and redirected to the redirect server, so that the redirect server returns the portal resources of the corresponding campus network to the terminal, so that the portal authentication page is displayed on the terminal, which is convenient for the user to log in to the terminal on the portal authentication page. After the user logs in successfully, the redirect server returns an authentication success message to the cloud gateway; the portal resources of the corresponding campus network are obtained from the portal authentication server of the campus where the terminal is located, and the portal resources can be understood as the web resources of the portal authentication page. Fig.11As shown, the cloud gateway is connected to the redirect server through a network, and the redirect server is also connected to the portal authentication server through a network, so that the redirect server can obtain portal resources from the portal authentication server and return the portal resources to the cloud gateway, and then the cloud gateway returns the portal resources to the terminal.

[0128] In step 604, the cloud gateway also receives an authentication success message from the redirect server, and adds the MAC address of the terminal to the login information table item according to the authentication success message, so that when the traffic message from the terminal is subsequently received, the terminal can be identified as a logged-in terminal; the authentication success message includes at least the MAC address of the terminal.

[0129] In step 605, if it is determined that the terminal is a logged-in terminal, the traffic message is released so that the terminal can use the traffic message to access network resources. The traffic message includes DNS request and http / https request message, such as Figure 4 As shown, after receiving the DNS request from the terminal, the cloud gateway searches the DNS server to obtain the IP address of the domain name carried in the DNS request, and returns the IP address to the terminal through the DNS response. The terminal directly obtains network resources through the IP address.

[0130] The purpose of setting up the redirection server is to achieve compatibility with different schools. That is, the redirection server is used to determine the school where the terminal is located based on the traffic message, and return the portal resources of the school where the terminal is located to the cloud gateway in the form of redirection.

[0131] This embodiment intercepts the traffic message through the cloud gateway and redirects it. On the one hand, it can realize the management of campus network login, and on the other hand, it hides the IP address of the portal authentication server, so as not to expose the real IP address of the core server (i.e., the portal authentication server), ensure the security of the portal authentication server, and reduce the risk of network attacks. In addition, in this embodiment, through double redirection, that is, the cloud gateway also has the function of partial redirection, redirects the traffic message to the redirection server, and then the redirection server redirects the traffic message to the portal authentication server. While improving security, it also realizes the management function of multiple campus networks, that is, one redirection server can be connected to the portal authentication servers of multiple campus networks, thereby supporting the unified management of multiple campuses.

[0132] In most cases, the terminal accesses network resources through the Domain Name System (DNS), that is, the user enters the corresponding URL into the terminal browser, and this URL is the domain name. At this time, the browser will first request the DNS server, so that the DNS server returns the IP address corresponding to the domain name, and then the IP address can be used to interact with http / https messages, so as to access the network resources of the IP address. That is, in the actual application scenario, the traffic message includes DNS request and / or transmission message; wherein, the transmission message is http message or https message;

[0133] The traffic message is redirected to a redirection server, such as Fig.12 As shown, specifically including:

[0134] In step 701, when the traffic message is a DNS request, the cloud gateway IP address is returned to the terminal so that the terminal uses the cloud gateway IP address as the destination address to send a first transmission message.

[0135] In step 702, when the traffic message is the first transmission message, the destination address of the first transmission message is updated to the IP address of the redirect server, and the source address of the first transmission message is updated to the NAT address of the corresponding campus network, a second transmission message is generated, and the second transmission message is transmitted to the redirect server.

[0136] The first transmission message and the second transmission message are both http / https request messages, where "first" and "second" are used to refer to different transmission stages. The overall interaction process is as follows: Figure 6 and Fig.13 As shown, Figure 6 The information carried by each message in the interaction process is shown as follows Fig.13 As shown, after receiving the second transmission message, the redirect server determines the school where the terminal is located according to the NAT address in the second transmission message, obtains the portal resources of the school where the terminal is located in a redirection manner, carries the portal resources in the response message and returns it to the cloud gateway, which then carries the portal resources in the http / https response message and returns it to the terminal; the response message returned by the redirect server to the cloud gateway is also an http / https response message, and different names are used here to distinguish different transmission stages.

[0137] The traffic message also carries QinQ information; the NAT address of the corresponding campus network is obtained based on the QinQ information, such as Fig.14 As shown, specifically including:

[0138] In step 801, the school where the terminal is located is determined according to the QinQ information; a campus has unique QinQ information, which is pre-allocated by the operator in the QinQ switch of the campus. The message sent by the terminal to the cloud gateway passes through the QinQ switch during transmission. The QinQ switch will mark the message with a double VLAN, carrying the QinQ information in the outer VLAN, and the MAC address of the terminal carried in the DNS request is also read by the QinQ switch and added to the outer VLAN, so that the cloud gateway can directly obtain the MAC address and QinQ information based on the outer VLAN of the traffic message.

[0139] In step 802, a NAT address is taken from the school's NAT address pool as the NAT address of the campus network. By carrying QinQ information, when multiple campus networks are managed in a unified manner, the campus where the terminal is currently located can be determined without returning to portal resources of other campuses. The cloud gateway stores school information items, which include QinQ information of each campus of each school, such as Fig.15 As shown, it includes QinQ information, school ID, school name, campus ID, and campus name; wherein, one school may correspond to multiple campuses, and each campus has corresponding QinQ information.

[0140] In a preferred embodiment, the QinQ information is also used for verification of the login terminal, that is, when the traffic message also carries QinQ information, the login information table includes multiple table item information, such as Fig.16 As shown, each entry information includes a MAC address, QinQ information, and a last login time; judging whether the terminal is a logged-in terminal according to the login information entry and the MAC address specifically includes:

[0141] Determine whether the MAC address and QinQ information carried in the traffic message meet the preset conditions; if the preset conditions are met, determine that the terminal is a logged-in terminal; wherein the preset conditions are: the MAC address and QinQ information carried in the traffic message are both stored in the same table item information of the login information table item, and the time difference between the last login time in the table item information and the current time is less than the preset time difference.

[0142] The preset time difference is obtained by technical personnel in this field based on empirical analysis. When the time difference is greater than or equal to the preset time difference, it is considered that the terminal has been logged in for a long time. In order to ensure information security, the terminal is required to log in again, that is, the terminal is judged as a non-logged in terminal.

[0143] Considering the need for users to roam in different campuses of the same school, this embodiment also provides a preferred implementation method: judging whether the terminal is a logged-in terminal according to the login information table item and the MAC address, such as Fig.17 As shown, specifically including:

[0144] In step 901, determine whether there is a first table item information in the login information table item; wherein, the first table item information is a table item information including a first MAC address, and the time difference between the last login time and the current time is less than the preset time difference; the first MAC address is the MAC address carried in the traffic message.

[0145] In step 902, if the first table entry information exists and the QinQ information in the first table entry information is the first QinQ information, it is determined that the terminal is a logged-in terminal; the first QinQ information is the QinQ information carried in the traffic message.

[0146] In step 903, if the first table item information exists, but the QinQ information in the first table item information is the first QinQ information, then it is determined according to the school information table item whether the QinQ information in the first table item information and the first QinQ information belong to the same school; wherein the school information table item includes the QinQ information of each campus in each school.

[0147] In step 904, if the QinQ information in the first table item information and the first QinQ information belong to the same school, it is determined that the terminal is a logged-in terminal, and after determining that the terminal is a logged-in terminal, the first table item information is updated, specifically: the QinQ information in the first table item information center is replaced with the first QinQ information.

[0148] The login information table items in the cloud gateway are also synchronized with the user information in the campus network management server. It can be understood as follows: the login information table items in the cloud gateway are managed by the campus network management server. For example, when receiving a successful authentication message from the campus network management server, the MAC address and QinQ information of the terminal that successfully logged in are added to the login information table items. When receiving the first authentication expiration message from the campus network management server, the MAC address and QinQ message of the terminal with expired authentication are deleted from the login information table items. Similarly, in order to hide the IP address of the campus network management server, all messages sent from the campus network management server to the cloud gateway are forwarded by the redirection server, that is, Fig.18 As shown, the method also includes:

[0149] In step 1001, a first authentication expiration message is received from a redirect server, and based on a first MAC address in the first authentication expiration message, a search is performed to determine whether the login information table contains first entry information.

[0150] In step 1002, if the first table entry information exists, the first table entry information is deleted; wherein the first table entry information is the table entry information carrying the first MAC address.

[0151] Before the cloud gateway receives the first authentication expiration message, the login information table items stored in the cloud gateway are as follows: Fig.16 For example, if the first MAC address contained in the received first authentication expiration message is C1:C4:xx:xx:00:5D, that is, Fig.16 If the MAC addresses of sequence numbers 4 and 5 are the same, the rows of sequence numbers 4 and 5 are deleted.

[0152] After providing the above-mentioned campus network login method based on cloud gateway, the embodiment of the present invention will further provide another campus network login method based on cloud gateway, in order to make relevant elaboration on the above-mentioned method from the perspective of redirection server, and further make relevant in-depth analysis on its design principle. It should be noted that the execution subject of the above-mentioned method is cloud gateway, and the execution subject of the following method is redirection server, and the campus network login processing is realized through the mutual cooperation between cloud gateway and redirection.

[0153] This embodiment provides a campus network login method based on a cloud gateway, such as Fig.19 As shown, including:

[0154] In step 1101, a traffic message is received from a cloud gateway, and a corresponding school is determined based on a source address in the traffic message; the traffic message is specifically a second transmission message.

[0155] In step 1102, a response message is generated using the portal resources of the school, and the response message is transmitted to the terminal to return the portal resources of the campus network to the terminal. Figure 6 shown.

[0156] The method also includes: receiving a second authentication expiration message from each campus network management server, updating the destination address in the second authentication expiration message to the corresponding cloud gateway IP address, obtaining a first authentication expiration message, and sending the first authentication expiration message to the cloud gateway, so that the cloud gateway deletes the corresponding table item information in the login information table item according to the first authentication expiration message, that is, executing the above steps 1001-1002. The second authentication expiration message carries a MAC address.

[0157] The redirection server manages the correspondence between the cloud gateway, school (school's NAT address), campus network management server, and portal server, so that the corresponding cloud gateway can be determined according to the IP address of the campus network management server or the IP address of the portal server, or the corresponding portal server can be determined according to the school's NAT address.

[0158] Embodiment 3:

[0159] In actual use, there is often personnel flow between multiple campuses, such as students and teachers of the school going to other schools for academic exchanges. In the prior art, users can often only use the campus network within the community of their own school. When users go to other schools, they cannot log in to the campus network, which will bring inconvenience to users' use of the campus network. In order to increase the convenience of the campus network, this embodiment also provides another campus network login method based on cloud gateway on the basis of embodiment 2. The method supports roaming between multiple campuses. The campus network login method based on cloud gateway provided in this embodiment includes: storing a first roaming table item in the cloud gateway, the first roaming table item including a roaming group ID and a set of school IDs contained in the roaming group, such as Fig. 20 As shown, a school can join multiple roaming groups, each roaming group corresponds to a unique ID, and the roaming groups joined by each corresponding school are pre-set by each school in the cloud gateway management platform, such as Fig.21 As shown, the method includes:

[0160] In step 1201, the cloud gateway receives a traffic message from the terminal; wherein the traffic message carries the MAC address and QinQ information of the terminal; wherein the QinQ information is the QinQ information of the campus of the school where the terminal is currently located.

[0161] In step 1202, it is determined whether the terminal is a logged-in terminal of the roaming group to which the current school belongs based on the MAC address, the QinQ information, the login information entry and the first roaming entry.

[0162] Among them, the terminal is a logged-in terminal of the roaming group to which the current school belongs, which means that the terminal has logged in historically and the login information is valid, and the school to which the terminal belongs and the current school belong to the same roaming group, so that the historical login information can be reused, so that the terminal can directly maintain a logged-in status in the current school, that is, the following step 1205; if the terminal is not a logged-in terminal of the roaming group to which the current school belongs, it is necessary to re-verify the login, that is, the following step 1203.

[0163] In step 1203, if it is determined that the terminal is not a logged-in terminal of the roaming group to which the current school belongs, the traffic message is intercepted and redirected to the redirection server so that the redirection server returns the portal resources of the corresponding campus network to the terminal, and displays the portal authentication page on the terminal to facilitate the user to log in to the terminal on the portal authentication page. After the user logs in successfully, the redirection server returns an authentication success message to the cloud gateway.

[0164] In step 1204, the cloud gateway also receives an authentication success message from the redirect server, and adds the MAC address of the terminal, the QinQ information of the current school, and the relevant information of the school to which the terminal belongs to the login information table item according to the authentication success message, so that when the traffic message from the terminal at the current school is subsequently received, the terminal can be identified as a logged-in terminal of the roaming group to which the current school belongs; the authentication success message carries the MAC address of the terminal, the QinQ information of the school where the terminal is currently logged in, and the ID number of the school to which the terminal belongs when the login is successful (that is, the relevant information of the school to which the terminal belongs).

[0165] In step 1205, if it is determined that the terminal is a logged-in terminal of the roaming group to which the current school belongs, the traffic message is released so that the terminal can use the traffic message to access network resources.

[0166] This embodiment sets up a redirect server, whose architecture is implemented based on the same concept as that of Embodiment 2, and sets up roaming entries, which are used to verify user logins, thereby supporting user roaming between different schools.

[0167] Wherein, judging whether the terminal is a logged-in terminal of the roaming group to which the current school belongs according to the MAC address, the QinQ information, the login information table item and the first roaming table item, such as Fig. 22 As shown, specifically including:

[0168] In step 1301, based on the MAC address, the QinQ information and the login information table entry, it is determined whether the terminal is a logged-in terminal of the current school; that is, it is determined whether the last login of the terminal was a login at the current school and the login information is valid. If the last login occurred at the current school and the login information is valid, it is considered that the login of the terminal at the current school has been verified to be successful, and the terminal can continue to remain logged in to the current school.

[0169] In step 1302, if the terminal is a logged-in terminal of the current school, it is determined that the terminal is a logged-in terminal of the roaming group to which the current school belongs.

[0170] In step 1303, if the terminal is not a logged-in terminal of the current school, it is determined whether the terminal is a logged-in terminal of another school based on the MAC address and the login information table entry.

[0171] In step 1304, if the terminal is a logged-in terminal of another school, the first school to which the terminal belonged during the historical login is obtained, and the second school where the terminal is currently located is determined based on the QinQ information; wherein, the second school can be understood as the school where the terminal is currently located, and the first school can be understood as the school to which the user corresponding to the terminal belongs. For example, if there is a student from School A who uses the campus network to access the Internet within the campus of School B, then the first school of the student terminal is School A, and the second school is School B.

[0172] In step 1305, according to the first roaming table entry, it is determined whether the first school and the second school are in the same roaming group. If the first school and the second school are in the same roaming group, it is determined that the terminal is a logged-in terminal of the roaming group to which the current school belongs. When the first school and the second school are in the same roaming group, it can be considered that the school to which the terminal belongs can roam with the school to which the terminal is currently located. Therefore, although the terminal has not logged in to the current school (i.e., the first school), the terminal's historical login information can be reused to identify the terminal as a logged-in terminal of the current school for traffic release.

[0173] In a preferred embodiment, the login information table includes multiple table information items, each of which includes a MAC address, QinQ information, relevant information of the school to which the user belongs, and the last login time. Fig.23 As shown; the relevant information of the school to which the terminal belongs is specifically the ID number of the school to which the terminal belongs when the terminal logs in successfully; the terminal is judged whether it is a logged-in terminal of the current school according to the MAC address, the QinQ information and the login information table item, such as Fig.24 As shown, specifically including:

[0174] In step 1401, determine whether there is a first table item information in the login information table item; wherein, the first table item information is a table item information including a first MAC address, and the time difference between the last login time and the current time is less than the preset time difference; the first MAC address is the MAC address carried in the traffic message.

[0175] In step 1402, if the first table entry information exists and the QinQ information in the first table entry information is the first QinQ information, it is determined that the terminal is a logged-in terminal of the current school; the first QinQ information is the QinQ information carried in the traffic message.

[0176] In step 1403, if the first table item information exists, but the QinQ information in the first table item information is not the first QinQ information, then determine whether the relevant information of the school in the first table item information and the first QinQ information belong to the same school according to the school information table item; wherein the school information table item includes the QinQ information of each campus of each school and the relevant information of each school.

[0177] In step 1404, if the relevant information of the school in the first table item information and the first QinQ information belong to the same school, that is, the first QinQ information is a campus of the school, it is determined that the terminal is a logged-in terminal of the current school.

[0178] In step 1405, if the first table item information exists and it is determined that the terminal is not a logged-in terminal of the current school, then it is determined that the terminal is a logged-in terminal of another school. According to the relevant information of the school in the first table item information, the first school is determined, and the first table item information is updated, specifically: the QinQ information in the first table item information is updated to the first QinQ information.

[0179] In an actual application scenario, the traffic message includes a DNS request and / or a transmission message; wherein the transmission message is an http message or an https message.

[0180] The redirecting of the traffic message to the redirection server specifically includes:

[0181] When the traffic message is a DNS request, the cloud gateway IP address is returned to the terminal so that the terminal uses the cloud gateway IP address as the destination address to send the first transmission message.

[0182] When the traffic message is the first transmission message, the destination address of the first transmission message is updated to the IP address of the redirection server, and the source address of the first transmission message is updated to the NAT address of the campus network of the school where the terminal is located, and a second transmission message is generated, and the second transmission message is transmitted to the redirection server. That is, the NAT address pool of the campus network of the school where the terminal is located is used to allocate an external network IP address to the terminal, and the campus network management server of the school where the terminal is located performs terminal traffic billing, and the terminal traffic obtained by billing is transmitted to the campus network management server of the school to which the terminal belongs.

[0183] In actual use, the method further includes:

[0184] Receiving a first authentication expiration message from the redirect server, and searching, according to a first MAC address in the first authentication expiration message, whether first table item information exists in the login information table item;

[0185] If the first table entry information exists, the first table entry information is deleted; wherein the first table entry information is the table entry information carrying the first MAC address.

[0186] After providing the above-mentioned campus network login method based on cloud gateway, the embodiment of the present invention will further provide another campus network login method based on cloud gateway, in order to make relevant elaboration on the above-mentioned method from the perspective of redirection server, and further make relevant in-depth analysis on its design principle. It should be noted that the execution subject of the above-mentioned method is cloud gateway, and the execution subject of the following method is redirection server, and the campus network login processing is realized through the mutual cooperation between cloud gateway and redirection.

[0187] Another campus network login method based on a cloud gateway provided in this embodiment includes: storing a second roaming entry in a redirection server, wherein the second roaming entry includes a roaming group ID and a set of school IDs included in the roaming group, including:

[0188] Receive a traffic message from the cloud gateway, determine the second school where the terminal is currently located according to the source address in the traffic message, find the first roaming group including the second school from the second roaming table, generate a school option resource according to all schools in the first roaming group, and return the school option resource to the terminal to display the school option interface on the terminal; the traffic message is specifically a second transmission message. The school option interface is as follows Fig.25 shown.

[0189] When the user selects the corresponding second school in the school option interface, a response message is generated using the portal resources of the second school, and the response message is transmitted to the terminal to return the portal resources of the campus network to the terminal. The returning of the school option resources to the terminal is also achieved by transmitting http / https messages, and the intermediate process is the process of realizing web interaction through the cloud gateway, which is based on the same concept as the transmission process of the second transmission message and the response message, and will not be repeated here.

[0190] The method also includes: receiving a second authentication expiration message from each campus network management server, updating the destination address in the second authentication expiration message to the corresponding cloud gateway IP address, obtaining a first authentication expiration message, and sending the first authentication expiration message to the cloud gateway so that the cloud gateway can delete the corresponding table item information in the login information table item according to the first authentication expiration message.

[0191] The methods described in Example 2 are applicable to this embodiment and will not be described in detail here.

[0192] Embodiment 4:

[0193] In actual use, the campus network not only provides network services for users, but also often has campus resources for browsing and use by users of the school. For the purpose and needs of multi-school cooperation and communication, this embodiment also provides a campus network login method based on a cloud gateway. The method described in this embodiment supports sharing of campus resources between different campus networks. Specifically: a first roaming table item is stored in the cloud gateway, and the first roaming table item includes a roaming group ID and a set of school IDs included in the roaming group. The cloud gateway includes a leaf switch, an access switch and an intercommunication gateway. The intercommunication gateway can be understood as a layer 2 switch. The intercommunication gateways of each school are connected to each other, such as Fig.26 As shown, it should be noted that Fig.26 Take two schools as an example, and use the intercommunication gateways of each school to establish roaming tunnels between schools; Fig. 27 As shown, the method includes:

[0194] In step 1501, the first leaf switch receives a traffic message from a terminal; wherein the traffic message carries the terminal's MAC address, QinQ information and destination IP address; the first leaf switch is the leaf switch of the first school; and the destination IP address is the IP address of the shared resource server of the second school.

[0195] In step 1502, based on the destination IP address of the traffic packet, it is determined whether the traffic packet is a traffic packet requesting access to a second on-campus resource; wherein the second on-campus resource is an on-campus resource of the second school.

[0196] In step 1503, if it is determined that the traffic message is a traffic message requesting access to the second campus resource, it is determined whether the terminal has access rights to the second campus resource based on the QinQ information, the destination IP address, the login information table item, the school information table item and the first roaming table item; wherein, the condition for determining that the terminal has access rights to the second campus resource is that the first school where the terminal is currently located, the second school and the third school to which the terminal belongs belong to the same roaming group.

[0197] In step 1504, if it is determined that the terminal has access rights to the second campus resources, the traffic message is released so that the terminal can use the traffic message to access the second campus resources via the roaming tunnel between the first school and the second school. The roaming tunnel is pre-established when each school is added to the corresponding roaming group. In addition, the operator side closes the PPPoE+ verification function of the account on the Authentication, Authorization, and Accounting (AAA) architecture for users of each campus network.

[0198] The campus network of the first school and the campus network of the second school may belong to different edge networks or to the same edge network. The above steps 1501 to 1504 are described on the assumption that the campus network of the first school and the campus network of the second school belong to different edge networks.

[0199] This embodiment supports resource sharing among multiple campuses by connecting various campus networks through roaming tunnels and controlling traffic access through cloud gateways. In addition, since the intercommunication gateways of various campus networks are directly connected, there is no need to go through the public network when accessing resources of other schools, thereby realizing Layer 2 communication among multiple campus networks. While improving the resource access speed, it also reduces the occupancy of public network resources.

[0200] It should be noted here that the above steps 1501 to 1504 are performed after verifying that the terminal has logged into the campus network (i.e., after being able to use the campus network for traffic access), wherein verifying whether the terminal has logged into the campus network is implemented based on the cloud gateway-based campus network login method described in either Example 2 or Example 3, which will not be repeated here. For example, based on the cloud gateway-based campus network login method described in Example 3, verify whether the terminal is a logged-in terminal of the roaming group to which the current school belongs. If it is verified that the terminal is not a logged-in terminal of the roaming group to which the current school belongs, intercept the traffic of the terminal and redirect the intercepted traffic to the portal authentication server of the corresponding school, that is, before step 1502, this embodiment also includes the cloud gateway-based campus network login method described in Example 1, Example 2 or Example 3.

[0201] That is, before determining whether the traffic message is a traffic message requesting access to the second on-campus resource according to the destination IP address of the traffic message, the method further includes:

[0202] According to the MAC address, the QinQ information, the login information entry and the first roaming entry, it is determined whether the terminal is a logged-in terminal of the roaming group to which the current school belongs.

[0203] If it is determined that the terminal is not a logged-in terminal of the roaming group to which the current school belongs, the traffic message is intercepted and redirected to the redirection server, so that the redirection server returns the portal resources of the corresponding campus network to the terminal, and displays the portal authentication page on the terminal, so that the user can log in to the terminal on the portal authentication page. After the user logs in successfully, the redirection server returns an authentication success message to the cloud gateway.

[0204] The cloud gateway also receives an authentication success message from the redirect server, and adds the MAC address of the terminal, the QinQ information of the current school, and relevant information of the school to which it belongs to the login information table item based on the authentication success message, so that when the terminal subsequently receives traffic messages from the current school, the terminal can be identified as a logged-in terminal of the roaming group to which the current school belongs.

[0205] The use of the intercommunication gateways of each school to establish a roaming tunnel between schools specifically includes:

[0206] A first SRv6 tunnel is established between the first leaf switch and the first intercommunication gateway, a second SRv6 tunnel is established between the first intercommunication gateway and the second intercommunication gateway, and a third SRv6 tunnel is established between the destination gateway of the second campus network and the second intercommunication gateway.

[0207] The first SRv6 tunnel, the second SRv6 tunnel and the third SRv6 tunnel together form a roaming tunnel from the first school to the second school.

[0208] Among them, the first leaf switch is the leaf switch of the first school, the first intercommunication gateway is the intercommunication gateway of the first school, and the second intercommunication gateway is the intercommunication gateway of the second school; the destination gateway is the business gateway corresponding to the shared resource server of the second school.

[0209] Similarly, for the second school side, a first SRv6 tunnel is established between the second leaf switch and the second intercommunication gateway, a second SRv6 tunnel is established between the first intercommunication gateway and the second intercommunication gateway, and a third SRv6 tunnel is established between the destination gateway of the first campus network and the first intercommunication gateway; forming a roaming tunnel from the second school to the first school.

[0210] It can be understood that a pair of (LAN|WAN) dual-homed SRv6 tunnels are established between the access switch and the leaf switch; when the message needs to be forwarded to the WAN side, it needs to enter the leaf switch again after coming out of the access switch.

[0211] The first SRv6 tunnel specifically includes: a Virtual Private LAN Service (VPLS) tunnel between the first leaf switch and the first access switch, and a Virtual Private Wire Service (VPWS) tunnel between the first access cloud gateway and the first intercommunication gateway. The second SRv6 tunnel is specifically a VPWS tunnel, and the third SRv6 tunnel is specifically a VPWS tunnel.

[0212] In a specific application scenario, the traffic message is used to access the second school resources via the roaming tunnel between the first school and the second school, such as Fig.28 As shown, specifically including:

[0213] In step 1601, the first leaf switch converts the traffic message into a first SRv6 message, and transmits the first SRv6 message to the first intercommunication gateway through the first SRv6 tunnel.

[0214] In step 1602, the first intercommunication gateway transmits the first SRv6 message to the second intercommunication gateway through the second SRv6 tunnel according to the destination IP address carried in the first SRv6 message.

[0215] In step 1603, the second intercommunication gateway converts the first SRv6 message into a second message, and transmits the second message to the destination gateway through the third SRv6 tunnel.

[0216] The first intercommunication gateway transmits the first SRv6 message to the second intercommunication gateway through the second SRv6 tunnel according to the destination IP address carried in the first SRv6 message. Fig.29 As shown, specifically including:

[0217] In step 1701, the first intercommunication gateway pre-configures the inner VLAN and outer VLAN on its own device according to the QinQ conversion rules configured in its own device; wherein the inner VLAN is used to identify the terminal, and the outer VLAN is used to identify the campus network to be forwarded, i.e., the campus network of the second school.

[0218] The QinQ conversion rules are pre-defined by the operator and set in each network device. The QinQ conversion rules are used to modify the QinQ configuration to encapsulate another Ethernet frame in an Ethernet frame, thereby supporting multi-level VLAN nesting. By encapsulating the destination address field as an external VLAN tag, the data packet can be routed and forwarded according to the destination address when passing through the QinQ switch.

[0219] In step 1702, when the first intercommunication gateway communicates with the first campus network for the first time, an internal forwarding table is established in its own device; the MAC address of the terminal in the first SRv6 message is used as the MAC address of the inner VLAN, and the MAC address of the destination device is determined according to the destination IP address in the first SRv6 message, and the MAC address of the destination device is used as the MAC address of the outer VLAN to obtain the MAC address mapping relationship between the inner VLAN and the outer VLAN; the MAC address mapping relationship is associated with the QinQ conversion rule and recorded in the internal forwarding table; wherein the MAC address of the destination device is the MAC address of the shared resource server of the second school. The associating the MAC address mapping relationship with the QinQ conversion rule can be understood as: adding the above MAC address mapping relationship to the QinQ conversion rule, so that when the first SRv6 message is subsequently received, while modifying the QinQ configuration, the inner VLAN and the outer VLAN are also modified according to the above MAC address mapping relationship.

[0220] The MAC address of the destination device is determined based on the destination IP address in the first SRv6 message by analyzing the server address mapping table in the first intercommunication gateway, and the server mapping table stores the mapping relationship between the IP address of the shared resource server of each school in the roaming group to which the first school belongs and the MAC address of the shared resource server.

[0221] The internal forwarding table is a table in the intercommunication switch used to determine the data packet forwarding path; it searches for the corresponding forwarding entry based on specific information (such as MAC address, IP address, QinQ information, etc.) to determine which port or next-hop network device the data packet should be forwarded to.

[0222] In step 1703, a forwarding entry matching the QinQ information in the first SRv6 message and the MAC address of the destination device is searched in the internal forwarding table; and the first SRv6 message is forwarded to the second intercommunication gateway according to the forwarding entry.

[0223] In an optional implementation manner, the first leaf switch converts the traffic message into a first SRv6 message, and transmits the first SRv6 message to the first intercommunication gateway through the first SRv6 tunnel. Fig.30 As shown, specifically including:

[0224] In step 1801, the first leaf switch generates an SRv6 message header according to the SID information obtained from the upstream router, the source IP address of the flow message, and the destination IP address of the flow message; adds the SRv6 message header to the front end of the flow message to obtain an initial SRv6 message; transmits the initial SRv6 message to the first access switch through the VPLS tunnel; wherein the first access switch is the access switch of the first school; the SRv6 message header includes the source IP address and the destination IP address, as well as the segment identifier (Segment Identifier, referred to as: SID), and the SID information is used to guide the device supporting the Srv6 protocol to forward the message. The SID information can be obtained from the local router or a router directly connected to the local router. For example, the local router configures the SID information and encodes it into the SRv6 message header. The local router can identify the Locator it publishes and use the SID information to determine the forwarding path of the data packet.

[0225] In step 1802, the first access switch decapsulates the initial SRv6 message to obtain a first inner message and the destination IP address, replaces the QinQ information in the first inner message with the QinQ information of the second school, and obtains a first SRv6 message; according to the destination IP address, transmits the first SRv6 message to the first intercommunication gateway through the VPWS tunnel.

[0226] After providing the above-mentioned campus network login method based on cloud gateway, the embodiment of the present invention will further provide another campus network login method based on cloud gateway, in order to make relevant elaboration on the above-mentioned method from the perspective of redirection server, and further make relevant in-depth analysis on its design principle. It should be noted that the execution subject of the above-mentioned method is cloud gateway, and the execution subject of the following method is redirection server, and the campus network login processing is realized through the mutual cooperation between cloud gateway and redirection.

[0227] Another campus network login method based on a cloud gateway provided in this embodiment includes: storing a second roaming entry in a redirection server, wherein the second roaming entry includes a roaming group ID and a set of school IDs included in the roaming group, including:

[0228] Receive a traffic message from a cloud gateway, determine the first school where the terminal is currently located based on the source address in the traffic message, find the first roaming group including the first school from the second roaming table entry, generate a school option resource based on all schools in the first roaming group, and return the school option resource to the terminal to display the school option interface on the terminal.

[0229] When the user selects the second school in the school option interface, a response message is generated using the portal resources of the second school, and the response message is transmitted to the terminal to return the portal resources of the campus network to the terminal.

[0230] The methods described in Example 2 are applicable to this embodiment and will not be described in detail here.

[0231] Embodiment 5:

[0232] In actual use, multiple schools may also conduct academic exchanges through remote conferences. In order to improve the real-time and fluency of remote conferences, this embodiment also provides another campus network login method based on a cloud gateway, which specifically includes:

[0233] A conference center server is set up in the computer room of the campus network of the target school, and the conference center server is used to forward conference data messages; specifically: the SFU (full name: Selective Forwarding Unit) architecture is adopted, such as Fig.31 As shown, the conference center server is responsible for receiving conference data messages from each terminal and forwarding the conference data messages to other participating terminals. The target school can be any school.

[0234] The cloud gateway includes leaf switches, access switches and intercommunication gateways. The intercommunication gateways of each school are connected to each other, and the intercommunication gateways of each school are used to establish roaming tunnels between each school and the target school; Fig.32 As shown, the method includes:

[0235] In step 1901, the first leaf switch receives the first conference data message from the first terminal; wherein the first conference data message carries the MAC address, QinQ information, destination IP address, conference identifier and conference ID of the first terminal; the first leaf switch is the leaf switch of the first school; the destination IP address is the IP address of the conference center server; the conference identifier is used to identify the current message as a conference data message, and each conference has a unique conference ID.

[0236] In step 1902, after identifying the conference identifier carried in the first conference data message, the first conference data message is transmitted to the conference center server via the roaming tunnel between the first school and the target school.

[0237] In step 1903, the conference center server determines the second terminal participating in the same conference as the first terminal based on the conference table entry and the conference ID in the first conference data message, encapsulates the first conference data message into a forwarded conference data message, and transmits the forwarded conference data message to the second terminal through the roaming tunnel between the target school and the second school to realize a remote conference between the first terminal and the second terminal.

[0238] Among them, the first conference data message is encapsulated as a forwarded conference data message, specifically: an outer message header is added to the first conference data message, the source IP address carried in the outer message header is the IP address of the conference center server, the destination IP address carried in the outer message header is the IP address of the second terminal, and the outer message header also carries the MAC address of the conference center server and QinQ information.

[0239] The roaming tunnel is pre-established. There may be some schools that belong to the same edge network as the target school, or there may be some schools that belong to different edge networks as the target school. The above steps 1901 to 1903 are described as if the campus network of each school and the campus network of the target school belong to different edge networks.

[0240] This embodiment connects each campus network with the target school (i.e., the conference center server) through a roaming tunnel, so that data transmission between each school and the target school does not need to go through the public network, but can be achieved directly through the second-layer communication, thereby improving the transmission speed of conference data messages, thereby improving the real-time and smoothness of multi-school remote conferences, and reducing the occupancy of public network resources.

[0241] It should be noted here that the above steps 1901 to 1903 are performed after verifying that the terminal has logged into the campus network (i.e., after being able to use the campus network for traffic access), wherein verifying whether the terminal has logged into the campus network is implemented based on the cloud gateway-based campus network login method described in any one of Example 2, Example 3 or Example 4, which will not be repeated here. For example, based on the cloud gateway-based campus network login method described in Example 3, verify whether the terminal is a logged-in terminal of the roaming group to which the current school belongs. If it is verified that the terminal is not a logged-in terminal of the roaming group to which the current school belongs, the traffic of the terminal is intercepted and the intercepted traffic is redirected to the portal authentication server of the corresponding school, that is, before step 1902, this embodiment also includes the cloud gateway-based campus network login method described in Example 1, Example 2 or Example 3.

[0242] For example, a first roaming entry is stored in the cloud gateway, wherein the first roaming entry includes a roaming group ID and a set of school IDs included in the roaming group; before transmitting the first conference data message to the conference center server via a roaming tunnel between the first school and the target school, the method further includes:

[0243] According to the MAC address, the QinQ information, the login information entry and the first roaming entry, it is determined whether the first terminal is a logged-in terminal of the roaming group to which the current school belongs.

[0244] If it is determined that the first terminal is not a logged-in terminal of the roaming group to which the current school belongs, the first conference data message is intercepted and redirected to the redirection server, so that the redirection server returns the portal resources of the corresponding campus network to the first terminal, and displays the portal authentication page on the first terminal, so that the user can log in to the first terminal on the portal authentication page. After the user logs in successfully, the redirection server returns an authentication success message to the cloud gateway.

[0245] The cloud gateway also receives an authentication success message from the redirect server, and adds the MAC address of the first terminal, the QinQ information of the current school, and relevant information of the school to which it belongs to the login information table item based on the authentication success message, so that when the first conference data message is subsequently received from the first terminal at the current school, the first terminal can be identified as a logged-in terminal of the roaming group to which the current school belongs.

[0246] The transmission process of the first conference data message and the forwarded conference data message is implemented based on the same concept as that of Embodiment 4, that is, the intercommunication gateways of each school are used to establish a roaming tunnel between each school and the target school, specifically including:

[0247] A first SRv6 tunnel is established between the first leaf switch and the first intercommunication gateway, a second SRv6 tunnel is established between the first intercommunication gateway and the target intercommunication gateway, and a third SRv6 tunnel is established between the destination gateway of the target campus network and the target intercommunication gateway.

[0248] The first SRv6 tunnel, the second SRv6 tunnel and the third SRv6 tunnel together form a roaming tunnel from the first school to the target school.

[0249] Among them, the first leaf switch is the leaf switch of the first school, the first intercommunication gateway is the intercommunication gateway of the first school, the target intercommunication gateway is the intercommunication gateway of the target school; and the destination gateway is the service gateway corresponding to the conference center server.

[0250] Similarly, for the target school side, a first SRv6 tunnel is established between the target leaf switch and the target intercommunication gateway, a second SRv6 tunnel is established between the target intercommunication gateway and the first intercommunication gateway, and a third SRv6 tunnel is established between the destination gateway of the first campus network and the target intercommunication gateway; a roaming tunnel is formed from the target school to the first school.

[0251] It can be understood that a pair of (LAN|WAN) dual-homed SRv6 tunnels are established between the access switch and the leaf switch; when the message needs to be forwarded to the WAN side, it needs to enter the leaf switch again after coming out of the access switch.

[0252] The first SRv6 tunnel specifically includes: a Virtual Private LAN Service (VPLS) tunnel between the first leaf switch and the first access switch, and a Virtual Private Wire Service (VPWS) tunnel between the first access cloud gateway and the first intercommunication gateway. The second SRv6 tunnel is specifically a VPWS tunnel, and the third SRv6 tunnel is specifically a VPWS tunnel.

[0253] In a specific application scenario, the transmitting the first conference data message to the conference center server via the roaming tunnel between the first school and the target school specifically includes:

[0254] The first leaf switch converts the forwarded conference data message into a first SRv6 message, and transmits the first SRv6 message to the first intercommunication gateway through the first SRv6 tunnel.

[0255] The first intercommunication gateway transmits the first SRv6 message to the target intercommunication gateway through the second SRv6 tunnel according to the destination IP address carried in the first SRv6 message.

[0256] The target intercommunication gateway converts the first SRv6 message into a second message, and transmits the second message to the destination gateway through the third SRv6 tunnel.

[0257] The first intercommunication gateway transmits the first SRv6 message to the target intercommunication gateway through the second SRv6 tunnel according to the destination IP address carried in the first SRv6 message, specifically including:

[0258] The first interconnection gateway pre-configures an inner VLAN and an outer VLAN on its own device according to the QinQ conversion rules configured in its own device; wherein the inner VLAN is used to identify the first terminal, and the outer VLAN is used to identify the campus network to be forwarded to. During the transmission of the first data conference message, the campus network to be forwarded to is the campus network of the target school.

[0259] The QinQ conversion rules are pre-defined by the operator and set in each network device. The QinQ conversion rules are used to modify the QinQ configuration to encapsulate another Ethernet frame in an Ethernet frame, thereby supporting multi-level VLAN nesting. By encapsulating the destination address field as an external VLAN tag, the data packet can be routed and forwarded according to the destination address when passing through the QinQ switch.

[0260] When the first intercommunication gateway communicates with the first campus network for the first time, an internal forwarding table is established in its own device; the MAC address of the first terminal in the first SRv6 message is used as the MAC address of the inner VLAN, and the MAC address of the destination device is determined according to the destination IP address in the first SRv6 message, and the MAC address of the destination device is used as the MAC address of the outer VLAN to obtain the MAC address mapping relationship between the inner VLAN and the outer VLAN; the MAC address mapping relationship is associated with the QinQ conversion rule and recorded in the internal forwarding table; wherein the MAC address of the destination device is the MAC address of the conference center server. The associating the MAC address mapping relationship with the QinQ conversion rule can be understood as: adding the above MAC address mapping relationship to the QinQ conversion rule, so that when the first SRv6 message is subsequently received, while modifying the QinQ configuration, the inner VLAN and the outer VLAN are also modified according to the above MAC address mapping relationship.

[0261] The MAC address of the destination device is determined based on the destination IP address in the first SRv6 message by analyzing the server address mapping table in the first intercommunication gateway, and the server mapping table stores the mapping relationship between the IP address of the shared resource server of each school in the roaming group to which the first school belongs and the MAC address of the shared resource server.

[0262] The internal forwarding table is a table in the intercommunication switch used to determine the data packet forwarding path; it searches for the corresponding forwarding entry based on specific information (such as MAC address, IP address, QinQ information, etc.) to determine which port or next-hop network device the data packet should be forwarded to.

[0263] In the internal forwarding table, a forwarding entry matching the QinQ information in the first SRv6 message and the MAC address of the destination device is searched; and the first SRv6 message is forwarded to the target intercommunication gateway according to the forwarding entry.

[0264] In an optional implementation manner, the first leaf switch converts the forwarded conference data message into a first SRv6 message, and transmits the first SRv6 message to the first intercommunication gateway through the first SRv6 tunnel, specifically including:

[0265] The first leaf switch generates an SRv6 message header according to the SID information obtained from the upstream router, the source IP address of the forwarded conference data message, and the destination IP address of the forwarded conference data message; adds the SRv6 message header to the front end of the forwarded conference data message to obtain an initial SRv6 message; transmits the initial SRv6 message to the first access switch through the VPLS tunnel; the SRv6 message header includes the source IP address and the destination IP address, as well as the segment identifier (SegmentIdentifier, referred to as: SID), and the SID information is used to guide devices that support the Srv6 protocol to forward messages. SID information can be obtained from a local router or a router directly connected to the local router. For example, the local router configures SID information and encodes it into the SRv6 message header. The local router can identify the Locator it publishes and use the SID information to determine the forwarding path of the data packet.

[0266] The first access switch decapsulates the initial SRv6 message to obtain a first inner message and the destination IP address, replaces the QinQ information in the first inner message with the QinQ information of the second school, and obtains a first SRv6 message; and transmits the first SRv6 message to the first intercommunication gateway through the VPWS tunnel according to the destination IP address.

[0267] The transmission process of the forwarded conference data message and the transmission process of the first conference data message are implemented based on the same concept, and will not be described in detail here.

[0268] After providing the above-mentioned campus network login method based on cloud gateway, the embodiment of the present invention will further provide another campus network login method based on cloud gateway, in order to make relevant elaboration on the above-mentioned method from the perspective of redirection server, and further make relevant in-depth analysis on its design principle. It should be noted that the execution subject of the above-mentioned method is cloud gateway, and the execution subject of the following method is redirection server, and the campus network login processing is realized through the mutual cooperation between cloud gateway and redirection.

[0269] Another campus network login method based on a cloud gateway provided in this embodiment includes:

[0270] Receive a first conference data message from the cloud gateway, determine the first school where the first terminal is currently located based on the source address in the first conference data message, find the first roaming group including the first school from the second roaming table item, generate a school option resource based on all schools in the first roaming group, and return the school option resource to the first terminal to display the school option interface on the first terminal.

[0271] When the user selects the second school in the school option interface, a response message is generated using the portal resources of the second school, and the response message is transmitted to the first terminal to return the portal resources of the campus network to the first terminal.

[0272] The methods described in Example 2, Example 3 and Example 4 are all applicable in this embodiment and will not be described in detail here.

[0273] Embodiment 6:

[0274] The present invention is based on the method described in Example 1, combined with specific application scenarios, and uses technical descriptions in related scenarios to illustrate the implementation process of the present invention in characteristic scenarios.

[0275] The campus network login method based on the cloud gateway described in this embodiment is as follows Fig.33 and Fig.34 As shown, specifically including:

[0276] 1. When sending HTTP / HTTPS, the campus student user terminal that does not perform portal authentication will first initiate a DNS request, and the traffic reaches the cloud gateway.

[0277] 2. The cloud gateway intercepts DNS traffic and replies to the gateway address to the terminal. The terminal accesses the URL through the gateway address.

[0278] 3. The cloud gateway intercepts the traffic of the gateway address, and changes the destination address of the traffic from the gateway address to the address of the HTTP / HTTPS redirection server through the IP proxy. After determining which school the source address belongs to based on the Qinq information in the traffic, an IP replacement source address is taken from the NAT address pool of the school.

[0279] 4. After the http / https redirection server monitors the http or https message from the terminal, it redirects the url:port of the message to the address of the portal authentication server, and then returns the redirection message to the terminal.

[0280] 5. The terminal then uses the redirected url:port to access.

[0281] 6. After the cloud gateway intercepts this redirect message, it uses the gateway IP to answer the URL again, and the cloud gateway answers the gateway IP: port to the terminal.

[0282] 7. The terminal uses ip:port to send http / https messages. The cloud gateway intercepts the traffic of the gateway address and changes the destination address of the traffic from the gateway address to the address of the http / https redirection server through ip proxy. After determining which school the source address belongs to based on the qinq information in the traffic, an ip replacement source address is taken from the nat address pool of the school.

[0283] 8. The http / https redirect server redirects the resources of the accessed message to the portal authentication server according to the port. After the portal authentication server identifies which school it is based on the source address, it sends the school's web resources to the terminal, so that the terminal can automatically jump to open the portal web authentication page of its own school.

[0284] It should be noted here that when the student terminal passes the portal authentication, the cloud gateway will record the mac address of the terminal. When the authenticated terminal accesses the Internet, it does not need to perform portal authentication again. The cloud gateway can allow the terminal traffic to access the Internet. This proxy address is not the http / https redirection server. The proxy address is the http / https redirection server. This is because the real IP of the core server is not exposed to the terminal user, reducing the risk of being attacked. The cloud gateway determines which user it is based on the qinq information in the message, and determines the user's terminal based on the mac information in the message. According to the source address of the school address pool converted by the cloud gateway nat, the portal page of your school can be automatically popped up on the terminal.

[0285] In addition, in order to allow students to access the Internet at various locations in the school, cloud gateway access allows student terminals to roam the Internet, such as Fig.33 As shown, specifically:

[0286] 1. After the student terminal authenticates and accesses the Internet through the portal of Campus A, the cloud gateway management platform records the terminal authentication information corresponding to this account.

[0287] 2. After that, the student terminal authenticates again on campus B to access the Internet, and the portal service sends the account authentication information: qinq+mac+terminal ip+campus to the cloud gateway management platform.

[0288] 3. The cloud gateway management platform queries the student’s account based on qinq+mac+terminal ip, and then queries the previously authenticated campus information.

[0289] 4. The management platform deletes the student’s authentication information and PPPoE dial-up information at Campus A, and notifies the cloud gateway to delete them simultaneously.

[0290] The management platform sends the student's authentication information and PPPoE dial-up information in campus B to the corresponding cloud gateway. The cloud gateway re-executes the PPPoE dial-up and associates it with the authentication information of community B, so that the terminal can access the Internet in campus B.

[0291] Under the implementation mode of this embodiment, students can roam in different campuses. This implementation can also be achieved in different dormitories and different office buildings on the same campus, as long as they are within one school.

[0292] For security reasons, operators generally verify the PPPoE+ information of the account on the Authentication, Authorization, and Accounting (AAA) architecture. PPPoE+ generally consists of the following formats: Fig.35 As shown, it is used to verify the authenticity of this account. If you need to enable terminal roaming in the campus, the operator needs to disable the PPPoE+ verification function of the account on AAA, such as Fig.36 , Fig.37 and Fig.38 As shown, Fig.36 This is a diagram showing the traffic flow of users visiting their school. Fig.37 This is a diagram showing the traffic flow when users use the campus network to access the Internet. Fig.38 The following is a schematic diagram of the traffic flow when a user performs portal authentication. PPPoE+ is an extension of the Point-to-Point Protocol Over Ethernet (PPPoE).

[0293] In order to realize multi-school resource sharing, the following takes access to storage resources vnas ​​of different schools as an example to illustrate the business implementation method, where user A and user B are in different schools; gateway virtualization (abbreviated as: vcpe) equipment, access vswitch (i.e. access switch, also called access gateway, also referred to as: access vsw), business vswtich (i.e. business gateway, also referred to as: business vsw), and intercommunication gateway together constitute the cloud gateway, where vcpe refers to a device with gateway software function installed, and in this embodiment refers to a leaf switch, which is in Fig.36 , Fig.37 and Fig.38It is also represented as Leaf in the diagram; vnas1 and vnas2 are deployed in different school intranets; vnas ​​is the shared resource server of the corresponding school, also referred to as nas, vnas1 and vnas2 represent the shared resource server of the school where user A is located and the shared resource server of the school where user B is located respectively; after the large second layer configuration, the management platform will reallocate these large second layer accounts to the same C segment and use a 16-bit mask.

[0294] The first case: When the network equipment of user A's school and the network equipment of user B's school are located in the same computer room and connected to the same vcpe (it can be understood that the campus network of user A's school and the campus network of user B's school are located in the same edge network), then Fig.39 As shown in the figure, the account terminals in the same computer room and the same access to vsw can communicate with each other. Just replace vniqinq and ip in vcpe. When nas are interconnected, use vxlan tunnel to business vsw to access the local nas; use SRv6 tunnel to business vsw to access the interconnected nas.

[0295] The second case: When the network equipment of user A's school and user B's school are located in the same computer room, but connected to different vcpes (it can be understood that the campus network of user A's school and the campus network of user B's school are in different edge networks, but these two edge networks share the same computer room), then Fig.40 As shown in the figure, the account terminals of different access vsws in the same computer room are interconnected. The vniqinq and ip are replaced in vcpe, and the SRv6 tunnel is used to reach the interconnection gateway, and then the terminal is directly forwarded after the access vsw on the other end. When nas are interconnected, the vxlan tunnel is used to access the local service vsw on the local end nas; the SRv6 tunnel is used to access the opposite service vsw on the opposite end nas.

[0296] The third situation: When the network equipment of user A's school and user B's school are located in different computer rooms, it is necessary to interconnect the account terminals across computer rooms. You can replace the school of vniqinq and ip in vcpe, such as Fig.41 As shown, first go through the SRv6 tunnel to the interconnection gateway of this computer room, then to the interconnection gateway of the other computer room, and then to the opposite access vsw and then directly forward the terminal. When nas are interconnected, go through the vxlan tunnel to the local service vsw to access the local nas; go through the SRv6 tunnel to the interconnection gateway of this computer room, then to the interconnection gateway of the other computer room, and then to the opposite service vsw to access the opposite nas.

[0297] Among them, for the first case and the second case, the service message forwarding path includes: from the access vsw to the service vsw, and then from the service vsw to the nas.

[0298] Among them, for the process from access vsw to business vsw, a vxlan tunnel is established between the access vsw and the business vsw, and different tunnels are built to different schools; the access vsw selects different vxlan tunnels according to the configured destination IP for accessing the nas and forwards it to the corresponding business vsw.

[0299] For the process from business vsw to nas, the business vsw and nas are interconnected through three-layer routing; the business vsw finds the exit sub-interface based on the tunnel connected to the vsw entrance. The business vsw configures different IP address pools for different schools. The source IP of the message passes through the source NAT and is replaced by the IP address of the address pool.

[0300] For the third case, the service message forwarding path includes: from the local access vsw to the local intercommunication gateway, from the local intercommunication gateway to the other end's intercommunication gateway, from the other end's intercommunication gateway to the other end's service vsw, and then from the other end's service vsw to the other end's nas.

[0301] Among them, the access vsw finds that the business vsw is not in the computer room according to the configured destination IP for accessing the nas, and forwards the message to the vxlan tunnel of the interconnection gateway of the computer room; the interconnection gateway of the computer room finds the tunnel to the interconnection gateway of the opposite computer room according to the destination IP address of the accessed nas; the interconnection gateway of the opposite computer room finds the corresponding vxlan tunnel according to the destination IP address of the accessed nas; the business vsw finds the exit sub-interface according to the tunnel connected to the access vsw entrance. The business vsw configures different IP address pools for different schools. The source IP of the message is replaced by the IP address of the address pool through the source nat, thereby realizing cross-school resource sharing.

[0302] By sharing and building resources among different schools, the maximum utilization efficiency of resources can be achieved. At the same time, in order to save Internet resource bandwidth, the cloud gateway realizes the mutual conversion of resource traffic within the DCN. Students can share access to different campus network resources (such as vnas, online libraries, boutique classrooms, forums, open classes, etc.).

[0303] The above-mentioned Embodiment 1 to Embodiment 5 are all applicable to the present embodiment and will not be elaborated here.

[0304] Embodiment 7:

[0305] like Fig.42 , which is a schematic diagram of the architecture of a cloud gateway-based campus network login device according to an embodiment of the present invention. The cloud gateway-based campus network login device according to this embodiment includes one or more processors 21 and a memory 22. Fig.42 A processor 21 is taken as an example.

[0306] The processor 21 and the memory 22 may be connected via a bus or other means. Fig.42 The example of connecting through bus is taken in the following.

[0307] The memory 22 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs and non-volatile computer executable programs, such as the cloud gateway-based campus network login method described in any one of Embodiments 1 to 6. The processor 21 executes the cloud gateway-based campus network login method by running the non-volatile software programs and instructions stored in the memory 22.

[0308] The memory 22 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 22 may optionally include a memory remotely arranged relative to the processor 21, and these remote memories may be connected to the processor 21 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0309] The program instructions / modules are stored in the memory 22, and when executed by the one or more processors 21, the cloud gateway-based campus network login method described in any one of the above-mentioned embodiments 1 to 6 is executed.

[0310] It is worth noting that the information interaction, execution process, etc. between the modules and units within the above-mentioned devices and systems are based on the same concept as the processing method embodiment of the present invention. The specific contents can be found in the description of the method embodiment of the present invention and will not be repeated here.

[0311] A person skilled in the art may understand that all or part of the steps in the various methods of the embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0312] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A campus network login method based on cloud gateway, characterized in that: include: The cloud gateway receives a traffic message from the terminal; wherein the traffic message carries the MAC address of the terminal; Determine whether the terminal is a logged-in terminal according to the login information table entry and the MAC address; If it is determined that the terminal is not logged in, the traffic message is redirected to the redirect server of the campus network, so that the redirect server returns the portal resources of the corresponding campus network to the terminal, so that the portal authentication page is displayed on the terminal, which is convenient for the user to log in to the terminal on the portal authentication page. After the user logs in successfully, the redirect server returns an authentication success message to the cloud gateway; The cloud gateway also receives an authentication success message from the redirect server, and adds the MAC address of the terminal to the login information table item according to the authentication success message, so as to identify the terminal as a logged-in terminal when a traffic message is subsequently received from the terminal; If it is determined that the terminal is a logged-in terminal, the traffic message is released so that the terminal can use the traffic message to access network resources; The redirection server returns the portal resources of the corresponding campus network to the terminal, specifically including: The redirection server is connected to the portal authentication server through the network. The redirection server is used to determine the school where the terminal is located based on the traffic message. The redirection server obtains portal resources from the portal authentication server of the school where the terminal is located, and returns the portal resources to the cloud gateway, which then returns the portal resources to the terminal. The login information table item includes a plurality of table item information, each table item information includes a MAC address, QinQ information and a last login time; the determining whether the terminal is a logged-in terminal according to the login information table item and the MAC address specifically includes: Determine whether there is a first table item information in the login information table item; wherein the first table item information is a table item information including a first MAC address, and the time difference between the last login time and the current time is less than a preset time difference; the first MAC address is a MAC address carried in the traffic message; If the first table item information exists, and the QinQ information in the first table item information is the first QinQ information, it is determined that the terminal is a logged-in terminal; the first QinQ information is the QinQ information carried in the traffic message; wherein, according to the QinQ information, it is determined whether the terminal is located within the school range; a campus has unique QinQ information; by using the school information table item to manage QinQ information, when the same user logs in at different campuses, the campus is identified by the QinQ information, and all can log in to the campus network of the school, thereby realizing roaming in multiple campuses; If the first table item information exists, but the QinQ information in the first table item information is not the first QinQ information, then judging whether the QinQ information in the first table item information and the first QinQ information belong to the same school according to the school information table item; wherein the school information table item includes the QinQ information of each campus in each school; If the QinQ information in the first table item information and the first QinQ information belong to the same school, it is determined that the terminal is a logged-in terminal.

2. The campus network login method based on cloud gateway according to claim 1 is characterized in that: The traffic message includes a DNS request and / or a transmission message; wherein the transmission message is an http message or an https message; The redirection of the traffic message to the redirection server of the campus network specifically includes: When the traffic message is a DNS request, returning the cloud gateway IP address to the terminal so that the terminal uses the cloud gateway IP address as the destination address to send the first transmission message; When the traffic message is the first transmission message, the destination address of the first transmission message is updated to the IP address of the redirect server, and the source address of the first transmission message is updated to the NAT address of the corresponding campus network, a second transmission message is generated, and the second transmission message is transmitted to the redirect server.

3. The campus network login method based on cloud gateway according to claim 2 is characterized in that: The traffic message also carries QinQ information; the NAT address of the corresponding campus network is obtained according to the QinQ information, specifically including: Determine the school where the terminal is located according to the QinQ information; A NAT address is taken from the NAT address pool of the school where the terminal is located as the NAT address of the campus network.

4. The campus network login method based on cloud gateway according to claim 3 is characterized in that: The cloud gateway stores a school information table item, which includes QinQ information of each campus of each school; determining the school where the terminal is located according to the QinQ information specifically includes: Determining whether the QinQ information has been stored in the school information table item; If the QinQ information is stored in the school information entry, the school where the terminal is located is determined according to the school information entry.

5. The campus network login method based on cloud gateway according to claim 1 is characterized in that: The method further comprises: Receiving an authentication expiration message from a redirect server, and searching, according to the first MAC address in the authentication expiration message, whether second table item information exists in the login information table item; If the first table entry information exists, the second table entry information is deleted; wherein the second table entry information is the table entry information carrying the first MAC address.

6. A campus network login device based on a cloud gateway, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to execute the cloud gateway-based campus network login method described in any one of claims 1-5.

7. A non-volatile computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, which are executed by one or more processors to implement any of the methods described in claims 1-5.