# Union

The common language equivalent for the union operand is the word “AND”. The union operand’s role is to widen the scope of the expression.

Figure: Graphical representation of a union

1
  The union includes all IP addresses in both sets combined

## Example

The expression 1.2.3.0/24 ⋃ 2.3.4.0/24 includes all IP addresses in the two networks. As is evident from this example, using unions is the same as including the elements in the same Group element. For this reason, unions are not the only operand in an expression. Perhaps a better example is: ~192.168.1.1 ⋃ ~192.168.1.255 (includes all IP addresses except the two IP addresses mentioned). However, this example is wide in scope and might require further restriction to be practical. For example, adding an intersection with the network 192.168.1.0/24 restricts the result to addresses in that network.

Unions do have the potential to become too wide in scope if you are not careful. In the preceding example, we used the example expression: 192.168.10.0/24 ⋂ ~192.168.10.200. If we replace the intersection (“⋂”) with a union (“⋃”), the expression then includes all addresses from the left side (network 192.168.10.0/24) and the right side (all IPv4 addresses except for one). The expression includes even the single IP address that is excluded on the right side because it is part of the network on the left side. The result corresponds to the default “Any Network” element that matches all possible IP addresses. The processing order of the operands is also a factor in this result.