CN111654464A - Access control method, authentication device and system - Google Patents
Access control method, authentication device and system Download PDFInfo
- Publication number
- CN111654464A CN111654464A CN202010301170.9A CN202010301170A CN111654464A CN 111654464 A CN111654464 A CN 111654464A CN 202010301170 A CN202010301170 A CN 202010301170A CN 111654464 A CN111654464 A CN 111654464A
- Authority
- CN
- China
- Prior art keywords
- address
- terminal
- access control
- authentication device
- authentication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000004044 response Effects 0.000 claims abstract description 22
- 230000004048 modification Effects 0.000 claims description 29
- 238000012986 modification Methods 0.000 claims description 29
- 230000008569 process Effects 0.000 abstract description 18
- 238000012423 maintenance Methods 0.000 abstract description 10
- 238000011217 control strategy Methods 0.000 abstract 2
- 238000010586 diagram Methods 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 10
- 230000003068 static effect Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- GOLXNESZZPUPJE-UHFFFAOYSA-N spiromesifen Chemical compound CC1=CC(C)=CC(C)=C1C(C(O1)=O)=C(OC(=O)CC(C)(C)C)C11CCCC1 GOLXNESZZPUPJE-UHFFFAOYSA-N 0.000 description 3
- 238000013475 authorization Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/20—Network architectures or network communication protocols for network security for managing network security; network security policies in general
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Mobile Radio Communication Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及网络通信技术,尤其涉及一种访问控制方法、认证设备及系统。The present invention relates to network communication technology, in particular to an access control method, authentication device and system.
背景技术Background technique
现有的计算机网络中,通常需要对终端执行访问控制。访问控制是按用户身份及其所归属的某项定义组来限制用户对某些信息项的访问,或限制对某些控制功能的使用的一种技术。访问控制是几乎所有系统都需要用到的一种技术。In existing computer networks, it is usually necessary to perform access control on terminals. Access control is a technology that restricts the user's access to certain information items or the use of certain control functions according to the user's identity and a defined group to which they belong. Access control is a technique that is required in almost all systems.
常用的访问控制技术例如包括IEEE 802.1x技术,一旦终端通过IEEE 802.1x认证后,接入设备以介质访问控制MAC地址识别终端,即该终端的网际协议IP地址便不会再受到控制,对其IP地址的控制一般通过访问控制列表ACL进行,用于配置来限制或者放通某些IP地址的访问权限。ACL是路由器和交换机接口的指令列表,用来控制端口进出的数据包。配置ACL后,可以限制网络流量,允许特定设备访问,指定转发特定端口数据包等。ACL既可以在路由器上配置,也可以在具有ACL功能的业务软件上进行配置。Common access control technologies include, for example, IEEE 802.1x technology. Once the terminal passes IEEE 802.1x authentication, the access device identifies the terminal with the MAC address of media access control, that is, the terminal's Internet Protocol IP address will no longer be controlled. IP addresses are generally controlled through access control lists (ACLs), which are used for configuration to restrict or allow access rights of certain IP addresses. ACLs are lists of directives on router and switch interfaces that control the incoming and outgoing packets of a port. After configuring an ACL, you can restrict network traffic, allow access to specific devices, specify to forward packets on specific ports, and so on. ACLs can be configured on routers or service software with the ACL function.
由于ACL技术对终端的IP地址只能通过掩码配置,对于分散或者连续的IP地址配置十分不方便。而且由于ACL只能进行静态配置,终端IP或者端口变化后需要通过网管或者命令行界面CLI修改配置,不能做到动态调整。另外由于在每种协议、每个方向、每个接口都需要配置一个ACL,因此ACL的配置相当复杂。Because the ACL technology can only configure the IP address of the terminal through the mask, it is very inconvenient to configure scattered or continuous IP addresses. In addition, because ACL can only be configured statically, after the terminal IP or port changes, you need to modify the configuration through the network management or command line interface CLI, which cannot be dynamically adjusted. In addition, since an ACL needs to be configured on each protocol, each direction, and each interface, the ACL configuration is quite complicated.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供了一种访问控制方法以及认证设备,用于实现对终端IP进行动态的访问控制。Embodiments of the present invention provide an access control method and an authentication device, which are used to implement dynamic access control to a terminal IP.
有鉴于此,本发明实施例第一方面提供了一种访问控制方法,该方法包括:认证设备获取终端的MAC地址和当前的IP地址,终端的IP地址可以为IPv4协议的IP地址,也可以为IPv6协议的IP地址,此处不作限定。该认证设备向服务器发送包含该终端的MAC地址和当前的IP地址的认证请求,需要说明的是,认证请求不仅携带该终端的MAC地址和IP地址,还可以携带认证设备本身的接入信息,包括该终端接入的所述认证设备的端口信息或者该终端所属的VLAN的信息,比如该终端所属的VLAN的标识,只要能让服务器知道该认证设备的地址以使得认证设备可以收到服务器的返回信息,此处不作限定。该认证设备接收该服务器发送包含与该终端的MAC地址和当前的IP地址对应的访问控制策略的认证响应报文,该访问控制策略也可以包括对该终端的原来的IP地址的访问控制策略,还可以参考该终端需要访问的网址,还可以参考当下的时间点,服务器在存储的访问策略就不同的参考因素进行匹配,找到相应的匹配的访问控制策略,被认证响应报文携带,被发送到认证设备,此处不作限定。该认证设备根据该访问控制策略对该终端当前的IP地址执行访问控制,也可以在允许/禁止当前的IP地址访问的前提下,允许/禁止该终端当前的IP地址和原来的IP地址同时访问网络。在一些可行的实施例中,若该终端为例如防火墙设备或者路由器设备等允许多个IP地址同时访问网络的类型,此处不作限定。In view of this, a first aspect of the embodiments of the present invention provides an access control method, the method includes: an authentication device obtains a MAC address and a current IP address of a terminal, and the IP address of the terminal may be an IP address of the IPv4 protocol, or It is the IP address of the IPv6 protocol, which is not limited here. The authentication device sends an authentication request including the terminal's MAC address and current IP address to the server. It should be noted that the authentication request not only carries the terminal's MAC address and IP address, but also the access information of the authentication device itself. Including the port information of the authentication device accessed by the terminal or the information of the VLAN to which the terminal belongs, such as the identifier of the VLAN to which the terminal belongs, as long as the server can know the address of the authentication device so that the authentication device can receive the server's information. Return information, which is not limited here. The authentication device receives an authentication response message sent by the server and includes an access control policy corresponding to the terminal's MAC address and current IP address, and the access control policy may also include an access control policy for the terminal's original IP address, You can also refer to the URL that the terminal needs to access, and you can also refer to the current time point. The access policy stored by the server matches different reference factors to find the corresponding matching access control policy, which is carried by the authentication response message and sent. to the authentication device, which is not limited here. The authentication device performs access control on the current IP address of the terminal according to the access control policy, and may also allow/forbid simultaneous access by the current IP address and the original IP address of the terminal on the premise of allowing/forbidding access from the current IP address network. In some feasible embodiments, if the terminal is a type that allows multiple IP addresses to access the network at the same time, such as a firewall device or a router device, it is not limited here.
由于认证设备可以获取终端的IP地址和MAC地址并向服务器发送认证请求,且在服务器中设置了对终端的不同IP地址和MAC地址的访问控制策略,因此不需要对逐个IP地址在逐个网关设备上进行配置,即不需要静态配置,而是可以通过服务器返回的对该终端的网络访问策略,基于IP地址对该终端执行访问控制,从而做到动态的访问控制,而且配置过程十分简单,从而简化了运营和维护。Since the authentication device can obtain the IP address and MAC address of the terminal and send an authentication request to the server, and the access control policy for different IP addresses and MAC addresses of the terminal is set in the server, it is not necessary to perform a gateway device by IP address one by one. The configuration is performed on the terminal, that is, no static configuration is required, but the network access policy of the terminal returned by the server can be used to perform access control on the terminal based on the IP address, so as to achieve dynamic access control, and the configuration process is very simple. Simplified operations and maintenance.
结合本发明实施例的第一方面,在本发明实施例的第一方面的第一种实施方式中,包括:当需要对访问控制策略进行调整的时候,可以在服务器端进行修改,发送的策略修改报文到认证设备,该策略修改报文包含针对该终端的访问控制修改策略;该认证设备根据该访问控制修改策略对该终端当前的IP地址执行访问控制。Combined with the first aspect of the embodiments of the present invention, the first implementation manner of the first aspect of the embodiments of the present invention includes: when the access control policy needs to be adjusted, it can be modified on the server side, and the policy sent A modification message is sent to the authentication device, where the policy modification message includes an access control modification policy for the terminal; the authentication device performs access control on the current IP address of the terminal according to the access control modification policy.
由于当网络访问策略需要改变时,可以通过在服务器端对策略进行修改,因此不需要对逐个IP地址在逐个网关设备上进行配置,因此网络访问策略修改的过程十分简单,从而简化了运营和维护。When the network access policy needs to be changed, the policy can be modified on the server side, so there is no need to configure each IP address on each gateway device, so the process of modifying the network access policy is very simple, which simplifies the operation and maintenance. .
结合本发明实施例的第一方面、第一方面的第一种实施方式,在本发明实施例的第一方面的第二种具体实施方式,包括:当该终端通过IEEE 802.1x协议接入网络后,可以通过向认证设备发送动态主机配置协议DHCP报文获取IP地址。该DHCP报文携带自身的MAC地址,认证设备根据MAC地址在预留的IP地址段中选取一个IP地址分配给终端,则终端可以使用该IP进行网络的访问。With reference to the first aspect of the embodiments of the present invention and the first implementation manner of the first aspect, the second specific implementation manner of the first aspect of the embodiments of the present invention includes: when the terminal accesses the network through the IEEE 802.1x protocol After that, the IP address can be obtained by sending a DHCP message to the authentication device. The DHCP message carries its own MAC address, and the authentication device selects an IP address from the reserved IP address segment according to the MAC address and assigns it to the terminal, and the terminal can use the IP to access the network.
由于认证设备通过DHCP报文从预置的IP地址段给予终端分配一个IP地址,满足了无固定IP地址而需要动态获取IP地址的终端的需求。Because the authentication device assigns an IP address to the terminal from the preset IP address segment through the DHCP message, it satisfies the requirement of the terminal that does not have a fixed IP address but needs to obtain the IP address dynamically.
结合本发明实施例的第一方面、第一方面的第一种实施方式、第一方面的第二种实施方式以及第一方面的第三种实施方式,在本发明实施例的第一方面的第三种实施方式中,包括:终端可以是在预先对MAC地址与IP地址进行绑定配置。该MAC地址可以绑定一个或多个IP地址,而且可以使用这些IP地址中的一个或多个同时访问网络,例如防火墙设备、路由器设备等。当该终端通过MAC认证接入网络后,由于该终端是绑定了MAC地址和IP地址,因此该终端不需要另外再获取IP地址,可以直接使用与MAC地址绑定的IP地址进行访问网络。In combination with the first aspect of the embodiments of the present invention, the first implementation of the first aspect, the second implementation of the first aspect, and the third implementation of the first aspect, in the first aspect of the embodiments of the present invention In the third implementation manner, the terminal may perform binding configuration on the MAC address and the IP address in advance. The MAC address can be bound to one or more IP addresses, and one or more of these IP addresses can be used to simultaneously access the network, such as firewall devices, router devices, and the like. After the terminal accesses the network through MAC authentication, since the terminal is bound with the MAC address and the IP address, the terminal does not need to obtain another IP address, and can directly use the IP address bound with the MAC address to access the network.
由于认证设备通过预先给予终端配置了一个IP地址段,从而满足了需要配置静态的固定IP地址的终端的需求。Because the authentication device configures an IP address segment for the terminal in advance, it satisfies the requirement of the terminal that needs to be configured with a static fixed IP address.
结合本发明实施例的第一方面、第一方面的第一种实施方式、第一方面的第二种实施方式以及第一方面的第三种实施方式,在本发明实施例的第一方面的第四种实施方式中,包括:终端向认证设备发送ARP报文,该ARP报文包括该终端的IP地址、该终端的MAC地址以及该认证设备的IP地址。当认证设备收到该ARP报文时,认证设备将终端的IP地址和MAC地址的映射关系添加到本地ARP表中。In combination with the first aspect of the embodiments of the present invention, the first implementation of the first aspect, the second implementation of the first aspect, and the third implementation of the first aspect, in the first aspect of the embodiments of the present invention The fourth embodiment includes: the terminal sends an ARP packet to the authentication device, where the ARP packet includes the IP address of the terminal, the MAC address of the terminal, and the IP address of the authentication device. When the authentication device receives the ARP packet, the authentication device adds the mapping relationship between the IP address and the MAC address of the terminal to the local ARP table.
由于认证设备通过接收ARP报文获取终端的MAC地址和该终端的当前的IP地址,因此认证设备可以生成针对该终端的访问控制的认证请求,从而可得到针对该IP地址的认证响应报文。Since the authentication device obtains the terminal's MAC address and the current IP address of the terminal by receiving the ARP message, the authentication device can generate an authentication request for access control of the terminal, thereby obtaining an authentication response message for the IP address.
本发明实施例第二方面提供了一种认证设备,包括:获取模块,用于获取终端的MAC地址和当前的IP地址,也可以包括原来的IP地址,此处不作限定;发送模块,用于向服务器发送认证请求,该认证请求包含该获取模块获取的该终端的MAC地址和当前的IP地址,也可以包括原来的IP地址,此处不作限定;第一接收模块,用于接收该服务器发送的认证响应报文,该认证响应报文包含与该终端的MAC地址和当前的IP地址对应的访问控制策略,也可以包括原来的IP地址,此处不作限定;第一执行模块,用于根据该访问控制策略对该终端当前的IP地址执行访问控制,也可以对该终端原来的IP地址执行访问控制,此处不作限定。A second aspect of the embodiments of the present invention provides an authentication device, including: an acquisition module, used for acquiring the MAC address and current IP address of the terminal, and may also include the original IP address, which is not limited here; a sending module, used for Send an authentication request to the server, where the authentication request includes the MAC address and the current IP address of the terminal obtained by the obtaining module, and may also include the original IP address, which is not limited here; the first receiving module is used to receive the transmission from the server. The authentication response message contains the access control policy corresponding to the MAC address and the current IP address of the terminal, and may also include the original IP address, which is not limited here; the first execution module is used for according to The access control policy performs access control on the current IP address of the terminal, and may also perform access control on the original IP address of the terminal, which is not limited here.
由于获取模块可以获取终端的IP地址和MAC地址并发送模块向服务器发送认证请求,且第一接收模块接收了在服务器中设置了的对终端的不同IP地址和MAC地址的访问控制策略,因此不需要对逐个IP地址在逐个网关设备上进行配置,即不需要静态配置,而是可以通过服务器返回的对该终端的网络访问策略,基于IP地址第一执行模块对该终端执行访问控制,从而做到动态的访问控制,而且配置过程十分简单,从而简化了运营和维护。Since the obtaining module can obtain the IP address and MAC address of the terminal, and the sending module sends an authentication request to the server, and the first receiving module receives the access control policies for different IP addresses and MAC addresses of the terminal set in the server, it is not necessary to It is necessary to configure each IP address on each gateway device, that is, static configuration is not required, but the network access policy for the terminal returned by the server can be used. To dynamic access control, and the configuration process is very simple, which simplifies operation and maintenance.
结合本发明实施例的第二方面,在本发明实施例的第二方面的第一种实施方式中,包括:第二接收模块接收该服务器发送的策略修改报文,该策略修改报文包含针对该终端的访问控制修改策略,第二执行模块根据该访问控制修改策略对该终端当前的IP地址执行访问控制。With reference to the second aspect of the embodiments of the present invention, in the first implementation manner of the second aspect of the embodiments of the present invention, the method includes: a second receiving module receives a policy modification message sent by the server, where the policy modification message includes a The access control modification policy of the terminal, and the second execution module performs access control on the current IP address of the terminal according to the access control modification policy.
由于当网络访问策略需要改变时,可以通过在服务器端对策略进行修改,因此不需要对逐个IP地址在逐个网关设备上进行配置,因此网络访问策略修改的过程十分简单,从而简化了运营和维护。When the network access policy needs to be changed, the policy can be modified on the server side, so there is no need to configure each IP address on each gateway device, so the process of modifying the network access policy is very simple, which simplifies the operation and maintenance. .
结合本发明实施例的第二方面、第二方面的第一种实施方式,在本发明实施例的第二方面的第二种具体实施方式,包括:第三接收模块接收该终端发送的动态主机配置协议DHCP报文,分配模块根据该DHCP报文为该终端分配一个IP地址。Combined with the second aspect of the embodiments of the present invention and the first implementation of the second aspect, the second specific implementation of the second aspect of the embodiments of the present invention includes: a third receiving module receives the dynamic host sent by the terminal Configure a DHCP message, and the allocation module allocates an IP address to the terminal according to the DHCP message.
由于认证设备通过DHCP报文从预置的IP地址段给予终端分配一个IP地址,满足了无固定IP地址而需要动态获取IP地址的终端的需求。Because the authentication device assigns an IP address to the terminal from the preset IP address segment through the DHCP message, it satisfies the requirement of the terminal that does not have a fixed IP address but needs to obtain the IP address dynamically.
结合本发明实施例的第二方面、第二方面的第一种实施方式、第二方面的第二种实施方式以及第二方面的第三种实施方式,在本发明实施例的第二方面的第三种实施方式中,包括:分配模块为该终端配置IP地址段。In combination with the second aspect of the embodiments of the present invention, the first implementation of the second aspect, the second implementation of the second aspect, and the third implementation of the second aspect, in the second aspect of the embodiments of the present invention In the third embodiment, the method includes: the allocation module configures an IP address segment for the terminal.
由于认证设备通过预先给予终端配置了一个IP地址段,从而满足了需要配置静态的固定IP地址的终端的需求。Because the authentication device configures an IP address segment for the terminal in advance, it satisfies the requirement of the terminal that needs to be configured with a static fixed IP address.
结合本发明实施例的第二方面、第二方面的第一种实施方式、第二方面的第二种实施方式以及第二方面的第三种实施方式,在本发明实施例的第二方面的第四种实施方式中,包括:第一接收模块接收该终端发送的地址解析协议ARP报文,该ARP报文携带该终端的MAC地址和该终端的当前的IP地址。In combination with the second aspect of the embodiments of the present invention, the first implementation of the second aspect, the second implementation of the second aspect, and the third implementation of the second aspect, in the second aspect of the embodiments of the present invention The fourth embodiment includes: the first receiving module receives an ARP packet sent by the terminal, where the ARP packet carries the MAC address of the terminal and the current IP address of the terminal.
由于认证设备通过接收ARP报文获取终端的MAC地址和该终端的当前的IP地址,因此认证设备可以生成针对该终端的访问控制的认证请求。Since the authentication device obtains the MAC address of the terminal and the current IP address of the terminal by receiving the ARP message, the authentication device can generate an authentication request for access control of the terminal.
本申请第三方面提供了一种服务器,包括:收发器、存储器、处理器以及总线;收发器、存储器以及处理器通过总线连接;收发器用于获取终端的MAC地址和当前的IP地址,也可以包括原来的IP地址,此处不作限定,向服务器发送认证请求,认证请求包含终端的MAC地址和当前的IP地址,也可以包括原来的IP地址,此处不作限定,接收服务器发送的认证响应报文,认证响应报文包含与终端的MAC地址和当前的IP地址对应的访问控制策略,也可以包括原来的IP地址,此处不作限定;存储器用于存储程序和收发器获取的终端的MAC地址和当前的IP地址、向服务器发送的认证请求以及服务器发送的认证响应报文,此处不作限定;处理器用于当认证设备运行时,执行程序以及根据访问控制策略对终端当前的IP地址执行访问控制,也可以对终端原来的IP地址执行访问控制,此处不作限定。A third aspect of the present application provides a server, including: a transceiver, a memory, a processor, and a bus; the transceiver, the memory, and the processor are connected through a bus; the transceiver is used to obtain the MAC address and current IP address of the terminal, or Including the original IP address, which is not limited here, send an authentication request to the server. The authentication request includes the MAC address of the terminal and the current IP address, and can also include the original IP address, which is not limited here. Receive the authentication response message sent by the server. The authentication response message contains the access control policy corresponding to the MAC address of the terminal and the current IP address, and may also include the original IP address, which is not limited here; the memory is used to store the program and the MAC address of the terminal obtained by the transceiver. and the current IP address, the authentication request sent to the server, and the authentication response message sent by the server, which are not limited here; the processor is used to execute the program and access the current IP address of the terminal according to the access control policy when the authentication device is running. It is also possible to perform access control on the original IP address of the terminal, which is not limited here.
从以上技术方案可以看出,本发明实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of the present invention have the following advantages:
本发明实施例中,由于认证设备可以获取终端的IP地址和MAC地址并向服务器发送认证请求,且在服务器中设置了对终端的不同IP地址和MAC地址的访问控制策略,因此不需要对逐个IP地址在逐个网关设备上进行配置,即不需要静态配置,而是可以通过服务器返回的对该终端的网络访问策略,基于IP地址对该终端执行访问控制,从而做到动态的访问控制,而且配置过程十分简单,从而简化了运营和维护。In this embodiment of the present invention, since the authentication device can obtain the IP address and MAC address of the terminal and send an authentication request to the server, and set access control policies for different IP addresses and MAC addresses of the terminal in the server, it is unnecessary to The IP address is configured on each gateway device, that is, static configuration is not required, but access control can be performed on the terminal based on the IP address through the network access policy returned by the server to the terminal, so as to achieve dynamic access control, and The configuration process is simple, simplifying operations and maintenance.
附图说明Description of drawings
图1为本发明实施例中访问控制系统的框架示意图;1 is a schematic diagram of a framework of an access control system in an embodiment of the present invention;
图2为本发明实施例中访问控制方法一个实施例示意图;FIG. 2 is a schematic diagram of an embodiment of an access control method in an embodiment of the present invention;
图3为本发明实施例中认证设备一个实施例示意图;3 is a schematic diagram of an embodiment of an authentication device in an embodiment of the present invention;
图4为本发明实施例中认证设备另一个实施例示意图;4 is a schematic diagram of another embodiment of an authentication device in an embodiment of the present invention;
图5为本发明实施例中认证设备另一个实施例示意图;5 is a schematic diagram of another embodiment of an authentication device in an embodiment of the present invention;
图6为本发明实施例中认证设备另一个实施例示意图;6 is a schematic diagram of another embodiment of an authentication device in an embodiment of the present invention;
图7为本发明实施例中认证设备另一个实施例示意图;7 is a schematic diagram of another embodiment of an authentication device in an embodiment of the present invention;
图8为本发明实施例中认证设备另一个实施例示意图;FIG. 8 is a schematic diagram of another embodiment of an authentication device in an embodiment of the present invention;
图9为本发明实施例中认证设备另一个实施例示意图;9 is a schematic diagram of another embodiment of an authentication device in an embodiment of the present invention;
图10为本发明实施例中认证设备另一个实施例示意图。FIG. 10 is a schematic diagram of another embodiment of an authentication device in an embodiment of the present invention.
具体实施方式Detailed ways
本发明实施例提供了一种访问控制方法以及认证设备,用于实现对终端IP进行动态的访问控制。Embodiments of the present invention provide an access control method and an authentication device, which are used to implement dynamic access control to a terminal IP.
为了使本技术领域的人员更好地理解本发明实施例方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the embodiments of the present invention, the following will clearly describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only Embodiments are part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”、“包含”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if present) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising", "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to the explicit Those steps or units are explicitly listed, but may include other steps or units not expressly listed or inherent to the process, method, product or apparatus.
如图1所示,是一种访问控制系统的架构示意图。在本发明实施例中,该终端可以包括手机、平板电脑或笔记本电脑等移动终端,也可以为台式电脑、路由器设备或者防火墙设备,此处不作限定。在一些可行的实施例中,认证设备可以为以太网交换机或者局域网交换机,只要能连接终端以及服务器并实现本发明实施例中的访问控制的方法的功能,此处不作限定。在一些可行的实施例中,该服务器可以为AAA服务器(AAA:验证Authentication、授权Authorization和记账Accounting),也可以为其他实现对来访的终端进行验证、授权和记账功能的服务器,此处不作限定。本发明实施例中以AAA服务器为例进行说明。认证设备获取终端的MAC地址和当前的IP地址后,向服务器发送包含终端的MAC地址和该终端当前的IP地址的认证请求,该服务器向该认证设备发送认证响应报文,该认证响应报文包含与终端的MAC地址和该终端当前的IP地址对应的访问控制策略,该认证设备根据访问控制策略对该终端当前的IP地址执行访问控制。As shown in Figure 1, it is a schematic diagram of the architecture of an access control system. In this embodiment of the present invention, the terminal may include a mobile terminal such as a mobile phone, a tablet computer, or a notebook computer, and may also be a desktop computer, a router device, or a firewall device, which is not limited here. In some feasible embodiments, the authentication device may be an Ethernet switch or a local area network switch, which is not limited here as long as it can connect to a terminal and a server and implement the functions of the access control method in the embodiment of the present invention. In some feasible embodiments, the server may be an AAA server (AAA: Authentication, Authorization, and Accounting), or may be another server that implements the functions of authentication, authorization, and accounting for the visiting terminal. Here Not limited. In the embodiment of the present invention, an AAA server is used as an example for description. After the authentication device obtains the terminal's MAC address and current IP address, it sends an authentication request including the terminal's MAC address and the terminal's current IP address to the server, and the server sends an authentication response packet to the authentication device. It includes an access control policy corresponding to the MAC address of the terminal and the current IP address of the terminal, and the authentication device performs access control on the current IP address of the terminal according to the access control policy.
在网络通信领域,几乎所有系统都需要用到访问控制。访问控制是按用户身份及其所归属的某项定义组来限制用户对某些信息项的访问,或限制对某些控制功能的使用的一种技术。In the field of network communication, almost all systems need to use access control. Access control is a technology that restricts the user's access to certain information items or the use of certain control functions according to the user's identity and a defined group to which they belong.
常用的访问控制技术例如包括IEEE 802.1x认证技术或者MAC认证技术。一旦终端通过IEEE 802.1x认证或者MAC认证后,接入设备以MAC地址识别终端,即该终端的IP地址便不会再受到控制,对终端的IP地址的控制一般通过ACL进行,用于配置来限制或者放通某些IP地址的访问权限。Common access control technologies include, for example, IEEE 802.1x authentication technology or MAC authentication technology. Once the terminal passes IEEE 802.1x authentication or MAC authentication, the access device identifies the terminal with its MAC address, that is, the IP address of the terminal will no longer be controlled. Restrict or release access to certain IP addresses.
由于ACL技术对终端的IP地址只能通过掩码配置,对于分散或者连续的IP地址配置十分不方便。而且由于ACL只能进行静态配置,终端的IP地址或者终端的端口变化后需要通过网管或者CLI修改配置,不能做到动态调整。另外由于在每种协议、每个方向、每个接口都需要配置一个ACL表项,因此ACL的配置相当复杂。Because the ACL technology can only configure the IP address of the terminal through the mask, it is very inconvenient to configure scattered or continuous IP addresses. In addition, because ACL can only be configured statically, after the IP address of the terminal or the port of the terminal changes, the configuration needs to be modified through the network management or CLI, and cannot be dynamically adjusted. In addition, since an ACL entry needs to be configured for each protocol, each direction, and each interface, the ACL configuration is quite complicated.
本发明实施例中,由于在服务器中设置了对不同终端的IP地址和MAC地址的访问控制策略,因此不需要对逐个IP地址在逐个网关设备上进行配置,即不需要静态配置,而是可以通过服务器返回的对该终端的网络访问策略判断如何对该终端执行访问控制,从而做到动态的访问控制,而且配置过程十分简单,从而简化了运营和维护。In this embodiment of the present invention, since access control policies for the IP addresses and MAC addresses of different terminals are set in the server, it is not necessary to configure each IP address on each gateway device, that is, static configuration is not required, but Based on the network access policy of the terminal returned by the server, it is judged how to perform access control on the terminal, so as to achieve dynamic access control, and the configuration process is very simple, thereby simplifying operation and maintenance.
为便于理解,下面对本发明实施例中的具体流程进行描述,请参阅图2,本发明实施例中访问控制方法一个实施例包括:For ease of understanding, the following describes the specific process in the embodiment of the present invention, referring to FIG. 2 , an embodiment of the access control method in the embodiment of the present invention includes:
201、终端获得IP地址。201. The terminal obtains an IP address.
在一些可行的实施例中,终端可以通过IEEE 802.1x协议接入网络,即当该终端接入网络时,认证设备对此做出回应,则该终端需要通过填写用户名和密码,以此作为信息发送到认证设备,若认证设备认为该用户名和密码符合要求,则会放通该终端的MAC地址的访问权限。当该终端通过IEEE 802.1x协议接入网络后,可以通过向认证设备发送动态主机配置协议DHCP报文获取IP地址。该DHCP报文携带自身的MAC地址,认证设备根据MAC地址在预留的IP地址段中选取一个IP地址分配给终端,则终端可以使用该IP进行网络的访问。在本发明实施例中,通过上述IEEE 802.1x协议接入网络的终端,如大多数的个人电脑和移动终端,终端的MAC地址无固定的IP地址,而是需要动态获取IP地址,而且该终端在一个时间段只能有一个IP地址。当有新的IP地址被某一终端使用时,该终端原来的IP地址就会被禁止访问。In some feasible embodiments, the terminal can access the network through the IEEE 802.1x protocol, that is, when the terminal accesses the network and the authentication device responds to this, the terminal needs to fill in the user name and password as information Send it to the authentication device. If the authentication device considers that the user name and password meet the requirements, it will release the access rights of the terminal's MAC address. After the terminal accesses the network through the IEEE 802.1x protocol, it can obtain an IP address by sending a dynamic host configuration protocol DHCP message to the authentication device. The DHCP message carries its own MAC address, and the authentication device selects an IP address from the reserved IP address segment according to the MAC address and assigns it to the terminal, and the terminal can use the IP to access the network. In this embodiment of the present invention, for a terminal that accesses the network through the above-mentioned IEEE 802.1x protocol, such as most personal computers and mobile terminals, the MAC address of the terminal does not have a fixed IP address, but needs to dynamically obtain an IP address, and the terminal has no fixed IP address. There can only be one IP address at a time. When a new IP address is used by a terminal, the original IP address of the terminal will be forbidden to access.
在一些可行的实施例中,终端可以通过MAC地址认证接入网络,即当该终端接入网络时,认证设备只需通过该终端的MAC地址确定是否放通该终端的访问权限,而不需要终端填写用户名和密码。在本发明实施例中,终端可以是在预先对MAC地址与IP地址进行绑定配置。该MAC地址可以绑定一个或多个IP地址,而且可以使用这些IP地址中的一个或多个同时访问网络,例如防火墙设备、路由器设备等。当该终端通过MAC地址认证接入网络后,由于该终端是绑定了MAC地址和IP地址,因此该终端不需要另外再获取IP地址,可以直接使用与MAC地址绑定的IP地址进行访问网络。In some feasible embodiments, the terminal can authenticate access to the network through the MAC address, that is, when the terminal accesses the network, the authentication device only needs to determine whether to allow the access authority of the terminal through the MAC address of the terminal, and does not need to Fill in the user name and password in the terminal. In this embodiment of the present invention, the terminal may perform binding configuration on the MAC address and the IP address in advance. The MAC address can be bound to one or more IP addresses, and one or more of these IP addresses can be used to simultaneously access the network, such as firewall devices, router devices, and the like. After the terminal accesses the network through MAC address authentication, since the terminal is bound with a MAC address and an IP address, the terminal does not need to obtain another IP address, and can directly use the IP address bound with the MAC address to access the network .
202、认证设备获取终端的MAC地址和IP地址。202. The authentication device acquires the MAC address and IP address of the terminal.
在一些可行的实施例中,终端的IP地址可以为IPv4协议的IP地址,也可以为IPv6协议的IP地址,此处不作限定。在本发明实施例中,就IP地址为IPv4为例对认证设备获取终端的MAC地址和IP地址的过程进行说明。In some feasible embodiments, the IP address of the terminal may be the IP address of the IPv4 protocol, or may be the IP address of the IPv6 protocol, which is not limited here. In the embodiment of the present invention, the process of the authentication device acquiring the MAC address and the IP address of the terminal is described by taking the IP address as an example of IPv4.
当终端的IP地址为IPv4协议时,终端接入网络时,向认证设备发送ARP报文,该ARP报文包括该终端的IP地址、该终端的MAC地址以及认证设备的IP地址。当认证设备收到该ARP报文时,则将终端的IP地址和MAC地址映射关系添加到该认证设备的本地ARP表中。When the IP address of the terminal is IPv4 protocol, when the terminal accesses the network, it sends an ARP packet to the authentication device. The ARP packet includes the IP address of the terminal, the MAC address of the terminal, and the IP address of the authentication device. When the authentication device receives the ARP packet, it adds the mapping relationship between the IP address and the MAC address of the terminal to the local ARP table of the authentication device.
当该终端的IP地址为IPv6的协议的IP地址时,将不使用ARP报文,而是使用邻居发现ND报文,该终端使用ND报文获取认证设备的MAC地址的具体工作过程,为描述的方便和简洁,可以参考前述方法实施例中当IP地址为IPv4的对应过程,在此不再赘述。When the IP address of the terminal is the IP address of the IPv6 protocol, the ARP packet is not used, but the Neighbor Discovery ND packet is used. The specific working process of the terminal using the ND packet to obtain the MAC address of the authentication device is described for For convenience and simplicity, reference may be made to the corresponding process when the IP address is IPv4 in the foregoing method embodiments, which will not be repeated here.
203、认证设备向服务器发送认证请求,认证请求包含终端的MAC地址和IP地址。203. The authentication device sends an authentication request to the server, where the authentication request includes the MAC address and IP address of the terminal.
在本发明实施例中,认证设备获取了终端的MAC地址和IP地址之后,会发送携带该终端的MAC地址和IP地址的认证请求到服务器,以获取该服务器对该终端的访问控制策略。In the embodiment of the present invention, after obtaining the MAC address and IP address of the terminal, the authentication device sends an authentication request carrying the MAC address and IP address of the terminal to the server to obtain the access control policy of the server to the terminal.
当终端的IP地址发生了变化,认证设备发送的认证请求可以携带该终端的当前的IP地址和原来的IP地址,也可以携带该终端当前的IP地址,此处不作限定。在一些可行的实施例中,当服务器接收到认证请求时,会从缓存的数据中获取该终端的原来的IP地址,并向所述认证设备返回携带针对终端的当前的IP地址对应的访问控制策略和针对所述终端原来的IP地址的访问控制策略,比如针对终端的当前的IP地址对应的访问控制策略可以是“允许访问”,针对所述终端原来的IP地址的访问控制策略可以是“禁止访问”。When the IP address of the terminal changes, the authentication request sent by the authentication device may carry the current IP address and the original IP address of the terminal, or may carry the current IP address of the terminal, which is not limited here. In some feasible embodiments, when the server receives the authentication request, it will obtain the original IP address of the terminal from the cached data, and return to the authentication device the access control corresponding to the current IP address of the terminal. The policy and the access control policy for the original IP address of the terminal, for example, the access control policy corresponding to the current IP address of the terminal may be "Allow access", and the access control policy for the original IP address of the terminal may be " No Access".
可选的,当认证设备获取了终端的MAC地址和所述终端当前的IP地址之后,会从缓存的MAC地址对应的表中检查是否存在该终端原来的IP地址,若存在且该终端原来的IP地址与该终端当前的IP地址相同,则认证设备向服务器发送的认证请求中仅携带该终端当前的IP地址,或者,认证设备也可以不发送认证请求,此处不作限定;否则,若认证设备确定该终端原来的IP地址与该终端当前的IP地址不同,则可以将该终端当前的IP地址以及该终端原来的IP地址包括在发往服务器的认证请求,或者,认证设备也可以不把原来的IP地址包括在发往服务器的认证请求,此处不作限定,以得到服务器中对该终端的各个IP地址的访问控制策略。Optionally, after the authentication device obtains the MAC address of the terminal and the current IP address of the terminal, it will check whether the original IP address of the terminal exists from the table corresponding to the cached MAC address. The IP address is the same as the current IP address of the terminal, the authentication request sent by the authentication device to the server only carries the current IP address of the terminal, or the authentication device may not send the authentication request, which is not limited here; otherwise, if the authentication If the device determines that the original IP address of the terminal is different from the current IP address of the terminal, it may include the current IP address of the terminal and the original IP address of the terminal in the authentication request sent to the server, or the authentication device may not include the current IP address of the terminal and the original IP address of the terminal in the authentication request sent to the server. The original IP address is included in the authentication request sent to the server, which is not limited here, so as to obtain the access control policy for each IP address of the terminal in the server.
需要说明的是,该认证请求不仅携带该终端的MAC地址和IP地址,还携带认证设备本身的接入信息,该认证设备本身的接入信息包括该终端接入的、该认证设备的端口信息,该认证设备本身的接入信息包括该终端所属的虚拟局域网VLAN信息,比如该终端所属的VLAN标识,只要能让服务器知道该认证设备的地址以使得认证设备可以收到服务器的返回信息,此处不作限定。It should be noted that the authentication request not only carries the MAC address and IP address of the terminal, but also carries the access information of the authentication device itself. The access information of the authentication device itself includes the port information of the authentication device accessed by the terminal. , the access information of the authentication device itself includes the VLAN information of the virtual local area network to which the terminal belongs, such as the VLAN ID to which the terminal belongs. As long as the server can know the address of the authentication device so that the authentication device can receive the return information from the server, this There are no restrictions.
在一些可行的实施例中,认证请求可以为间隔一定的时间发送一次,例如20分钟发送一次,也可以为一旦被触动就会广播发送报文,如当认证设备接收到ARP报文的时候向服务器发送认证请求,此处不作限定。In some feasible embodiments, the authentication request can be sent once at a certain interval, for example, once every 20 minutes, or it can be sent by broadcasting a message once triggered, for example, when the authentication device receives an ARP message, it sends a message to the The server sends an authentication request, which is not limited here.
204、认证设备接收服务器发送的认证响应报文,认证响应报文包含与终端的MAC地址和IP地址对应的访问控制策略。204. The authentication device receives an authentication response message sent by the server, where the authentication response message includes an access control policy corresponding to the MAC address and IP address of the terminal.
在一些可行的实施例中,当服务器根据终端的MAC地址和IP地址,在存储的访问控制策略中查找匹配的访问控制策略,将查找到的、匹配的访问控制策略发送给认证设备。在另外的可行的实施例中,也可以默认为不允许这样的MAC地址和IP地址访问,此处不作限定。In some feasible embodiments, when the server searches for a matching access control policy in the stored access control policy according to the MAC address and IP address of the terminal, and sends the found and matching access control policy to the authentication device. In another feasible embodiment, it may also be assumed that such MAC address and IP address access is not allowed by default, which is not limited here.
可选的,服务器查找匹配的访问控制策略时,可能不仅仅参考该终端的MAC地址和IP地址,还可以参考该终端需要访问的网址,还可以参考当下的时间点,此处不作限定。服务器在存储的访问策略就不同的参考因素进行匹配,找到相应的匹配的访问控制策略,被认证响应报文携带,被发送到认证设备。在本发明实施例中,服务器在查找匹配的访问控制策略时,以仅考虑终端的MAC地址和IP地址为例进行说明。Optionally, when the server searches for a matching access control policy, it may not only refer to the MAC address and IP address of the terminal, but also refer to the website that the terminal needs to access, and can also refer to the current time point, which is not limited here. The access policy stored by the server matches different reference factors, finds the corresponding matching access control policy, is carried in the authentication response message, and is sent to the authentication device. In the embodiment of the present invention, when the server searches for a matching access control policy, only the MAC address and IP address of the terminal are considered for illustration.
需要说明的是,并非所有MAC地址和IP地址都能找到对应的访问控制策略,在一些可行的实施例中,若服务器无法根据终端的MAC地址和IP地址找到对应的访问控制策略,则默认不对该MAC地址和IP地址做出访问控制,也可以默认为不允许这样的MAC地址和IP地址访问,此处不作限定。It should be noted that not all MAC addresses and IP addresses can find the corresponding access control policy. In some feasible embodiments, if the server cannot find the corresponding access control policy according to the MAC address and IP address of the terminal, the default is incorrect. The MAC address and the IP address are used for access control, and the MAC address and the IP address may not be allowed to access by default, which is not limited here.
205、认证设备根据访问控制策略对终端的IP地址执行访问控制。205. The authentication device performs access control on the IP address of the terminal according to the access control policy.
在一些可行的实施例中,该访问控制策略可以为允许/禁止该终端当前的IP地址访问,也可以为允许/禁止该终端的当前的IP地址在当前的时间段访问特定的网址,在此不作限定。In some feasible embodiments, the access control policy may be to allow/forbid the current IP address of the terminal to access, or may be to allow/forbid the current IP address of the terminal to access a specific website in the current time period, here Not limited.
在另一些可行的实施例中,也可以在允许当前的IP地址访问的前提下,允许/禁止该终端当前的IP地址和原来的IP地址同时访问网络。在一些可行的实施例中,若该终端为例如防火墙设备或者路由器设备等允许多个IP地址同时访问网络的类型。In some other feasible embodiments, the current IP address and the original IP address of the terminal may also be allowed/prohibited to access the network at the same time under the premise of allowing the current IP address to access. In some feasible embodiments, if the terminal is a type that allows multiple IP addresses to access the network at the same time, such as a firewall device or a router device.
在另一些可行的实施例中,该终端可以为大多数的手持终端或者个人电脑,在一个时间段内只能使用一个IP地址,而且该IP地址为动态的,则可以在允许该终端当前的IP地址访问网络的前提下,禁止该终端的原来的IP地址。In some other feasible embodiments, the terminal can be most handheld terminals or personal computers, only one IP address can be used in a period of time, and the IP address is dynamic, then the current Under the premise that the IP address can access the network, the original IP address of the terminal is prohibited.
需要说明的是,可选的,也可以考虑把当前的时间和特定的网址作为综合参考的因素,即可以通过终端的MAC地址、当前的IP地址、原来的IP地址、当前的时间段和当前需要访问的网络,找到匹配的对该终端当前的IP地址和原来的IP地址进行访问控制的策略,以指示该终端当前的IP地址和原来的IP地址是否可以在当下访问当前的网址。It should be noted that, optionally, the current time and a specific URL can also be considered as comprehensive reference factors, that is, the terminal's MAC address, current IP address, original IP address, current time period and current For the network that needs to be accessed, find a policy that matches the current IP address and the original IP address of the terminal to control the access, so as to indicate whether the current IP address and the original IP address of the terminal can access the current website at the moment.
在一些可行的实施例中,不仅上述的几种访问控制策略,还可以有其他类型的访问控制策略,例如禁止该终端当前的IP地址和原来的IP地址,此处不作限定。本步骤则根据接受得到的认证响应报文里携带的访问控制策略对该终端的IP地址进行访问控制。In some feasible embodiments, not only the above-mentioned several access control policies, but also other types of access control policies, such as prohibiting the current IP address and the original IP address of the terminal, are not limited here. In this step, access control is performed on the IP address of the terminal according to the access control policy carried in the received authentication response message.
206、认证设备接收服务器发送的策略修改报文,策略修改报文包含针对终端的访问控制修改策略。206. The authentication device receives a policy modification message sent by the server, where the policy modification message includes an access control modification policy for the terminal.
在一些可行的实施例中,当需要对访问控制策略进行调整的时候,可以在服务器端进行修改。当修改完毕后,认证设备接收服务器发送的策略修改报文,策略修改报文包含针对终端的访问控制修改策略。可选的,当修改完毕后,服务器可以向认证设备下发特定MAC地址和IP地址策略变更的转交地址协议COA报文,该COA报文包括指示认证设备对终端最新的访问控制策略。In some feasible embodiments, when the access control policy needs to be adjusted, it can be modified on the server side. After the modification is completed, the authentication device receives the policy modification message sent by the server, and the policy modification message includes the access control modification policy for the terminal. Optionally, after the modification is completed, the server may deliver to the authentication device a care-of address protocol COA message for the specific MAC address and IP address policy change, where the COA message includes the latest access control policy for the terminal instructing the authentication device.
207、认证设备根据访问控制修改策略对终端的IP地址执行访问控制。207. The authentication device performs access control on the IP address of the terminal according to the access control modification policy.
本发明实施例中,认证设备根据访问控制修改策略对终端的IP地址执行访问控制,可选的,该策略修改报文可以包括针对不同的MAC地址和IP地址的策略的最新版本,也可以为对该终端在不同时间段和不同特定网页限制访问的修改,此处不作限定。In this embodiment of the present invention, the authentication device performs access control on the IP address of the terminal according to the access control modification policy. Optionally, the policy modification message may include the latest version of the policy for different MAC addresses and IP addresses, or may be Modifications to the restricted access of the terminal in different time periods and different specific webpages are not limited here.
本发明实施例中,由于在服务器中设置了对不同终端的IP地址和MAC地址的访问控制策略,因此不需要对逐个IP地址在逐个网关设备上进行配置,即不需要静态配置,而是可以通过服务器返回的对该终端的网络访问策略判断如何对该终端执行访问控制,从而做到动态的访问控制,而且配置过程十分简单,从而简化了运营和维护。In this embodiment of the present invention, since access control policies for the IP addresses and MAC addresses of different terminals are set in the server, it is not necessary to configure each IP address on each gateway device, that is, static configuration is not required, but Based on the network access policy of the terminal returned by the server, it is judged how to perform access control on the terminal, so as to achieve dynamic access control, and the configuration process is very simple, thereby simplifying operation and maintenance.
请参考图3,本发明实施例还提供一种认证设备300,该认证设备包括:Referring to FIG. 3, an embodiment of the present invention further provides an
获取模块301,用于获取终端的MAC地址和当前的IP地址。The obtaining
发送模块302,用于向服务器发送认证请求,认证请求包含获取模块301获取的终端的MAC地址和当前的IP地址。The sending
第一接收模块303,用于接收服务器发送的认证响应报文,认证响应报文包含与发送模块302发送的,终端的MAC地址和当前的IP地址对应的访问控制策略。The
第一执行模块304,用于根据第一接收模块303接收的访问控制策略对终端当前的IP地址执行访问控制。The first executing
请参考图4,在一些实施例中,该认证设备还包括:Referring to FIG. 4, in some embodiments, the authentication device further includes:
第二接收模块305,用于接收服务器发送的策略修改报文,策略修改报文包含针对终端的访问控制修改策略。The
第二执行模块306,认证设备根据访问控制修改策略对终端当前的IP地址执行访问控制。The second execution module 306: The authentication device executes access control on the current IP address of the terminal according to the access control modification policy.
请参考图5,在一些实施例中,该认证设备还包括:Referring to FIG. 5, in some embodiments, the authentication device further includes:
第三接收模块307,用于接收终端发送的DHCP报文。The
分配模块308,用于根据DHCP报文为终端分配一个IP地址。The
请参考图6,在一些实施例中,该认证设备还包括:Referring to FIG. 6, in some embodiments, the authentication device further includes:
配置模块309,用于为终端配置IP地址段。The
请参考图7,在一些实施例中,该发送模块302包括:Referring to FIG. 7, in some embodiments, the sending
第一接收单元3011,用于接收终端发送的ARP报文,ARP报文携带终端的MAC地址和当前的IP地址。The
请参考图8,在一些实施例中,该发送模块302包括:Referring to FIG. 8, in some embodiments, the sending
读取单元3021,用于从本地缓存中读取终端原来的IP地址。The
发送单元3022,用于当获取单元获取的终端当前的IP地址,与读取单元读取的终端原来的IP地址不同时,向服务器发送认证请求,认证请求包含终端的原来的IP地址和当前的IP地址以及终端的MAC地址。The sending
请参考图9,在一些实施例中,该第一执行模块304包括:Referring to FIG. 9, in some embodiments, the
执行单元3041,用于根据访问控制策略对终端当前的IP地址和原来的IP地址分别执行访问控制。The executing
本发明实施例中,由于在服务器中设置了对不同终端的IP地址和MAC地址的访问控制策略,因此不需要对逐个IP地址在逐个网关设备上进行配置,即不需要静态配置,而是可以通过服务器返回的对该终端的网络访问策略判断如何对该终端执行访问控制,从而做到动态的访问控制,而且配置过程十分简单,从而简化了运营和维护。In this embodiment of the present invention, since access control policies for the IP addresses and MAC addresses of different terminals are set in the server, it is not necessary to configure each IP address on each gateway device, that is, static configuration is not required, but Based on the network access policy of the terminal returned by the server, it is judged how to perform access control on the terminal, so as to achieve dynamic access control, and the configuration process is very simple, thereby simplifying operation and maintenance.
所述认证设备300可以是图1或图2所述的认证设备,可以执行图2中的认证设备所执行的各个步骤。The
上面从模块化功能实体的角度对本发明实施例中的认证设备进行描述,下面从硬件处理的角度对本发明实施例中的认证设备进行描述,请参阅图10,本发明实施例提供了一种认证设备400,包括:The authentication device in the embodiment of the present invention is described above from the perspective of modular functional entities, and the authentication device in the embodiment of the present invention is described below from the perspective of hardware processing. Please refer to FIG. 10 , an embodiment of the present invention provides an
收发器401、存储器402、处理器403以及总线404。
收发器401、存储器402以及处理器403通过总线404连接。The
收发器401用于获取终端的MAC地址和当前的IP地址;向服务器发送认证请求,认证请求包含终端的MAC地址和当前的IP地址;接收服务器发送的认证响应报文,认证响应报文包含与终端的MAC地址和当前的IP地址对应的访问控制策略。The
进一步的,收发器401包括ZigBee、Wi-Fi、LTE(Long Term Evolution,长期演进)、RFID(Radio Frequency Identification,射频识别技术)、NFC(Near FieldCommunication,近场通信)、红外、UWB(Ultra Wideband,超宽带)的一种或多种组合,此处不作限定;也可以包括EIA-RS-232C标准下的通信接口,即数据终端设备(英文:DataTerminal Equipment,缩写:DTE)和数据通信设备(英文:Data Circuit-terminatingEquipment,缩写:DCE)之间串行二进制数据交换接口技术标准的通信接口,也可以包括RS-485协议下的通信接口,此处不作限定。Further, the
存储器402用于存储程序和收发器401获取的终端的MAC地址和当前的IP地址、向服务器发送的认证请求以及服务器发送的认证响应报文。The
存储器402可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(英文:random-access memory,缩写:RAM);存储器402也可以包括非易失性存储器(英文:non-volatile memory),例如快闪存储器(英文:flash memory),硬盘(英文:hard diskdrive,缩写:HDD)或固态硬盘(英文:solid-state drive,缩写:SSD);存储器403还可以包括上述种类的存储器的任意组合,此处不作限定。The
可选地,存储器402还可以用于存储程序指令,处理器403可以调用该存储器402中存储的程序指令,执行图2所示实施例中的一个或多个步骤,或其中可选的实施方式,使得该认证设备400实现上述方法的功能。Optionally, the
处理器403用于当认证设备400运行时,执行程序以及根据访问控制策略对终端当前的IP地址执行访问控制。The
处理器403可以是中央处理器(英文:central processing unit,缩写:CPU),网络处理器(英文:network processor,缩写:NP)或者CPU和NP的组合。The
处理器403还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(英文:application-specific integrated circuit,缩写:ASIC),可编程逻辑器件(英文:programmable logic device,缩写:PLD)或其任意组合。上述PLD可以是复杂可编程逻辑器件(英文:complex programmable logic device,缩写:CPLD),现场可编程逻辑门阵列(英文:field-programmable gate array,缩写:FPGA),通用阵列逻辑(英文:generic arraylogic,缩写:GAL)或其任意组合。The
可选地,所述认证设备400可以是图1~9中任一所述的认证设备,可以执行图2中的认证设备所执行的各个步骤。Optionally, the
本发明实施例中,由于在服务器中设置了对不同终端的IP地址和MAC地址的访问控制策略,因此不需要对逐个IP地址在逐个网关设备上进行配置,即不需要静态配置,而是可以通过服务器返回的对该终端的网络访问策略判断如何对该终端执行访问控制,从而做到动态的访问控制,而且配置过程十分简单,从而简化了运营和维护。In this embodiment of the present invention, since access control policies for the IP addresses and MAC addresses of different terminals are set in the server, it is not necessary to configure each IP address on each gateway device, that is, static configuration is not required, but Based on the network access policy of the terminal returned by the server, it is judged how to perform access control on the terminal, so as to achieve dynamic access control, and the configuration process is very simple, thereby simplifying operation and maintenance.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions described in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (19)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010301170.9A CN111654464A (en) | 2015-12-31 | 2015-12-31 | Access control method, authentication device and system |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010301170.9A CN111654464A (en) | 2015-12-31 | 2015-12-31 | Access control method, authentication device and system |
CN201511032463.7A CN106936804B (en) | 2015-12-31 | 2015-12-31 | Access control method and authentication equipment |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511032463.7A Division CN106936804B (en) | 2015-12-31 | 2015-12-31 | Access control method and authentication equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111654464A true CN111654464A (en) | 2020-09-11 |
Family
ID=59443673
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010301170.9A Pending CN111654464A (en) | 2015-12-31 | 2015-12-31 | Access control method, authentication device and system |
CN201511032463.7A Active CN106936804B (en) | 2015-12-31 | 2015-12-31 | Access control method and authentication equipment |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511032463.7A Active CN106936804B (en) | 2015-12-31 | 2015-12-31 | Access control method and authentication equipment |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN111654464A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112363578A (en) * | 2020-11-13 | 2021-02-12 | 浪潮电子信息产业股份有限公司 | Server |
CN114301731A (en) * | 2021-12-31 | 2022-04-08 | 德力西电气有限公司 | Address management method, master device and slave device |
CN114374543A (en) * | 2021-12-20 | 2022-04-19 | 北京北信源软件股份有限公司 | Network security protection method, system, device, security switch and storage medium |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109391601B (en) * | 2017-08-10 | 2021-02-12 | 华为技术有限公司 | Method, device and equipment for granting terminal network permission |
CN109803029B (en) * | 2017-11-17 | 2020-11-06 | 华为技术有限公司 | Data processing method, device and equipment |
CN109995738A (en) * | 2018-01-02 | 2019-07-09 | 中国移动通信有限公司研究院 | A kind of access control method, gateway and cloud server |
CN108134858B (en) * | 2018-01-22 | 2020-02-14 | 珠海格力电器股份有限公司 | Networking method, server, client and network system |
CN110933018B (en) * | 2018-09-20 | 2021-01-15 | 马上消费金融股份有限公司 | Network authentication method, device and computer storage medium |
CN109347841B (en) * | 2018-10-26 | 2021-08-10 | 深圳市元征科技股份有限公司 | MAC address authentication method, device, terminal, server and storage medium |
CN113132326B (en) * | 2019-12-31 | 2022-08-09 | 华为技术有限公司 | Access control method, device and system |
CN114157475B (en) * | 2021-11-30 | 2023-09-19 | 迈普通信技术股份有限公司 | Equipment access method and device, authentication equipment and access equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1437361A (en) * | 2002-02-07 | 2003-08-20 | 华为技术有限公司 | Network access control method based on network address |
CN1625853A (en) * | 2002-04-23 | 2005-06-08 | Sk电信有限公司 | Authentication system and method having mobility in public wireless local area network |
CN101465856A (en) * | 2008-12-31 | 2009-06-24 | 杭州华三通信技术有限公司 | Method and system for controlling user access |
CN101540757A (en) * | 2008-03-19 | 2009-09-23 | 北京艾科网信科技有限公司 | Method and system for identifying network and identification equipment |
CN102624744A (en) * | 2012-04-06 | 2012-08-01 | 北京星网锐捷网络技术有限公司 | Authentication method, device and system of network device and network device |
CN102724172A (en) * | 2011-07-28 | 2012-10-10 | 北京天地互连信息技术有限公司 | System and method supporting rapid access authentication |
CN103297967A (en) * | 2012-02-28 | 2013-09-11 | 中国移动通信集团公司 | Method, device and system for user authentication in access of wireless local area network |
CN104468619A (en) * | 2014-12-26 | 2015-03-25 | 杭州华三通信技术有限公司 | Method and gateway for achieving dual-stack web authentication |
US20150326528A1 (en) * | 2014-05-06 | 2015-11-12 | Futurewei Technologies, Inc. | Enforcement of Network-Wide Context Aware Policies |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1845491A (en) * | 2006-02-20 | 2006-10-11 | 南京联创通信科技有限公司 | Access authentication method of 802.1x |
CN101436934B (en) * | 2008-10-20 | 2013-04-24 | 福建星网锐捷网络有限公司 | Method, system and equipment for controlling user networking |
KR101034938B1 (en) * | 2009-11-26 | 2011-05-17 | 삼성에스디에스 주식회사 | IP6 address and access policy management system and method |
CN101917398A (en) * | 2010-06-28 | 2010-12-15 | 北京星网锐捷网络技术有限公司 | Method and equipment for controlling client access authority |
CN102739684B (en) * | 2012-06-29 | 2015-03-18 | 杭州迪普科技有限公司 | Portal authentication method based on virtual IP address, and server thereof |
CN104104516B (en) * | 2014-07-30 | 2018-12-25 | 新华三技术有限公司 | A kind of portal authentication method and equipment |
CN105141618A (en) * | 2015-09-15 | 2015-12-09 | 华为技术有限公司 | Authentication method of network connection and network access device |
-
2015
- 2015-12-31 CN CN202010301170.9A patent/CN111654464A/en active Pending
- 2015-12-31 CN CN201511032463.7A patent/CN106936804B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1437361A (en) * | 2002-02-07 | 2003-08-20 | 华为技术有限公司 | Network access control method based on network address |
CN1625853A (en) * | 2002-04-23 | 2005-06-08 | Sk电信有限公司 | Authentication system and method having mobility in public wireless local area network |
CN101540757A (en) * | 2008-03-19 | 2009-09-23 | 北京艾科网信科技有限公司 | Method and system for identifying network and identification equipment |
CN101465856A (en) * | 2008-12-31 | 2009-06-24 | 杭州华三通信技术有限公司 | Method and system for controlling user access |
CN102724172A (en) * | 2011-07-28 | 2012-10-10 | 北京天地互连信息技术有限公司 | System and method supporting rapid access authentication |
CN103297967A (en) * | 2012-02-28 | 2013-09-11 | 中国移动通信集团公司 | Method, device and system for user authentication in access of wireless local area network |
CN102624744A (en) * | 2012-04-06 | 2012-08-01 | 北京星网锐捷网络技术有限公司 | Authentication method, device and system of network device and network device |
US20150326528A1 (en) * | 2014-05-06 | 2015-11-12 | Futurewei Technologies, Inc. | Enforcement of Network-Wide Context Aware Policies |
CN104468619A (en) * | 2014-12-26 | 2015-03-25 | 杭州华三通信技术有限公司 | Method and gateway for achieving dual-stack web authentication |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112363578A (en) * | 2020-11-13 | 2021-02-12 | 浪潮电子信息产业股份有限公司 | Server |
CN114374543A (en) * | 2021-12-20 | 2022-04-19 | 北京北信源软件股份有限公司 | Network security protection method, system, device, security switch and storage medium |
CN114374543B (en) * | 2021-12-20 | 2023-10-13 | 北京北信源软件股份有限公司 | Network security protection method, system, device, security switch and storage medium |
CN114301731A (en) * | 2021-12-31 | 2022-04-08 | 德力西电气有限公司 | Address management method, master device and slave device |
CN114301731B (en) * | 2021-12-31 | 2023-12-22 | 德力西电气有限公司 | Address management method, master device and slave device |
Also Published As
Publication number | Publication date |
---|---|
CN106936804B (en) | 2020-04-28 |
CN106936804A (en) | 2017-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111654464A (en) | Access control method, authentication device and system | |
US20210385154A1 (en) | Multipath data transmission method and device | |
US20200076708A1 (en) | System Architecture and Methods for Controlling and Managing Networking Devices and Expediting New Service Delivery in a Subscriber?s Home Network Using Micro-domai21 | |
US10129246B2 (en) | Assignment and distribution of network configuration parameters to devices | |
US11451510B2 (en) | Method and apparatus for processing service request | |
US20180069901A1 (en) | Cloud-based virtual local networks | |
CN109314701B (en) | Network path probing using available network connections | |
EP2819363A1 (en) | Method, device and system for providing network traversing service | |
JP6909772B2 (en) | Infrastructure-based D2D connection configuration using OTT services | |
KR20140072193A (en) | Architecture for virtualized home ip service delivery | |
US9219646B2 (en) | Managing actions of a network device | |
WO2014028614A2 (en) | Ip address allocation | |
JP5849354B2 (en) | Access control method for WiFi device and WiFi device | |
CN106533973A (en) | Method and system for distributing service message, and equipment | |
US20160308824A1 (en) | Method for determining gre tunnel, gateway device, and access site | |
US10110702B2 (en) | Dynamic download and enforcement of network access role based on network login context | |
US10657093B2 (en) | Managing actions of a network device based on policy settings corresponding to a removable wireless communication device | |
US9467932B2 (en) | Access control method for WiFi device and WiFi device | |
CN116346294A (en) | Communication method, device, related equipment and storage medium | |
US11711691B2 (en) | Applying network policies on a per-user basis | |
US20230413353A1 (en) | Inter-plmn user plane integration | |
CN105516378B (en) | The method and apparatus of on-position is provided | |
CN119449346A (en) | A network access configuration method and device based on IPv6 address | |
CN116744284A (en) | Method, PCF, system and storage medium for providing QoS service | |
WO2016128039A1 (en) | Apparatus and method for managing communication with a local device of a local network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |