1752455 Members
6183 Online
108788 Solutions
New Discussion

route -f impact

 
SOLVED
Go to solution
tempsample
Frequent Advisor

route -f impact

Hi

 

Is there any impact in executing route -f command ?

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > networking.
-HP Forum Moderator

4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: route -f impact

According to the 'route' man page:

 

 -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.

 

So, yes there will be some impact.

Patrick Wallek
Honored Contributor

Re: route -f impact

Here's an exmple of what 'route -f' does on one my test servers.

 

Current routes:

# netstat -rn
Routing tables
Destination           Gateway            Flags   Refs Interface  Pmtu
127.0.0.1             127.0.0.1          UH        0  lo0        4136
1.1.150.134           1.1.150.134        UH        0  lan0       4136
1.1.150.0             1.1.150.134        U         2  lan0       1500
127.0.0.0             127.0.0.1          U         0  lo0           0
default               1.1.150.1          UG        0  lan0          0


Run 'route -f':

# route -f

Routes after:
# netstat -rn
Routing tables
Destination           Gateway            Flags   Refs Interface  Pmtu
127.0.0.1             127.0.0.1          UH        0  lo0        4136
1.1.150.134           1.1.150.134        UH        0  lan0       4136
1.1.150.0             1.1.150.134        U         2  lan0       1500
127.0.0.0             127.0.0.1          U         0  lo0           0

 

Notice that my 'default' route is now missing.  I now have no communication outside my current subnet.

 

I now have to add my default gateway back manually.

 

# route add default 1.1.150.1 1
add net default: gateway 1.1.150.1

# netstat -rn
Routing tables
Destination           Gateway            Flags   Refs Interface  Pmtu
127.0.0.1             127.0.0.1          UH        0  lo0        4136
1.1.150.134           1.1.150.134        UH        0  lan0       4136
1.1.150.0             1.1.150.134        U         2  lan0       1500
127.0.0.0             127.0.0.1          U         0  lo0           0
default               1.1.150.1          UG        0  lan0          0

 

 

 

tempsample
Frequent Advisor

Re: route -f impact

one of my team member has executed route -f .I can find that from history file.

 

but now when i run cmviewcl ,I am getting the below error.

Unable to receive reply from local cmclconfd. Connection timed out. Unable to initialize HOSTNAME_ADDRESS_FAMILY.

 

and also i am able to login only thorugh console.

 

when i check with netstat -rn,I cant find the default route.

 

Is it the reason ?

Patrick Wallek
Honored Contributor
Solution

Re: route -f impact

>>when i check with netstat -rn,I cant find the default route.

>>Is it the reason ?

 

More than likely, yes.

 

Add your default route back with the 'route add' command.