Pleas help - Linux with 2 Networkcards
Hello !
My Problem is this: My Linux Box has 2 Networkcards: eth0 = Intel on Board eth1 = realtek i want connect from this PC to a) one Windows XP (IP 192.168.0.1) B) to another linux Box (IP 192.168.0.100) but always only one connetction is working (depending which networkcable is connected (so every line by itself works!!!) if i connect both networkcabels then only one of them is working, but i can not "ping" on the other line!!!! please help me to set up my linux box rhight !!! Thank you a lot !!! Liu |
You have a routing problem at this point.
Quote:
That means that your first card gets all addresses from within 192.168.0.1 until 192.168.0.254. If you can you should change one network to another address space. For example: a) one Windows XP (IP 192.168.0.1) B) to another linux Box (IP 192.168.1.100) If you want to use both network cards on the same subnet i am not sure how you could manage this cleanly. But if there are just a few fixed addresses behind each card you can setup host routes. However that would need you to change the routes each time the network structure changes. Chris |
if u change routing table u will reach other computer. but chris78 is right. 2 of network card are in same network. so linux will try to access computers on eth0. but eth0 is not connected both of computers. so u can only reach one of them.
u may try this: if eth0 is connected to pc1 (192.168.0.100) and eth1 is connected to pc2(192.168.0.1): /sbin/route add -host 192.168.0.1 dev eth1 if eth0 is connected to pc2 (192.168.0.1) /sbin/route add -host 192.168.0.100 dev eth1 |
Quote:
Code:
/sbin/route del -net 192.168.0.0 netmask 255.255.255.0 eth0 One of them might fail. Since one of the routes might have been deleted by the network-script which also automatically inserted them when you connect a cable i guess. |
Hey - Thank you very much for your fast response!!!!
For me itīs not important which IP every PC has.. so pleas can you tell me if iīve had everthing understood: PC "A" = WindowsXP IP: 192.168.0.1 (because it will forward the Internet ...) Subnet: 255.255.255.0 Linux PC (Mandrake (but if i get it to work -> SLACKWARE 1st Networkcard (connected to PC "A") IP: 192.168.0.100 Subnet:255.255.255.0 2nd Networkcard (connected to PC "B") IP: 192.168.1.100 Subnet: 255.255.255.0 PC "B" = Slackware IP: 192.168.1.1 Subnet:255.255.255.0 Would this be right???? Thank you verry much for your verry good help!!! Liu |
Yes. As far as i can see you got the point.
-network A (192.168.0.0 / 255.255.255.0) -network B (192.168.1.0 / 255.255.255.0) Quote:
|
@ chris78
Thank you a lot! I just wanted to give a result of the things i changed! Now i use 2 different subnetīs every thing works fine yet !!! Bye Liu |
All times are GMT -5. The time now is 05:08 PM. |