Networking Forums

Networking Forums > Computer Networking > Linux Networking > multiple network cards in one subnet - possible?

Reply
Thread Tools Display Modes

multiple network cards in one subnet - possible?

 
 
Tomasz Chmielewski
Guest
Posts: n/a

 
      08-24-2005, 12:43 PM
I'm having trouble setting up multiple network cards with the IP address
from the same subnet, on one machine. It should look like this:

eth0 10.1.1.1 --- switch (LAN) - workstations
eth1 10.1.1.2 ---/

So a server has two cards: eth0 (10.1.1.1), and eth1 (10.1.1.2).


Now what I want to achieve:

1) any workstation which connects (send packets, initiates connection)
to 10.1.1.1/eth0, should also receive packets from 10.1.1.1/eth0
2) any workstation which connects (send packets, initiates connection)
to 10.1.1.2/eth1, should also receive packets from 10.1.1.2/eth1
3) if the server initiates connection, I don't care which card it will
choose as an outhoing interface
4) if the network cable eth0-switch is broken, clients should be able to
connect to eth1, and vice versa.


After spending two day on reading Advanced Routing HOWTO and other
similar documents, all I'm able to do is:

1) pinging 10.1.1.2/eth1 results in replies from eth0
2) disconnecting eth0 results in 10.1.1.2/eth1 being unavailable.


I don't want to achieve it through aliases, which is trivial

--
Tomek
http://wpkg.org
 
Reply With Quote
 
 
 
 
CL (dnoyeB) Gilbert
Guest
Posts: n/a

 
      08-24-2005, 02:17 PM
Tomasz Chmielewski wrote:
> I'm having trouble setting up multiple network cards with the IP address
> from the same subnet, on one machine. It should look like this:
>
> eth0 10.1.1.1 --- switch (LAN) - workstations
> eth1 10.1.1.2 ---/
>
> So a server has two cards: eth0 (10.1.1.1), and eth1 (10.1.1.2).
>
>
> Now what I want to achieve:
>
> 1) any workstation which connects (send packets, initiates connection)
> to 10.1.1.1/eth0, should also receive packets from 10.1.1.1/eth0


Are you talking about a form of port triggering?

> 2) any workstation which connects (send packets, initiates connection)
> to 10.1.1.2/eth1, should also receive packets from 10.1.1.2/eth1
> 3) if the server initiates connection, I don't care which card it will
> choose as an outhoing interface


you have to decide this upfront. there is no 'random' setting.

> 4) if the network cable eth0-switch is broken, clients should be able to
> connect to eth1, and vice versa.


I dont understand. where do the clients connect now? do both .1 and .2
connect to the same switch?


>
>
> After spending two day on reading Advanced Routing HOWTO and other
> similar documents, all I'm able to do is:
>
> 1) pinging 10.1.1.2/eth1 results in replies from eth0
> 2) disconnecting eth0 results in 10.1.1.2/eth1 being unavailable.
>
>
> I don't want to achieve it through aliases, which is trivial
>



--
Respectfully,


CL Gilbert
 
Reply With Quote
 
Graeme Hinchliffe
Guest
Posts: n/a

 
      08-24-2005, 02:33 PM
On Wed, 24 Aug 2005 14:43:13 +0200, Tomasz Chmielewski wrote:

> So a server has two cards: eth0 (10.1.1.1), and eth1 (10.1.1.2).
>
>
> Now what I want to achieve:
>
> 1) any workstation which connects (send packets, initiates connection)
> to 10.1.1.1/eth0, should also receive packets from 10.1.1.1/eth0
> 2) any workstation which connects (send packets, initiates connection)
> to 10.1.1.2/eth1, should also receive packets from 10.1.1.2/eth1
> 3) if the server initiates connection, I don't care which card it will
> choose as an outhoing interface
> 4) if the network cable eth0-switch is broken, clients should be able to
> connect to eth1, and vice versa.


Not sure if you can do it nicely that way.. however...

> After spending two day on reading Advanced Routing HOWTO and other
> similar documents, all I'm able to do is:
>
> 1) pinging 10.1.1.2/eth1 results in replies from eth0
> 2) disconnecting eth0 results in 10.1.1.2/eth1 being unavailable.
>
>
> I don't want to achieve it through aliases, which is trivial


Have you considered configuring the interfaces as a bridge? then assign
just one IP to the bridge? Traffic should flow sensibly, and both ports
will be on the same subnet, albeit they will 'kind of have' the same IP
(the virtual representation device has the IP).

Would this achieve what you want?

Graeme

 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      08-24-2005, 03:12 PM
In comp.os.linux.networking Tomasz Chmielewski <(E-Mail Removed)>:
> I'm having trouble setting up multiple network cards with the IP address
> from the same subnet, on one machine. It should look like this:


> eth0 10.1.1.1 --- switch (LAN) - workstations
> eth1 10.1.1.2 ---/


> So a server has two cards: eth0 (10.1.1.1), and eth1 (10.1.1.2).

[..]

> 4) if the network cable eth0-switch is broken, clients should be able to
> connect to eth1, and vice versa.


Setup bonding (see bonding.txt in the kernel Documentation) on
interfaces and put the alias on top, setup bonding mode to your
needs, done. Be aware some switches need to know about bonding.

Good luck

[..]


--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 233: TCP/IP UDP alarm threshold is set too low.
 
Reply With Quote
 
Tomasz Chmielewski
Guest
Posts: n/a

 
      08-24-2005, 03:13 PM
CL (dnoyeB) Gilbert schrieb:
> Tomasz Chmielewski wrote:
>
>> I'm having trouble setting up multiple network cards with the IP
>> address from the same subnet, on one machine. It should look like this:
>>
>> eth0 10.1.1.1 --- switch (LAN) - workstations
>> eth1 10.1.1.2 ---/
>>
>> So a server has two cards: eth0 (10.1.1.1), and eth1 (10.1.1.2).
>>
>>
>> Now what I want to achieve:
>>
>> 1) any workstation which connects (send packets, initiates connection)
>> to 10.1.1.1/eth0, should also receive packets from 10.1.1.1/eth0

>
>
> Are you talking about a form of port triggering?


no, I'm talking of plain, simple connecting.
i.e. if one connects to 10.1.1.2 (which is eth1), then gets the reply
from 10.1.1.2 (which is eth1).
same goes for eth1 interface.

as it sounds logical, it doesn't happen that way (but, surprisingly, at
least in my setup, if one connects to 10.1.1.2, which is on eth1, then
the packets will go through eth0, and not even touch eth1; I can unplug
eth1, and still be able to connect to it).


>> 2) any workstation which connects (send packets, initiates connection)
>> to 10.1.1.2/eth1, should also receive packets from 10.1.1.2/eth1
>> 3) if the server initiates connection, I don't care which card it will
>> choose as an outhoing interface

>
> you have to decide this upfront. there is no 'random' setting.


well, more or less load balancing could be done
but for simplicity, let's pick eth0 as a card for initiating outgoing
connections.


>> 4) if the network cable eth0-switch is broken, clients should be able
>> to connect to eth1, and vice versa.

>
>
> I dont understand. where do the clients connect now? do both .1 and .2
> connect to the same switch?


yes.


--
Tomek
http://wpkg.org
 
Reply With Quote
 
Tomasz Chmielewski
Guest
Posts: n/a

 
      08-24-2005, 03:18 PM
Graeme Hinchliffe schrieb:
> On Wed, 24 Aug 2005 14:43:13 +0200, Tomasz Chmielewski wrote:
>
>
>>So a server has two cards: eth0 (10.1.1.1), and eth1 (10.1.1.2).
>>
>>
>>Now what I want to achieve:
>>
>>1) any workstation which connects (send packets, initiates connection)
>>to 10.1.1.1/eth0, should also receive packets from 10.1.1.1/eth0
>>2) any workstation which connects (send packets, initiates connection)
>>to 10.1.1.2/eth1, should also receive packets from 10.1.1.2/eth1
>>3) if the server initiates connection, I don't care which card it will
>>choose as an outhoing interface
>>4) if the network cable eth0-switch is broken, clients should be able to
>>connect to eth1, and vice versa.

>
>
> Not sure if you can do it nicely that way.. however...


there must be some way


>>After spending two day on reading Advanced Routing HOWTO and other
>>similar documents, all I'm able to do is:
>>
>>1) pinging 10.1.1.2/eth1 results in replies from eth0
>>2) disconnecting eth0 results in 10.1.1.2/eth1 being unavailable.
>>
>>
>>I don't want to achieve it through aliases, which is trivial

>
>
> Have you considered configuring the interfaces as a bridge? then assign
> just one IP to the bridge? Traffic should flow sensibly, and both ports
> will be on the same subnet, albeit they will 'kind of have' the same IP
> (the virtual representation device has the IP).
>
> Would this achieve what you want?


no. I don't want to "merge" this devices in any way.

just plain:

1) traffic to 10.1.1.1 (eth0), packets go into eth0 and reply from eth0
2) traffic to 10.1.1.2 (eth1), packets go into eth1, reply from eth1


--
Tomek
 
Reply With Quote
 
Tomasz Chmielewski
Guest
Posts: n/a

 
      08-24-2005, 03:19 PM
Michael Heiming schrieb:
> In comp.os.linux.networking Tomasz Chmielewski <(E-Mail Removed)>:
>
>>I'm having trouble setting up multiple network cards with the IP address
>>from the same subnet, on one machine. It should look like this:

>
>
>>eth0 10.1.1.1 --- switch (LAN) - workstations
>>eth1 10.1.1.2 ---/

>
>
>>So a server has two cards: eth0 (10.1.1.1), and eth1 (10.1.1.2).

>
> [..]
>
>
>>4) if the network cable eth0-switch is broken, clients should be able to
>>connect to eth1, and vice versa.

>
>
> Setup bonding (see bonding.txt in the kernel Documentation) on
> interfaces and put the alias on top, setup bonding mode to your
> needs, done. Be aware some switches need to know about bonding.


no, I don't want any bonding, merging interfaces into one etc.


--
Tomek
http://wpkg.org
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      08-24-2005, 03:21 PM
In comp.os.linux.networking Tomasz Chmielewski <(E-Mail Removed)>:
> Michael Heiming schrieb:
>> In comp.os.linux.networking Tomasz Chmielewski <(E-Mail Removed)>:
>>
>>>I'm having trouble setting up multiple network cards with the IP address
>>>from the same subnet, on one machine. It should look like this:

[..]

>>>4) if the network cable eth0-switch is broken, clients should be able to
>>>connect to eth1, and vice versa.

>>
>>
>> Setup bonding (see bonding.txt in the kernel Documentation) on
>> interfaces and put the alias on top, setup bonding mode to your
>> needs, done. Be aware some switches need to know about bonding.


> no, I don't want any bonding, merging interfaces into one etc.


Yeah, you want ha, but don't want to use bonding, which is the
way Linux networking ha works. If this makes sense to you, go
ahead...

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 164: root rot
 
Reply With Quote
 
Tomasz Chmielewski
Guest
Posts: n/a

 
      08-24-2005, 03:28 PM
Michael Heiming schrieb:

(...)

>>>>4) if the network cable eth0-switch is broken, clients should be able to
>>>>connect to eth1, and vice versa.
>>>
>>>
>>>Setup bonding (see bonding.txt in the kernel Documentation) on
>>>interfaces and put the alias on top, setup bonding mode to your
>>>needs, done. Be aware some switches need to know about bonding.

>
>
>>no, I don't want any bonding, merging interfaces into one etc.

>
>
> Yeah, you want ha, but don't want to use bonding, which is the
> way Linux networking ha works. If this makes sense to you, go
> ahead...


hmm? what's wrong?
I said I don't want bonding here, because the setup has to look as I
described.

--
Tomek
http://wpkg.org
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      08-24-2005, 05:30 PM
In comp.os.linux.networking Tomasz Chmielewski <(E-Mail Removed)>:
> Michael Heiming schrieb:


> (...)


>>>>>4) if the network cable eth0-switch is broken, clients should be able to
>>>>>connect to eth1, and vice versa.
>>>>
>>>>
>>>>Setup bonding (see bonding.txt in the kernel Documentation) on
>>>>interfaces and put the alias on top, setup bonding mode to your
>>>>needs, done. Be aware some switches need to know about bonding.

>>
>>
>>>no, I don't want any bonding, merging interfaces into one etc.

>>
>>
>> Yeah, you want ha, but don't want to use bonding, which is the
>> way Linux networking ha works. If this makes sense to you, go
>> ahead...


> hmm? what's wrong?
> I said I don't want bonding here, because the setup has to look as I
> described.


Yeah sure, sorry for trying to help you, won't try again,
obviously you know exactly what you want.

Good riddance!

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 172: pseudo-user on a pseudo-terminal
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Multiple network cards IshmaelDS Windows Networking 2 07-18-2008 03:01 PM
How to host multiple SSL websites using multiple network cards rou DPL Windows Networking 3 08-01-2007 05:32 PM
Multiple network cards on a single PC Simon Finnigan Home Networking 9 10-26-2005 03:30 PM
Problem with Multiple network cards on the same subnet. Chris Tellor Linux Networking 0 12-29-2003 05:16 AM
configuring Multiple network cards Siddharth S Malu Linux Networking 2 11-27-2003 06:00 PM



1 2 3 4 5 6 7 8 9 10 11