LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to add a route table for eth1 and make it the default (https://www.linuxquestions.org/questions/linux-general-1/how-to-add-a-route-table-for-eth1-and-make-it-the-default-321271/)

banner 05-08-2005 08:10 AM

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
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.1.4 0.0.0.0 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.

rjlee 05-08-2005 08:17 AM

You need to drop the existing default route:
Code:

/sbin/route del default gw 192.168.1.4
By hand: Set up a route to the gateway machine at your ISP end, then make this the default gateway:

Code:

/sbin/route add -net gateway netmask 255.255.255.0 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).

banner 05-08-2005 10:43 AM

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 255.255.255.0 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.

dramen 05-08-2005 11:14 AM

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


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