Skip to main content

A question that comes up when running an Ethernet network with multiple devices is whether it is possible to only allow a specific IP address to connect to the Galil controller or possibly allow a specific range of IP addresses to connect but not the entire network.  The answer is to use the SM command (Subnet Mask).  This command is valid for the DMC-40x0, DMC-41x3, and RIO controllers.  It allows you to include a "mask" that blocks certain IP addresses from connecting.

The default of the SM command is 0,0,0,0 which means any IP address can connect to the controller (ie: no restrictions).  As an example - let's say you have a static IP address on your PC of 192.168.1.1 and you set your controllers static IP address to 192.168.1.2.  However, you have other devices that are also in the 192.168.1.xxx range that you do not want to be able to connect to the controller.  In this case, you would want to enter the command SM 255,255,255,252.  This command only allows devices with the IP address range of 192.168.1.1-192.168.1.2 to connect to the controller (effectively restricting everything but the PC's IP address).  How do you come up with the correct subnet mask?  Here's a site that will generate the mask for you based on the IP range you desire:

http://www.subnet-calculator.com/

More info on the SM command can be found in the Command Reference of your specific controller.

Happy Networking!