Monday, August 3, 2009
Default Route Change Without Reboot: Solaris
View the routing table:
# netstat -rn
----------------------
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
10.67.13.0 10.67.13.50 U 1 42 hme0
10.67.3.0 10.67.3.65 U 1 9172 hme1
224.0.0.0 10.67.13.50 U 1 0 hme0
default 10.67.12.1 UG 1 148
127.0.0.1 127.0.0.1 UH 2 783 lo0
----------------------
Delete current default router:
# route delete default 10.67.12.1
Add new default router:
# route add default 10.67.13.1 1
if you're ssh'd in from afar, then combine the route delete and route add into one command.
# route delete default 10.67.12.1 ; route add default 10.67.13.1
as separate commands you loose connectivity after the delete, so you can't enter the route add.
also to make the default route come up on the next reboot, change the address in:
/etc/defaultrouter
Solaris Runlevels
S Single user state (useful for recovery)
0 Go into firmware.
1 Put the system in system administrator mode. All local
file systems are mounted. Only a small set of essen-
tial kernel processes are left running. This mode is
for administrative tasks such as installing optional
utility packages. All files are accessible and no
users are logged in on the system.
2 Put the system in multi-user mode. All multi-user
environment terminal processes and daemons are
spawned. This state is commonly referred to as the
multi-user state.
3 Extend multi-user mode by making local resources
available over the network.
4 Is available to be defined as an alternative multi-
user environment configuration. It is not necessary
for system operation and is usually not used.
5 Shut the machine down so that it is safe to remove the
power. Have the machine remove power, if possible.
6 Stop the operating system and reboot to the state
defined by the initdefault entry in /etc/inittab.
Subscribe to:
Posts (Atom)