In order for the serial device and your computer to communicate to each other, they both need to be on the same physical network and the same subnet.
To connect your serial device and your computer to the same physical network, plug both devices into the same router.
Typically, in order for devices to be on the same subnet, the first three numbers of the IP address must match. The fourth number of the IP address must be different, as two devices cannot have the same IP address. For example, if your computer’s IP address is 192.168.0.1, then the subnet is 192.168.0.XXX. You can replace the XXX with any number, as long as it is not currently in use by another device.