Tuesday, June 9, 2009

Sun Storage 7210: Default router setting using CLI

If you happen to be like me, where using GUI to change the default router doesn't seems to work, then you have to fall back to use CLI.
There are few ways to access CLI. Firstly, if you still able to connect to the machine using the IP network, using putty is the easiest one. If you can't, you might need to use serial connection or net management connection. (For net management connection, you must have DHCP server and you need to identify the IP address assigned by your DHCP server)

Serial management and network management port

To use serial connection, you need to get a normal ethernet cable and plug it into the converter provided as shown below.

Serial converter

If you are running windows, open your hyperterminal program and choose the correct interface port (Usually is COM1) and set the setting as shown:

COM port settings


Once you in the terminal, it will prompt you for user name and password. If it is not a console login as shown below

UM7210 console login:

Then you might need to type this to go into console:

start /SP/console

Type y when prompt with this:

Are you sure you want to start /SP/console (y/n)?

Then you will be prompted by the console login.

Once you login, type the following command to go to the routing service:

UM7210:> configuration
UM7210:configuration> services
UM7210:configuration services> routing

Create a new routing by issue the following command

UM7210:configuration services routing> create
UM7210:configuration services route (uncommitted)> set gateway=xxx.yyy.zzz.1
gateway = xxx.yyy.zzz.1 (uncommitted)
UM7210:configuration services route (uncommitted)> set interface=nge0 //depends on which interface used
interface = nge0 (uncommitted)
UM7210:configuration services route (uncommitted)> set family=IPv4
family = IPv4 (uncommitted)
UM7210:configuration services route (uncommitted)> commit
error: cannot create route: must specify "destination" property
UM7210:configuration services route (uncommitted)> set destination=0.0.0.0
destination = 0.0.0.0 (uncommitted)
UM7210:configuration services route (uncommitted)> set mask=0
mask = 0 (uncommitted)
UM7210:configuration services route (uncommitted)> commit

After commit the changes, you can use this command to verify your default routing configuration

UM7210:configuration services routing> list
ROUTE DESTINATION GATEWAY INTERFACE TYPE
route-000 0.0.0.0/0 xxx.yyy.zzz.1 nge0 static
route-001 ...

When finish, just type done all the way.

No comments: