1

I want to test "connection retry" with remote application server. For this, I am using route method, wherein I remove static route from my linux server and check if the connectivity goes down or not. Surprisingly, connectivity doesn't go down & I can ping remote host too ! Any clue ? I am using RHEL 4.

Only thing that stops working is traceroute to the remote host.

Following are the 2 commands that I use to remove static route. Are they enough ?

route del -host 10.151.1.14 gw 10.200.1.1   
ip route flush cache                             

Thanks!

Vijay Gharge
  • 87
  • 1
  • 2
  • 10

2 Answers2

6

Connectivity should not go down.

When any connection is opened by some program or user it first finds the best route. After that it connects. After that connection persists.
Now if you remove any route the active connections will not go down. Because they are not seeking best route after making connection. Do you every day ask what is the best way to go to your university? Connection is made, its purpose is served.

If you want to make the connection down. Disconnect the route. Means put something in the route so that packet can not pass. It can be easily done by ifconfig eth0 down. of if-down After that the link is down. So all the connection that were using the link will be broken.

Shiplu Mokaddim
  • 893
  • 2
  • 9
  • 14
1

Use the firewall instead. Something like:

iptables -I OUTPUT -d 10.151.1.14 -j DROP

So, this should drop all traffic heading out from the box to IP address 10.151.1.14. To remove the rule, run:

iptables -D OUTPUT -d 10.151.1.14 -j DROP
cjc
  • 24,916
  • 3
  • 51
  • 70
  • Thanks Cjc for response, but I want to simulate network disconnection @my server side, which is already serving production traffic. So I thought of removing static route for specific client & restore it again after some time. – Vijay Gharge Feb 02 '12 at 17:33