Main Content

setipaddr

Set IP address and netmask on the target computer

Since R2020b

Description

example

setipaddr(target_object,'ipaddr','netmask') sets the IP address and netmask on the target computer. If the netmask argument is omitted, the default value is '255.255.255.0'.

Examples

collapse all

For target object tg, set the target computer IP address to '192.168.7.5' and the netmask to '255.255.255.0'. These values are retained by the target computer.

tg = slrealtime('TargetPC1');
setipaddr(tg,'192.168.7.5','255.255.255.0');
reboot(tg);

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

This value sets the IP address of the target computer.

Example: '192.168.7.5'

This value sets the netmask of the target computer.

Example: '255.255.255.0'

Version History

Introduced in R2020b