SLIP is a very simple protocol. It has no such facility. To get around this limitation, some servers display the IP address as part of the login sequence. If the client has the proper software, it can capture the address and use it. This assumes that only one IP address is transmitted.
Some servers display the server's address and the client's address.
The set ipaddr command only works if the remote SLIP server is designed to provide the address. Most SLIP connections are configured with static IP addresses. This set command is rarely used. The last set command is set keyboard on . Avoid keyboard input in the script.