IBM Support

Remove a static route

Question & Answer


Question

How do I remove a static route from the ODM

Answer


When you are trying to remove a static route it’s best to use smitty or a chdev command to get rid of it. When you use the route delete command that just removes it from the running Kernel. Here is how we can remove the static route.

First Option: Smitty

Step 1: Run netstat -rn
Step 2: Verify the route you want to remove. Also look at the ODM so you can see later that it was removed from there to. To verify from the odm run lsattr -El inet0. In this example we will remove the route circled in red. Notice on the flags column and you will see it has a flag of H, meaning it is a Host route.



Here is the odm output and circled in red is the same route from the netstat -rn output. It also shows you that it is a Host route we are going to remove. It looks similar to the route above it, but one is a network route and the other is a host specific route.


Step 3: Type smitty route

Step 4: Select remove a static route



Step 5: Enter the information for destination and gateway exactly how you see it in the routing table.

For Destination Type we can hit F4 and it will give us two options: net and host. In our case we will select host since we are removing a host specific route.

Under Destination Address we will enter what is in the Destination column of the
netstat -rn.

The Gateway value will be what’s in the Gateway column of the netstat -rn.

Hit enter when done.



Step 6: Verify that it was gone with the lsattr command. lsattr -El inet0.

Notice we don’t see the following value for route any longer:

host,-interface,,,,,,153.6.24.0,153.6.24.56



Second Option: Command line using chdev command.

Step 1: Verify the route we want to remove in the netstat -rn output.



Step 2: Verify which route is the offending route in the lsattr -El inet0 output.



Step 3: Run the following command:

chdev -l inet0 -a delroute=”net,-interface,,,,,,153.6.24.0,153.6.24.56”

Step 4: Verify that the route is gone in the ODM.



That is it!

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"}],"Version":"5.3","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

More support for:
AIX

Software version:
5.3

Operating system(s):
AIX

Document number:
670333

Modified date:
17 June 2018

UID

isg3T1011556

Manage My Notification Subscriptions