Can't connect to TCP/IP printer with undescore "_" in the IP
underscore “_” in the IP


IP address does not contain an underscore.

Wiki: https://en.wikipedia.org/wiki/IPv4#Addressing

192.168.51.xxx_1 is the Port Name, not the IP address of your printer, port name is auto-generated and "_#" is added to avoid duplicates names. So if you are using 192.168.51.xxx_1 to connect to the printer it will not work as this is not the IP address of your printer.