1831213 Members
2700 Online
110021 Solutions
New Discussion

Re: Default gate way

 
David_492
Advisor

Default gate way

Dear aLL

I already configured a default gateway on my HPUX SERVER rp8400 by using SAM from hosts file but now i can not remove it could any body has any idea how to remove defualt gate way?

Thanks
9 REPLIES 9
Rainer von Bongartz
Honored Contributor

Re: Default gate way

edit

/etc/rc.config.d/netconf


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
blal
Frequent Advisor

Re: Default gate way


Hi

Use netstat -nr to find the default gateway.

to delete,

#route delete default gateway_address.

where default_gateway is the ip address of the default gate wasy as shown in netstat -nr

regds
Live and let live.
Ron Kinner
Honored Contributor

Re: Default gate way

You need to do both methods to remove the default gateway. The route delete method will remove it from the current routing table but it will return after the first reboot unless you edit the /etc/rc.config.d/netconf file too.

Ron
KCS_1
Respected Contributor

Re: Default gate way

Hi,

Follow this step :

# route -f

-f Delete all route table entries that specify a remote host for a gateway. If this is used with one of the subcommands, the entries are deleted before the subcommand is processed.



Edit "netconf" file a part of default gateway setting portion.

# vi /etc/rc.config.d/netconf


Re-read the file by this commands.

# /sbin/init.d/net stop
# /sbin/init.d/net start





Best Regards


Patrick










Easy going at all.
Norman_21
Honored Contributor

Re: Default gate way

Hello,

# netstat -nr ( I have cut and paste the last line only):
default 192.168.1.10 UG 0 0 lan1 1500

# route delete 192.168.1.10
# netstat -nr ( again to make sure the default gateway has gone away).
This is to remove it temporarly from the routing table.

# vi /etc/rc.config.d/netconf
and clear the default gateway the following field:
ROUTE_DESTINATION[0]="0.0.0.0"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="192.168.1.10"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

# /sbin/init.d/net stop
# /sbin/init.d/net start



"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Hoefnix
Honored Contributor

Re: Default gate way

Hari Kumar
Trusted Contributor

Re: Default gate way

SAM

NETWORKING

HOSTS
ACTIONS--->DEFAULT GATEWAY
Information is Wealth ; Knowledge is Power
Pratyush Paul_1
Valued Contributor

Re: Default gate way

Hi,

First edit your /etc/rc.config.d/netconf

stop your network.

#./sbin/init.d/net stop

# route -f

# netstat -rn ( just to make sure the old route is not there)

# ./sbin/init.d/net start

#netstat -rn

Please let me know if this works.

Thanks

Pratyush
Die Hard
Brian Lee_4
Regular Advisor

Re: Default gate way

open /etc/rc.config.d/netconf file and remove IP address from "ROUTE_GATEWAY[0]".
After saving the file, you should run "/sbin/init.d/net stop" and then "/sbin/init.d/net start" to refresh network setting.
brian lee