Why do I receive an error indicating the Subnet in this block is the same as or is a subset of the subnet calculated in ''block''?

12 views (last 30 days)
Why am I receiving the following error?
The subnet in this block is the same as or is a subset of the subnet calculated in ''block''. The block calculates the subnet by ANDing the IP address bitwise with the subnet mask.
How do I configure the IP addresses and subnet masks in my Simulink model to resolve this error message? 

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 26 Mar 2023
Edited: MathWorks Support Team on 27 Mar 2023
Subnet masks are used in TCP/IP addressing protocols to split an IP address into two parts: the host, or computer, and the network to which it belongs. Comparing the IP address and the subnet mask, the local computer can determine whether the signal came from the local computer or a specific remote network.
Each subnet mask divides the full IP address range into subdivisions called subnets. The subnet masks in the "Configure UDP" blocks do not need to be unique; however, the subnets cannot be duplicates or subsets of each other. This is the reason for the error message. 
An example of the subnet (host address range) obtained by the IP address "" and the subnet mask of "" is " --". This means that only 1 IP address in all the "Configure UDP" blocks in the model can be of the form "192.168.0.X". An IP address of "" with a subnet mask of "" would produce the error above. To divide the subnet (host address range) into smaller ranges, the last number in the subnet mask can be increased. Common examples of subnet masks are:
Take note that when represented in binary notation, any 1's present in the subnet mask must be contiguous. Also, IP addresses ending in 0 or 255 are not valid. The 0 address specifies a network without a host, and the 255 address specifies all hosts on a network.
The following link can be helpful in visualizing how combinations of IP addresses and subnet masks result in different subnets (IP address ranges).

More Answers (0)


Find more on Manage Products in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by