LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-24-2005, 02:57 AM   #1
the_cranky_don
LQ Newbie
 
Registered: Sep 2004
Location: Australia
Posts: 22

Rep: Reputation: 15
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.
 
Old 04-24-2005, 03:32 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
try

route del localnet eth1

regards
 
Old 04-24-2005, 04:36 AM   #3
the_cranky_don
LQ Newbie
 
Registered: Sep 2004
Location: Australia
Posts: 22

Original Poster
Rep: Reputation: 15
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
 
Old 04-24-2005, 09:18 AM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
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
 
Old 04-24-2005, 07:01 PM   #5
the_cranky_don
LQ Newbie
 
Registered: Sep 2004
Location: Australia
Posts: 22

Original Poster
Rep: Reputation: 15
thanks

thanks dude, that did the trick
 
Old 04-24-2005, 10:19 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
thanks to you also!!
i also got to know the right menthod

regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
if a route fails in a multipath route? eantoranz Linux - Networking 5 07-03-2005 02:03 PM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM
Working with 'route' and unwanted route entries pioniere Linux - Networking 6 02-05-2003 12:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration