LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-02-2001, 04:37 PM   #1
SkYzOpReNiCk
Member
 
Registered: Feb 2001
Location: Costa Rica
Distribution: SuSE
Posts: 47

Rep: Reputation: 15
Question 2 Nics?


There is any way to use 2 network cards, in the same network, but work them totally independent, right now I have 2 nics, but the Eth0 always depends of the Eth1, If I disconnect the Eth0 the Eth1 will not reply the pings, even if the cable is connected. I know that this works with differents Subnets. Like this

eth0 192.168.237.25
eth1 192.168.238.30

But I want to have them in the same network and in the same computer.

eth0 192.168.237.25
eth1 192.168.237.30

Any idea? Sugesstion of routing. ipchains? iptables?
 
Old 07-03-2001, 12:41 PM   #2
GMAN
LQ Newbie
 
Registered: Jul 2001
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
2 nics

You should be able to do this. If you read the "Linux Ethernet-Howto" by Paul Gortmaker, it should explain how to do this. Basically you may want to create alias's. You can find this in /usr/doc/Linux-HOWTO's or www.linux.org

Good luck
 
Old 07-03-2001, 11:16 PM   #3
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
can i know what is the use ??
siddiqu.T
 
Old 07-04-2001, 09:06 AM   #4
drthornt
Member
 
Registered: May 2001
Location: Toronto
Distribution: RH 7.2
Posts: 33

Rep: Reputation: 15
basic networking.

So you have two network cards on the same subnet.
When you disconnect one the other does not reply.
where are you pinging this machine from? The local net (i.e. the same subnet that the cards are on) or a remote net ?

I think that you problem may be that you cannot setup two default gateways.

probably at this time you routing table looks like this:

[pre]
netstat david@jing~>netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
205.150.136.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
205.150.136.3 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
205.150.136.0 0.0.0.0 255.255.255.192 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 205.150.136.1 0.0.0.0 UG 0 0 0 eth0
david@jing~>
[/pre]
see how there is only one "default gateway" (the line that begins 0.0.0.0) ?

if you are ping from 78.45.56.2 then packets would come from 78.45.56.2 , go to a pile of other routers , then to 205.150.136.1 and then to eth1 (the router knows how to get to eth1). but the reply to the ping will not go out eth1. All your computer knows is that it must send the reply to 78.45.56.2 which , according to you router table means it must go out eth0 (which you have disconnected). I suggest testing this theory by pinging you machines two interfaces from a computer on the same subnet as those interfaces. see picture http://www.quadratic.net/archive/ima...ps/dualnic.gif

You know, now that I think of it how does the linux box know which interface to send back a packet through if the reply should go to a machine on the same subnet as the two interfaces? answer: it doesn't (least not in 2.2 kernels).

there are two ways I can think of for fixing this problem:

1. linux 2.4 iptable "source routing" , which basically says "send packets out the interface thay came in on"

2. advanced routing (BGP with MRTD http://www.mrtd.net/ )
 
Old 07-04-2001, 09:08 AM   #5
SkYzOpReNiCk
Member
 
Registered: Feb 2001
Location: Costa Rica
Distribution: SuSE
Posts: 47

Original Poster
Rep: Reputation: 15
Talking

Well the use of having two network cards, is that I could get rid of too much traffic from one server. So if I have 2 Nic's all the traffic to this server will be faster. I hope to get that FAQ and put to work this out soon.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2 NICs d-rez Linux - Networking 3 06-13-2006 02:08 PM
2 NICs, 1 IP? lil_drummaboy Linux - Hardware 1 07-09-2005 11:56 PM
Intel D845GLLY + Multiple Intel Pro 100 NICs + kernel 2.6.x = NICs don't work egable Linux - Hardware 0 02-04-2005 02:30 PM
Two nics, but only one can be used at once, why? geraldomanaus Linux - Networking 1 02-17-2004 09:45 PM
more than 2 nics sauli Linux - Software 1 02-11-2002 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration