Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The invention can prevent the uplink device from intercepting the Radius message which is sent by the network access device to an authentication server (such as an AAA server) and is used for authenticating the terminal device in the authentication process of the terminal device under the premise that the uplink device authenticates the network access device by adopting an 802.1X authentication mode based on the MAC address, thereby finishing the authentication of the terminal device.
The method provided by the invention is described as follows:
referring to fig. 2, fig. 2 is a flow chart of the method provided by the present invention. The procedure is applied to a network transit device (referred to as an uplink device for uplink access of the network access device in this application) between the network access device and the authentication server. As shown in fig. 2, the process may include the following steps:
step 201, the uplink device receives an authentication message sent to an authentication server by a network access device.
Here, the authentication message is used to authenticate the terminal device that is downlink accessed by the network access device.
In the invention, the network access equipment starts a non-local 802.1X authentication mode, and the network access equipment also needs to interact with an authentication server in the authentication process of the terminal equipment so as to finally finish the authentication of the terminal equipment. When the network access equipment sends an authentication message to the authentication server, the source MAC address of the authentication message is the MAC address of a port which can be reached by the network access equipment to the authentication server.
Step 202, the uplink device judges whether the release strategy matched with the authentication message is enabled locally, if so, the uplink device continues to send the authentication message to the authentication server, so that the network access device and the authentication server interact to complete the authentication of the terminal device.
As an embodiment of the present invention, when the upstream device determines that the release policy matched with the authentication packet is not enabled locally, the upstream device intercepts the authentication packet and terminates the forwarding of the authentication packet.
As an embodiment of the present invention, the present invention further comprises: the uplink equipment authenticates the network access equipment through an authentication mode which is started on the equipment and based on the MAC address, when the MAC address of the network access equipment passes the authentication, a locally configured release strategy is started, the release strategy corresponds to the port MAC address and is used for releasing the authentication message of which the source MAC address is the port MAC address, and the port MAC address is the MAC address of a port which can be reached from the network access equipment to the authentication server.
Based on this, instep 202, determining whether the release policy matched with the authentication packet is enabled locally includes:
searching for the enabled release strategy corresponding to the source MAC address of the authentication message, determining that the release strategy matched with the authentication message is locally enabled when the corresponding release strategy is found, and otherwise, determining that the release strategy matched with the authentication message is not locally enabled.
Thus, the flow shown in fig. 2 is completed.
Compared with the reason that the uplink equipment intercepts the authentication message described in the background art, it can be seen that, in the present invention, although the source MAC address of the authentication message (used for authenticating the terminal device) sent by the network access equipment to the authentication server is the MAC address of the port on the network access equipment, which is reachable by three layers of the authentication server, the uplink equipment continues to send the authentication message to the authentication server as long as the uplink equipment determines that the release policy matched with the authentication message is locally enabled after receiving the authentication message, so that the network access equipment and the authentication server interactively complete the authentication of the terminal device, which realizes that even on the premise that the uplink equipment authenticates the network access equipment by adopting the 802.1X authentication mode based on the MAC address, the uplink equipment can be prevented from intercepting the Radius message for authenticating the terminal device sent by the network access equipment to the AAA server in the authentication process of the terminal device, and finishing the authentication of the terminal equipment.
Fig. 2 is illustrated below by way of a specific embodiment:
referring to fig. 3, fig. 3 is a schematic diagram of networking according to an embodiment of the present invention. In fig. 3, the network access device takes an access Switch (Switch) as an example, the uplink device of the network access device takes the uplink Switch as an example, and the authentication server is an AAA server as an example.
In fig. 3, an uplink Switch starts an 802.1X authentication method based on a MAC address. The access Switch starts an 802.1X authentication method (specifically, the 802.1X authentication method based on the MAC address may be used, and the 802.1X authentication method based on the port may also be used, which is determined as required, and this embodiment is not particularly limited). The 802.1X authentication mode opened on the access Switch is a non-local authentication mode, and when the access Switch authenticates the terminal device, the access Switch needs to interact with an AAA server.
In fig. 3, the uplink Switch authenticates the access Switch through an 802.1X authentication method based on the MAC address opened on the device, and when the MAC address of the access Switch passes the authentication, the uplink Switch enables a locally configured release policy, which corresponds to the port MAC address and is used to release the authentication packet whose source MAC address is the port MAC address, where the port MAC address is the MAC address of a port that can be reached by the three layers of the AAA server on the access Switch, and the port may be a virtual port or a physical port.
The uplink Switch authenticates the access Switch through an 802.1X authentication method based on the MAC address opened on the device, which may specifically refer to 802.1X authentication, and is not described herein again.
The authentication of the terminal device is described below by taking an Extensible Authentication Protocol (EAP) MD5 as an example among 802.1X protocols:
the terminal equipment starts an 802.1X Client (Client) function, sends an authentication Start (EAPoL-Start) message to the access Switch and starts 802.1X authentication;
the access Switch receives the EAPoL-Start message, sends an EAP Request/confirmation (EAP-Request/Identity) message to the terminal equipment, and requires the terminal equipment to report the user name. And the destination MAC address of the EAP-Request/Identity message is the MAC address of the terminal equipment.
The terminal equipment receives the EAP-Request/Identity message and responds to an EAP Response/Identity message, wherein the EAP-Response/Identity message carries the user name.
The Access Switch receives the EAP-Response/Identity message, encapsulates the EAP-Response/Identity message into a Remote User Authentication Dial In User Service (RADIUS) Access Request message and sends the Access-Request message to the RADIUS server. The RADIUS Access-Request message is the authentication message, and the source MAC address is the port MAC address of the port that can reach from the Access Switch to the AAA server three-layer.
And the uplink Switch receives the RADIUS Access-Request message, and searches the enabled release strategy corresponding to the key word by taking the source MAC address of the RADIUS Access-Request message as the key word.
And if the uplink Switch finds the corresponding release strategy, the uplink Switch continues to forward the RADIUS Access-Request message to the AAA server.
The AAA server receives the RADIUS Access-Request message, randomly generates a Challenge (Challenge) word, and sends the RADIUS Access-Challenge message to the Access Switch through the uplink Switch. The RADIUS Access-Change message carries an EAP-Request/MD 5-Change message.
The access Switch sends an EAP-Request/MD5-Challenge message to the terminal equipment, and the terminal equipment is required to be authenticated. And the destination MAC address of the EAP-Request/MD5-Challenge is the MAC address of the terminal equipment.
After receiving the EAP-Request/MD5-Challenge message, the terminal equipment encrypts the password and a Challenge word carried by the EAP-Request/MD5-Challenge message by MD5 to obtain a Challenge-Pass-word, and sends the Challenge-Pass-word carried by the EAP-Response/MD5-Challenge message to the access Switch;
the Access Switch receives an EAP-Response/MD5-Challenge message, encapsulates the EAP-Response/MD5-Challenge message into a RADIUS-Access-Request message and sends the RADIUS-Access-Request message to the AAA server. The source MAC address of the RADIUS-Access-Request message is the port MAC address of a port which is accessed from the Switch to the three layers of the AAA server and can reach.
And the uplink Switch receives the RADIUS Access-Request message, and searches the enabled release strategy corresponding to the key word by taking the source MAC address of the RADIUS Access-Request message as the key word.
And if the uplink Switch finds the corresponding release strategy, the uplink Switch continues to forward the RADIUS Access-Request message to the AAA server.
The AAA server receives the RADIUS-Access-Request message, judges whether the terminal equipment is legal according to the challenge-Pass-word carried by the RADIUS-Access-Request message, and returns a RADIUS-Access authentication message to the Access Switch through the uplink Switch if the terminal equipment is legal;
and the Access Switch receives the Radius Access-Access authentication message, sends an EAP-Access message to the terminal equipment, and successfully accesses the terminal equipment.
Thus, the authentication of the access Switch to the terminal device is completed.
It should be noted that, in the above description, when the upstream Switch does not find the corresponding release policy, the forwarding of the received RADIUS Access-Request message is terminated.
This completes the description of the embodiment shown in fig. 3.
The method provided by the invention is described above, and the device provided by the invention is described below:
referring to fig. 4, fig. 4 is a structural view of the apparatus provided by the present invention. The device is applied to the network transfer equipment between the network access equipment and the authentication server, and comprises the following steps:
a receiving unit, configured to receive an authentication packet sent by a network access device to an authentication server, where the authentication packet is used to authenticate a terminal device accessed by the network access device;
a judging unit, for judging whether the release strategy matched with the authentication message is enabled locally,
and the processing unit is used for continuously sending the authentication message to the authentication server when the judgment result of the judgment unit is yes, so that the network access equipment and the authentication server interactively complete the authentication of the terminal equipment.
Preferably, the apparatus further comprises:
the authentication unit is used for authenticating the network access equipment through an authentication mode which is started on the equipment and is based on the MAC address, when the MAC address of the network access equipment passes the authentication, a release strategy which is configured locally is started, the release strategy corresponds to the port MAC address and is used for releasing the authentication message of which the source MAC address is the port MAC address, and the port MAC address is the MAC address of a port which can be reached by the three layers of the authentication server on the network access equipment;
the judging unit judges whether the release strategy matched with the authentication message is started locally or not, and comprises the following steps:
searching for the enabled release strategy corresponding to the source MAC address of the authentication message, determining that the release strategy matched with the authentication message is locally enabled when the corresponding release strategy is found, and otherwise, determining that the release strategy matched with the authentication message is not locally enabled.
Preferably, the processing unit further terminates the authentication packet forwarding when the determination result of the determining unit is negative.
Preferably, the authentication message is a remote user dial-up authentication service RADIUS message.
Preferably, the authentication mode is an 802.1X authentication mode.
Thus, the description of the device structure shown in fig. 4 is completed.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.