Method for realizing https redirection on cross-device link aggregation, switch, computing device and storage medium
By using switches and line cards to intercept TCP messages and modify addresses in a cross-device link aggregation environment, https redirection under the 'Large Layer 2' network architecture is achieved, solving the problem of difficult user terminal authentication. Ensure that core equipment can complete user terminal authentication.
Patent Information
- Application Number
- CN202410785822.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-08-30
AI Technical Summary
In the 'large two-layer' network architecture, user terminal authentication and resource access management are difficult, and the traditional http redirection method cannot complete https redirection on the core device and cannot achieve user terminal authentication.
In a cross-device link aggregation environment, the first switch and the second switch belong to the same cross-device link aggregation group, and the first line card and the first main control card are used to perform TCP synchronization packets forwarded by the access device. Interception and address modification, forging packets to achieve https redirection, ensuring that the core device can receive synchronization packets and feedback response packets to the user terminal.
It realizes https redirection of user terminals in a cross-device link aggregation environment, ensuring that core devices can authenticate user terminals, and solves the problem that traditional methods cannot complete https redirection at the core layer.
Smart Images

Figure CN118573452A
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, a switch, a computing device and a storage medium for implementing https redirection on cross-device link aggregation. Background Art
[0002] Typically, a campus network includes a three-layer network architecture, consisting of an access layer, an aggregation layer, and a core layer. The access layer is used to authenticate user terminals, connect user terminals to the network, and provide an interface for users to access the network; the aggregation layer is used to aggregate different access layers to the core layer and act as a gateway; the core layer connects different aggregation layers, performs routing decisions, and forwards high-speed traffic.
[0003] In the campus network, tasks such as authentication and configuration of user terminals and management of user resource access are completed by access devices, which may cause difficulties in user terminal deployment, management, and configuration. To this end, the new campus network adopts a "large two-layer" network architecture.
[0004] In the "big two-layer" network architecture, the management of the entire network is moved to the core device. The access device cannot authenticate the user terminal. A https redirection method is needed to enable the core device to authenticate the user terminal. Summary of the invention
[0005] The present application provides a method, switch, computing device and storage medium for implementing https redirection on cross-device link aggregation, which can enable the core device to authenticate the corresponding user terminal during the https redirection process.
[0006] In order to achieve the above purpose, this application adopts the following technical solutions:
[0007] In a first aspect, the present application provides a method for implementing https redirection on a cross-device link aggregation, wherein a first switch and a second switch belong to the same cross-device aggregation link group, the cross-device link aggregation group is connected to an access device, and the first switch includes a first main control card and a plurality of first line cards, and the method includes:
[0008] The first line card intercepts the TCP synchronization message forwarded by the access device, and the TCP synchronization message is sent by the user terminal to the access device;
[0009] The first line card modifies the destination IP address of the TCP synchronization message from the first IP address to the second IP address of the first main control card, and forwards the TCP synchronization message to the first main control card according to the second IP address of the first main control card;
[0010] The first line card receives a TCP response message fed back by the first master control card according to the TCP synchronization message, wherein the TCP response message is sent by the first master control card to the first line card according to an identifier of the first line card that receives the TCP synchronization message;
[0011] The first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address, and feeds back the TCP response message to the user terminal through the access device, so that the user terminal displays an authentication interface.
[0012] In some possible implementations, after the first line card modifies the destination IP address of the TCP synchronization message from the first IP address to the second IP address of the first main control card, the method further includes:
[0013] The first line card records an address translation table of the TCP synchronization message, wherein the address translation table includes a destination IP address before modification and a destination IP address after modification of the TCP synchronization message;
[0014] The first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address, including:
[0015] The first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address according to the address translation table of the TCP synchronization message.
[0016] In some possible implementations, the first line card intercepts the TCP synchronization message forwarded by the access device, including:
[0017] When the first line card determines that the user terminal has not passed the authentication, the TCP synchronization message forwarded by the access device is intercepted.
[0018] In some possible implementations, the method further includes:
[0019] When the storage time of the address translation table of the TCP synchronization message exceeds a preset time, the address translation table of the TCP synchronization message is deleted.
[0020] In some possible implementations, the identifier of the target line card is obtained by the first main control card recording the identifier of the line card that receives the TCP synchronization message.
[0021] In some possible implementations, the first switch is an active master, and the second switch is a backup master; or,
[0022] The first switch is a backup master controller, and the second switch is an active master controller.
[0023] In a second aspect, the present application provides a method for implementing https redirection on a cross-device link aggregation, wherein a first switch and a second switch belong to the same cross-device aggregation link group, the cross-device link aggregation group is connected to an access device, and the first switch includes a first main control card and a plurality of first line cards, and the method includes:
[0024] The first main control card receives a TCP synchronization message sent by the first line card, where the TCP synchronization message is sent by a user terminal to the first line card through an access device, and a destination IP address of the TCP synchronization message is modified by the first line card from a first IP address to a second IP address of the first main control card;
[0025] The first main control card generates a TCP response message according to the TCP synchronization message;
[0026] The first main control card sends the tcp response message to the first line card according to the identifier of the first line card that receives the tcp synchronization message, so that after the first line card receives the tcp response message, the source IP address of the tcp response message is modified from the second IP address to the first IP address, and the tcp response message is fed back to the user terminal through the access device.
[0027] In a third aspect, the present application provides a first switch, wherein the first switch and the second switch belong to the same cross-device link aggregation group, the cross-device link aggregation group is connected to an access device, and the first switch includes a first main control card and a plurality of first line cards;
[0028] The first line card is used to intercept the TCP synchronization message forwarded by the access device, the TCP synchronization message is sent by the user terminal to the access device, the destination IP address of the TCP synchronization message is modified from the first IP address to the second IP address of the first main control card, and forward the TCP synchronization message to the first main control card according to the second IP address of the first main control card;
[0029] The first main control card is used to generate a TCP response message according to the TCP synchronization message, and send the TCP response message to the first line card according to the identifier of the first line card that receives the TCP synchronization message;
[0030] The first line card is used to modify the source IP address of the TCP response message from the second IP address to the first IP address after receiving the TCP response message, and feed back the TCP response message to the user terminal through the access device, so that the user terminal displays an authentication interface.
[0031] In a fourth aspect, the present application provides a computing device, including a memory and a processor;
[0032] One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as described in any one of the first aspects.
[0033] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method as described in any one of the first aspects.
[0034] It can be seen from the above technical solution that the present application has at least the following beneficial effects:
[0035] In the present application, the first switch and the second switch belong to the same cross-device link aggregation group, and the cross-device link aggregation group is connected to the access device, wherein the first switch includes a first main control card and multiple first line cards. In this method, the user terminal sends a TCP synchronization message to the receiving device, and the access device forwards the TCP synchronization message to the first line card. After the first line card receives the TCP synchronization message, the destination IP address of the TCP synchronization message is modified from the first IP address to the second IP address of the first main control card, and the TCP synchronization message is forwarded to the first main control card according to the second IP address of the first main control card. The first main control card generates a TCP response message according to the TCP synchronization message, and then sends a TCP response message to the first line card according to the identifier of the first line card that receives the TCP synchronization message by the first main control card. After receiving the TCP response message, the first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address, and forwards the TCP response message to the user terminal through the access device. The user terminal displays the authentication interface according to the TCP response message, thereby realizing the redirection of https on the cross-device link aggregation. Since the first switch is in the core layer, the message needs to be forwarded between the access layer and the core layer. In order to ensure that the main control card of the core device can receive the synchronization message, the method modifies the destination IP address of the message. In order to ensure that the user terminal can normally receive the response message, the method modifies the source IP address of the response message accordingly, thereby ensuring that the core device can authenticate the user terminal during the redirection process.
[0036] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be realized without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in a specific embodiment that does not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of a network architecture provided in an embodiment of the present application;
[0039] Figure 3 A flow chart of a method for implementing https redirection on cross-device link aggregation provided in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of the software hierarchy of a first main control card provided in an embodiment of the present application;
[0041] Figure 5 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The terms "first", "second", "third", etc. in the specification of this application and the accompanying drawings are used to distinguish different objects rather than to limit a specific order.
[0043] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0044] like Figure 1As shown, the figure is a schematic diagram of an application scenario provided by an embodiment of the present application, and the application scenario includes a user terminal 101, an access layer 102, an aggregation layer 103, and a core layer 104. Among them, the user terminal 101 may include devices such as mobile phones, computers, and printers. The access layer 102 is composed of switches and is responsible for forwarding the data traffic of the user terminal 101 to the aggregation layer 103. The aggregation layer 103 aggregates different access layers 102 to the core layer 104. The core layer 104 includes a cross-device link aggregation group composed of multiple switches.
[0045] In the above network topology, the access layer 102 and the aggregation layer 103 are only responsible for Vlan tagging and Layer 2 traffic forwarding. Routing is collected from the aggregation layer 103 to the core layer 104, and Dot1x, Mab, and Web Portal authentication management functions are also concentrated in the core layer 104. The management of the entire network is concentrated in the core, combined with cloud management technology, making the management function of the entire network more convenient and intelligent.
[0046] https is a transmission protocol for secure communication over a computer network. The following is an introduction to the redirection process of https: a. The browser of an unauthenticated user terminal accesses any website through the https protocol; b. The core layer intercepts the message of the unauthenticated user terminal, forges the SSL / TLS handshake message and data message, and pushes the login page to the user terminal; c. The user terminal receives the user name and password entered by the user and logs in. Among them, SSL (Secure Sockets Layer) is an encryption protocol used to protect the security of network communications, and TLS (Transport Layer Security) is a transport layer security protocol.
[0047] The traditional http redirection process is usually completed at the access layer 102, which only requires the forged TCP message to be transmitted in the IP protocol stack. However, the data transmission of https is based on SSL / TLS encrypted data, and it is impossible to forge SSL / TLS messages in the IP protocol stack. In the "big two-layer" network architecture, Figure 1 , the authentication of the user terminal needs to be completed on the core layer 104, and the http redirection method cannot be used. A method that can adapt to the https redirection in the stacking and cross-device link aggregation environment is needed.
[0048] In order to forge TCP messages in the https redirection process and push authentication pages to the user terminal in a cross-device link aggregation environment, the present application provides an implementation method, which implements the https redirection process by modifying the content of the TCP message at the driver layer of the line card where the master control card and the aggregation group member port are located. The technical solution of the present application is described in detail below in conjunction with the accompanying drawings.
[0049] like Figure 2 As shown, this figure is a schematic diagram of a network architecture provided by an embodiment of the present application, wherein the first switch 210 and the second switch 220 may belong to the same cross-device link aggregation group. Exemplarily, the first switch 210 is an active master (AM) and the second switch 220 is a backup master (SM); or, the first switch 210 is a backup master and the second switch 220 is an active master. The following is an introduction taking the first switch 210 as an active master and the second switch 220 as a backup master as an example. The first switch 210 includes a first master control card 211 and a plurality of first line cards 212, and the second switch includes a second master control card 221 and a plurality of second line cards 222.
[0050] like Figure 3 As shown, the figure is a flow chart of a method for implementing https redirection on cross-device link aggregation provided by an embodiment of the present application, the method comprising:
[0051] S301. The user terminal sends a TCP synchronization message to an access device.
[0052] The tcp synchronization message is used for the user terminal to interact and authenticate with the core device (i.e., the first switch or the second switch). Without authentication, the user terminal can access any website through a browser. For example, if the IP address of the website accessed by the user terminal is the first IP address, the user terminal will encapsulate the first IP address into the tcp synchronization message and then forward the tcp synchronization message to the first IP address. Figure 2 In the network architecture shown, when the user terminal sends a tcp synchronization message to the first IP address, it needs to first send the tcp synchronization message to the access device. In S301, the destination IP address of the tcp synchronization message is the first IP address and the source IP address is the IP address of the user terminal.
[0053] S302: The access device forwards the TCP synchronization message to the core device.
[0054] After receiving the above-mentioned TCP synchronization message, the access device can forward the TCP synchronization message to the core device, which includes a first switch and a second switch. Whether to forward to the first switch or the second switch can be determined based on the result of load balancing. If the first switch is relatively busy and the second switch is relatively idle, the TCP synchronization message can be forwarded to the second switch, and the second switch performs authentication and other processing; if the second switch is relatively busy and the first switch is relatively idle, the TCP synchronization message can be forwarded to the first switch. The embodiment of the present application is introduced by taking the forwarding of the TCP synchronization message to the first switch as an example.
[0055] S303: The first line card intercepts the TCP synchronization message forwarded by the access device.
[0056] The first switch includes a first main control card and a plurality of first line cards. After the TCP synchronization message is forwarded to the first switch, the first line card intercepts the TCP synchronization message forwarded by the access device. In some embodiments, when the first line card determines that the user terminal has not passed the authentication, the TCP synchronization message forwarded by the access device is intercepted. Exemplarily, when the user terminal passes the authentication, the core device will issue an access control list release rule (Access List Control, ACL), wherein the ACL is used to record the information of the authenticated user terminal, for example, the IP address and MAC address of the associated user terminal. If the user terminal fails the authentication, the TCP synchronization message sent by the user terminal will be reported to the CPU of the core device for the subsequent authentication process.
[0057] S304: The first line card modifies the destination IP address of the TCP synchronization message from the first IP address to the second IP address of the first main control card.
[0058] The first IP address may be a network address that the user terminal wants to access. After receiving the TCP synchronization message, the first line card may modify the destination IP address of the synchronization message from the first IP address to the second IP address of the first main control card, so that the first line card forwards the TCP synchronization message to the first main control card. In some examples, the TCP synchronization message will be sent to the CPU of the first line card of the first switch, and the driver software of the first line card will process the TCP synchronization message, and the driver software will modify the destination IP in the TCP synchronization message to the IP address of the first switch.
[0059] After the first line card completes the above modification, it will record the address translation table of the TCP synchronization message, which at least includes the destination IP address of the TCP synchronization message before modification and the destination IP address after modification. Exemplarily, the address translation table of the TCP synchronization message is as follows.
[0060] Table 1:
[0061] Message Destination IP address Source IP address Source Port Modified destination IP address 1 110.242.68.247 192.168.1.100 30000 192.168.1.1 2 110.242.68.247 192.168.1.100 30001 192.168.1.1 3 110.210.66.66 192.168.2.200 50000 192.168.2.1 … … … … …
[0062] Taking message 1 as an example, after receiving message 1, the first line card modifies the destination IP address of message 1 from the first IP address "110.242.68.247" to the second IP address "192.168.1.1" of the first main control card, and then the first line card records the above modification process to obtain the address translation table of the TCP synchronization message.
[0063] In S304, the destination IP address of the TCP synchronization message is modified to the second IP address, and the source IP address is the IP address of the user terminal.
[0064] In some embodiments, the first line card may also obtain the storage time of the address translation table of the TCP synchronization message, and then determine whether the storage time exceeds the preset time. If it exceeds, the address translation table of the TCP synchronization message is deleted. For example, the storage time of message 1 is 12 minutes, the preset time is 10 minutes, and the storage time of message 1 exceeds the preset time. Therefore, the first line card will delete the relevant information of message 1 from table 1, thereby reducing the storage amount and further improving the efficiency of retrieving other messages.
[0065] S305: The first line card forwards the TCP synchronization message to the first main control card according to the second IP address of the first main control card.
[0066] After the first line card completes modification of the destination IP address of the TCP synchronization message, it can forward the TCP synchronization message to the first central control card according to the modified destination IP address, that is, the second IP address of the first main control card.
[0067] S306: The first main control card generates a TCP response message according to the TCP synchronization message.
[0068] After receiving the TCP synchronization message sent by the first line card, the first main control card generates a TCP response message according to the TCP synchronization message.
[0069] like Figure 4 As shown, the figure is a software layer schematic diagram of a first main control card provided by an embodiment of the present application. The first main control card includes a Web Server thread 401, an SSL proxy thread 402, an IP protocol stack 403 and a driver layer 404. The driver layer 404 is responsible for receiving the TCP synchronization message and determining the sending position of the TCP response message according to the sending and receiving position table. The SSL proxy thread 402 monitors the socket through the OpenSSL library and is responsible for SSL / TLS handshake and user data parsing (for example, parsing the TCP synchronization message), and sends it to the Web Server thread 401 after parsing. The Web Server thread 401 monitors port 80 and is responsible for Web page processing.
[0070] The first main control card records the receiving and sending positions of the TCP synchronization message, for example, records the identification of the first line card that receives the TCP synchronization message, so as to send a TCP response message to the corresponding first line card based on the recorded identification. The receiving and sending positions recorded by the first main control card are shown in the following table.
[0071] Table 2:
[0072] Message Destination IP address Source IP address Source Port Receive Line Card Location 1 192.168.1.1 192.168.1.100 30000 Memer2 Slot3 2 192.168.1.1 192.168.1.100 30001 Memer2 Slot1 3 192.168.2.1 192.168.2.200 5000 Memer2 Slot3 … … … … …
[0073] Among them, "Memer2 Slot3" is the identifier of the line card, which is used to mark which line card sent the message 1. In S306, the source IP address of the TCP response message is the second IP address of the first main control card, and the destination IP address is the IP address of the user terminal.
[0074] S307: The first main control card sends a TCP response message to the first line card according to the identifier of the first line card that receives the TCP synchronization message.
[0075] In some examples, the first main control card can determine the identifier of the first line card that receives the TCP synchronization message according to Table 2 above, and then transmit the generated TCP response message to the first line card.
[0076] S308. The first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address.
[0077] After the first line card receives the TCP response message fed back by the first main control card, the source address of the TCP response message needs to be modified from the second IP address to the first IP address. In S308, the source IP address of the TCP response message is modified to the first IP address, and the destination IP address is the address of the user terminal. Therefore, for the user terminal, the destination IP address of the TCP synchronization message sent is the same as the source IP address of the received TCP response message, and the source IP address of the TCP synchronization message sent is the same as the destination IP address of the received TCP response message. The user terminal can receive the TCP response message normally, and then perform the subsequent authentication process based on the TCP response message.
[0078] S309: The first line card forwards the TCP response message to the access device.
[0079] S310: The access device forwards the TCP response message to the user terminal.
[0080] S311. The user terminal displays the authentication interface according to the TCP response message.
[0081] After receiving the TCP response message, the user terminal will judge the TCP response message, that is, whether it is the message it wants to receive. When the destination IP address of the TCP synchronization message sent by the user terminal is the same as the source IP address of the received TCP response message, and the source IP address of the sent TCP synchronization message is the same as the destination IP address of the received TCP response message, then the TCP response message is considered to be the message it wants to receive, otherwise the TCP response message will be discarded.
[0082] Based on the above content description, an embodiment of the present application provides a method for implementing https redirection on cross-device link aggregation, wherein the first switch and the second switch belong to the same cross-device link aggregation group, and the cross-device link aggregation group is connected to the access device, wherein the first switch includes a first main control card and multiple first line cards, and in this method, the user terminal sends a tcp synchronization message to the receiving device, the access device forwards the tcp synchronization message to the first line card, and after the first line card receives the tcp synchronization message, the destination IP address of the tcp synchronization message is modified from the first IP address to the second IP address of the first main control card, and the tcp synchronization message is forwarded to the first main control card according to the second IP address of the first main control card. The first main control card generates a TCP response message according to the TCP synchronization message, and then sends a TCP response message to the first line card according to the identifier of the first line card that receives the TCP synchronization message by the first main control card. After receiving the TCP response message, the first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address, and forwards the TCP response message to the user terminal through the access device. The user terminal displays the authentication interface according to the TCP response message, thereby realizing the redirection of https. Since the first switch is in the core layer, the message needs to be forwarded between the access layer and the core layer. In order to ensure that the main control card of the core device can receive the synchronization message, the method modifies the destination IP address of the message. In order to ensure that the user terminal can normally receive the response message, the method modifies the source IP address of the response message accordingly, thereby ensuring that the core device can authenticate the user terminal during the redirection process.
[0083] The embodiment of the present application further provides a first switch, the first switch and the second switch belong to the same cross-device link aggregation group, the cross-device link aggregation group is connected to an access device, the first switch includes a first main control card and a plurality of first line cards;
[0084] The first line card is used to intercept the TCP synchronization message forwarded by the access device, the TCP synchronization message is sent by the user terminal to the access device, the destination IP address of the TCP synchronization message is modified from the first IP address to the second IP address of the first main control card, and forward the TCP synchronization message to the first main control card according to the second IP address of the first main control card;
[0085] The first main control card is used to generate a TCP response message according to the TCP synchronization message, and send the TCP response message to the first line card according to the identifier of the first line card that receives the TCP synchronization message;
[0086] The first line card is used to modify the source IP address of the TCP response message from the second IP address to the first IP address after receiving the TCP response message, and feed back the TCP response message to the user terminal through the access device, so that the user terminal displays an authentication interface.
[0087] Combination of the above Figures 1 to 3 The https redirection method provided in the embodiment of the present application is introduced in detail. The device provided in the embodiment of the present application will be introduced in conjunction with the accompanying drawings.
[0088] The present application also provides a computing device. Figure 5 As shown, this figure is a schematic diagram of a computing device provided in an embodiment of the present application, such as Figure 5 As shown, computing device 500 includes bus 501, processor 502, communication interface 503 and memory 504. Processor 502, memory 504 and communication interface 503 communicate with each other via bus 501.
[0089] The bus 501 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0090] The processor 502 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0091] The communication interface 503 is used for external communication. For example, the communication interface 503 can be used for communicating with an access device, such as receiving a TCP synchronization message sent by the access device or sending a TCP response message to the access device.
[0092] The memory 504 may include a volatile memory, such as a random access memory (RAM). The memory 504 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0093] The memory 504 stores executable codes, and the processor 502 executes the executable codes to perform the aforementioned method for implementing https redirection on cross-device link aggregation.
[0094] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned method for implementing https redirection on cross-device link aggregation.
[0095] The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
[0096] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0097] When the computer program product is executed by a computer, the computer executes any of the aforementioned methods for implementing https redirection on cross-device link aggregation. The computer program product may be a software installation package, and when any of the aforementioned methods for implementing https redirection on cross-device link aggregation is needed, the computer program product may be downloaded and executed on a computer.
[0098] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0099] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.
Claims
1. A method for implementing https redirection on cross-device link aggregation, characterized in that: The first switch and the second switch belong to the same cross-device link aggregation group, the cross-device link aggregation group is connected to the access device, the first switch includes a first main control card and a plurality of first line cards, the method includes: The first line card intercepts the TCP synchronization message forwarded by the access device, and the TCP synchronization message is sent by the user terminal to the access device; The first line card modifies the destination IP address of the TCP synchronization message from the first IP address to the second IP address of the first main control card, and forwards the TCP synchronization message to the first main control card according to the second IP address of the first main control card; The first line card receives a TCP response message fed back by the first master control card according to the TCP synchronization message, wherein the TCP response message is sent by the first master control card to the first line card according to an identifier of the first line card that receives the TCP synchronization message; The first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address, and feeds back the TCP response message to the user terminal through the access device, so that the user terminal displays an authentication interface.
2. The method according to claim 1, characterized in that After the first line card modifies the destination IP address of the TCP synchronization message from the first IP address to the second IP address of the first main control card, the method further includes: The first line card records an address translation table of the TCP synchronization message, wherein the address translation table includes a destination IP address before modification and a destination IP address after modification of the TCP synchronization message; The first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address, including: The first line card modifies the source IP address of the TCP response message from the second IP address to the first IP address according to the address translation table of the TCP synchronization message.
3. The method according to claim 1, characterized in that The first line card intercepts the TCP synchronization message forwarded by the access device, including: When the first line card determines that the user terminal has not passed the authentication, the TCP synchronization message forwarded by the access device is intercepted.
4. The method according to claim 2, characterized in that: The method further comprises: When the storage time of the address translation table of the TCP synchronization message exceeds a preset time, the address translation table of the TCP synchronization message is deleted.
5. The method according to claim 1, characterized in that The identifier of the target line card is obtained by the first main control card recording the identifier of the line card that receives the TCP synchronization message.
6. The method according to claim 1, characterized in that The first switch is an active master control, and the second switch is a backup master control; or, The first switch is a backup master controller, and the second switch is an active master controller.
7. A method for implementing https redirection on cross-device link aggregation, characterized in that: The first switch and the second switch belong to the same cross-device link aggregation group, the cross-device link aggregation group is connected to the access device, the first switch includes a first main control card and a plurality of first line cards, the method includes: The first main control card receives a TCP synchronization message sent by the first line card, where the TCP synchronization message is sent by a user terminal to the first line card through an access device, and a destination IP address of the TCP synchronization message is modified by the first line card from a first IP address to a second IP address of the first main control card; The first main control card generates a TCP response message according to the TCP synchronization message; The first main control card sends the tcp response message to the first line card according to the identifier of the first line card that receives the tcp synchronization message, so that after the first line card receives the tcp response message, the source IP address of the tcp response message is modified from the second IP address to the first IP address, and the tcp response message is fed back to the user terminal through the access device.
8. A first switch, characterized in that: The first switch and the second switch belong to the same cross-device link aggregation group, the cross-device link aggregation group is connected to the access device, and the first switch includes a first main control card and a plurality of first line cards; The first line card is used to intercept the TCP synchronization message forwarded by the access device, the TCP synchronization message is sent by the user terminal to the access device, the destination IP address of the TCP synchronization message is modified from the first IP address to the second IP address of the first main control card, and forward the TCP synchronization message to the first main control card according to the second IP address of the first main control card; The first main control card is used to generate a TCP response message according to the TCP synchronization message, and send the TCP response message to the first line card according to the identifier of the first line card that receives the TCP synchronization message; The first line card is used to modify the source IP address of the TCP response message from the second IP address to the first IP address after receiving the TCP response message, and feed back the TCP response message to the user terminal through the access device, so that the user terminal displays an authentication interface.
9. A computing device, characterized in that including memory and processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.
