ixIsSameSubnet

ixIsSameSubnet - compares two subnets for overlap

SYNOPSIS

ixIsSameSubnet ipAddress1 mask1 ipAddress2 mask2

DESCRIPTION

This command compares two subnets to determine if they are the same.

ARGUMENTS
ipAddress1

The first IP address to be compared.

mask1

The network mask for the first IP address.

ipAddress2

The second IP address to be compared.

mask2

The network mask for the first IP address.

RETURNS
0

The subnets are different.

1

The subnets are the same.

EXAMPLES

package require IxTclHal

set ip1 192.168.0.1

set mask1 255.255.255.0

set ip2 192.168.20.1

set mask2 255.255.0.0

if [ixIsSameSubnet $ip1 $mask1 $ip2 $mask2] {

ixPuts "These are the same subnet"

}

SEE ALSO