Networking Forums

Networking Forums > Computer Networking > Linux Networking > Switchless TCP/IP networking?

Reply
Thread Tools Display Modes

Switchless TCP/IP networking?

 
 
Matthew Clark
Guest
Posts: n/a

 
      03-10-2006, 03:34 PM
If I had 4 linux boxes, A thru D each with two ethernet adapters 1 & 2
and I chained them together via crossover cables where:

A2 -> B1
B2 -> C1
C2 -> D1
D2 -> A1

A
/ \
D B
\ /
C

Could I set up TCP/IP networking/routing such that any box can reach
any other? (Ie, Box A could telnet into Box C) If so, how do I?

Thanks

Matt

 
Reply With Quote
 
 
 
 
Eric Teuber
Guest
Posts: n/a

 
      03-10-2006, 04:44 PM
Matthew Clark wrote:
> If I had 4 linux boxes, A thru D each with two ethernet adapters 1 & 2
> and I chained them together via crossover cables where:
>
> A2 -> B1
> B2 -> C1
> C2 -> D1
> D2 -> A1
>
> A
> / \
> D B
> \ /
> C
>
> Could I set up TCP/IP networking/routing such that any box can reach
> any other? (Ie, Box A could telnet into Box C) If so, how do I?


Basically it is possible if you define all necessary routing rules. Also
all boxes must be able to forward traffic from one ethernet adapter (1)
to the other (2) and vice versa.

The routing can be setup very easy by defining routes to each connected
system (see man route). I.E. A must have a route to D and B, B to A and
C and so on.

Do you plan to have an outside connection to the internet on one of
these systems? Then you should also define default gateways on each
system. The internet box needs the router as default gateway. I.E. A is
the internet box, the default gateways can be defined as follows:

B -> C -> D -> A -> Internet

The forwarding could be achieved by using iptables. Iptables (Netfilter)
lets you forward traffic from one device to another (POSTROUTING and
FORWARD). You will find a nice doc at
http://iptables-tutorial.frozentux.n...-tutorial.html.

I am sure, there are other solutions to forward traffic.

May i ask you why you are thinking of such a network structure?

Please don't hesitate to ask for more.

Eric

--
for mails replace NOSPAM.com by w e b . d e
 
Reply With Quote
 
Andrew Gideon
Guest
Posts: n/a

 
      03-10-2006, 06:10 PM
Eric Teuber wrote:

> The routing can be setup very easy by defining routes to each connected
> system (see man route). I.E. A must have a route to D and B, B to A and
> C and so on.



As far as I know, this requires that all the "wires" be separate networks.
The requirement is that the A interface pointing to B be on a separate
network from all other interfaces except for the B interface pointing to A.
This permits Linux's layer 3 routing to Do The Right Thing.

I'd use /30 networks for each of those "point to point" links.

I don't know of any way to do this at the ethernet frame level (ie. as a
switch would). But I'm curious: is there a way for Linux to behave like a
switch instead of (or in addition to) behaving like a router?

- Andrew

 
Reply With Quote
 
Matthew Clark
Guest
Posts: n/a

 
      03-10-2006, 06:16 PM
Hi, Eric. Thanks for responding.

> Do you plan to have an outside connection to the internet on one of
> these systems? Then you should also define default gateways on each
> system. The internet box needs the router as default gateway. I.E. A is
> the internet box, the default gateways can be defined as follows:


No, the 4 machines are isolated. No internet access.

> I am sure, there are other solutions to forward traffic.


A friend suggested setting up one or more boxes as bridges.
Is one inherently simpler to do than another?

> May i ask you why you are thinking of such a network structure?


I'm doing some OS/middleware fault testing and the switch/hub
needs to be eliminated as a variable (for good or ill)

Matt

 
Reply With Quote
 
Eric Teuber
Guest
Posts: n/a

 
      03-10-2006, 06:23 PM
Matthew Clark wrote:
>> I am sure, there are other solutions to forward traffic.

>
> A friend suggested setting up one or more boxes as bridges.
> Is one inherently simpler to do than another?
>


Sorry, i do not understand your question. Please be more precisely.

Eric

--
for mails replace NOSPAM.com by w e b . d e
 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      03-10-2006, 06:54 PM
Matthew Clark wrote:
> Hi, Eric. Thanks for responding.
>
>
>>Do you plan to have an outside connection to the internet on one of
>>these systems? Then you should also define default gateways on each
>>system. The internet box needs the router as default gateway. I.E. A is
>>the internet box, the default gateways can be defined as follows:

>
>
> No, the 4 machines are isolated. No internet access.
>
>
>>I am sure, there are other solutions to forward traffic.

>
>
> A friend suggested setting up one or more boxes as bridges.
> Is one inherently simpler to do than another?
>
>
>>May i ask you why you are thinking of such a network structure?

>
>
> I'm doing some OS/middleware fault testing and the switch/hub
> needs to be eliminated as a variable (for good or ill)
>
> Matt
>


You won't. The hosts are much more probable to create
faults than a simple hub. A switch is more complicated
than a hub, but still much simpler than a bridged
(link level forwarding) or routing (network level
forwarding) host.

--

Tauno Voipio
tauno voipio (at) iki fi
 
Reply With Quote
 
Postmaster
Guest
Posts: n/a

 
      03-10-2006, 07:17 PM

"Matthew Clark" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> If I had 4 linux boxes, A thru D each with two ethernet adapters 1 & 2
> and I chained them together via crossover cables where:
>
> A2 -> B1
> B2 -> C1
> C2 -> D1
> D2 -> A1
>
> A
> / \
> D B
> \ /
> C
>
> Could I set up TCP/IP networking/routing such that any box can reach
> any other? (Ie, Box A could telnet into Box C) If so, how do I?
>
> Thanks
>
> Matt
>


Matt,

1. It's possible.
2. It's a bad idea.
3. For $10 you could use get a switch.
4. If A is talking to C and D wants to talk with B, you've
got bandwidth problems that could have been avoided
for $10.
5. If you're really going here then you might want another
connection from A to C, and from D to B. Then the
max hop would be 1 (one). But your cost in NICs will
far exceed the cost of 4 port switch :-) (12 versus 4)

Enjoy,
Postmaster


 
Reply With Quote
 
Eric Teuber
Guest
Posts: n/a

 
      03-10-2006, 07:27 PM
Andrew Gideon wrote:
>> The routing can be setup very easy by defining routes to each connected
>> system (see man route). I.E. A must have a route to D and B, B to A and
>> C and so on.

>
>
> As far as I know, this requires that all the "wires" be separate networks.


AFAIK, also hosts can be set as routes, if there is now default gateway
using the same network mask.

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      03-10-2006, 07:29 PM
Andrew Gideon wrote:
> Eric Teuber wrote:
>
>
>>The routing can be setup very easy by defining routes to each connected
>>system (see man route). I.E. A must have a route to D and B, B to A and
>>C and so on.

>
>
>
> As far as I know, this requires that all the "wires" be separate networks.
> The requirement is that the A interface pointing to B be on a separate
> network from all other interfaces except for the B interface pointing to A.
> This permits Linux's layer 3 routing to Do The Right Thing.
>
> I'd use /30 networks for each of those "point to point" links.
>
> I don't know of any way to do this at the ethernet frame level (ie. as a
> switch would). But I'm curious: is there a way for Linux to behave like a
> switch instead of (or in addition to) behaving like a router?


Yes - Google for bridging.

It can even do some packet filtering on the way.
Google for 'ebtables'.

--

Tauno Voipio
tauno voipio (at) iki fi
 
Reply With Quote
 
Matthew Clark
Guest
Posts: n/a

 
      03-10-2006, 08:25 PM
I meant do you know if bridging is easier to set up than IP forwarding,
or more reliable, etc.

Matt

 
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
Home Networking (Networking Newbie) - Wireless & Wired can they work together ? GeoffP Home Networking 3 07-20-2005 12:03 PM
[Reminder] Online chat with Networking & Devices VP about Networking in Longhorn Eddy Malik [MSFT] Wireless Networks 0 03-22-2005 02:27 AM
[Reminder] Online chat with Networking & Devices VP about Networking in Longhorn Eddy Malik [MSFT] Windows Networking 0 03-22-2005 02:27 AM
Wireless networking removed wired networking Rob Windows Networking 1 01-15-2004 02:47 AM
full networking for console user, limited networking for remotely logged in user RJ41 Linux Networking 3 08-15-2003 08:18 PM



1 2 3 4 5 6 7 8 9 10 11