WO2025051027A1 - Traffic policy determination method, electronic device, and storage medium - Google Patents

Traffic policy determination method, electronic device, and storage medium Download PDF

Info

Publication number
WO2025051027A1
WO2025051027A1 PCT/CN2024/114881 CN2024114881W WO2025051027A1 WO 2025051027 A1 WO2025051027 A1 WO 2025051027A1 CN 2024114881 W CN2024114881 W CN 2024114881W WO 2025051027 A1 WO2025051027 A1 WO 2025051027A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
terminal
information
mapping relationship
gateway
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
Application number
PCT/CN2024/114881
Other languages
French (fr)
Chinese (zh)
Inventor
沈金志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Publication of WO2025051027A1 publication Critical patent/WO2025051027A1/en
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/40Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Definitions

  • the present application relates to the field of communication technology, and in particular to a traffic strategy determination method, an electronic device, and a storage medium.
  • network administrators need to uniformly manage users' network access rights and require users to access the network according to pre-planned network segments and locations.
  • users' access locations will move over a large range.
  • Network administrators often need to reassign network access rights to users, which brings great inconvenience to network management and maintenance.
  • Policy mobility means that no matter where the user moves, the user experience remains unchanged, which breaks the limitation of the traditional network access location and truly embodies the characteristic of network moving with people.
  • the present application provides a traffic strategy determination method, an electronic device, and a storage medium.
  • the present application provides a method for determining a traffic policy, wherein the method is applied to a policy execution node, and the method includes: obtaining first information, wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between an Internet Protocol version 6 IPv6 address of a terminal and a media access control MAC address of the terminal; obtaining a first mapping relationship, wherein the first mapping relationship indicates a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal; and determining the traffic policy corresponding to the IPv6 address of the terminal based on the first information and the first mapping relationship.
  • the traffic policy corresponding to the IPv6 address of the terminal is determined based on the first information and the first mapping relationship, including: determining the traffic policy corresponding to the IPv6 address of the terminal based on the traffic policy corresponding to the IPv4 address of the terminal; wherein the traffic policy corresponding to the IPv6 address of the terminal is the same as the traffic policy corresponding to the IPv4 address of the terminal.
  • obtaining the first mapping relationship includes: obtaining the first mapping relationship from a controller through a network configuration protocol NETCONF interface.
  • the obtaining of the first mapping relationship includes: obtaining second information, wherein the second information corresponds to a second message from the gateway, and the second information indicates a second correspondence between the IPv4 address of the terminal and the MAC address of the terminal; obtaining third information, The third information indicates the correspondence between the IPv4 address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal; and based on the second information and the third information, the first mapping relationship is obtained.
  • obtaining the second information includes: obtaining the second information from the gateway through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the second message is one of the following messages: an Address Resolution Protocol ARP message, an ARP table entry, a Dynamic Host Configuration Protocol snooping DHCP Snooping message, or a DHCP Snooping table entry.
  • obtaining the second information includes: obtaining the second information from the controller through a network configuration protocol NETCONF interface; wherein the second message is an ARP message or an ARP table entry.
  • obtaining the second information includes: directly obtaining the second information from the gateway, wherein the policy execution node is set on the gateway, and the second message is an ARP message or an ARP table entry.
  • obtaining the first information includes: obtaining the first information from the gateway through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the first message is one of the following messages: a neighbor discovery ND message, an ND table entry, a neighbor discovery snooping ND Snooping message, or an ND Snooping table entry.
  • obtaining the first information includes: obtaining the first information from the controller through a network configuration protocol NETCONF interface; wherein the first message is an ND message or an ND table entry.
  • obtaining the first information includes: directly obtaining the first information from the gateway, wherein the policy execution node is set on the gateway, and the first message is an ND message or an ND table entry.
  • a method for determining a traffic policy comprising: sending a first message, wherein the first message allows a policy execution node to determine a traffic policy corresponding to an IPv6 address of a terminal based on first information and a first mapping relationship; wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between an IPv6 address of a terminal and a MAC address of the terminal; and the first mapping relationship is a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal.
  • sending the first message includes: sending the first message through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the first message is one of the following messages: a neighbor discovery ND message, an ND table entry, a neighbor discovery snooping ND Snooping message, or an ND Snooping table entry.
  • sending the first message includes: sending the first message to the controller through a remote procedure call protocol GRPC interface or a NETCONF interface to allow The controller sends the first message to the policy execution node; wherein the first message is a neighbor discovery ND message or an ND table entry.
  • sending the first message includes: directly sending the first message to the policy execution node; wherein the policy execution node is set on the gateway, and the first message is an ND message or an ND table entry.
  • the method before sending the first message and the second message, the method also includes: learning the first message and the second message from the terminal.
  • the present application provides a method for determining a traffic policy, wherein the method is applied to a controller, and the method includes: receiving a first message sent by a gateway; and sending the first message to a policy execution node, wherein the first message allows the policy execution node to determine the traffic policy corresponding to the IPv6 address of the terminal based on first information and a first mapping relationship; wherein the first information corresponds to a first message from the gateway, and the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; and the first mapping relationship is the relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal.
  • the method further includes: sending the first mapping relationship to the policy execution node through a network configuration protocol NETCONF interface.
  • the method also includes: receiving a second message sent by the gateway; sending second information and third information to the policy execution node; wherein the second information and the third information allow the policy execution node to determine the first mapping relationship; the second information corresponds to a second message from the gateway, the second information indicates a second correspondence between the IPv4 address of the terminal and the MAC address of the terminal; and the third information indicates a correspondence between the IPv4 address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal.
  • the present application provides a method for determining a traffic policy, wherein the method is applied to a policy execution node, and the method includes: receiving fourth information, wherein the fourth information indicates the traffic policy corresponding to the IPv6 address of the terminal; the fourth information is determined based on first information and a first mapping relationship, the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; the first mapping relationship indicates the relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal; and based on the fourth information, determining the traffic policy corresponding to the IPv6 address of the terminal.
  • the present application provides a method for determining a traffic policy, wherein the method is applied to a gateway, and the method includes: sending a first message, wherein the first message allows a controller to determine the traffic policy corresponding to the IPv6 address of the terminal based on first information and a first mapping relationship, and send the traffic policy corresponding to the IPv6 address of the terminal to a policy execution node; wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; and the first mapping relationship is the relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal.
  • the present application provides a method for determining a traffic strategy, wherein the method is applied to Controller, the method includes: receiving a first message sent by a gateway; the first message allows the controller to determine fourth information based on the first information and the first mapping relationship; wherein the first information corresponds to the first message from the gateway, and the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; the first mapping relationship is the relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC and the traffic policy corresponding to the IPv4 address of the terminal; the fourth information indicates the traffic policy corresponding to the IPv6 address of the terminal; and sending the fourth information to the policy execution node.
  • the present application provides a traffic policy determination device, wherein the device includes: an acquisition module, used to obtain first information and a first mapping relationship, wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between an IPv6 address of a terminal and a MAC address of the terminal; the first mapping relationship indicates a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal; and
  • a traffic policy determination module is used to determine the traffic policy corresponding to the IPv6 address of the terminal based on the first information and the first mapping relationship.
  • the present application provides a policy accompanying method, the method is applied to a software defined network SDN, the method comprising:
  • the first mapping relationship represents a relationship between MAC address information, IPv4 address information and a user group of the terminal
  • a second mapping relationship between IPv6 address information and user groups is generated, and the traffic policy of IPv6 address information is determined according to the second mapping relationship, so as to realize policy following of terminal IPv6 service traffic.
  • the target identification mode is any one of a controller identification mode, a local Ethernet virtual private network EVPN identification mode, and a local gateway identification mode.
  • obtaining a first mapping relationship and a message of the terminal includes:
  • the generating, according to the first mapping relationship and the message, a second mapping relationship between the IPv6 address information of the terminal and the user group includes:
  • the third mapping relationship is compared with the first mapping relationship to generate a second mapping relationship between the IPv6 address information and the user group, so that the policy execution node in the SDN determines the traffic policy of the IPv6 address information according to the second mapping relationship.
  • a second mapping relationship between the IPv6 address information and the user group is generated based on the controller, and the second mapping relationship is sent to the policy execution node, thereby realizing policy-based mobility of the terminal IPv6 service traffic without relying on the authentication device to report the IPv6 address information.
  • obtaining a first mapping relationship and a message of the terminal includes:
  • the generating, according to the first mapping relationship and the message, a second mapping relationship between the IPv6 address information of the terminal and the user group includes:
  • the controller sends the first mapping relationship to the policy execution node, and the policy execution node parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;
  • the third mapping relationship is compared with the first mapping relationship based on the policy execution node to generate a second mapping relationship between the IPv6 address information and the user group.
  • a second mapping relationship between the IPv6 address information and the user group is generated based on the policy execution node, thereby eliminating the need for the controller to separately send down the traffic policy of the IPv6 address information, thereby improving the performance of policy delivery.
  • obtaining a first mapping relationship and a message of the terminal includes:
  • the generating, according to the first mapping relationship and the message, a second mapping relationship between the IPv6 address information of the terminal and the user group includes:
  • the controller sends the first mapping relationship to the gateway, and the gateway parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;
  • the gateway compares the third mapping relationship with the first mapping relationship to generate a second mapping relationship between the IPv6 address information and the user group.
  • the second mapping relationship between the IPv6 address information and the user group can be directly generated based on the gateway.
  • the present application provides a policy accompanying device, which is applied to a software defined network (SDN), and the device includes:
  • An acquisition module configured to acquire a first mapping relationship and a message of a terminal in response to a user operation of selecting a target recognition mode, wherein the first mapping relationship represents a relationship between the MAC address information, the IPv4 address information and the user group of the terminal;
  • a generating module configured to generate an IPv6 address of the terminal according to the first mapping relationship and the message. a second mapping relationship between address information and the user group;
  • a policy accompanying module is used to determine the traffic policy of the IPv6 address information according to the second mapping relationship.
  • the target identification mode is any one of a controller identification mode, a local Ethernet virtual private network EVPN identification mode, and a local gateway identification mode.
  • the acquisition module is specifically used for:
  • the generation module is specifically used for:
  • the third mapping relationship is compared with the first mapping relationship to generate a second mapping relationship between the IPv6 address information and the user group, so that the policy execution node in the SDN determines the traffic policy of the IPv6 address information according to the second mapping relationship.
  • the acquisition module is further used for:
  • the generation module is also used for:
  • the controller sends the first mapping relationship to the policy execution node, and the policy execution node parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;
  • the third mapping relationship is compared with the first mapping relationship based on the policy execution node to generate a second mapping relationship between the IPv6 address information and the user group.
  • the acquisition module is further used for:
  • the generation module is also used for:
  • the controller sends the first mapping relationship to the gateway, and the gateway parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;
  • the gateway compares the third mapping relationship with the first mapping relationship to generate a second mapping relationship between the IPv6 address information and the user group.
  • the present application provides an electronic device, including:
  • Memory used to store computer programs
  • the processor is used to implement the above-mentioned traffic policy determination method steps or policy following method steps when executing the computer program stored in the memory.
  • the present application provides a computer-readable storage medium, wherein the computer-readable
  • the storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned traffic policy determination method steps or policy following method steps.
  • the present application provides a computer program product, which includes: computer program code (or instructions), when the computer program code is executed by one or more processors, it enables the device including the processor to perform the above-mentioned traffic policy determination method steps or policy following method steps.
  • a first message is obtained from a gateway, and first information is determined based on the first message to determine a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal, and a flow policy corresponding to the IPv6 address of the terminal is determined based on the first information and the first mapping relationship.
  • the authentication device there is no need for the authentication device to support IPv6 authentication and audit functions, nor is there a need to set a private message in the authentication message to carry IPv6-related information, thereby achieving decoupling of the flow policy determination process of the IPv6 address information of the terminal from the authentication device, reducing the burden on the authentication device.
  • FIG1 is a flow chart of a method for determining a traffic strategy provided in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of signaling interaction of a controller identification mode provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of signaling interaction in a local EVPN identification mode provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of signaling interaction in a local gateway identification mode provided in an embodiment of the present application.
  • FIG5 is a flow chart of a method for determining a traffic strategy provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of the structure of a traffic strategy determination device provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of the structure of a traffic strategy determination device provided in an embodiment of the present application.
  • SDN Software Defined Network
  • the controller is the brain of SDN, which not only provides different levels of programmability to upper-layer network applications through the northbound interface, but also uniformly configures, manages and controls the data plane through the southbound interface.
  • LDAP Lightweight Directory Access Protocol
  • component information for example, server names and connection properties
  • Office Automation is a new way of working that combines modern office and computer technology.
  • OA server is a cloud server used to store various OA office software.
  • Ethernet Virtual Private Network is a VPN technology used for Layer 2 network interconnection.
  • EVPN extends the BGP protocol to transfer the learning and publishing process of MAC address information between Layer 2 networks from the data plane to the control plane.
  • An autonomous system is a group of routers managed by the same technical management organization and running the same dynamic routing protocol.
  • Border Gateway Protocol is an AS-based protocol. BGP neighbor relationships are manually configured to enable two parties running BGP to find each other and establish connections.
  • Address Resolution Protocol is a protocol that obtains MAC address information based on IP address information.
  • Neighbor Discovery Protocol is mainly responsible for discovering the corresponding address information of other nodes on the link, determining available routes, and maintaining information about available paths and other active nodes. ND defines five types of messages.
  • NS Neighbor Solicitation
  • NA message is the response of IPv6 node to NS message.
  • Router Solicitation is a message sent by an IPv6 node to the router after it is started, requesting the network prefix and other configuration information for automatic configuration of the IPv6 node address information.
  • Router Advertisement is a message sent periodically by a router, which includes key information about the network configuration, such as the network prefix, or the router responds to an RS message with a RA message.
  • Redirect message When the router finds that the incoming interface and outgoing interface of the message are the same, it can notify the terminal through the redirect message to select another better next hop address information for sending subsequent messages.
  • Network Configuration Protocol is a network management protocol based on Extensible Markup Language. It provides a programmable method for the controller to configure and manage the gateway and obtain the gateway data.
  • RPC Remote Procedure Call Protocol
  • GRPC refers to the RPC framework developed by Google.
  • Telemetry technology is a comprehensive technology that uses sensor technology, communication technology, and data processing technology to transmit short-range measurement values of object parameters to a distant measurement station to achieve long-distance measurement.
  • Type 2 routing also known as MAC/IP routing, is used to advertise MAC and IP address information.
  • a host table is a mapping table used in computer networks to associate IP address information with corresponding host names.
  • the southbound interface is the communication protocol between the controller and the switch (gateway, policy execution node, terminal).
  • Strategy mobility means that no matter where the user moves, the user experience remains unchanged. It breaks the limitation of traditional network access location and truly embodies the characteristic of network following people.
  • IPv4 Internet Protocol version 4
  • IPv6 Internet Protocol version 6
  • the embodiment of the present application provides a method for determining a traffic strategy, which can realize the policy accompanying the terminal IPv6 service traffic by generating a second mapping relationship between IPv6 address information and a user group, and determining the traffic strategy of the IPv6 address information according to the second mapping relationship.
  • the method and device described in the embodiment of the present application are based on the same technical concept. Since the principles of the problems solved by the method and the device are similar, the embodiments of the device and the method can refer to each other, and the repeated parts will not be repeated.
  • the embodiment of the present application provides the method operation steps shown in the following embodiments or drawings, the method may include more or fewer operation steps based on routine or no creative labor. In the steps that do not logically have a necessary causal relationship, the execution order of these steps is not limited to the execution order provided by the embodiment of the present application.
  • the method is actually During the processing or when the device is executed, the methods shown in the embodiments or drawings may be executed sequentially or in parallel.
  • FIG1 is a flow chart of a method for determining a traffic strategy provided by an embodiment of the present application.
  • the method is applied to a traffic strategy determination system.
  • the process can be executed by a policy accompanying device, which can be implemented by software, hardware, or a combination of software and hardware to ensure the normal operation of the system. As shown in FIG1 , the process includes the following steps.
  • S12 Generate a second mapping relationship between the IPv6 address information of the terminal and the user group according to the first mapping relationship and the message.
  • the traffic policy of the IPv6 address of the same terminal may be the same as the traffic policy of the IPv4 address of the terminal, which will not be described in detail below.
  • a user group is a collection of multiple user devices.
  • Traffic policies can be set for user groups through the controller to ensure that network resources are not illegally used or accessed.
  • Traffic policies are access control policies. Traffic policies can be permission and rejection, as well as full access, partial access, speed-limited access, or time-limited access. Ordinary technicians in this field should be aware of the various types of traffic policies, which will not be described in detail in this article.
  • Each user group can correspond to a traffic policy. When the policy execution node determines the user group corresponding to the terminal IPv4 address or IPv6 address, the traffic policy corresponding to the terminal IPv4 address or IPv6 address can be determined. When the terminal devices in the user group access the network at any location, the access control policy of the user device is the same, realizing business mobility.
  • the user operation of selecting the target identification mode may refer to determining the traffic policy determination method of the device through device configuration according to requirements during the device deployment stage or the operation stage.
  • the SDN controller when configuring the network, the SDN controller will obtain the organizational relationship (user group) within the organization from the LDAP, OA and other servers, and send the user group and its corresponding traffic policy to the policy execution node.
  • the controller is used to refer to the SDN controller below.
  • devices that do not have corresponding specific user groups in the organizational relationship such as printers or monitoring devices, they can also be individually set up as user groups corresponding to one or more user groups (for example, shared user groups), and the user groups corresponding to these devices and the traffic policies corresponding to the user groups can be sent to the policy execution node.
  • user groups corresponding to one or more user groups for example, shared user groups
  • the policy execution node is used to store the IP address of the terminal device and the corresponding traffic policy.
  • the policy execution node can store the IP address of the terminal device and the corresponding user group information, wherein the user group information corresponds to the traffic policy.
  • the policy execution node receives a message sent by the terminal device, it queries the source IP address corresponding to the message and the user group information to which it belongs, and executes the traffic policy corresponding to the user group.
  • the policy execution node receives a message sent to the terminal device, it queries the destination IP address corresponding to the message and the user group information to which it belongs, and executes the traffic policy corresponding to the user group.
  • the target identification mode is any one of a controller identification mode, a local Ethernet virtual private network EVPN identification mode, and a local gateway identification mode.
  • the controller identification mode is used in the following scenarios: When configured as a policy execution node, and there is no Border Gateway Protocol BGP neighbor relationship configured between the gateway and the policy execution node.
  • a signaling interaction diagram of a controller identification mode provided in an embodiment of the present application includes: obtaining a first mapping relationship of a terminal based on a controller, wherein the first mapping relationship represents the relationship between the MAC address information, IPv4 address information and user group of the terminal.
  • the specific method for obtaining the first mapping relationship may be: the terminal initiates an authentication request to the authentication device, and after receiving the authentication request, the authentication device sends the authentication request and the billing message to the controller through RADIUS. After receiving the authentication request and the billing message, the controller performs proxy authentication, for example, sends the authentication request to the authentication server, and after the authentication is successful, the authentication server returns the authentication pass information to the controller, so that the controller returns the authentication pass information to the terminal via the authentication device, and the terminal authentication is successful.
  • the controller can bind the IPv4 address information, MAC address information and user identity information of the terminal carried in the billing message, determine the user group to which the user belongs through the user identity information, and generate the first mapping relationship between the terminal's MAC address information, IPv4 address information and user group.
  • the controller obtains a message corresponding to the terminal, such as an ARP message and an ND message, wherein the ARP message includes the correspondence between the MAC address of the terminal and the IPv4 address of the terminal, and the ND message includes the correspondence between the MAC address of the terminal and the IPv6 address of the terminal.
  • a message corresponding to the terminal such as an ARP message and an ND message
  • the ARP message includes the correspondence between the MAC address of the terminal and the IPv4 address of the terminal
  • the ND message includes the correspondence between the MAC address of the terminal and the IPv6 address of the terminal.
  • the message corresponding to the terminal can also be replaced by a table item corresponding to the terminal, such as an ARP table item and an ND table item, wherein the ARP table item includes the correspondence between the MAC address of the terminal and the IPv4 address of the terminal, and the ND table item includes the correspondence between the MAC address of the terminal and the IPv6 address of the terminal.
  • a message contains more data information, and the table item is information extracted from the message. If the table item is used to transmit the correspondence between the IP address and the MAC address, the transmission efficiency can be improved.
  • the gateway learns the message or table entry of the terminal and sends the message or table entry to the controller, for example, through NETCONF, GRPC or telemetry technology.
  • the controller parses the message or table entry to obtain a third mapping relationship between the terminal's MAC address information and the IPv6 address information, and based on the third mapping relationship and the first mapping relationship, generates a second mapping relationship between the IPv6 address information and the above-mentioned user group.
  • the controller can send the second mapping relationship to the policy execution node through, for example, the network configuration protocol NETCONF, so that the policy execution node determines the traffic policy of the IPv6 address information according to the second mapping relationship.
  • the policy execution node notifies the second mapping relationship to the solution application component of the policy companion to perform policy association.
  • the policy execution node will also install the second mapping relationship into the host table.
  • the controller may send the message or table entry to the policy execution node.
  • the policy execution node parses the message or table entry to obtain the third mapping relationship between the MAC address information and the IPv6 address information of the terminal.
  • the policy execution node obtains a first mapping relationship from the controller, where the first mapping relationship includes a mapping relationship between MAC address information of the terminal, IPv4 address information, and a user group.
  • the policy execution node generates the IPv6 address information based on the first mapping relationship and the third mapping relationship. and a second mapping relationship between the terminal and the user group, and determining a traffic policy corresponding to the IPv6 address of the terminal based on the second mapping relationship.
  • the controller may send the message or table entry to the policy execution node.
  • the policy execution node parses the message or table entry to obtain the third mapping relationship between the MAC address information and the IPv6 address information of the terminal.
  • the controller when the controller sends the traffic policy corresponding to the IPv4 address, the controller can send the correspondence between the IPv4 address information and the user group to the policy execution node.
  • the policy execution node can obtain the correspondence between the IPv4 address and the MAC address of the terminal based on the ARP message or ARP table entry, and then obtain the first mapping relationship in combination with the traffic policy corresponding to the IPv4 address.
  • the policy execution node may generate a second mapping relationship between the IPv6 address information and the user group based on the first mapping relationship and the third mapping relationship, and determine a traffic policy corresponding to the IPv6 address of the terminal based on the second mapping relationship.
  • the above message is sent to the controller based on the gateway.
  • the authentication device There is no need for the authentication device to support IPv6 authentication and audit functions, nor is there any need to set a private message in the authentication message to carry IPv6-related information, thereby achieving the decoupling of the traffic policy determination process of the terminal's IPv6 address information from the authentication device, reducing the burden on the authentication device.
  • the use scenario of the local EVPN identification mode is: the gateway is not configured as a policy execution node, and a BGP neighbor relationship is configured between the gateway and the policy execution node.
  • a signaling interaction diagram of the local EVPN identification mode provided in an embodiment of the present application is shown.
  • the corresponding message or table item of the terminal is obtained, for example, an ARP message or table item, and an ND message or table item.
  • the message or table item corresponding to the terminal obtained by the policy execution node may also be a dynamic host configuration protocol snooping DHCP snooping message or table item, and a neighbor discovery snooping ND snooping message or table item.
  • the gateway learns the terminal's message and sends the message to the policy execution node through BGP. For example, the gateway sends the message to the policy execution node through EVPN's Type 2 routing.
  • the policy execution node When receiving the message, the policy execution node parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.
  • the first mapping relationship of the terminal is obtained through the controller, wherein the specific method for obtaining the first mapping relationship is consistent with the method for obtaining the first mapping relationship in the controller identification mode, and is not described repeatedly here.
  • the controller sends the first mapping relationship to the policy execution node through the southbound interface.
  • the policy execution node When receiving the first mapping relationship, the policy execution node generates a second mapping relationship between the terminal's IPv6 address information and the user group based on the first mapping relationship and the above-mentioned third mapping relationship; determines the traffic policy of the IPv6 address information according to the second mapping relationship; and installs the second mapping relationship into the host table.
  • the policy execution node determines the traffic policy of the IPv6 address information according to the second mapping relationship. For example, the policy execution node notifies the second mapping relationship to the solution application component of the policy companion to perform policy association. At the same time, the policy execution node also installs the second mapping relationship into the host table.
  • a policy execution node when a policy execution node receives an ND message or an ND table entry, The message is analyzed to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.
  • the controller when the controller sends the traffic policy corresponding to the IPv4 address, the controller can send the correspondence between the IPv4 address information and the user group to the policy execution node.
  • the policy execution node can obtain the correspondence between the IPv4 address and the MAC address of the terminal based on the ARP message or ARP table entry, and then obtain the first mapping relationship in combination with the traffic policy corresponding to the IPv4 address.
  • the policy execution node may generate a second mapping relationship between the IPv6 address information and the user group based on the first mapping relationship and the third mapping relationship, and determine a traffic policy corresponding to the IPv6 address of the terminal based on the second mapping relationship.
  • the above messages are synchronized based on EVPN, and the existing protocols are used. There is no need to add a new private protocol to transmit the binding relationship between IPv6 address information and MAC address information, which can reduce the performance consumption of the policy execution node.
  • the mapping association between IPv6 address information and user groups is performed at the policy execution node, and the traffic policy of the IPv4 address is determined.
  • the traffic policy of the IPv6 address does not need to be determined through the controller, avoiding centralized management of the controller, which can reduce the burden on the controller and improve reliability.
  • the local gateway identification mode is used in a scenario where the gateway is configured as a policy execution node.
  • FIG4 a signaling interaction diagram of a local gateway identification mode provided in an embodiment of the present application is shown.
  • the controller obtains the first mapping relationship of the terminal, wherein the specific method for obtaining the first mapping relationship is consistent with the method for obtaining the first mapping relationship in the controller identification mode, and is not described again here.
  • the controller sends the first mapping relationship to the policy execution node, i.e., the gateway, through the southbound interface.
  • gateway learning terminal's message or table entry such as ARP message or table entry, and ND message or table entry
  • the gateway when the gateway obtains the message or table entry, it can obtain the third mapping relationship between the terminal's MAC address information and IPv6 address information by parsing the message or table entry.
  • the gateway generates a second mapping relationship between the IPv6 address information and the user group based on the third mapping relationship and the first mapping relationship, and then the gateway determines the traffic policy of the IPv6 address information according to the second mapping relationship. For example, the gateway notifies the second mapping relationship to the solution application component of the policy companion to perform policy association. At the same time, the gateway also installs the second mapping relationship into the host table.
  • the policy execution node when receiving an ND message or an ND table entry, parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.
  • the controller when the controller sends the traffic policy corresponding to the IPv4 address, the controller can send the correspondence between the IPv4 address information and the user group to the policy execution node.
  • the policy execution node obtains the correspondence between the IPv4 address and the MAC address of the terminal based on the received ARP message or ARP table entry, and then obtains the first mapping relationship in combination with the traffic policy corresponding to the IPv4 address.
  • the policy execution node generates a second mapping relationship between the IPv6 address information and the user group based on the first mapping relationship and the third mapping relationship, and determines the IPv6 address of the terminal based on the second mapping relationship. Corresponding traffic strategy.
  • the gateway when the gateway is configured as a policy execution node, there is no need to send messages or table entries to the controller.
  • the IPv6 address information of the terminal is directly associated with the user group based on the gateway to achieve policy-based mobility of the terminal IPv6 service traffic.
  • Figure 5 is a flow chart of a method for determining a traffic strategy provided by an embodiment of the present application.
  • the method for determining a traffic strategy is applied to a policy execution point. As shown in Figure 5, the process includes the following steps.
  • the first mapping relationship indicates a relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal.
  • S53 Determine a traffic policy corresponding to the IPv6 address of the terminal based on the first information and the first mapping relationship.
  • a first message is obtained from a gateway, and first information is determined based on the first message to determine a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal, and a traffic policy corresponding to the IPv6 address of the terminal is determined based on the first information and the first mapping relationship.
  • the authentication device there is no need for the authentication device to support IPv6 authentication and audit functions, nor is there a need to set a private message in the authentication message to carry IPv6-related information, thereby achieving decoupling of the traffic policy determination process of the IPv6 address information of the terminal from the authentication device, reducing the burden on the authentication device.
  • the policy execution node obtains a first mapping relationship from the controller, wherein the first mapping relationship is a mapping relationship between the IPv4 address and MAC address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal.
  • the policy execution node determines the traffic policy corresponding to the IPv4 address of the terminal based on the first mapping relationship, and determines the traffic policy corresponding to the IPv6 address of the terminal based on the first corresponding relationship and the traffic policy corresponding to the IPv4 address of the terminal.
  • the policy execution node obtains second information, wherein the second information corresponds to a second message from the gateway, and the second information indicates a second correspondence between the IPv4 address of the terminal and the MAC address of the terminal.
  • the policy execution node obtains third information from the controller, wherein the third information indicates a correspondence between the IPv4 address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal.
  • the policy execution node obtains the first mapping relationship based on the second information and the third information.
  • the terminals include but are not limited to: mobile phones, tablet computers, laptop computers, PDAs, mobile Internet devices (English: Mobile Internet Device, abbreviated as MID), wearable devices, virtual reality (English: Virtual Reality, abbreviated as VR) devices, augmented reality (English: Augmented Reality, abbreviated as AR) devices, wireless terminal devices in industrial control, wireless terminal devices in unmanned driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.
  • mobile Internet devices English: Mobile Internet Device, abbreviated as MID
  • VR Virtual Reality
  • AR Augmented Reality
  • a traffic strategy determination device is also provided in an embodiment of the present application, as shown in FIG6 , which is a structural diagram of a traffic strategy determination device provided in an embodiment of the present application.
  • the traffic strategy determination device may be a policy execution node.
  • the device comprises: an acquisition module 51, which is used to acquire a first mapping relationship and a message of a terminal in response to a user operation of selecting a target recognition mode, wherein the first mapping relationship represents the relationship between the MAC address information, IPv4 address information and user group of the terminal.
  • the generating module 52 is used to generate a second mapping relationship between the IPv6 address information of the terminal and the user group according to the first mapping relationship and the message.
  • the traffic policy determination module 53 is used to determine the traffic policy of the IPv6 address information according to the second mapping relationship.
  • the target identification mode is any one of a controller identification mode, a local Ethernet virtual private network EVPN identification mode, and a local gateway identification mode.
  • the acquisition module 51 is specifically used to: in response to a user operation of selecting the controller identification mode, acquire the first mapping relationship of the terminal and the message based on the controller.
  • the generating module 52 is specifically configured to: parse the message based on the controller to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.
  • the controller generates a second mapping relationship between the IPv6 address information and the user group based on the third mapping relationship and the first mapping relationship, so that the policy execution node determines the traffic policy of the IPv6 address information according to the second mapping relationship.
  • the acquisition module 51 is further used to: in response to a user operation of selecting the local EVPN identification mode, acquire the first mapping relationship of the terminal based on the controller, and acquire the message of the terminal based on the policy execution node.
  • the generating module 52 is further configured to: send the first mapping relationship to the policy execution node based on the controller, and parse the message based on the policy execution node to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.
  • the policy execution node generates a second mapping relationship between the IPv6 address information and the user group based on the third mapping relationship and the first mapping relationship.
  • the acquisition module 51 is further configured to: in response to a user operation of selecting the local gateway identification mode, acquire the first mapping relationship of the terminal based on the controller, and acquire the message of the terminal based on the gateway.
  • the generating module 52 is further configured to: send the first mapping relationship to the gateway based on the controller, and parse the message based on the gateway to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.
  • the gateway generates a second mapping relationship between the IPv6 address information and the user group based on the third mapping relationship and the first mapping relationship.
  • the above-mentioned traffic strategy determination device generates a second mapping relationship between the IPv6 address information and the user group, and determines the traffic strategy of the IPv6 address information according to the second mapping relationship, thereby realizing the policy accompanying the terminal IPv6 service traffic.
  • the traffic strategy determination device may be a policy execution node.
  • the device includes: an acquisition module 71, used to obtain first information and a first mapping relationship, wherein the first information corresponds to a first message from a gateway, the first information indicates a first correspondence between an IPv6 address of a terminal and a MAC address of the terminal; and the first mapping relationship indicates a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal.
  • an acquisition module 71 used to obtain first information and a first mapping relationship, wherein the first information corresponds to a first message from a gateway, the first information indicates a first correspondence between an IPv6 address of a terminal and a MAC address of the terminal; and the first mapping relationship indicates a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal.
  • the traffic policy determination module 72 is used to determine the traffic policy corresponding to the IPv6 address of the terminal based on the first information and the first mapping relationship.
  • an electronic device is also provided in an embodiment of the present application, and the electronic device can realize the function of the aforementioned traffic strategy determination device.
  • the electronic device includes: at least one processor 61, and a memory 62 connected to at least one processor 61.
  • the specific connection medium between the processor 61 and the memory 62 is not limited in the embodiment of the present application.
  • Figure 7 takes the connection between the processor 61 and the memory 62 through the bus 60 as an example.
  • the bus 60 is represented by a thick line in Figure 7, and the connection method between other components is only for schematic illustration and is not limited.
  • the bus 60 can be divided into an address information bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in Figure 7, but it does not mean that there is only one bus or one type of bus.
  • the processor 61 can also be called a controller, and there is no restriction on the name.
  • the memory 62 stores instructions that can be executed by at least one processor 61, and the at least one processor 61 can execute the traffic strategy determination method discussed above by executing the instructions stored in the memory 62.
  • the processor 61 can implement the functions of each module in the device shown in Figures 6 and 8.
  • the processor 61 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device.
  • the processor 61 By running or executing instructions stored in the memory 62 and calling data stored in the memory 62, the various functions of the device and processing data, the device can be monitored as a whole.
  • the processor 61 may include one or more processing units, and the processor 61 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 61.
  • the processor 61 and the memory 62 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
  • the processor 61 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • a general-purpose processor may be a microprocessor or any conventional processor, etc.
  • the steps of the traffic policy determination method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
  • the memory 62 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules.
  • the memory 62 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory, or a memory card.
  • the memory 62 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer, but is not limited to this.
  • the memory 62 in the embodiment of the present application can also be a circuit or any other device that can realize the storage function, used to store program instructions and/or data.
  • the code corresponding to the traffic policy determination method described in the above embodiment can be fixed into the chip, so that the chip can execute the steps of the traffic policy determination method of the embodiment shown in Figures 1 and 5 when running.
  • How to design and program the processor 61 is a technology known to those skilled in the art and will not be described in detail here.
  • an embodiment of the present application further provides a storage medium, which stores computer instructions.
  • the computer instructions When the computer instructions are executed on a computer, the computer executes the traffic strategy determination method discussed above.
  • various aspects of the traffic policy determination method provided in the present application can also be implemented in the form of a program product, which includes a program code.
  • the program product When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the traffic policy determination method according to various exemplary embodiments of the present application described above in this specification.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application discloses a traffic policy determination method, an electronic device, and a storage medium. The method is applied to a policy execution node and comprises: acquiring first information, wherein the first information corresponds to a first packet from a gateway, and the first information indicates a first correspondence between an Internet protocol version 6 (IPv6) address of a terminal and a media access control (MAC) address of the terminal; acquiring a first mapping relationship, wherein the first mapping relationship indicates a relationship among an Internet protocol version 4 (IPv4) address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal; and on the basis of the first information and the first mapping relationship, determining a traffic policy corresponding to the IPv6 address of the terminal.

Description

流量策略确定方法、电子设备及存储介质Traffic strategy determination method, electronic device and storage medium

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本申请要求于2023年09月07日提交中国国家知识产权局、申请号为202311149908.4、发明名称为“一种策略随行方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office of China on September 7, 2023, with application number 202311149908.4 and invention name “A strategic accompanying method, device and electronic device”, all contents of which are incorporated by reference in this application.

技术领域Technical Field

本申请涉及通信技术领域,特别是涉及一种流量策略确定方法、电子设备及存储介质。The present application relates to the field of communication technology, and in particular to a traffic strategy determination method, an electronic device, and a storage medium.

背景技术Background Art

在园区网络内,网络管理员需要对用户的网络访问权限进行统一管理,需要用户按照事先规划好的网段和位置接入。现阶段,企业的网络不断得到建设与发展,用户的接入位置会进行大范围移动,网络管理员往往需要重新给用户分配网络访问权限,给网络的管理及维护带来了极大的不方便。In the campus network, network administrators need to uniformly manage users' network access rights and require users to access the network according to pre-planned network segments and locations. At present, as enterprise networks continue to be built and developed, users' access locations will move over a large range. Network administrators often need to reassign network access rights to users, which brings great inconvenience to network management and maintenance.

因此,为解决上述问题,提出了一种有效的网络管理以及保障企业网络安全的方法,也就是策略随行。策略随行是指用户无论移动到哪里,用户的体验是不变的,其打破了传统网络受接入位置的限制,真正意义上体现了网随人动的特点。Therefore, in order to solve the above problems, an effective network management and enterprise network security protection method is proposed, that is, policy mobility. Policy mobility means that no matter where the user moves, the user experience remains unchanged, which breaks the limitation of the traditional network access location and truly embodies the characteristic of network moving with people.

发明内容Summary of the invention

本申请提供了一种流量策略确定方法、电子设备及存储介质。The present application provides a traffic strategy determination method, an electronic device, and a storage medium.

第一方面,本申请提供一种流量策略确定方法,其中,所述方法应用于策略执行节点,所述方法包括:获取第一信息,其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的互联网协议第六版IPv6地址与所述终端的媒体访问控制MAC地址的第一对应关系;获取第一映射关系,其中,所述第一映射关系指示所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系;以及基于所述第一信息和所述第一映射关系,确定所述终端的IPv6地址对应的流量策略。In a first aspect, the present application provides a method for determining a traffic policy, wherein the method is applied to a policy execution node, and the method includes: obtaining first information, wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between an Internet Protocol version 6 IPv6 address of a terminal and a media access control MAC address of the terminal; obtaining a first mapping relationship, wherein the first mapping relationship indicates a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal; and determining the traffic policy corresponding to the IPv6 address of the terminal based on the first information and the first mapping relationship.

在一种可能的设计中,所述基于所述第一信息和所述第一映射关系,确定所述终端的IPv6地址对应的流量策略,包括:基于所述终端的IPv4地址对应的流量策略,确定所述终端的IPv6地址对应的流量策略;其中,所述终端的IPv6地址对应的流量策略与所述终端的IPv4地址对应的流量策略相同。In one possible design, the traffic policy corresponding to the IPv6 address of the terminal is determined based on the first information and the first mapping relationship, including: determining the traffic policy corresponding to the IPv6 address of the terminal based on the traffic policy corresponding to the IPv4 address of the terminal; wherein the traffic policy corresponding to the IPv6 address of the terminal is the same as the traffic policy corresponding to the IPv4 address of the terminal.

在一种可能的设计中,所述获取第一映射关系,包括:通过网络配置协议NETCONF接口从控制器获取所述第一映射关系。In one possible design, obtaining the first mapping relationship includes: obtaining the first mapping relationship from a controller through a network configuration protocol NETCONF interface.

在一种可能的设计中,所述获取第一映射关系,包括:获取第二信息,其中,所述第二信息对应来自所述网关的第二报文,所述第二信息指示所述终端的IPv4地址与所述终端的MAC地址的第二对应关系;获取第三信息, 其中,所述第三信息指示所述终端的IPv4地址以及所述终端的IPv4地址对应的流量策略之间的对应关系;以及基于所述第二信息和所述第三信息,获取所述第一映射关系。In a possible design, the obtaining of the first mapping relationship includes: obtaining second information, wherein the second information corresponds to a second message from the gateway, and the second information indicates a second correspondence between the IPv4 address of the terminal and the MAC address of the terminal; obtaining third information, The third information indicates the correspondence between the IPv4 address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal; and based on the second information and the third information, the first mapping relationship is obtained.

在一种可能的设计中,所述获取第二信息,包括:通过基于以太的虚拟私有网络EVPN从所述网关获取所述第二信息;其中,所述网关和所述策略执行节点为边界网关协议BGP邻居关系,以及所述第二报文为以下报文其中之一:地址解析协议ARP报文、ARP表项、动态主机配置协议侦听DHCP Snooping报文或者DHCP Snooping表项。In one possible design, obtaining the second information includes: obtaining the second information from the gateway through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the second message is one of the following messages: an Address Resolution Protocol ARP message, an ARP table entry, a Dynamic Host Configuration Protocol snooping DHCP Snooping message, or a DHCP Snooping table entry.

在一种可能的设计中,所述获取第二信息,包括:通过网络配置协议NETCONF接口从控制器获取所述第二信息;其中,所述第二报文为ARP报文或者ARP表项。In one possible design, obtaining the second information includes: obtaining the second information from the controller through a network configuration protocol NETCONF interface; wherein the second message is an ARP message or an ARP table entry.

在一种可能的设计中,所述获取第二信息,包括:从所述网关直接获取所述第二信息,其中,所述策略执行节点设置于所述网关上,所述第二报文为ARP报文或者ARP表项。In one possible design, obtaining the second information includes: directly obtaining the second information from the gateway, wherein the policy execution node is set on the gateway, and the second message is an ARP message or an ARP table entry.

在一种可能的设计中,所述获取第一信息,包括:通过基于以太的虚拟私有网络EVPN从所述网关获取所述第一信息;其中,所述网关和所述策略执行节点为边界网关协议BGP邻居关系,以及所述第一报文为以下报文其中之一:邻居发现ND报文、ND表项、邻居发现侦听ND Snooping报文或者ND Snooping表项。In one possible design, obtaining the first information includes: obtaining the first information from the gateway through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the first message is one of the following messages: a neighbor discovery ND message, an ND table entry, a neighbor discovery snooping ND Snooping message, or an ND Snooping table entry.

在一种可能的设计中,所述获取第一信息,包括:通过网络配置协议NETCONF接口从控制器获取所述第一信息;其中,所述第一报文为ND报文或者ND表项。In one possible design, obtaining the first information includes: obtaining the first information from the controller through a network configuration protocol NETCONF interface; wherein the first message is an ND message or an ND table entry.

在一种可能的设计中,所述获取第一信息,包括:从所述网关直接获取所述第一信息,其中,所述策略执行节点设置于所述网关上,以及所述第一报文为ND报文或者ND表项。In one possible design, obtaining the first information includes: directly obtaining the first information from the gateway, wherein the policy execution node is set on the gateway, and the first message is an ND message or an ND table entry.

第二方面,提供一种流量策略确定方法,其中,所述方法应用于网关,所述方法包括:发送第一报文,其中,所述第一报文允许策略执行节点基于第一信息和第一映射关系确定终端的IPv6地址对应的流量策略;其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系;以及所述第一映射关系为所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系。In a second aspect, a method for determining a traffic policy is provided, wherein the method is applied to a gateway, and the method comprises: sending a first message, wherein the first message allows a policy execution node to determine a traffic policy corresponding to an IPv6 address of a terminal based on first information and a first mapping relationship; wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between an IPv6 address of a terminal and a MAC address of the terminal; and the first mapping relationship is a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal.

在一种可能的设计中,所述发送所述第一报文包括:通过基于以太的虚拟私有网络EVPN发送第一报文;其中,所述网关和所述策略执行节点为边界网关协议BGP邻居关系,以及所述第一报文为以下报文其中之一:邻居发现ND报文、ND表项、邻居发现侦听ND Snooping报文或者ND Snooping表项。In one possible design, sending the first message includes: sending the first message through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the first message is one of the following messages: a neighbor discovery ND message, an ND table entry, a neighbor discovery snooping ND Snooping message, or an ND Snooping table entry.

在一种可能的设计中,所述发送所述第一报文包括:通过远程过程调用协议GRPC接口或者NETCONF接口,发送所述第一报文给控制器,以允许 所述控制器将所述第一报文发送给所述策略执行节点;其中,所述第一报文为邻居发现ND报文或者ND表项。In one possible design, sending the first message includes: sending the first message to the controller through a remote procedure call protocol GRPC interface or a NETCONF interface to allow The controller sends the first message to the policy execution node; wherein the first message is a neighbor discovery ND message or an ND table entry.

在一种可能的设计中,所述发送所述第一报文包括:直接发送所述第一报文给所述策略执行节点;其中,所述策略执行节点设置于所述网关上,以及所述第一报文为ND报文或者ND表项。In one possible design, sending the first message includes: directly sending the first message to the policy execution node; wherein the policy execution node is set on the gateway, and the first message is an ND message or an ND table entry.

在一种可能的设计中,所述发送所述第一报文和所述第二报文之前,所述方法还包括:从所述终端学习所述第一报文和所述第二报文。In one possible design, before sending the first message and the second message, the method also includes: learning the first message and the second message from the terminal.

第三方面,本申请提供一种流量策略确定方法,其中,所述方法应用于控制器,所述方法包括:接收网关发送的第一报文;以及发送所述第一报文给策略执行节点,所述第一报文允许策略执行节点基于第一信息和第一映射关系确定终端的IPv6地址对应的流量策略;其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系;以及所述第一映射关系为所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系。In a third aspect, the present application provides a method for determining a traffic policy, wherein the method is applied to a controller, and the method includes: receiving a first message sent by a gateway; and sending the first message to a policy execution node, wherein the first message allows the policy execution node to determine the traffic policy corresponding to the IPv6 address of the terminal based on first information and a first mapping relationship; wherein the first information corresponds to a first message from the gateway, and the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; and the first mapping relationship is the relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal.

在一种可能的设计中,所述方法还包括:通过网络配置协议NETCONF接口向所述策略执行节点发送所述第一映射关系。In one possible design, the method further includes: sending the first mapping relationship to the policy execution node through a network configuration protocol NETCONF interface.

在一种可能的设计中,所述方法还包括:接收网关发送的第二报文;向所述策略执行节点发送第二信息和第三信息;其中,所述第二信息和所述第三信息允许所述策略执行节点确定所述第一映射关系;所述第二信息对应来自所述网关的第二报文,所述第二信息指示所述终端的IPv4地址与所述终端的MAC地址的第二对应关系;以及所述第三信息指示所述终端的IPv4地址以及所述终端的IPv4地址对应的流量策略之间的对应关系。In one possible design, the method also includes: receiving a second message sent by the gateway; sending second information and third information to the policy execution node; wherein the second information and the third information allow the policy execution node to determine the first mapping relationship; the second information corresponds to a second message from the gateway, the second information indicates a second correspondence between the IPv4 address of the terminal and the MAC address of the terminal; and the third information indicates a correspondence between the IPv4 address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal.

第四方面,本申请提供一种流量策略确定方法,其中,所述方法应用于策略执行节点,所述方法包括:接收第四信息,其中,所述第四信息指示终端的IPv6地址对应的流量策略;所述第四信息基于第一信息和第一映射关系确定,所述第一信息对应来自网关的第一报文,所述第一信息指示所述终端的IPv6地址与所述终端的MAC地址的第一对应关系;所述第一映射关系指示所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系;以及基于所述第四信息,确定所述终端的IPv6地址对应的流量策略。In a fourth aspect, the present application provides a method for determining a traffic policy, wherein the method is applied to a policy execution node, and the method includes: receiving fourth information, wherein the fourth information indicates the traffic policy corresponding to the IPv6 address of the terminal; the fourth information is determined based on first information and a first mapping relationship, the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; the first mapping relationship indicates the relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal; and based on the fourth information, determining the traffic policy corresponding to the IPv6 address of the terminal.

第五方面,本申请提供一种流量策略确定方法,其中,所述方法应用于网关,所述方法包括:发送第一报文,其中,所述第一报文允许控制器基于第一信息和第一映射关系确定终端的IPv6地址对应的流量策略,并将所述终端的IPv6地址对应的流量策略发送给策略执行节点;其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系;以及所述第一映射关系为所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系。In a fifth aspect, the present application provides a method for determining a traffic policy, wherein the method is applied to a gateway, and the method includes: sending a first message, wherein the first message allows a controller to determine the traffic policy corresponding to the IPv6 address of the terminal based on first information and a first mapping relationship, and send the traffic policy corresponding to the IPv6 address of the terminal to a policy execution node; wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; and the first mapping relationship is the relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal.

第六方面,本申请提供一种流量策略确定方法,其中,所述方法应用于 控制器,所述方法包括:接收网关发送的第一报文;所述第一报文允许控制器基于第一信息和第一映射关系确定第四信息;其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系;所述第一映射关系为所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系;所述第四信息指示终端的IPv6地址对应的流量策略;以及发送所述第四信息给策略执行节点。In a sixth aspect, the present application provides a method for determining a traffic strategy, wherein the method is applied to Controller, the method includes: receiving a first message sent by a gateway; the first message allows the controller to determine fourth information based on the first information and the first mapping relationship; wherein the first information corresponds to the first message from the gateway, and the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; the first mapping relationship is the relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC and the traffic policy corresponding to the IPv4 address of the terminal; the fourth information indicates the traffic policy corresponding to the IPv6 address of the terminal; and sending the fourth information to the policy execution node.

第七方面,本申请提供一种流量策略确定装置,其中,所述装置包括:获取模块,用于获取第一信息和第一映射关系,其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系;所述第一映射关系指示所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系;以及In a seventh aspect, the present application provides a traffic policy determination device, wherein the device includes: an acquisition module, used to obtain first information and a first mapping relationship, wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between an IPv6 address of a terminal and a MAC address of the terminal; the first mapping relationship indicates a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal; and

流量策略确定模块,用于基于所述第一信息和所述第一映射关系,确定所述终端的IPv6地址对应的流量策略。A traffic policy determination module is used to determine the traffic policy corresponding to the IPv6 address of the terminal based on the first information and the first mapping relationship.

第八方面,本申请提供了一种策略随行方法,所述方法应用于软件定义网络SDN,所述方法包括:In an eighth aspect, the present application provides a policy accompanying method, the method is applied to a software defined network SDN, the method comprising:

响应于选择目标识别模式的用户操作,获取终端的第一映射关系和报文,其中,所述第一映射关系表征所述终端的MAC地址信息、IPv4地址信息和用户组之间的关系;In response to a user operation of selecting a target identification mode, obtaining a first mapping relationship and a message of a terminal, wherein the first mapping relationship represents a relationship between MAC address information, IPv4 address information and a user group of the terminal;

根据所述第一映射关系和所述报文,生成所述终端的IPv6地址信息与所述用户组之间的第二映射关系;Generate a second mapping relationship between the IPv6 address information of the terminal and the user group according to the first mapping relationship and the message;

根据所述第二映射关系确定所述IPv6地址信息的流量策略。Determine a traffic policy for the IPv6 address information according to the second mapping relationship.

通过上述方法,生成IPv6地址信息和用户组之间的第二映射关系,并根据第二映射关系确定IPv6地址信息的流量策略,实现终端IPv6业务流量的策略随行。Through the above method, a second mapping relationship between IPv6 address information and user groups is generated, and the traffic policy of IPv6 address information is determined according to the second mapping relationship, so as to realize policy following of terminal IPv6 service traffic.

在一种可能的设计中,所述目标识别模式为控制器识别模式、本地以太网虚拟专用网络EVPN识别模式和本地网关识别模式中任一项。In one possible design, the target identification mode is any one of a controller identification mode, a local Ethernet virtual private network EVPN identification mode, and a local gateway identification mode.

在一种可能的设计中,所述响应于选择目标识别模式的用户操作,获取终端的第一映射关系和报文,包括:In a possible design, in response to a user operation of selecting a target recognition mode, obtaining a first mapping relationship and a message of the terminal includes:

响应于选择所述控制器识别模式的用户操作时,基于所述SDN中的控制器获取所述终端的第一映射关系和所述报文;In response to a user operation of selecting the controller identification mode, acquiring a first mapping relationship of the terminal and the message based on a controller in the SDN;

所述根据所述第一映射关系和所述报文,生成所述终端的IPv6地址信息与所述用户组之间的第二映射关系,包括:The generating, according to the first mapping relationship and the message, a second mapping relationship between the IPv6 address information of the terminal and the user group includes:

基于所述控制器解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系;Parsing the message based on the controller to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;

基于所述控制器将所述第三映射关系和所述第一映射关系进行比对,生成所述IPv6地址信息与所述用户组之间的第二映射关系,以使所述SDN中的策略执行节点根据所述第二映射关系确定所述IPv6地址信息的流量策略。 Based on the controller, the third mapping relationship is compared with the first mapping relationship to generate a second mapping relationship between the IPv6 address information and the user group, so that the policy execution node in the SDN determines the traffic policy of the IPv6 address information according to the second mapping relationship.

通过上述方法,响应于选择控制器识别模式的用户操作,基于控制器生成IPv6地址信息和用户组之间的第二映射关系,并将该第二映射关系下发至策略执行节点,从而在无需依赖认证设备上报IPv6地址信息的情况下,实现终端IPv6业务流量的策略随行。Through the above method, in response to the user operation of selecting the controller identification mode, a second mapping relationship between the IPv6 address information and the user group is generated based on the controller, and the second mapping relationship is sent to the policy execution node, thereby realizing policy-based mobility of the terminal IPv6 service traffic without relying on the authentication device to report the IPv6 address information.

在一种可能的设计中,所述响应于选择目标识别模式的用户操作,获取终端的第一映射关系和报文,包括:In a possible design, in response to a user operation of selecting a target recognition mode, obtaining a first mapping relationship and a message of the terminal includes:

响应于选择所述本地EVPN识别模式的用户操作时,基于所述SDN中的控制器获取所述终端的第一映射关系,并基于所述SDN中的策略执行节点获取所述终端的报文;In response to a user operation of selecting the local EVPN identification mode, acquiring a first mapping relationship of the terminal based on a controller in the SDN, and acquiring a message of the terminal based on a policy execution node in the SDN;

所述根据所述第一映射关系和所述报文,生成所述终端的IPv6地址信息与所述用户组之间的第二映射关系,包括:The generating, according to the first mapping relationship and the message, a second mapping relationship between the IPv6 address information of the terminal and the user group includes:

基于所述控制器将所述第一映射关系下发至所述策略执行节点,并基于所述策略执行节点解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系;The controller sends the first mapping relationship to the policy execution node, and the policy execution node parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;

基于所述策略执行节点将所述第三映射关系和所述第一映射关系进行比对,生成所述IPv6地址信息与所述用户组之间的第二映射关系。The third mapping relationship is compared with the first mapping relationship based on the policy execution node to generate a second mapping relationship between the IPv6 address information and the user group.

通过上述方法,响应于选择本地EVPN识别模式的用户操作,基于策略执行节点生成IPv6地址信息和用户组之间的第二映射关系,从而无需控制器单独下发IPv6地址信息的流量策略,提高策略下发的性能。Through the above method, in response to the user operation of selecting the local EVPN identification mode, a second mapping relationship between the IPv6 address information and the user group is generated based on the policy execution node, thereby eliminating the need for the controller to separately send down the traffic policy of the IPv6 address information, thereby improving the performance of policy delivery.

在一种可能的设计中,所述响应于选择目标识别模式的用户操作,获取终端的第一映射关系和报文,包括:In a possible design, in response to a user operation of selecting a target recognition mode, obtaining a first mapping relationship and a message of the terminal includes:

响应于选择所述本地网关识别模式的用户操作时,基于所述SDN中的控制器获取所述终端的第一映射关系,并基于所述SDN中的网关获取所述终端的报文;In response to a user operation of selecting the local gateway identification mode, acquiring a first mapping relationship of the terminal based on a controller in the SDN, and acquiring a message of the terminal based on a gateway in the SDN;

所述根据所述第一映射关系和所述报文,生成所述终端的IPv6地址信息与所述用户组之间的第二映射关系,包括:The generating, according to the first mapping relationship and the message, a second mapping relationship between the IPv6 address information of the terminal and the user group includes:

基于所述控制器将所述第一映射关系下发至所述网关,并基于所述网关解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系;The controller sends the first mapping relationship to the gateway, and the gateway parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;

基于所述网关将所述第三映射关系和所述第一映射关系进行比对,生成所述IPv6地址信息与所述用户组之间的第二映射关系。The gateway compares the third mapping relationship with the first mapping relationship to generate a second mapping relationship between the IPv6 address information and the user group.

通过上述方法,响应于选择本地网关识别模式的用户操作,可直接基于网关生成IPv6地址信息和用户组之间的第二映射关系。Through the above method, in response to the user operation of selecting the local gateway identification mode, the second mapping relationship between the IPv6 address information and the user group can be directly generated based on the gateway.

第九方面,本申请提供了一种策略随行装置,所述装置应用于软件定义网络SDN,所述装置包括:In a ninth aspect, the present application provides a policy accompanying device, which is applied to a software defined network (SDN), and the device includes:

获取模块,用于响应于选择目标识别模式的用户操作,获取终端的第一映射关系和报文,其中,所述第一映射关系表征所述终端的MAC地址信息、IPv4地址信息和用户组之间的关系;An acquisition module, configured to acquire a first mapping relationship and a message of a terminal in response to a user operation of selecting a target recognition mode, wherein the first mapping relationship represents a relationship between the MAC address information, the IPv4 address information and the user group of the terminal;

生成模块,用于根据所述第一映射关系和所述报文,生成所述终端的IPv6 地址信息与所述用户组之间的第二映射关系;A generating module, configured to generate an IPv6 address of the terminal according to the first mapping relationship and the message. a second mapping relationship between address information and the user group;

策略随行模块,用于根据所述第二映射关系确定所述IPv6地址信息的流量策略。A policy accompanying module is used to determine the traffic policy of the IPv6 address information according to the second mapping relationship.

在一种可能的设计中,所述目标识别模式为控制器识别模式、本地以太网虚拟专用网络EVPN识别模式和本地网关识别模式中任一项。In one possible design, the target identification mode is any one of a controller identification mode, a local Ethernet virtual private network EVPN identification mode, and a local gateway identification mode.

在一种可能的设计中,所述获取模块具体用于:In a possible design, the acquisition module is specifically used for:

响应于选择所述控制器识别模式的用户操作时,基于所述SDN中的控制器获取所述终端的第一映射关系和所述报文;In response to a user operation of selecting the controller identification mode, acquiring a first mapping relationship of the terminal and the message based on a controller in the SDN;

所述生成模块具体用于:The generation module is specifically used for:

基于所述控制器解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系;Parsing the message based on the controller to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;

基于所述控制器将所述第三映射关系和所述第一映射关系进行比对,生成所述IPv6地址信息与所述用户组之间的第二映射关系,以使所述SDN中的策略执行节点根据所述第二映射关系确定所述IPv6地址信息的流量策略。Based on the controller, the third mapping relationship is compared with the first mapping relationship to generate a second mapping relationship between the IPv6 address information and the user group, so that the policy execution node in the SDN determines the traffic policy of the IPv6 address information according to the second mapping relationship.

在一种可能的设计中,所述获取模块还用于:In a possible design, the acquisition module is further used for:

响应于选择所述本地EVPN识别模式的用户操作时,基于所述SDN中的控制器获取所述终端的第一映射关系,并基于所述SDN中的策略执行节点获取所述终端的报文;In response to a user operation of selecting the local EVPN identification mode, acquiring a first mapping relationship of the terminal based on a controller in the SDN, and acquiring a message of the terminal based on a policy execution node in the SDN;

所述生成模块还用于:The generation module is also used for:

基于所述控制器将所述第一映射关系下发至所述策略执行节点,并基于所述策略执行节点解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系;The controller sends the first mapping relationship to the policy execution node, and the policy execution node parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;

基于所述策略执行节点将所述第三映射关系和所述第一映射关系进行比对,生成所述IPv6地址信息与所述用户组之间的第二映射关系。The third mapping relationship is compared with the first mapping relationship based on the policy execution node to generate a second mapping relationship between the IPv6 address information and the user group.

在一种可能的设计中,所述获取模块还用于:In a possible design, the acquisition module is further used for:

响应于选择所述本地网关识别模式的用户操作时,基于所述SDN中的控制器获取所述终端的第一映射关系,并基于所述SDN中的网关获取所述终端的报文;In response to a user operation of selecting the local gateway identification mode, acquiring a first mapping relationship of the terminal based on a controller in the SDN, and acquiring a message of the terminal based on a gateway in the SDN;

所述生成模块还用于:The generation module is also used for:

基于所述控制器将所述第一映射关系下发至所述网关,并基于所述网关解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系;The controller sends the first mapping relationship to the gateway, and the gateway parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal;

基于所述网关将所述第三映射关系和所述第一映射关系进行比对,生成所述IPv6地址信息与所述用户组之间的第二映射关系。The gateway compares the third mapping relationship with the first mapping relationship to generate a second mapping relationship between the IPv6 address information and the user group.

第十方面,本申请提供了一种电子设备,包括:In a tenth aspect, the present application provides an electronic device, including:

存储器,用于存放计算机程序;Memory, used to store computer programs;

处理器,用于执行所述存储器上所存放的计算机程序时,实现上述流量策略确定方法步骤或者策略随行方法步骤。The processor is used to implement the above-mentioned traffic policy determination method steps or policy following method steps when executing the computer program stored in the memory.

第十一方面,本申请提供了一种计算机可读存储介质,所述计算机可读 存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述流量策略确定方法步骤或者策略随行方法步骤。In an eleventh aspect, the present application provides a computer-readable storage medium, wherein the computer-readable The storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned traffic policy determination method steps or policy following method steps.

第十二方面,本申请提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码(或指令),当该计算机程序代码由一个或多个处理器执行时,使得包括该处理器的装置执行上述流量策略确定方法步骤或者策略随行方法步骤。In the twelfth aspect, the present application provides a computer program product, which includes: computer program code (or instructions), when the computer program code is executed by one or more processors, it enables the device including the processor to perform the above-mentioned traffic policy determination method steps or policy following method steps.

在本申请实施方式中,通过从网关获取第一报文,基于第一报文确定第一信息,确定终端的IPv6地址与终端的MAC地址的第一对应关系,并基于所述第一信息和所述第一映射关系,确定终端的IPv6地址对应的流量策略。在该实施方式中,无需认证设备支持IPv6认证功能和审计功能,也不需要在认证报文中设置私有报文携带IPv6相关的信息,进而实现终端的IPv6地址信息的流量策略确定过程与认证设备的解耦,减轻认证设备的负担。In an implementation manner of the present application, a first message is obtained from a gateway, and first information is determined based on the first message to determine a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal, and a flow policy corresponding to the IPv6 address of the terminal is determined based on the first information and the first mapping relationship. In this implementation manner, there is no need for the authentication device to support IPv6 authentication and audit functions, nor is there a need to set a private message in the authentication message to carry IPv6-related information, thereby achieving decoupling of the flow policy determination process of the IPv6 address information of the terminal from the authentication device, reducing the burden on the authentication device.

上述第二方面至第十二方面中的各个方面以及各个方面可能达到的技术效果参照上述针对第一方面或者第一方面中的各种可能方案可以达到的技术效果说明,这里不再重复赘述。The technical effects that can be achieved in each of the above-mentioned second to twelfth aspects and each of the above-mentioned aspects refer to the technical effects that can be achieved in the above-mentioned first aspect or various possible schemes in the first aspect, and will not be repeated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或相关技术中的技术方案,下面将对实施例或传统技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or traditional technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, drawings of other embodiments can also be obtained based on these drawings without creative work. The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments that conform to the present application, and together with the specification, are used to explain the principles of the present application.

图1为本申请实施例提供的一种流量策略确定方法的流程图。FIG1 is a flow chart of a method for determining a traffic strategy provided in an embodiment of the present application.

图2为本申请实施例提供的一种控制器识别模式的信令交互示意图。FIG. 2 is a schematic diagram of signaling interaction of a controller identification mode provided in an embodiment of the present application.

图3为本申请实施例提供的一种本地EVPN识别模式的信令交互示意图。FIG3 is a schematic diagram of signaling interaction in a local EVPN identification mode provided in an embodiment of the present application.

图4为本申请实施例提供的一种本地网关识别模式的信令交互示意图。FIG4 is a schematic diagram of signaling interaction in a local gateway identification mode provided in an embodiment of the present application.

图5为本申请实施例提供的一种流量策略确定方法的流程图。FIG5 is a flow chart of a method for determining a traffic strategy provided in an embodiment of the present application.

图6为本申请实施例提供的一种流量策略确定装置的结构示意图。FIG6 is a schematic diagram of the structure of a traffic strategy determination device provided in an embodiment of the present application.

图7为本申请实施例提供的一种电子设备结构示意图。FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

图8为本申请实施例提供的一种流量策略确定装置的结构示意图。FIG8 is a schematic diagram of the structure of a traffic strategy determination device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。方法实施例中的具体操作方法也可以应用于装置实施例或系统实施例中。需要说明的是,在本申请的描述中“多个”理解为“至少两个”。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,并存在A和B,单独存在B这三种情况。A与B连接,可以表示:A与B直接连接和A与B通过C连接这两种情况。 另外,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The specific operating method in the method embodiment can also be applied to the device embodiment or the system embodiment. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And/or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can represent the following three situations: A exists alone, and A and B exist, and B exists alone. A is connected to B, which can represent the following two situations: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as “first” and “second” are only used for the purpose of distinguishing the description and cannot be understood as indicating or implying relative importance or order.

为了便于本领域技术人员理解,首先对本申请实施例中所涉及的技术术语进行解释说明。In order to facilitate understanding by those skilled in the art, the technical terms involved in the embodiments of the present application are first explained.

(1)软件定义网络(英文:Software Defined Network,缩写为SDN)是网络虚拟化的一种实现方式,可以将网络设备的控制平面和数据平面分离,控制平面与数据平面之间有统一的开放接口。控制器则是SDN的大脑,不仅通过北向接口给上层网络应用提供不同层次的可编程能力,还通过南向接口对数据平面进行统一配置、管理和控制。(1) Software Defined Network (SDN) is a way to implement network virtualization, which can separate the control plane and data plane of network devices, and there is a unified open interface between the control plane and the data plane. The controller is the brain of SDN, which not only provides different levels of programmability to upper-layer network applications through the northbound interface, but also uniformly configures, manages and controls the data plane through the southbound interface.

(2)轻型目录访问协议(英文:Lightweight Directory Access Protocol,缩写为LDAP)是一个访问在线目录服务的协议。LDAP服务器则提供用于共享组件信息(比如,服务器名称和连接属性)的全局目录服务。(2) Lightweight Directory Access Protocol (LDAP) is a protocol for accessing online directory services. LDAP servers provide global directory services for sharing component information (for example, server names and connection properties).

(3)办公自动化(英文:Office Automation,缩写为OA)是将现代化办公和计算机技术结合起来的一种新型办公方式。OA服务器则是用于放置各OA办公软件的云服务器。(3) Office Automation (OA) is a new way of working that combines modern office and computer technology. OA server is a cloud server used to store various OA office software.

(4)以太网虚拟专用网络(英文:Ethernet Virtual Private Network,缩写为EVPN)是一种用于二层网络互联的VPN技术,EVPN通过扩展BGP协议使二层网络间的MAC地址信息的学习和发布过程从数据平面转移到控制平面。(4) Ethernet Virtual Private Network (EVPN) is a VPN technology used for Layer 2 network interconnection. EVPN extends the BGP protocol to transfer the learning and publishing process of MAC address information between Layer 2 networks from the data plane to the control plane.

(5)自治系统(英文:Autonomous System,缩写为AS)是由同一技术管理机构管理,运行同一动态路由协议的一组路由器的集合。(5) An autonomous system (AS) is a group of routers managed by the same technical management organization and running the same dynamic routing protocol.

(6)边界网关协议(英文:Border Gateway Protocol,缩写为BGP)是一种基于AS的协议。BGP邻居关系则是通过人工配置实现运行BGP的双方互相找到对方并建立连接。(6) Border Gateway Protocol (BGP) is an AS-based protocol. BGP neighbor relationships are manually configured to enable two parties running BGP to find each other and establish connections.

(7)远程用户拨号认证系统(英文:Remote Authentic Dial In User Service,缩写为RADIUS),用于为拨号用户进行认证和计费。(7) Remote Authentication Dial In User Service (RADIUS) is used to authenticate and bill dial-up users.

(8)地址信息解析协议(英文:Address Resolution Protocol,缩写为APR)是根据IP地址信息获取MAC地址信息的一个协议。(8) Address Resolution Protocol (APR) is a protocol that obtains MAC address information based on IP address information.

(9)邻居发现协议(英文:Neighbor Discovery protocol,缩写为ND)主要负责在链路上发现其他节点相应的地址信息,并确定可用路由和维护关于可用路径和其他活动节点的信息可达性。ND定义的报文包括五种类型。(9) Neighbor Discovery Protocol (ND) is mainly responsible for discovering the corresponding address information of other nodes on the link, determining available routes, and maintaining information about available paths and other active nodes. ND defines five types of messages.

邻居请求报文(英文:Neighbor Solicitation,缩写为NS):IPv6节点(使用IPv6协议的终端)通过NS报文可以得到邻居的链路层地址信息,检查邻居是否可达。Neighbor Solicitation (NS): An IPv6 node (a terminal using the IPv6 protocol) can obtain the link layer address information of its neighbors through NS messages and check whether the neighbors are reachable.

邻居通告报文(英文:Neighbor Advertisement,缩写为NA),NA报文是IPv6节点对NS报文的响应。Neighbor Advertisement (NA), NA message is the response of IPv6 node to NS message.

路由器请求报文(英文:Router Solicitation,缩写为RS),IPv6节点启动后,向路由器发出RS报文,以请求网络前缀和其他配置信息,用于IPv6节点地址信息的自动配置。 Router Solicitation (RS) is a message sent by an IPv6 node to the router after it is started, requesting the network prefix and other configuration information for automatic configuration of the IPv6 node address information.

路由器通告报文(英文:Router Advertisement,缩写为RA),路由器周期性的发布RA报文,其中包括网络前缀等网络配置的关键信息,或者路由器以RA报文响应RS报文。Router Advertisement (RA) is a message sent periodically by a router, which includes key information about the network configuration, such as the network prefix, or the router responds to an RS message with a RA message.

重定向报文,路由器发现报文的入接口和出接口相同时,可以通过重定向报文通知终端选择另外一个更好的下一跳地址信息进行后续报文的发送。Redirect message: When the router finds that the incoming interface and outgoing interface of the message are the same, it can notify the terminal through the redirect message to select another better next hop address information for sending subsequent messages.

(10)网络配置协议(英文:Network Configuration Protocol,缩写为NETCONF)是一种基于可扩展标记语言的网络管理协议,它提供了一种可编程的方法使控制器对网关进行配置和管理,以及获取网关的数据。(10) Network Configuration Protocol (NETCONF) is a network management protocol based on Extensible Markup Language. It provides a programmable method for the controller to configure and manage the gateway and obtain the gateway data.

(11)远程过程调用协议(英文:Remote Procedure Call Protocol,缩写为RPC)是一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议,即控制器通过RPC可以远程调用网关的数据。GRPC则是指谷歌开发的RPC框架。(11) Remote Procedure Call Protocol (RPC) is a protocol that requests services from a remote computer program over the network without having to understand the underlying network technology. That is, the controller can remotely call the gateway's data through RPC. GRPC refers to the RPC framework developed by Google.

(12)遥测技术是利用传感技术、通信技术和数据处理技术,将对象参量的近距离测量值传输至远距离的测量站来实现远距离测量的一门综合性技术。(12) Telemetry technology is a comprehensive technology that uses sensor technology, communication technology, and data processing technology to transmit short-range measurement values of object parameters to a distant measurement station to achieve long-distance measurement.

(13)类型2(Type 2)路由,又叫做MAC/IP路由,用于通告MAC和IP地址信息。(13) Type 2 routing, also known as MAC/IP routing, is used to advertise MAC and IP address information.

(14)主机表是一个在计算机网络中使用的映射表,用于将IP地址信息和对应的主机名进行关联。(14) A host table is a mapping table used in computer networks to associate IP address information with corresponding host names.

(15)南向接口就是控制器与交换机(网关、策略执行节点、终端)之间的通信协议。(15) The southbound interface is the communication protocol between the controller and the switch (gateway, policy execution node, terminal).

策略随行是指用户无论移动到哪里,用户的体验是不变的,其打破了传统网络受接入位置的限制,真正意义上体现了网随人动的特点。Strategy mobility means that no matter where the user moves, the user experience remains unchanged. It breaks the limitation of traditional network access location and truly embodies the characteristic of network following people.

传统的策略随行方案主要应用于互联网协议第四版(英文:Internet Protocol version 4,缩写为IPv4)网络中,通过获取终端IPv4地址信息和用户组的关系,并将IPv4地址信息和用户组的关系下发到策略执行节点,来实现终端IPv4业务流量的策略随行。Traditional policy-based mobility solutions are mainly used in Internet Protocol version 4 (IPv4) networks. They achieve policy-based mobility of terminal IPv4 service traffic by obtaining the relationship between terminal IPv4 address information and user groups, and then sending the relationship between IPv4 address information and user groups to policy execution nodes.

但随着互联网协议第六版(英文:Internet Protocol version 6,缩写为IPv6)的到来,如何确定终端IPv6业务的流量策略成为了亟待解决的问题。However, with the advent of Internet Protocol version 6 (IPv6), how to determine the traffic strategy for terminal IPv6 services has become an urgent problem to be solved.

本申请实施例提供的一种流量策略确定方法,通过生成IPv6地址信息和用户组之间的第二映射关系,并根据第二映射关系确定IPv6地址信息的流量策略,可以实现终端IPv6业务流量的策略随行。其中,本申请实施例所述方法和装置基于同一技术构思,由于方法及装置所解决问题的原理相似,因此装置与方法的实施例可以相互参见,重复之处不再赘述。The embodiment of the present application provides a method for determining a traffic strategy, which can realize the policy accompanying the terminal IPv6 service traffic by generating a second mapping relationship between IPv6 address information and a user group, and determining the traffic strategy of the IPv6 address information according to the second mapping relationship. Among them, the method and device described in the embodiment of the present application are based on the same technical concept. Since the principles of the problems solved by the method and the device are similar, the embodiments of the device and the method can refer to each other, and the repeated parts will not be repeated.

为进一步说明本申请实施例提供的技术方案,下面结合附图以及具体实施方式对此进行详细的说明。虽然本申请实施例提供了如下述实施例或附图所示的方法操作步骤,但基于常规或者无需创造性的劳动在所述方法中可以包括更多或者更少的操作步骤。在逻辑上不存在必要因果关系的步骤中,这些步骤的执行顺序不限于本申请实施例提供的执行顺序。所述方法在实际的 处理过程中或者装置执行时,可按照实施例或者附图所示的方法顺序执行或者并执行。To further illustrate the technical solution provided by the embodiment of the present application, the following is a detailed description of the technical solution in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps shown in the following embodiments or drawings, the method may include more or fewer operation steps based on routine or no creative labor. In the steps that do not logically have a necessary causal relationship, the execution order of these steps is not limited to the execution order provided by the embodiment of the present application. The method is actually During the processing or when the device is executed, the methods shown in the embodiments or drawings may be executed sequentially or in parallel.

图1为本申请实施例提供的一种流量策略确定方法的流程图,该方法应用于流量策略确定系统,该流程可由策略随行装置所执行,该装置可通过软件的方式实现,也可通过硬件的方式实现,还可通过软件和硬件结合的方式实现,用以保证系统正常运行。如图1所示,该流程包括如下步骤。FIG1 is a flow chart of a method for determining a traffic strategy provided by an embodiment of the present application. The method is applied to a traffic strategy determination system. The process can be executed by a policy accompanying device, which can be implemented by software, hardware, or a combination of software and hardware to ensure the normal operation of the system. As shown in FIG1 , the process includes the following steps.

S11,响应于选择目标识别模式的用户操作,获取终端的第一映射关系和报文。S11, in response to a user operation of selecting a target recognition mode, obtaining a first mapping relationship and a message of a terminal.

S12,根据该第一映射关系和报文,生成终端的IPv6地址信息与用户组之间的第二映射关系。S12: Generate a second mapping relationship between the IPv6 address information of the terminal and the user group according to the first mapping relationship and the message.

S13,根据该第二映射关系确定该IPv6地址信息的流量策略。S13: Determine a traffic policy for the IPv6 address information according to the second mapping relationship.

在本申请实施方式中,同一个终端的IPv6地址的流量策略与该终端的IPv4地址的流量策略可以是相同的,以下不再赘述。In the implementation manner of the present application, the traffic policy of the IPv6 address of the same terminal may be the same as the traffic policy of the IPv4 address of the terminal, which will not be described in detail below.

用户组是多个用户设备的集合,可以通过控制器对用户组设置流量策略,保证网络资源不被非法使用和非法访问,流量策略即访问控制策略。流量策略可以为允许和拒绝,还可以为全面访问、部分访问、限速访问或者限时访问等,本领域的普通技术人员应该知晓流量策略的各种类型,本文不再赘述。每个用户组可以对应一种流量策略,当策略执行节点确定了终端IPv4地址或者IPv6地址对应的用户组时,就可以确定该终端IPv4地址或者IPv6地址对应的流量策略。用户组中的终端设备在任何地点接入网络时,该用户设备的访问控制策略都是相同的,实现了业务随行。A user group is a collection of multiple user devices. Traffic policies can be set for user groups through the controller to ensure that network resources are not illegally used or accessed. Traffic policies are access control policies. Traffic policies can be permission and rejection, as well as full access, partial access, speed-limited access, or time-limited access. Ordinary technicians in this field should be aware of the various types of traffic policies, which will not be described in detail in this article. Each user group can correspond to a traffic policy. When the policy execution node determines the user group corresponding to the terminal IPv4 address or IPv6 address, the traffic policy corresponding to the terminal IPv4 address or IPv6 address can be determined. When the terminal devices in the user group access the network at any location, the access control policy of the user device is the same, realizing business mobility.

选择目标识别模式的用户操作,可以是指在设备部署阶段或运行阶段,根据需求通过设备配置来确定设备的流量策略确定方式。The user operation of selecting the target identification mode may refer to determining the traffic policy determination method of the device through device configuration according to requirements during the device deployment stage or the operation stage.

在本申请实施例中,网络配置时,SDN控制器会从LDAP、OA等服务器获取到机构内的组织关系(用户组),并将该用户组及其对应的流量策略下发到策略执行节点。为了方便表述,以下用控制器指代SDN控制器。In the embodiment of the present application, when configuring the network, the SDN controller will obtain the organizational relationship (user group) within the organization from the LDAP, OA and other servers, and send the user group and its corresponding traffic policy to the policy execution node. For the convenience of description, the controller is used to refer to the SDN controller below.

另外,对于在组织关系中没有对应的特定用户组的设备,如打印机或者监控设备等,也可以单独被设置对应为一类或多类用户组的用户组(例如,共享用户组),并将这些设备对应的用户组和该用户组对应的流量策略下发到策略执行节点。In addition, for devices that do not have corresponding specific user groups in the organizational relationship, such as printers or monitoring devices, they can also be individually set up as user groups corresponding to one or more user groups (for example, shared user groups), and the user groups corresponding to these devices and the traffic policies corresponding to the user groups can be sent to the policy execution node.

策略执行节点用于存储终端设备的IP地址和对应的流量策略。在一实施例中,策略执行节点可以存储终端设备的IP地址和对应的用户组信息,其中用户组信息和流量策略相对应。当策略执行节点收到终端设备发送的报文时,查询该报文对应的源IP地址及其所属的用户组信息,执行该用户组对应的流量策略。当策略执行节点收到发往终端设备的报文时,查询该报文对应的目的IP地址及其所属的用户组信息,执行该用户组对应的流量策略。The policy execution node is used to store the IP address of the terminal device and the corresponding traffic policy. In one embodiment, the policy execution node can store the IP address of the terminal device and the corresponding user group information, wherein the user group information corresponds to the traffic policy. When the policy execution node receives a message sent by the terminal device, it queries the source IP address corresponding to the message and the user group information to which it belongs, and executes the traffic policy corresponding to the user group. When the policy execution node receives a message sent to the terminal device, it queries the destination IP address corresponding to the message and the user group information to which it belongs, and executes the traffic policy corresponding to the user group.

可选的,目标识别模式为控制器识别模式、本地以太网虚拟专用网络EVPN识别模式和本地网关识别模式中任一项。Optionally, the target identification mode is any one of a controller identification mode, a local Ethernet virtual private network EVPN identification mode, and a local gateway identification mode.

在一些可能的实施方式中,控制器识别模式的使用场景为:网关没有被 配置为策略执行节点时,且该网关与策略执行节点之间没有配置边界网关协议BGP邻居关系。如图2所示,为本申请实施例提供的一种控制器识别模式的信令交互示意图,包括:基于控制器获取终端的第一映射关系,其中,第一映射关系表征终端的MAC地址信息、IPv4地址信息和用户组之间的关系。In some possible implementations, the controller identification mode is used in the following scenarios: When configured as a policy execution node, and there is no Border Gateway Protocol BGP neighbor relationship configured between the gateway and the policy execution node. As shown in Figure 2, a signaling interaction diagram of a controller identification mode provided in an embodiment of the present application includes: obtaining a first mapping relationship of a terminal based on a controller, wherein the first mapping relationship represents the relationship between the MAC address information, IPv4 address information and user group of the terminal.

第一映射关系具体的获取方法可以是:终端向认证设备发起认证请求,认证设备在接收到该认证请求后,通过RADIUS将认证请求和计费报文发送到控制器。控制器在接收到该认证请求和计费报文后,进行代理认证,比如,将认证请求发送至认证服务器,认证服务器在认证通过后,将认证通过信息返回至控制器,以使控制器将该认证通过信息经由认证设备返回至终端,至此,终端认证成功。控制器可以在管理员的控制下,将该计费报文携带终端的IPv4地址信息、MAC地址信息和用户身份信息进行绑定后,通过用户身份信息确定该用户所在的用户组,生成终端的MAC地址信息、IPv4地址信息和用户组之间的第一映射关系。The specific method for obtaining the first mapping relationship may be: the terminal initiates an authentication request to the authentication device, and after receiving the authentication request, the authentication device sends the authentication request and the billing message to the controller through RADIUS. After receiving the authentication request and the billing message, the controller performs proxy authentication, for example, sends the authentication request to the authentication server, and after the authentication is successful, the authentication server returns the authentication pass information to the controller, so that the controller returns the authentication pass information to the terminal via the authentication device, and the terminal authentication is successful. Under the control of the administrator, the controller can bind the IPv4 address information, MAC address information and user identity information of the terminal carried in the billing message, determine the user group to which the user belongs through the user identity information, and generate the first mapping relationship between the terminal's MAC address information, IPv4 address information and user group.

在一些实施方式中,控制器获取终端对应的报文,比如,ARP报文和ND报文,其中,ARP报文中包括终端的MAC地址和终端的IPv4地址的对应关系,ND报文中包括终端的MAC地址和终端的IPv6地址的对应关系。本申请示例性实施例中,均是以报文作为示例进行说明,本领域技术人员可以理解的,终端对应的报文,也可以替换为终端对应的表项,比如ARP表项和ND表项,其中,ARP表项中包括终端的MAC地址和终端的IPv4地址的对应关系,ND表项中包括终端的MAC地址和终端的IPv6地址的对应关系。一般而言,报文中包含了较多的数据信息,而表项是从报文中提取的信息,若采用表项传输IP地址与MAC地址之间的对应关系,可以提高传输效率。In some embodiments, the controller obtains a message corresponding to the terminal, such as an ARP message and an ND message, wherein the ARP message includes the correspondence between the MAC address of the terminal and the IPv4 address of the terminal, and the ND message includes the correspondence between the MAC address of the terminal and the IPv6 address of the terminal. In the exemplary embodiments of the present application, messages are used as examples for explanation. It can be understood by those skilled in the art that the message corresponding to the terminal can also be replaced by a table item corresponding to the terminal, such as an ARP table item and an ND table item, wherein the ARP table item includes the correspondence between the MAC address of the terminal and the IPv4 address of the terminal, and the ND table item includes the correspondence between the MAC address of the terminal and the IPv6 address of the terminal. Generally speaking, a message contains more data information, and the table item is information extracted from the message. If the table item is used to transmit the correspondence between the IP address and the MAC address, the transmission efficiency can be improved.

具体来讲,网关学习终端的报文或者表项,并将该报文或者表项发送至控制器,比如,通过NETCONF、GRPC或遥测技术进行发送。Specifically, the gateway learns the message or table entry of the terminal and sends the message or table entry to the controller, for example, through NETCONF, GRPC or telemetry technology.

在一些实施方式中,控制器在接收到该报文或者表项后,解析该报文或者表项,得到终端的MAC地址信息与IPv6地址信息之间的第三映射关系,并基于该第三映射关系和第一映射关系,生成该IPv6地址信息与上述用户组之间的第二映射关系。In some embodiments, after receiving the message or table entry, the controller parses the message or table entry to obtain a third mapping relationship between the terminal's MAC address information and the IPv6 address information, and based on the third mapping relationship and the first mapping relationship, generates a second mapping relationship between the IPv6 address information and the above-mentioned user group.

控制器将上述第二映射关系可以通过例如网络配置协议NETCONF下发至策略执行节点,以使策略执行节点根据该第二映射关系确定出该IPv6地址信息的流量策略,比如,策略执行节点将该第二映射关系通告到策略随行的方案应用组件,进行策略关联。同时,策略执行节点还会将该第二映射关系安装到主机表中。The controller can send the second mapping relationship to the policy execution node through, for example, the network configuration protocol NETCONF, so that the policy execution node determines the traffic policy of the IPv6 address information according to the second mapping relationship. For example, the policy execution node notifies the second mapping relationship to the solution application component of the policy companion to perform policy association. At the same time, the policy execution node will also install the second mapping relationship into the host table.

在一些实施方式中,控制器在接收到上述报文或者表项后,可以将该报文或者表项发送给策略执行节点。策略执行节点解析该报文或者表项,得到终端的MAC地址信息与IPv6地址信息之间的第三映射关系。In some implementations, after receiving the above message or table entry, the controller may send the message or table entry to the policy execution node. The policy execution node parses the message or table entry to obtain the third mapping relationship between the MAC address information and the IPv6 address information of the terminal.

策略执行节点从控制器获取第一映射关系,第一映射关系包括终端的MAC地址信息、IPv4地址信息和用户组之间的映射关系。The policy execution node obtains a first mapping relationship from the controller, where the first mapping relationship includes a mapping relationship between MAC address information of the terminal, IPv4 address information, and a user group.

策略执行节点基于第一映射关系和第三映射关系,生成该IPv6地址信息 与上述用户组之间的第二映射关系,基于第二映射关系确定终端的IPv6地址对应的流量策略。The policy execution node generates the IPv6 address information based on the first mapping relationship and the third mapping relationship. and a second mapping relationship between the terminal and the user group, and determining a traffic policy corresponding to the IPv6 address of the terminal based on the second mapping relationship.

在一些实施方式中,控制器在接收到上述报文或者表项后,可以将该报文或者表项发送给策略执行节点。策略执行节点解析该报文或者表项,得到终端的MAC地址信息与IPv6地址信息之间的第三映射关系。In some implementations, after receiving the above message or table entry, the controller may send the message or table entry to the policy execution node. The policy execution node parses the message or table entry to obtain the third mapping relationship between the MAC address information and the IPv6 address information of the terminal.

额外地或可替换地,控制器在下发IPv4地址对应的流量策略时,可以将IPv4地址信息和用户组之间的对应关系发送给策略执行节点。策略执行节点可以基于ARP报文或者ARP表项,获得IPv4地址和终端的MAC地址之间的对应关系,再结合IPv4地址对应的流量策略,获取第一映射关系。Additionally or alternatively, when the controller sends the traffic policy corresponding to the IPv4 address, the controller can send the correspondence between the IPv4 address information and the user group to the policy execution node. The policy execution node can obtain the correspondence between the IPv4 address and the MAC address of the terminal based on the ARP message or ARP table entry, and then obtain the first mapping relationship in combination with the traffic policy corresponding to the IPv4 address.

策略执行节点可以基于第一映射关系和第三映射关系,生成该IPv6地址信息与上述用户组之间的第二映射关系,基于第二映射关系确定终端的IPv6地址对应的流量策略。The policy execution node may generate a second mapping relationship between the IPv6 address information and the user group based on the first mapping relationship and the third mapping relationship, and determine a traffic policy corresponding to the IPv6 address of the terminal based on the second mapping relationship.

通过上述方法,基于网关将上述报文发送至控制器,无需认证设备支持IPv6认证功能和审计功能,也不需要在认证报文中设置私有报文携带IPv6相关的信息,进而实现终端的IPv6地址信息的流量策略确定过程与认证设备的解耦,减轻认证设备的负担。Through the above method, the above message is sent to the controller based on the gateway. There is no need for the authentication device to support IPv6 authentication and audit functions, nor is there any need to set a private message in the authentication message to carry IPv6-related information, thereby achieving the decoupling of the traffic policy determination process of the terminal's IPv6 address information from the authentication device, reducing the burden on the authentication device.

在一些可能的实施方式中,本地EVPN识别模式的使用场景为:网关没有被配置为策略执行节点,且该网关与策略执行节点之间配置了BGP邻居关系。如图3所示,为本申请实施例提供的本地EVPN识别模式的信令交互示意图。In some possible implementations, the use scenario of the local EVPN identification mode is: the gateway is not configured as a policy execution node, and a BGP neighbor relationship is configured between the gateway and the policy execution node. As shown in Figure 3, a signaling interaction diagram of the local EVPN identification mode provided in an embodiment of the present application is shown.

基于策略执行节点获取终端对应的报文或者表项,比如,ARP报文或者表项,和ND报文或者表项。在一些实施方式中,策略执行节点获取的终端对应的报文或者表项,也可以为动态主机配置协议侦听DHCP Snooping报文或者表项,和邻居发现侦听ND Snooping报文或者表项。Based on the policy execution node, the corresponding message or table item of the terminal is obtained, for example, an ARP message or table item, and an ND message or table item. In some embodiments, the message or table item corresponding to the terminal obtained by the policy execution node may also be a dynamic host configuration protocol snooping DHCP snooping message or table item, and a neighbor discovery snooping ND snooping message or table item.

具体来讲,网关学习终端的报文,并通过BGP将该报文发送至策略执行节点,比如,通过EVPN的Type 2路由将该报文发送至策略执行节点。Specifically, the gateway learns the terminal's message and sends the message to the policy execution node through BGP. For example, the gateway sends the message to the policy execution node through EVPN's Type 2 routing.

策略执行节点在接收到该报文时,解析该报文,得到终端的MAC地址信息和IPv6地址信息之间的第三映射关系。When receiving the message, the policy execution node parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.

通过控制器获取终端的第一映射关系,其中,第一映射关系具体的获取方法与控制器识别模式下的获取方法一致,此处不作重复描述。且该控制器会通过南向接口将该第一映射关系下发至策略执行节点。The first mapping relationship of the terminal is obtained through the controller, wherein the specific method for obtaining the first mapping relationship is consistent with the method for obtaining the first mapping relationship in the controller identification mode, and is not described repeatedly here. The controller sends the first mapping relationship to the policy execution node through the southbound interface.

策略执行节点在接收到该第一映射关系时,基于该第一映射关系和上述第三映射关系,生成终端的IPv6地址信息与用户组之间的第二映射关系;根据该第二映射关系确定出该IPv6地址信息的流量策略;以及将该第二映射关系安装到主机表中。When receiving the first mapping relationship, the policy execution node generates a second mapping relationship between the terminal's IPv6 address information and the user group based on the first mapping relationship and the above-mentioned third mapping relationship; determines the traffic policy of the IPv6 address information according to the second mapping relationship; and installs the second mapping relationship into the host table.

策略执行节点根据该第二映射关系确定出该IPv6地址信息的流量策略,比如,策略执行节点将该第二映射关系通告到策略随行的方案应用组件,进行策略关联。同时,策略执行节点还会将该第二映射关系安装到主机表中。The policy execution node determines the traffic policy of the IPv6 address information according to the second mapping relationship. For example, the policy execution node notifies the second mapping relationship to the solution application component of the policy companion to perform policy association. At the same time, the policy execution node also installs the second mapping relationship into the host table.

在一些实施方式中,策略执行节点在接收到ND报文或者ND表项时,解 析该报文,得到终端的MAC地址信息和IPv6地址信息之间的第三映射关系。In some implementations, when a policy execution node receives an ND message or an ND table entry, The message is analyzed to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.

额外地或可替换地,控制器在下发IPv4地址对应的流量策略时,可以将IPv4地址信息和用户组之间的对应关系发送给策略执行节点。策略执行节点可以基于ARP报文或者ARP表项,获得IPv4地址和终端的MAC地址之间的对应关系,再结合IPv4地址对应的流量策略,获取第一映射关系。Additionally or alternatively, when the controller sends the traffic policy corresponding to the IPv4 address, the controller can send the correspondence between the IPv4 address information and the user group to the policy execution node. The policy execution node can obtain the correspondence between the IPv4 address and the MAC address of the terminal based on the ARP message or ARP table entry, and then obtain the first mapping relationship in combination with the traffic policy corresponding to the IPv4 address.

策略执行节点可以基于第一映射关系和第三映射关系,生成该IPv6地址信息与上述用户组之间的第二映射关系,基于第二映射关系确定终端的IPv6地址对应的流量策略。The policy execution node may generate a second mapping relationship between the IPv6 address information and the user group based on the first mapping relationship and the third mapping relationship, and determine a traffic policy corresponding to the IPv6 address of the terminal based on the second mapping relationship.

通过上述方法,基于EVPN同步上述报文,利用当前已有的协议,无需新增私有协议传递IPv6地址信息和MAC地址信息的绑定关系,可以减少策略执行节点的性能消耗。同时,在策略执行节点进行IPv6地址信息与用户组之间的映射关联,基于IPv4地址的流量策略,确定IPv6地址的流量策略,不需要通过控制器确定IPv6地址的流量策略,避免控制器集中管理,可以减轻控制器的负担,提升可靠性。此外,在上述方案中,无需认证设备通过计费报文实时向控制器传递IPv6地址信息,可以减少认证设备和控制器之间的交互,减轻认证设备和控制器的负担。Through the above method, the above messages are synchronized based on EVPN, and the existing protocols are used. There is no need to add a new private protocol to transmit the binding relationship between IPv6 address information and MAC address information, which can reduce the performance consumption of the policy execution node. At the same time, the mapping association between IPv6 address information and user groups is performed at the policy execution node, and the traffic policy of the IPv4 address is determined. The traffic policy of the IPv6 address does not need to be determined through the controller, avoiding centralized management of the controller, which can reduce the burden on the controller and improve reliability. In addition, in the above scheme, there is no need for the authentication device to transmit IPv6 address information to the controller in real time through billing messages, which can reduce the interaction between the authentication device and the controller and reduce the burden on the authentication device and the controller.

在一些实施方式中,本地网关识别模式的使用场景为:网关被配置为策略执行节点。如图4所示,为本申请实施例提供的一种本地网关识别模式的信令交互示意图。In some implementations, the local gateway identification mode is used in a scenario where the gateway is configured as a policy execution node. As shown in FIG4 , a signaling interaction diagram of a local gateway identification mode provided in an embodiment of the present application is shown.

基于控制器获取终端的第一映射关系,其中,第一映射关系具体的获取方法与控制器识别模式下的获取方法一致,此处不作重复描述。且该控制器会通过南向接口将该第一映射关系下发至策略执行节点,即网关。The controller obtains the first mapping relationship of the terminal, wherein the specific method for obtaining the first mapping relationship is consistent with the method for obtaining the first mapping relationship in the controller identification mode, and is not described again here. The controller sends the first mapping relationship to the policy execution node, i.e., the gateway, through the southbound interface.

同时,基于网关学习终端的报文或者表项,比如,ARP报文或者表项,和ND报文或者表项。网关在获取到该报文或者表项时,通过解析该报文或者表项,可以得到终端的MAC地址信息和IPv6地址信息之间的第三映射关系。At the same time, based on the gateway learning terminal's message or table entry, such as ARP message or table entry, and ND message or table entry, when the gateway obtains the message or table entry, it can obtain the third mapping relationship between the terminal's MAC address information and IPv6 address information by parsing the message or table entry.

进一步,网关基于该第三映射关系和上述第一映射关系,生成该IPv6地址信息与上述用户组之间的第二映射关系,进而网关根据该第二映射关系确定出该IPv6地址信息的流量策略,比如,网关将该第二映射关系通告到策略随行的方案应用组件,进行策略关联。同时,网关还会将该第二映射关系安装到主机表中。Further, the gateway generates a second mapping relationship between the IPv6 address information and the user group based on the third mapping relationship and the first mapping relationship, and then the gateway determines the traffic policy of the IPv6 address information according to the second mapping relationship. For example, the gateway notifies the second mapping relationship to the solution application component of the policy companion to perform policy association. At the same time, the gateway also installs the second mapping relationship into the host table.

在一些实施方式中,策略执行节点在接收到ND报文或者ND表项时,解析该报文,得到终端的MAC地址信息和IPv6地址信息之间的第三映射关系。In some implementations, when receiving an ND message or an ND table entry, the policy execution node parses the message to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.

额外地或可替换地,控制器在下发IPv4地址对应的流量策略时,可以将IPv4地址信息和用户组之间的对应关系发送给策略执行节点。策略执行节点基于接收到的ARP报文或者ARP表项,获得IPv4地址和终端的MAC地址之间的对应关系,再结合IPv4地址对应的流量策略,获取第一映射关系。Additionally or alternatively, when the controller sends the traffic policy corresponding to the IPv4 address, the controller can send the correspondence between the IPv4 address information and the user group to the policy execution node. The policy execution node obtains the correspondence between the IPv4 address and the MAC address of the terminal based on the received ARP message or ARP table entry, and then obtains the first mapping relationship in combination with the traffic policy corresponding to the IPv4 address.

策略执行节点基于第一映射关系和第三映射关系,生成该IPv6地址信息与上述用户组之间的第二映射关系,基于第二映射关系确定终端的IPv6地址 对应的流量策略。The policy execution node generates a second mapping relationship between the IPv6 address information and the user group based on the first mapping relationship and the third mapping relationship, and determines the IPv6 address of the terminal based on the second mapping relationship. Corresponding traffic strategy.

通过上述方法,当网关被配置为策略执行节点,无需将报文或者表项发送至控制器,直接基于网关将终端的IPv6地址信息与用户组关联,实现终端IPv6业务流量的策略随行。Through the above method, when the gateway is configured as a policy execution node, there is no need to send messages or table entries to the controller. The IPv6 address information of the terminal is directly associated with the user group based on the gateway to achieve policy-based mobility of the terminal IPv6 service traffic.

图5为本申请实施例提供的一种流量策略确定方法的流程图。该流量策略确定方法应用于策略执行点。如图5所示,该流程包括如下步骤。Figure 5 is a flow chart of a method for determining a traffic strategy provided by an embodiment of the present application. The method for determining a traffic strategy is applied to a policy execution point. As shown in Figure 5, the process includes the following steps.

S51,获取第一信息,其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系。S51, obtaining first information, wherein the first information corresponds to a first message from a gateway, and the first information indicates a first corresponding relationship between an IPv6 address of a terminal and a MAC address of the terminal.

S52,获取第一映射关系,其中,所述第一映射关系指示所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系。S52, obtaining a first mapping relationship, wherein the first mapping relationship indicates a relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal.

S53,基于所述第一信息和所述第一映射关系,确定所述终端的IPv6地址对应的流量策略。S53: Determine a traffic policy corresponding to the IPv6 address of the terminal based on the first information and the first mapping relationship.

在该实施方式中,通过从网关获取第一报文,基于第一报文确定第一信息,确定终端的IPv6地址与终端的MAC地址的第一对应关系,并基于所述第一信息和所述第一映射关系,确定终端的IPv6地址对应的流量策略。在该实施方式中,无需认证设备支持IPv6认证功能和审计功能,也不需要在认证报文中设置私有报文携带IPv6相关的信息,进而实现终端的IPv6地址信息的流量策略确定过程与认证设备的解耦,减轻认证设备的负担。In this implementation, a first message is obtained from a gateway, and first information is determined based on the first message to determine a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal, and a traffic policy corresponding to the IPv6 address of the terminal is determined based on the first information and the first mapping relationship. In this implementation, there is no need for the authentication device to support IPv6 authentication and audit functions, nor is there a need to set a private message in the authentication message to carry IPv6-related information, thereby achieving decoupling of the traffic policy determination process of the IPv6 address information of the terminal from the authentication device, reducing the burden on the authentication device.

在一些实施方式中,策略执行节点从控制器获取第一映射关系,其中,第一映射关系为终端的IPv4地址、MAC地址以及终端的IPv4地址对应的流量策略之间的映射关系。策略执行节点基于第一映射关系,确定终端的IPv4地址对应的流量策略,并基于第一对应关系以及终端的IPv4地址对应的流量策略,确定终端的IPv6地址对应的流量策略。In some implementations, the policy execution node obtains a first mapping relationship from the controller, wherein the first mapping relationship is a mapping relationship between the IPv4 address and MAC address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal. The policy execution node determines the traffic policy corresponding to the IPv4 address of the terminal based on the first mapping relationship, and determines the traffic policy corresponding to the IPv6 address of the terminal based on the first corresponding relationship and the traffic policy corresponding to the IPv4 address of the terminal.

在一些实施方式中,策略执行节点获取第二信息,其中,所述第二信息对应来自所述网关的第二报文,所述第二信息指示所述终端的IPv4地址与所述终端的MAC地址的第二对应关系。并从控制器获取第三信息,其中,所述第三信息指示所述终端的IPv4地址以及所述终端的IPv4地址对应的流量策略之间的对应关系。策略执行节点基于所述第二信息和所述第三信息,获取所述第一映射关系。In some implementations, the policy execution node obtains second information, wherein the second information corresponds to a second message from the gateway, and the second information indicates a second correspondence between the IPv4 address of the terminal and the MAC address of the terminal. The policy execution node obtains third information from the controller, wherein the third information indicates a correspondence between the IPv4 address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal. The policy execution node obtains the first mapping relationship based on the second information and the third information.

需要说明的是,上述实施例中,对策略执行节点和终端的数量不做任何限制。其中,终端包括但不限于:手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(英文:Mobile Internet Device,缩写为MID)、可穿戴设备,虚拟现实(英文:Virtual Reality,缩写为VR)设备、增强现实(英文:Augmented Reality,缩写为AR)设备、工业控制中的无线终端设备、无人驾驶中的无线终端设备、智能电网中的无线终端设备、运输安全中的无线终端设备、智慧城市中的无线终端设备,或智慧家庭中的无线终端设备等。It should be noted that in the above embodiments, there is no restriction on the number of policy execution nodes and terminals. The terminals include but are not limited to: mobile phones, tablet computers, laptop computers, PDAs, mobile Internet devices (English: Mobile Internet Device, abbreviated as MID), wearable devices, virtual reality (English: Virtual Reality, abbreviated as VR) devices, augmented reality (English: Augmented Reality, abbreviated as AR) devices, wireless terminal devices in industrial control, wireless terminal devices in unmanned driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.

基于同一发明构思,本申请实施例中还提供了一种流量策略确定装置,如图6所示,为本申请实施例提供的一种流量策略确定装置的结构示意图。 该流量策略确定装置可以为策略执行节点。Based on the same inventive concept, a traffic strategy determination device is also provided in an embodiment of the present application, as shown in FIG6 , which is a structural diagram of a traffic strategy determination device provided in an embodiment of the present application. The traffic strategy determination device may be a policy execution node.

该装置包括:获取模块51,用于响应于选择目标识别模式的用户操作,获取终端的第一映射关系和报文,其中,所述第一映射关系表征所述终端的MAC地址信息、IPv4地址信息和用户组之间的关系。The device comprises: an acquisition module 51, which is used to acquire a first mapping relationship and a message of a terminal in response to a user operation of selecting a target recognition mode, wherein the first mapping relationship represents the relationship between the MAC address information, IPv4 address information and user group of the terminal.

生成模块52,用于根据所述第一映射关系和所述报文,生成所述终端的IPv6地址信息与所述用户组之间的第二映射关系。The generating module 52 is used to generate a second mapping relationship between the IPv6 address information of the terminal and the user group according to the first mapping relationship and the message.

流量策略确定模块53,用于根据所述第二映射关系确定所述IPv6地址信息的流量策略。The traffic policy determination module 53 is used to determine the traffic policy of the IPv6 address information according to the second mapping relationship.

在一种可能的实施方式中,所述目标识别模式为控制器识别模式、本地以太网虚拟专用网络EVPN识别模式和本地网关识别模式中任一项。In a possible implementation manner, the target identification mode is any one of a controller identification mode, a local Ethernet virtual private network EVPN identification mode, and a local gateway identification mode.

在一种可能的设计中,所述获取模块51具体用于:响应于选择所述控制器识别模式的用户操作时,基于所述控制器获取所述终端的第一映射关系和所述报文。In a possible design, the acquisition module 51 is specifically used to: in response to a user operation of selecting the controller identification mode, acquire the first mapping relationship of the terminal and the message based on the controller.

所述生成模块52具体用于:基于所述控制器解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系。The generating module 52 is specifically configured to: parse the message based on the controller to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.

所述控制器基于所述第三映射关系和所述第一映射关系,生成所述IPv6地址信息与所述用户组之间的第二映射关系,以使所述策略执行节点根据所述第二映射关系确定所述IPv6地址信息的流量策略。The controller generates a second mapping relationship between the IPv6 address information and the user group based on the third mapping relationship and the first mapping relationship, so that the policy execution node determines the traffic policy of the IPv6 address information according to the second mapping relationship.

在一种可能的设计中,所述获取模块51还用于:响应于选择所述本地EVPN识别模式的用户操作时,基于控制器获取所述终端的第一映射关系,并基于所述策略执行节点获取所述终端的报文。In a possible design, the acquisition module 51 is further used to: in response to a user operation of selecting the local EVPN identification mode, acquire the first mapping relationship of the terminal based on the controller, and acquire the message of the terminal based on the policy execution node.

所述生成模块52还用于:基于所述控制器将所述第一映射关系下发至所述策略执行节点,并基于所述策略执行节点解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系。The generating module 52 is further configured to: send the first mapping relationship to the policy execution node based on the controller, and parse the message based on the policy execution node to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.

所述策略执行节点基于所述第三映射关系和所述第一映射关系,生成所述IPv6地址信息与所述用户组之间的第二映射关系。The policy execution node generates a second mapping relationship between the IPv6 address information and the user group based on the third mapping relationship and the first mapping relationship.

在一种可能的实施方式中,所述获取模块51还用于:响应于选择所述本地网关识别模式的用户操作时,基于所述控制器获取所述终端的第一映射关系,并基于所述网关获取所述终端的报文。In a possible implementation manner, the acquisition module 51 is further configured to: in response to a user operation of selecting the local gateway identification mode, acquire the first mapping relationship of the terminal based on the controller, and acquire the message of the terminal based on the gateway.

所述生成模块52还用于:基于所述控制器将所述第一映射关系下发至所述网关,并基于所述网关解析所述报文,得到所述终端的MAC地址信息与IPv6地址信息之间的第三映射关系。The generating module 52 is further configured to: send the first mapping relationship to the gateway based on the controller, and parse the message based on the gateway to obtain a third mapping relationship between the MAC address information and the IPv6 address information of the terminal.

所述网关基于所述第三映射关系和所述第一映射关系,生成所述IPv6地址信息与所述用户组之间的第二映射关系。The gateway generates a second mapping relationship between the IPv6 address information and the user group based on the third mapping relationship and the first mapping relationship.

通过上述流量策略确定装置,生成IPv6地址信息和用户组之间的第二映射关系,并根据第二映射关系确定IPv6地址信息的流量策略,实现终端IPv6业务流量的策略随行。The above-mentioned traffic strategy determination device generates a second mapping relationship between the IPv6 address information and the user group, and determines the traffic strategy of the IPv6 address information according to the second mapping relationship, thereby realizing the policy accompanying the terminal IPv6 service traffic.

参考图8,为本申请实施例提供的一种流量策略确定装置的结构示意图。该流量策略确定装置可以为策略执行节点。 Referring to Fig. 8, it is a schematic diagram of the structure of a traffic strategy determination device provided in an embodiment of the present application. The traffic strategy determination device may be a policy execution node.

该装置包括:获取模块71,用于获取第一信息和第一映射关系,其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系;以及所述第一映射关系指示所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系。The device includes: an acquisition module 71, used to obtain first information and a first mapping relationship, wherein the first information corresponds to a first message from a gateway, the first information indicates a first correspondence between an IPv6 address of a terminal and a MAC address of the terminal; and the first mapping relationship indicates a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal.

流量策略确定模块72,用于基于所述第一信息和所述第一映射关系,确定所述终端的IPv6地址对应的流量策略。The traffic policy determination module 72 is used to determine the traffic policy corresponding to the IPv6 address of the terminal based on the first information and the first mapping relationship.

基于同一发明构思,本申请实施例中还提供了一种电子设备,所述电子设备可以实现前述流量策略确定装置的功能,参考图7,所述电子设备包括:至少一个处理器61,以及与至少一个处理器61连接的存储器62,本申请实施例中不限定处理器61与存储器62之间的具体连接介质,图7中是以处理器61和存储器62之间通过总线60连接为例。总线60在图7中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线60可以分为地址信息总线、数据总线、控制总线等,为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。或者,处理器61也可以称为控制器,对于名称不做限制。Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the electronic device can realize the function of the aforementioned traffic strategy determination device. Referring to Figure 7, the electronic device includes: at least one processor 61, and a memory 62 connected to at least one processor 61. The specific connection medium between the processor 61 and the memory 62 is not limited in the embodiment of the present application. Figure 7 takes the connection between the processor 61 and the memory 62 through the bus 60 as an example. The bus 60 is represented by a thick line in Figure 7, and the connection method between other components is only for schematic illustration and is not limited. The bus 60 can be divided into an address information bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in Figure 7, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 61 can also be called a controller, and there is no restriction on the name.

在本申请实施例中,存储器62存储有可被至少一个处理器61执行的指令,至少一个处理器61通过执行存储器62存储的指令,可以执行前文论述流量策略确定方法。处理器61可以实现图6和图8所示的装置中各个模块的功能。In the embodiment of the present application, the memory 62 stores instructions that can be executed by at least one processor 61, and the at least one processor 61 can execute the traffic strategy determination method discussed above by executing the instructions stored in the memory 62. The processor 61 can implement the functions of each module in the device shown in Figures 6 and 8.

其中,处理器61是该装置的控制中心,可以利用各种接口和线路连接整个该控制设备的各个部分,通过运行或执行存储在存储器62内的指令以及调用存储在存储器62内的数据,该装置的各种功能和处理数据,从而对该装置进行整体监控。Among them, the processor 61 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 62 and calling data stored in the memory 62, the various functions of the device and processing data, the device can be monitored as a whole.

在一种可能的设计中,处理器61可包括一个或多个处理单元,处理器61可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器61中。在一些实施例中,处理器61和存储器62可以在同一芯片上实现,在一些实施例中,它们也可以在独立的芯片上分别实现。In a possible design, the processor 61 may include one or more processing units, and the processor 61 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 61. In some embodiments, the processor 61 and the memory 62 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

处理器61可以是通用处理器,例如中央处理器(CPU)、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的流量策略确定方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。The processor 61 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the traffic policy determination method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

存储器62作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。存储器62可以包括至少一种类型的存储介质,例如可以包括闪存、硬盘、多媒体卡、卡型存储器、随 机访问存储器(英文:Random Access Memory,缩写为RAM)、静态随机访问存储器(英文:Static Random Access Memory,缩写为SRAM)、可编程只读存储器(英文:Programmable Read Only Memory,缩写为PROM)、只读存储器(英文:Read Only Memory,缩写为ROM)、带电可擦除可编程只读存储器(英文:Electrically Erasable Programmable Read-Only Memory,缩写为EEPROM)、磁性存储器、磁盘、光盘等。存储器62是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器62还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。The memory 62 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The memory 62 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory, or a memory card. Machine access memory (English: Random Access Memory, abbreviated as RAM), static random access memory (English: Static Random Access Memory, abbreviated as SRAM), programmable read-only memory (English: Programmable Read Only Memory, abbreviated as PROM), read-only memory (English: Read Only Memory, abbreviated as ROM), electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 62 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer, but is not limited to this. The memory 62 in the embodiment of the present application can also be a circuit or any other device that can realize the storage function, used to store program instructions and/or data.

通过对处理器61进行设计编程,可以将前述实施例中介绍的流量策略确定方法所对应的代码固化到芯片内,从而使芯片在运行时能够执行图1和图5所示的实施例的流量策略确定方法的步骤。如何对处理器61进行设计编程为本领域技术人员所公知的技术,这里不再赘述。By designing and programming the processor 61, the code corresponding to the traffic policy determination method described in the above embodiment can be fixed into the chip, so that the chip can execute the steps of the traffic policy determination method of the embodiment shown in Figures 1 and 5 when running. How to design and program the processor 61 is a technology known to those skilled in the art and will not be described in detail here.

基于同一发明构思,本申请实施例还提供一种存储介质,该存储介质存储有计算机指令,当该计算机指令在计算机上运行时,使得计算机执行前文论述流量策略确定方法。Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the traffic strategy determination method discussed above.

在一些可能的实施方式中,本申请提供的流量策略确定方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在装置上运行时,程序代码用于使该控制设备执行本说明书上述描述的根据本申请各种示例性实施方式的流量策略确定方法中的步骤。In some possible implementations, various aspects of the traffic policy determination method provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the traffic policy determination method according to various exemplary embodiments of the present application described above in this specification.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to the flowchart and/or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and/or box in the flowchart and/or block diagram, and the combination of the process and/or box in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图 一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the flowchart. The steps of a process or multiple processes and/or the functions specified in one or more blocks of a block diagram.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。 Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (20)

一种流量策略确定方法,其中,所述方法应用于策略执行节点,所述方法包括:A method for determining a traffic strategy, wherein the method is applied to a policy execution node, and the method comprises: 获取第一信息,其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的互联网协议第六版IPv6地址与所述终端的媒体访问控制MAC地址的第一对应关系;Acquire first information, wherein the first information corresponds to a first message from a gateway, and the first information indicates a first correspondence between an Internet Protocol version 6 IPv6 address of a terminal and a media access control MAC address of the terminal; 获取第一映射关系,其中,所述第一映射关系指示所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系;以及Acquire a first mapping relationship, wherein the first mapping relationship indicates a relationship between an Internet Protocol version 4 IPv4 address of the terminal, the MAC, and a traffic policy corresponding to the IPv4 address of the terminal; and 基于所述第一信息和所述第一映射关系,确定所述终端的IPv6地址对应的流量策略。Based on the first information and the first mapping relationship, determine the traffic policy corresponding to the IPv6 address of the terminal. 根据权利要求1所述的方法,其中,所述基于所述第一信息和所述第一映射关系,确定所述终端的IPv6地址对应的流量策略,包括:The method according to claim 1, wherein the determining, based on the first information and the first mapping relationship, a traffic policy corresponding to the IPv6 address of the terminal comprises: 基于所述终端的IPv4地址对应的流量策略,确定所述终端的IPv6地址对应的流量策略;其中,所述终端的IPv6地址对应的流量策略与所述终端的IPv4地址对应的流量策略相同。Based on the traffic policy corresponding to the IPv4 address of the terminal, determine the traffic policy corresponding to the IPv6 address of the terminal; wherein the traffic policy corresponding to the IPv6 address of the terminal is the same as the traffic policy corresponding to the IPv4 address of the terminal. 根据权利要求1或2所述的方法,其中,所述获取第一映射关系,包括:The method according to claim 1 or 2, wherein obtaining the first mapping relationship comprises: 通过网络配置协议NETCONF接口从控制器获取所述第一映射关系。The first mapping relationship is obtained from the controller through a network configuration protocol NETCONF interface. 根据权利要求1或2所述的方法,其中,所述获取第一映射关系,包括:The method according to claim 1 or 2, wherein obtaining the first mapping relationship comprises: 获取第二信息,其中,所述第二信息对应来自所述网关的第二报文,所述第二信息指示所述终端的IPv4地址与所述终端的MAC地址的第二对应关系;Acquire second information, wherein the second information corresponds to a second message from the gateway, and the second information indicates a second correspondence between the IPv4 address of the terminal and the MAC address of the terminal; 获取第三信息,其中,所述第三信息指示所述终端的IPv4地址以及所述终端的IPv4地址对应的流量策略之间的对应关系;以及Acquire third information, wherein the third information indicates a correspondence between the IPv4 address of the terminal and a traffic policy corresponding to the IPv4 address of the terminal; and 基于所述第二信息和所述第三信息,获取所述第一映射关系。The first mapping relationship is acquired based on the second information and the third information. 根据权利要求4所述的方法,其中,所述获取第二信息,包括:The method according to claim 4, wherein the obtaining the second information comprises: 通过基于以太的虚拟私有网络EVPN从所述网关获取所述第二信息;其中,所述网关和所述策略执行节点为边界网关协议BGP邻居关系,以及所述第二报文为以下报文其中之一:地址解析协议ARP报文、ARP表项、动态主机配置协议侦听DHCP Snooping报文或者DHCP Snooping表项。The second information is obtained from the gateway through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the second message is one of the following messages: an Address Resolution Protocol ARP message, an ARP table entry, a Dynamic Host Configuration Protocol snooping DHCP Snooping message or a DHCP Snooping table entry. 根据权利要求4所述的方法,其中,所述获取第二信息,包括:The method according to claim 4, wherein the obtaining the second information comprises: 通过网络配置协议NETCONF接口从控制器获取所述第二信息;其中, 所述第二报文为ARP报文或者ARP表项。The second information is obtained from the controller through the network configuration protocol NETCONF interface; wherein, The second message is an ARP message or an ARP table entry. 根据权利要求4所述的方法,其中,所述获取第二信息,包括:The method according to claim 4, wherein the obtaining the second information comprises: 从所述网关直接获取所述第二信息,其中,所述策略执行节点设置于所述网关上,所述第二报文为ARP报文或者ARP表项。The second information is directly obtained from the gateway, wherein the policy execution node is set on the gateway, and the second message is an ARP message or an ARP table entry. 根据权利要求1至7中任一项所述的方法,其中,所述获取第一信息,包括:The method according to any one of claims 1 to 7, wherein the obtaining the first information comprises: 通过基于以太的虚拟私有网络EVPN从所述网关获取所述第一信息;其中,所述网关和所述策略执行节点为边界网关协议BGP邻居关系,以及所述第一报文为以下报文其中之一:邻居发现ND报文、ND表项、邻居发现侦听ND Snooping报文或者ND Snooping表项。The first information is obtained from the gateway through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the first message is one of the following messages: a neighbor discovery ND message, an ND table entry, a neighbor discovery snooping ND Snooping message or an ND Snooping table entry. 根据权利要求1至7中任一项所述的方法,其中,所述获取第一信息,包括:The method according to any one of claims 1 to 7, wherein the obtaining the first information comprises: 通过网络配置协议NETCONF接口从控制器获取所述第一信息;其中,所述第一报文为ND报文或者ND表项。The first information is obtained from the controller through a network configuration protocol NETCONF interface; wherein the first message is an ND message or an ND table entry. 根据权利要求1至7中任一项所述的方法,其中,所述获取第一信息,包括:The method according to any one of claims 1 to 7, wherein the obtaining the first information comprises: 从所述网关直接获取所述第一信息,其中,所述策略执行节点设置于所述网关上,以及所述第一报文为ND报文或者ND表项。The first information is directly obtained from the gateway, wherein the policy execution node is set on the gateway, and the first message is an ND message or an ND table entry. 一种流量策略确定方法,其中,所述方法应用于网关,所述方法包括:A method for determining a traffic strategy, wherein the method is applied to a gateway, and the method comprises: 发送第一报文,其中,所述第一报文允许策略执行节点基于第一信息和第一映射关系确定终端的IPv6地址对应的流量策略;其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系;以及所述第一映射关系为所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系。A first message is sent, wherein the first message allows a policy execution node to determine a traffic policy corresponding to the IPv6 address of the terminal based on first information and a first mapping relationship; wherein the first information corresponds to a first message from a gateway, the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; and the first mapping relationship is a relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal. 根据权利要求11所述的方法,其中,所述发送所述第一报文包括:The method according to claim 11, wherein the sending the first message comprises: 通过基于以太的虚拟私有网络EVPN发送第一报文;其中,所述网关和所述策略执行节点为边界网关协议BGP邻居关系,以及所述第一报文为以下报文其中之一:邻居发现ND报文、ND表项、邻居发现侦听ND Snooping报文或者ND Snooping表项。A first message is sent through an Ethernet-based virtual private network EVPN; wherein the gateway and the policy execution node are in a Border Gateway Protocol BGP neighbor relationship, and the first message is one of the following messages: a neighbor discovery ND message, an ND table entry, a neighbor discovery snooping ND Snooping message or an ND Snooping table entry. 根据权利要求11所述的方法,其中,所述发送所述第一报文包括:The method according to claim 11, wherein the sending the first message comprises: 通过远程过程调用协议GRPC接口或者NETCONF接口,发送所述第一报文给控制器,以允许所述控制器将所述第一报文发送给所述策略执行节点;其中,所述第一报文为邻居发现ND报文或者ND表项。 The first message is sent to the controller through a remote procedure call protocol GRPC interface or a NETCONF interface to allow the controller to send the first message to the policy execution node; wherein the first message is a neighbor discovery ND message or an ND table entry. 根据权利要求11所述的方法,其中,所述发送所述第一报文包括:The method according to claim 11, wherein the sending the first message comprises: 直接发送所述第一报文给所述策略执行节点;其中,所述策略执行节点设置于所述网关上,以及所述第一报文为ND报文或者ND表项。The first message is directly sent to the policy execution node; wherein the policy execution node is set on the gateway, and the first message is an ND message or an ND table entry. 根据权利要求11至14中任一项所述的方法,其中,所述发送所述第一报文和所述第二报文之前,所述方法还包括:The method according to any one of claims 11 to 14, wherein before sending the first message and the second message, the method further comprises: 从所述终端学习所述第一报文和所述第二报文。The first message and the second message are learned from the terminal. 一种流量策略确定方法,其中,所述方法应用于控制器,所述方法包括:A method for determining a traffic strategy, wherein the method is applied to a controller, and the method comprises: 接收网关发送的第一报文;以及receiving a first message sent by the gateway; and 发送所述第一报文给策略执行节点,所述第一报文允许策略执行节点基于第一信息和第一映射关系确定终端的IPv6地址对应的流量策略;其中,所述第一信息对应来自网关的第一报文,所述第一信息指示终端的IPv6地址与所述终端的MAC地址的第一对应关系;以及所述第一映射关系为所述终端的互联网协议第四版IPv4地址、所述MAC以及所述终端的IPv4地址对应的流量策略之间的关系。The first message is sent to a policy execution node, wherein the first message allows the policy execution node to determine a traffic policy corresponding to the IPv6 address of the terminal based on first information and a first mapping relationship; wherein the first information corresponds to a first message from a gateway, wherein the first information indicates a first correspondence between the IPv6 address of the terminal and the MAC address of the terminal; and the first mapping relationship is a relationship between the Internet Protocol version 4 IPv4 address of the terminal, the MAC, and the traffic policy corresponding to the IPv4 address of the terminal. 根据权利要求16所述的方法,其中,所述方法还包括:The method according to claim 16, wherein the method further comprises: 通过网络配置协议NETCONF接口向所述策略执行节点发送所述第一映射关系。The first mapping relationship is sent to the policy execution node through a network configuration protocol NETCONF interface. 根据权利要求16所述的方法,其中,所述方法还包括:The method according to claim 16, wherein the method further comprises: 接收网关发送的第二报文;receiving a second message sent by the gateway; 向所述策略执行节点发送第二信息和第三信息;其中,所述第二信息和所述第三信息允许所述策略执行节点确定所述第一映射关系;所述第二信息对应来自所述网关的第二报文,所述第二信息指示所述终端的IPv4地址与所述终端的MAC地址的第二对应关系;以及所述第三信息指示所述终端的IPv4地址以及所述终端的IPv4地址对应的流量策略之间的对应关系。Sending second information and third information to the policy execution node; wherein the second information and the third information allow the policy execution node to determine the first mapping relationship; the second information corresponds to a second message from the gateway, and the second information indicates a second correspondence between the IPv4 address of the terminal and the MAC address of the terminal; and the third information indicates a correspondence between the IPv4 address of the terminal and the traffic policy corresponding to the IPv4 address of the terminal. 一种电子设备,其特征在于,包括:An electronic device, comprising: 存储器,用于存放计算机程序;Memory, used to store computer programs; 处理器,用于执行所述存储器上所存放的计算机程序时,实现权利要求1至10或者权利要求11至15或者权利要求16至18中任一项所述的方法步骤。A processor, for implementing the method steps of any one of claims 1 to 10, claims 11 to 15, or claims 16 to 18 when executing the computer program stored in the memory. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至10或者权利要求11至15或者权利要求16至18中任一项所述的方法步骤。 A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 10 or claims 11 to 15 or claims 16 to 18 are implemented.
PCT/CN2024/114881 2023-09-07 2024-08-27 Traffic policy determination method, electronic device, and storage medium Pending WO2025051027A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311149908.4A CN119583447A (en) 2023-09-07 2023-09-07 A strategy accompanying method, device and electronic device
CN202311149908.4 2023-09-07

Publications (1)

Publication Number Publication Date
WO2025051027A1 true WO2025051027A1 (en) 2025-03-13

Family

ID=94800898

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/114881 Pending WO2025051027A1 (en) 2023-09-07 2024-08-27 Traffic policy determination method, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN119583447A (en)
WO (1) WO2025051027A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025641A (en) * 2010-12-27 2011-04-20 中兴通讯股份有限公司 Message filtering method and exchange equipment
EP2506613A2 (en) * 2009-11-26 2012-10-03 Samsung SDS Co. Ltd. System and method for managing ipv6 address and access policy
CN104753793A (en) * 2013-12-26 2015-07-01 联芯科技有限公司 Method for statefull management of access terminal under stateless internet protocol version 6 (IPv6) configuration
CN110650075A (en) * 2018-06-26 2020-01-03 华为技术有限公司 Group policy implementation method, network device and group policy implementation system based on VXLAN
CN110958334A (en) * 2019-11-25 2020-04-03 新华三半导体技术有限公司 Message processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2506613A2 (en) * 2009-11-26 2012-10-03 Samsung SDS Co. Ltd. System and method for managing ipv6 address and access policy
CN102025641A (en) * 2010-12-27 2011-04-20 中兴通讯股份有限公司 Message filtering method and exchange equipment
CN104753793A (en) * 2013-12-26 2015-07-01 联芯科技有限公司 Method for statefull management of access terminal under stateless internet protocol version 6 (IPv6) configuration
CN110650075A (en) * 2018-06-26 2020-01-03 华为技术有限公司 Group policy implementation method, network device and group policy implementation system based on VXLAN
CN110958334A (en) * 2019-11-25 2020-04-03 新华三半导体技术有限公司 Message processing method and device

Also Published As

Publication number Publication date
CN119583447A (en) 2025-03-07

Similar Documents

Publication Publication Date Title
CN113950816B (en) System and method for providing a multi-cloud micro-service gateway using a side car agency
US11563681B2 (en) Managing communications using alternative packet addressing
US12010030B2 (en) FlowSpec message processing method and system, and apparatus
CN107409089B (en) Method implemented in network engine and virtual network function controller
CN107733670B (en) A forwarding strategy configuration method and device
RU2595517C2 (en) Objects of virtual network interface
KR102047197B1 (en) Discovering Wide Area Services for the Internet of Things
US8767737B2 (en) Data center network system and packet forwarding method thereof
US9485147B2 (en) Method and device thereof for automatically finding and configuring virtual network
US8988983B1 (en) Managing failure behavior for computing nodes of provided computer networks
US10868720B2 (en) Data driven orchestrated network using a voice activated light weight distributed SDN controller
WO2022001669A1 (en) Method for establishing vxlan tunnel, and related device
CN101009683A (en) Computer system and method for processing network flow
CN114745263B (en) Autonomous configuration system for service infrastructure
CN108259356B (en) Routing control method and device
US20210273915A1 (en) Multi-access interface for internet protocol security
CN120567769A (en) Route synchronization method, device, system, equipment and medium among multi-SDN clusters
CN116170409B (en) SD-WAN network address planning system based on virtual domain name
WO2024067338A1 (en) Cloud networking system, secure access method, and device and storage medium
EP3503484B1 (en) Message transmission methods and devices
WO2012075768A1 (en) Method and system for monitoring locator/identifier separation network
WO2025051027A1 (en) Traffic policy determination method, electronic device, and storage medium
CN113545130A (en) Fast Roaming and Unified Policy for Wireless Clients Using Distributed Hashing
CN112929193B (en) Method and device for configuring media access control address aging time
CN108259292B (en) Method and device for establishing tunnel

Legal Events

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

Ref document number: 24861871

Country of ref document: EP

Kind code of ref document: A1