LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   funny problem with 2 nics (https://www.linuxquestions.org/questions/linux-networking-3/funny-problem-with-2-nics-388107/)

cutejai 11-30-2005 08:56 PM

funny problem with 2 nics
 
hi all,
here is the situation
a debian box with 2 nics,
--------------------------------------
eth0 to internal network
ip: 10.0.10.1
subnet: 255.0.0.0
dns: 10.0.10.2(my windows server)

eth1 to wan
ip: 10.0.0.1
subnet: 255.0.0.0
gateway: 10.0.0.138(adsl model router)
dns 10.0.0.138
---------------------------------------
so when i issue these commands
ifdown eth0
ifdown eth1
ifup eth0
ifup eth1
then i will be able to ping my internal network computer, but not internet

when issue this command
ifdown eth0
ifdown eth1
ifup eth1
ifup eth0
now i can ping www.google.com. but not my internal network. (error message "destination host unreachable").

so i'm just wondering what kind of problem is this??? and how do i fix it so that i can ping both my internal network and google.com????

i'm so confuse, trying to think, maybe my 2 nics doesn't route to each other or something, i'm lost.

pls help.

fouldsy 12-01-2005 03:31 AM

Try typing "route" and viewing your routing table. As you have two nics, it seems like you'll need to manually specify which device to use for a default gateway (Internet) such as "route add default gw 10.0.0.1 netmask 255.0.0.0 dev eth1" in order your system to understand which nic to use for the different traffic (internal + external).

amitsharma_26 12-01-2005 10:13 PM

Re: funny problem with 2 nics
 
Quote:

Originally posted by cutejai
--------------------------------------
eth0 to internal network
ip: 10.0.10.1
subnet: 255.0.0.0

dns: 10.0.10.2(my windows server)

eth1 to wan
ip: 10.0.0.1
subnet: 255.0.0.0

gateway: 10.0.0.138(adsl model router)
dns 10.0.0.138
---------------------------------------
pls help.
Actually the problem is because of two class A series IPs on two different nics... so even route add command will be difficult to implement in your case as far as i understand. Infact in the current scenario you might have to change the internal net ip series to get out of this problem.

In your case you cannot route add two routes on two ethernet cards which both start from 10.0.*.* . Its ambiguous.

If you donot have many nos of machines in your internal network, a seperate route for each & every machine could be a possibility to add. I think so.

I sound lil confused... :p


All times are GMT -5. The time now is 03:56 AM.