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
-------------------- -------------------- ----- ----- ------ --------- U 1 42 hme0 U 1 9172 hme1 U 1 0 hme0
default UG 1 148 UH 2 783 lo0


Delete current default router:

# route delete default

Add new default router:

# route add default 1

if you're ssh'd in from afar, then combine the route delete and route add into one command.

# route delete default ; route add default

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:

No comments:

Post a Comment

tag ur valuable ideas below