# US 10,958,547 B2 · Verify a network function by inquiring a model using a query language

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,958,547 B2
- Document ID: US10958547B2
- Status: Granted
- Kind: B2
- Application number: 15/261,701
- Filed: 2016-09-09
- Published: 2018-03-15
- Granted: 2021-03-23
- Earliest claimed: 2016-09-09
- Assignees: Hewlett Packard Enterprise Development LP
- Applicants: Hewlett Packard Enterprise Development LP
- Inventors: Ying Zhang; Sujata Banerjee; Joon-Myung Kang
- Web page: https://patentgrep.com/patent/US10958547B2

## CPC

- H04L 43/0817: by checking functioning
- G06F 16/951: Indexing; Web crawling techniques
- G06F 16/953: Querying, e.g. by the use of web search engines
- H04L 12/66: Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
- H04L 41/024: {using relational databases for representation of network management data, e.g. managing via structured query language [SQL]}
- H04L 41/0866: Checking the configuration
- H04L 61/2514: between local and global IP addresses
- H04L 43/18: Protocol analysers
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In some examples, a system can verify a network function by inquiring a model using a query language is described. In some examples, the system can include at least a memory and a processor coupled to the memory. The processor can execute instructions stored in the memory to transmit a plurality of packets into at least one network function that is unverifiable; describe the at least one network function using a model comprising a set of match action rules and a state machine; inquire the model using a query language comprising a temporal logic to obtain a query result indicating an expected behavior of the plurality of packets; and verify the at least one network function based on the query result and the expected behavior of the plurality of packets.

## Claims

### Claim 1

A method comprising:
transmitting a plurality of packets into a network function chain comprising first and second network functions of a plurality of network functions, wherein the first network function is unverified and the second network function is verified, based on unavailability and availability, respectively, of source code corresponding to the first and second network functions;
constructing a first model of the first network function,
wherein the model comprises a set of match action rules and a state machine,
wherein the state machine represents a plurality of stateful processes,
wherein each node in the state machine represents a state that the at least one network function maintains, and
wherein each edge in the state machine represents a condition that triggers a transition between different states;
constructing a second model of the second network function using the source code of the second network function;
inquiring the first model and the second model using a query language comprising a temporal logic to obtain a query result indicating an expected behavior of the plurality of packets in the network function chain, wherein the temporal logic specifies a set of logic operators to describe a plurality of temporal relationships, the plurality of temporal relationship comprising:
a predicate is true sometime in the future;
a predicate is true always in the future;
a predicate is true sometime in the past; and
a predicate is true always in the past; and
verifying the first network function and the second network function based on the query result and the expected behavior of the plurality of packets in the network function chain.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first model comprises a set of primitives that include a unit, a state operation, a precondition, and an action.

### Claim 3 (depends on 2)

The method of claim 2, wherein the unit comprises a flow, a packet in the flow, and a header field in the packet in the flow.

### Claim 4 (depends on 2)

The method of claim 2, wherein the state operation comprises a first operation to get the first network function's internal state for a flow, a second operation to set the first network function's internal state for the flow to a particular value, and a third operation to remove the first network function's internal state for the flow when no activity for the flow is detected after a predetermined timeout period.

### Claim 5 (depends on 2)

The method of claim 2, wherein the precondition comprises a match of a flow on a particular pattern, a match of a packet in a flow on the particular pattern, and a match of an event generated by a protocol analyzer to the particular pattern, and wherein the event is generated by the protocol analyzer parsing the flow.

### Claim 6 (depends on 2)

The method of claim 2, wherein the action comprises a modifying action, a forwarding action, a dropping action, an encapsulating action, a decapsulating action, and a rate limiting action.

### Claim 7 (depends on 1)

The method of claim 1, wherein the set of match action rules comprises rules for at least one of:
matching on a packet header of the at least one packet;
matching on an internal state maintained by the first network function;
matching on both the packet header and the internal state;
performing an action on the at least one packet; and
changing the internal state.

### Claim 8 (depends on 1)

The method of claim 1, wherein the first network function comprises:
a network address translator (NAT);
a server load balancer;
a stateful firewall;
an injection detection system (IDS);
a cache proxy;
a virtual private network (VPN) gateway; and
a packet data network (PDN) gateway (PDW).

### Claim 9 (depends on 1)

The method of claim 1, wherein the query language permits a stateful query that returns the query result when the first network function is in a particular state.

### Claim 10

A system comprising at least a memory and a processor coupled to the memory, the processor executing instructions stored in the memory to:
transmit a plurality of packets into a network function chain comprising first and second network functions of a plurality of network functions, wherein the first network function is unverified and the second network function is verified, based on unavailability and availability, respectively, of source code corresponding to the first and second network functions;
construct a first model of the first network function using a model, the model comprising a set of match action rules and a state machine, wherein the state machine represents a plurality of stateful processes, wherein each node in the state machine represents a state that the first network function maintains, and wherein each edge in the state machine represents a condition that triggers a transition between different states;
construct a second model of the second network function using the source code of the second network function;
inquire the first model and the second model using a query language comprising a temporal logic to obtain a query result indicating an expected behavior of the plurality of packets, wherein the temporal logic specifies a set of logic operators to describe a plurality of temporal relationships, the plurality of temporal relationship comprising:
a predicate is true sometime in the future;
a predicate is true always in the future;
a predicate is true sometime in the past; and
a predicate is true always in the past; and
verify the first network function and the second network function based on the query result and the expected behavior of the plurality of packets.

### Claim 11 (depends on 10)

The system of claim 10, wherein the first model comprises a set of primitives that include a unit, a state operation, a precondition, and an action.

### Claim 12 (depends on 11)

The system of claim 11, wherein the unit comprises a flow, a packet in the flow, and a header field in the packet in the flow.

### Claim 13 (depends on 11)

The system of claim 11, wherein the state operation comprises a first operation to get the first network function's internal state for a flow, a second operation to set the first network function's internal state for the flow to a particular value, and a third operation to remove the first network function's internal state for the flow when no activity or no predefined condition is detected for the flow after a predetermined timeout period.

### Claim 14 (depends on 11)

The system of claim 11, wherein the precondition comprises a match of a flow on a particular pattern, a match of a packet in a flow on the particular pattern, and a match of an event generated by a protocol analyzer to the particular pattern.

### Claim 15 (depends on 11)

The system of claim 11, wherein the action comprises a modifying action, a forwarding action, a dropping action, an encapsulating action, a decapsulating action, and a rate limiting action.

### Claim 16 (depends on 10)

The system of claim 10, wherein the query language permits a stateful query that returns the query result when the first network function is in a particular state.

### Claim 17

A non-transitory machine-readable storage medium encoded with instructions executable by at least one processor of a network device, the machine-readable storage medium comprising instructions to:
transmit a plurality of packets into a network function chain comprising first and second network functions of a plurality of network functions, wherein the first network function is unverified and the second network function is verified, based on unavailability and availability, respectively, of source code corresponding to the first and second network functions;
generate a first model of the first network function, the first model comprising a set of match action rules and a state machine to describe the at least one network function, wherein the state machine represents a plurality of stateful processes, wherein each node in the state machine represents a state that the at least one network function maintains, and wherein each edge in the state machine represents a condition that triggers a transition between different states;
generate a second model of the second network function using the source code of the second network function;
search the first model and the second model using a query language comprising a temporal logic to obtain a query result indicating an expected behavior of the plurality of packets in the network function chain, wherein the temporal logic specifies a set of logic operators to describe a plurality of temporal relationships, the plurality of temporal relationship comprising:
a predicate is true sometime in the future;
a predicate is true always in the future;
a predicate is true sometime in the past; and
a predicate is true always in the past; and
verify the first network function and the second network function based on the query result and the expected behavior of the plurality of packets in the network function chain.

### Claim 18 (depends on 17)

The non-transitory machine-readable storage medium of claim 17, wherein the query language permits a stateful query that returns the query result when the first network function is in a particular state.
