How To Change The IP Address Of A Sun T5120 System Controller

Changing the IP address of a Sun T5120 system controller should be easy. And it is. But only if you know that magic command that makes the change stick.

First step, log in to the system controller (or SP or ALOM or ILOM, or whatever you call the system controller in your neck of the woods) as a user with Administrator privilege.

SUNSP001234567890 login: admin
Password:
Waiting for daemons to initialize...

Daemons ready

Sun(TM) Integrated Lights Out Manager

Version 2.0.4.26.d

Copyright 2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

sc>

Once logged in, display the system controller’s current IP address.

sc> shownetwork
SC network configuration is:
IP Address: 10.1.1.51
Gateway address: 10.1.1.100
Netmask: 255.255.255.0
Ethernet Address: 00:12:34:56:78:90
sc>

You’d think the command to change the IP address would be setnetwork, right? Wrong. Let’s dig a little deeper and see if we can get the system controller’s IP address in a different way.

sc> showsc
SP firmware version: 2.0.4.26.d

Parameter                Value
---------                -----
if_network               true
if_connection            ssh
if_emailalerts           true
netsc_dhcp               false
netsc_ipaddr             10.1.1.51
netsc_ipnetmask          255.255.255.0
netsc_ipgateway          10.1.1.100
mgt_mailhost             0.0.0.0
mgt_mailalert
sc_customerinfo          t5120
sc_escapechars           #.
sc_powerondelay          false
sc_powerstatememory      false
sc_clipasswdecho         true
sc_cliprompt             sc
sc_clitimeout            0
sc_clieventlevel         2
sc_backupuserdata        true
diag_trigger             power-on-reset error-reset
diag_verbosity           normal
diag_level               max
diag_mode                normal
sys_autorunonerror       false
sys_autorestart          reset
ser_baudrate             9600
ser_commit               (Cannot show property)
netsc_enetaddr           00:12:34:56:78:90
netsc_commit             (Cannot show property)
sys_enetaddr             00:12:34:56:78:87
sc>

That’s interesting. It looks like the IP address of a Sun T5120 system controller is stored as some sort of environment variable. If that’s the case, it should be a simple matter of changing the appropriate environment variable to the new IP address. Let’s do that and for good measure let us change the gateway address and the system controller’s customer info field too.

sc> setsc netsc_ipaddr 10.61.59.36
sc>
sc> set sc netsc_ipgateway 10.61.59.1
sc>
sc> setsc sc_customerinfo t5120-console
sc>

Now let’s check if the environment variables have changed.

sc> showsc
SP firmware version: 2.0.4.26.d

Parameter                Value
---------                -----
if_network               true
if_connection            ssh
if_emailalerts           true
netsc_dhcp               false
netsc_ipaddr             10.61.59.36
netsc_ipnetmask          255.255.255.0
netsc_ipgateway          10.61.59.1
mgt_mailhost             0.0.0.0
mgt_mailalert
sc_customerinfo          t5120-console
sc_escapechars           #.
sc_powerondelay          false
sc_powerstatememory      false
sc_clipasswdecho         true
sc_cliprompt             sc
sc_clitimeout            0
sc_clieventlevel         2
sc_backupuserdata        true
diag_trigger             power-on-reset error-reset
diag_verbosity           normal
diag_level               max
diag_mode                normal
sys_autorunonerror       false
sys_autorestart          reset
ser_baudrate             9600
ser_commit               (Cannot show property)
netsc_enetaddr           00:12:34:56:78:90
netsc_commit             (Cannot show property)
sys_enetaddr             00:12:34:56:78:87
sc>

So far, so good. netsc_ipaddr, netsc_ipgateway and sc_customerinfo have been updated as expected. Now let’s see what the shownetwork command has to say.

sc> shownetwork
SC network configuration is:
IP Address: 10.1.1.51
Gateway address: 10.1.1.100
Netmask: 255.255.255.0
Ethernet Address: 00:12:34:56:78:90
sc>

Whoa! What happened there? That’s still the old IP address and default gateway.

It turns out there’s one more step that we need to do to make the changes take effect. The magic command I mentioned earlier that makes the changes stick.

sc> setsc netsc_commit true
sc>
sc> shownetwork
SC network configuration is:
IP Address: 10.61.59.36
Gateway address: 10.61.59.1
Netmask: 255.255.255.0
Ethernet Address: 00:12:34:56:78:90
sc>

Now everything’s right with the world.