Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-03-2005, 06:22 AM   #1
Registered: May 2002
Posts: 401

Rep: Reputation: 30
removing and adding route


I use red hat.

I have on the machine this routing table:

[root@sns-jr-dmz root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default * UH 0 0 0 eth0 * U 0 0 0 eth0 * U 0 0 0 eth1 * U 0 0 0 lo

I want to remove the first line (default gateway ) and add a line which says the default gateway is so that evey traffic will go throw eth0

(the netmask should be right ?)

beacuse the difault gateway which is here is not working...

Old 04-03-2005, 08:33 AM   #2
Registered: Aug 2004
Location: Tucson, AZ
Distribution: Ubuntu 9.04 & 10.10, RHEL 4 & 5
Posts: 48
Blog Entries: 3

Rep: Reputation: 16
Easily done, sir:

route delete default
route add default dev eth0

Ron W7HD
Tucson, AZ


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
Adding entries to route table in C? kuronai Programming 2 04-04-2005 02:42 PM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
Adding static route in Mandrake 9.2 bloke Linux - Networking 1 02-23-2004 07:38 AM
Problem with adding default route... Grim Reaper Linux - Networking 1 02-22-2003 07:29 AM
Adding default route on startup? WeNdeL Linux - Newbie 2 01-08-2003 01:00 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:51 AM.

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