Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding default gateway on solaris 10 2

Status
Not open for further replies.

droodle

Technical User
Nov 10, 2005
75
AU

ok i'm quite new and have just installed a solaris 10 vmwar eand need to add a default gateway so when it boots i can connect remotely - at the moment i keep having to add the gateway via command line each time.

thanks,
 
Add the IP address to /etc/defaultrouter (create the file if it doesn't already exist).
 


vi /etc/defaultrouter and add the IPADDRESS of your router.

EXAMPLE:

Router IP: 192.168.1.1


vi /etc/defaultrouter
192.168.1.1

reboot to test.


 
or ..
netstat -r shows the current routing table

route add destination gateway
eg route add default 172.16.96.9 adds a default gateway

netstat -r will now show your 'new' default gateway.

You should also add this command to one of the /etc/rc.n directories so that is is set up after a reboot.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top