route -f impact (296 Views)
Reply
Frequent Advisor
tempsample
Posts: 100
Registered: ‎06-20-2013
Message 1 of 5 (296 Views)
Accepted Solution

route -f impact

[ Edited ]

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

Please use plain text.
Honored Contributor
Patrick Wallek
Posts: 13,736
Registered: ‎06-21-2000
Message 2 of 5 (272 Views)

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.

Please use plain text.
Honored Contributor
Patrick Wallek
Posts: 13,736
Registered: ‎06-21-2000
Message 3 of 5 (269 Views)

Re: route -f impact

[ Edited ]

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

 

 

 

Please use plain text.
Frequent Advisor
tempsample
Posts: 100
Registered: ‎06-20-2013
Message 4 of 5 (265 Views)

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 ?

Please use plain text.
Honored Contributor
Patrick Wallek
Posts: 13,736
Registered: ‎06-21-2000
Message 5 of 5 (260 Views)

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.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation