---
title: "Device Group and Interface Group Criteria for Networks"
canonical: "https://docs.infoblox.com/space/netmri760/357238756/Device%20Group%20and%20Interface%20Group%20Criteria%20for%20Networks"
format: markdown
---
Because devices are managed as part of one or more network views, you can define device groups or interface groups with criteria based on network membership.

- You use the `$Network` variable in both Device Groups and Interface Groups:
  - If the variable is applied to a device, it returns the name of the network view to which the device's Management IP belongs.
  - If the variable applies to a device's interface, it returns the name of the network view to which the interface IP address belongs.

Example: `$Network = "blue"`

- The hasnetwork operator returns a value of true if at least one device interface is part of the specified network views list:
  - Syntax example: `hasnetwork[”blue”,”red”,”green”]`