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