Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-08-2005, 08:10 AM   #1
Registered: Mar 2005
Posts: 49

Rep: Reputation: 15
How to add a route table for eth1 and make it the default

I currently have two network cards, eth0 is for my private network for my thin clients and my wireless pci card is set up as eth1 in which i want this to be the gateway for my internet acccess. currnetly my route table looks like this below.

root@bangde ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 eth0
default UG 0 0 0 eth0
[root@bangde ~]#

as you see there is no gate way for eth1 it does not eeven show up, but it is confugured properly as i can see all the details in wifi tools area about it.

I would like to know how to add a route entry for eth1 and make that the default route.

Thank you.
Old 05-08-2005, 08:17 AM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
You need to drop the existing default route:
/sbin/route del default gw
By hand: Set up a route to the gateway machine at your ISP end, then make this the default gateway:

/sbin/route add -net gateway netmask dev eth1
/sbin/route add default gw gateway
Or you could turn on DHCP on eth1 (this is the easier option, as it also takes care of things like DNS for you).
Old 05-08-2005, 10:43 AM   #3
Registered: Mar 2005
Posts: 49

Original Poster
Rep: Reputation: 15
Please explain in detail

I am currently using fedora 3

the information below

code:/sbin/route del default gw 192.168.

/sbin/route add -net gateway netmask dev eth1
/sbin/route add default gw gateway

where do i edit this information, i am a newby at linux is there a config file for me to edit this or do i run a command in the termainl window. I am lost at what to do with your instructions. Your detail help would be greatly welcomed.

Thank you.
Old 05-08-2005, 11:14 AM   #4
LQ Newbie
Registered: May 2005
Location: Vienna, Austria
Posts: 21

Rep: Reputation: 15
where is the routing-table saved? in which file?

i tried to find it using "find /etc -type f | xargs grep Destination" but no file returned?!

sorry i have it now! it's in /etc/rc.d/rc.inet1

Last edited by dramen; 05-08-2005 at 11:18 AM.


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 On
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
route add default gw ... dhsieh Linux - Software 1 10-15-2003 01:40 PM
how do I add script to set default gateway on boot for eth1 abg Linux - Networking 3 10-01-2003 05:22 PM
how do you make the route table/defaults stick on reboot? piratebiter Linux - Networking 3 09-05-2003 06:57 PM
Add Simple Route Table dwpondscum Linux - Networking 1 08-17-2003 02:26 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:56 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration