How to Delete a Persistent Route on CentOS

Program persistent network routes into the CentOS Linux operating system to work around network problems, or to direct network-bound traffic to the correct network interface and path. If you remove network interfaces or change network topology, a persistent route on the CentOS computer may actually cause network connection failures. Delete static or persistent routes on a CentOS computer when you no longer need custom routes. Configure CentOS to participate in dynamic RIPv2 or OSPF routing to adjust Linux routing tables automatically.

Step

Open the terminal. Type su at the command prompt and tap the Enter key. Enter the root password when prompted.

Step

Type vi /etc/sysconfig/network-scripts/route-interface_name at the command prompt except replace the “interface_name” with the name of the network interface associated with the route. Press the Enter key.

Step

Locate the route you wish to delete in the text file that appears. Place the cursor at the end of the line for the route you wish to delete. Press the I key and delete the entire line.

Step

Press the Esc key. Type :wq and tap the Enter key to save the setting.

Step

Type route del -net 10.0.0.0/24 gw 10.0.0.1 at the command prompt except replace "10.0.0.0/24” with the IP address and subnet mask of the network for the route you wish to delete and replace “10.0.0.1” with the gateway for the route you wish to delete. Press the Enter key.