1823986 Members
4425 Online
109667 Solutions
New Discussion юеВ

Default Gateway Remove

 
David_492
Advisor

Default Gateway Remove

Dear all

I already configured a defaltgateway for my HP UNIX Server rp8400 from SAM but i dont know how to remove it.Any body can help?
THANKS
5 REPLIES 5
aparna challagulla
Valued Contributor

Re: Default Gateway Remove

hi David,

pl take a break and read ur replies. pl go thro docs.hp.com
pl ask all ur questions together.

HTH
aparna
If you don't have time to do it right you must have time to do it over
Rajeev  Shukla
Honored Contributor

Re: Default Gateway Remove

Have a look at man pages of route command.
Use
route delete default 1

but be sure if you are on a different network from you'r server you will loose connection from the server if you'r default route is active
Hoefnix
Honored Contributor

Re: Default Gateway Remove

If the interface and default gateway are configured by SAM it will also be in the file /etc/rc.config.d/netconf

If you only use a "route delete" command your default gateway will be set (as set in netconf) after a reboot.

So change the next part of the netconf file:
ROUTE_DESTINATION[n]="default"
ROUTE_MASK[n]=""
ROUTE_GATEWAY[n]="1.1.1.1"
ROUTE_COUNT[n]="1"
ROUTE_ARGS[n]=""

Activate the new netconf using /sbin/init.d/net start

Be aware of the warning in a previous reply, if you are using the gateway via a network session you wil loose the connection!.
TSaliba
Trusted Contributor

Re: Default Gateway Remove

hi

i thing the best solution is to modify the file /etc/rc.config.d/netconf

change the following lines
ROUTE_DESTINATION[n]="default"
ROUTE_MASK[n]=""
ROUTE_GATEWAY[n]="1.1.1.1"
ROUTE_COUNT[n]="1"
ROUTE_ARGS[n]=""

by this way your modification is permanent
jj
Jeff Schussele
Honored Contributor

Re: Default Gateway Remove

Hi David,

It should be noted that if a non-default subnet mask was applied at route creation, it must again be stipulated in the route delete. The default mask is 255.255.255.0
Run
netstat -rvn
To see if a non-default mask is in play.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!