1832543 Members
6279 Online
110043 Solutions
New Discussion

Re: Route delete error

 
govindarajan_1
Advisor

Route delete error

Hi all,

I want to delete one of the fautly route entry

pls see the netstat output

netstat -nr
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
80.0.0.1 80.0.0.1 UH 0 lan2 4136
10.10.25.65 10.10.25.65 UH 0 lan1 4136
210.210.25.73 210.210.25.73 UH 0 lan0:1 4136
210.210.25.71 210.210.25.71 UH 0 lan0 4136
210.210.25.64 210.210.25.71 U 3 lan0 1500
210.210.25.64 210.210.25.73 U 3 lan0:1 1500
10.10.25.64 10.10.25.65 U 2 lan1 1500
80.0.0.0 80.0.0.1 U 2 lan2 1500
10.10.0.0 10.10.25.93 UG 0 lan1 0
10.10.25.0 10.10.25.93 UG 0 lan1 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 210.210.25.93 UG 0 lan0 0
#

in that i want to delete

10.10.25.0 10.10.25.93 entry ..

I removed this entry from /etc/rc.config.d/netconf file
and i restared /sbin/init.d/net server and inetd -c also .
aftere that i tried netstat command

netstat -nr
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
80.0.0.1 80.0.0.1 UH 0 lan2 4136
10.10.25.65 10.10.25.65 UH 0 lan1 4136
210.210.25.73 210.210.25.73 UH 0 lan0:1 4136
210.210.25.71 210.210.25.71 UH 0 lan0 4136
210.210.25.64 210.210.25.71 U 3 lan0 1500
210.210.25.64 210.210.25.73 U 3 lan0:1 1500
10.10.25.64 10.10.25.65 U 2 lan1 1500
80.0.0.0 80.0.0.1 U 2 lan2 1500
10.10.0.0 10.10.25.93 UG 0 lan1 0
10.10.25.0 10.10.25.93 UG 0 lan1 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 210.210.25.93 UG 0 lan0 0
#

the same output i got.

then i triend route delete 10.10.25.0 10.10.25.93 command

afterwards also i can see the same out that i mentioned above.

Please guide me how to delete that entry and one more query ?

How to add route entries propery ?

why because i add route entry in /etc/rc.config.d/netconf file and restarted network service.Is that the right way ?

How to add route entries through sam?

Why because i can use sam to add default route entry only i want to specify the route entry for lan too.

Pleae guide me how to do

Thanks in advance to you all

Regards,

Govindarajan R
4 REPLIES 4
Sandman!
Honored Contributor

Re: Route delete error

Specify network route thru a remote gateway in the route delete command:

# route delete net 10.10.25.0 10.10.25.93 1
John Waller
Esteemed Contributor

Re: Route delete error

Hi,

There is not a proper way to do anything in UNIX. Each user has their own method and as long as it works it's the correct way for them.
My personal method for managing routes is to manually add or delete the route from the command line with the "route add netmask " or "route delete " command. Once I've completed that and I then manually edit the /etc/rc.config.d/netconf file to add or remove the entry so the next time the system reboots routes are correct.

e.g. route add net 192.168.5.0 netmask 255.255.255.0 extgateway 1

vi /etc/rc.config.d/netconf to add

ROUTE_GATEWAY[3]=extgateway
ROUTE_COUNT[3]=1
ROUTE_DESTINATION[3]="net 192.168.5.0"
ROUTE_MASK[3]=255.255.255.0

remembering to increate the [n] value.



Sandman!
Honored Contributor

Re: Route delete error

extgateway is not a valid argument to route(1M). See route(1M) for details.

>route add net 192.168.5.0 netmask 255.255.255.0 extgateway 1

should be...

route add net 192.168.5.0 netmask 255.255.255.0 gateway 1
govindarajan_1
Advisor

Re: Route delete error

Is that system reboot is required if i add new gateway or change gateway?