LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   2 NICs - which to WAN? (https://www.linuxquestions.org/questions/linux-networking-3/2-nics-which-to-wan-1022/)

yank_ 02-24-2001 10:30 PM

I have 2 NICs in my RH7.0 box. Both work, and both find the ip address correctly. One is of my cable modem isp.. the other is of my LAN router (which is not the route to the internet for the linux box because it has its own ip) How do i convinse my box to go through the other network card to get to the internet. It currently goes through the router instead of the other NIC.

Thanks alot,
Yank_

crabboy 02-24-2001 11:01 PM

Add a default route to the interface you want to access the internet.

When you type the 'route' command I'm assuming that you see the incorrect interface for the default route?

delete the default route - route delete default
Add the correct default - route add default eth1

Hope this helps

Gary

yank_ 02-25-2001 09:18 AM

Thanks alot
 
Hey Gary,
Thanks alot for the prompt reply. It worked with out a problem.

Scott

yank_ 02-25-2001 02:41 PM

at least it did
 
It work fine at first.. but then after restarting, it set it back to the way it was. Now when i type that in.. it doesnt even work. Any ideas on how to make it perm?

Thanks

mjakob 03-05-2001 09:22 AM

Set your Linux bow up with static IPs, unless your cable ISP doesn't always give you the same IP. You can set all this info in:

/etc/sysconfig/network-scripts/ifcfg-eth0
&
/etc/sysconfig/network-scripts/ifcfg-eth1

Then set the gateway and gateway device in:

/etc/sysconfig/network

This will take care of the problem for sure unless you have to pick up a dynamic IP from your provider. I use @home and this is how mine is configured....
Hope it helps.. Maybe if you have to use dhcp to get your IP, maybe you can try setting the gateway device anyway and see if it works like that...

-Mark


All times are GMT -5. The time now is 10:11 AM.