LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   remove route (https://www.linuxquestions.org/questions/linux-networking-3/remove-route-316593/)

the_cranky_don 04-24-2005 02:57 AM

remove route
 
easy one hopefully...
i wish to remove a route from my route tables.
results from route...

> route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 eth1
loopback * 255.0.0.0 U 0 0 0 lo
default 10.0.0.138 0.0.0.0 UG 1 0 0 eth0

what syntax do i use to remove the second line (eth1)?

I have tried various combinations and permutations of 'route del...'
yes I tried 'man route', I would like a plain english answer though.

masand 04-24-2005 03:32 AM

try

route del localnet eth1

regards

the_cranky_don 04-24-2005 04:36 AM

thanks, but no go
 
yep, tried that one. results...

> route del localnet eth1
SIOCDELRT: Invalid argument

thanks for trying.

any other takers?

btw, distro is Slackware 9.0

masand 04-24-2005 09:18 AM

u can do this way also
as i have here

--------
root@gaurav:~# ip route show
202.XX.XX.XX dev ppp0 proto kernel scope link src 61.XX.XX.XX
192.168.0.0/24 dev eth0 scope link
127.0.0.0/8 dev lo scope link
default via 202.XX.XX.XX dev ppp0

root@gaurav:~# ip route del 192.168.0.0/24 dev eth0

root@gaurav:~# ip route show
202.XX.XX.XX dev ppp0 proto kernel scope link src 61.XX.XX.XX
127.0.0.0/8 dev lo scope link
default via 202.XX.XX.XX dev ppp0

---------

regards

the_cranky_don 04-24-2005 07:01 PM

thanks
 
thanks dude, that did the trick

masand 04-24-2005 10:19 PM

thanks to you also!!
i also got to know the right menthod

regards


All times are GMT -5. The time now is 02:04 PM.