LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Connect 3 computers with router and crossover? (https://www.linuxquestions.org/questions/linux-networking-3/connect-3-computers-with-router-and-crossover-581793/)

Ynot Irucrem 09-03-2007 03:12 AM

Connect 3 computers with router and crossover?
 
Hiya guys,

I have 3 computers, A, B, and C. A and B are both hanging off a router/switch. C is as of yet, not connected to anything. I want to connect C to the network. B, and C are geographically far away from the router, but right next to each other. I have a spare NIC and short crossover cable. Can I/How would I connect B to C with a crossover, and have C and A talk to each other?

I drew y'all a purdy diagram too.

Code:

  router              ^
    |  |                |
____|  |____            | 5 miles (creative license)
|          |            |
|          |            |
A          B........C  v

| = CAT5
. = crossover

Thanks for any help.


eh.. this is simplified. A is actually about 5 computers all over the place, so no I can't move the router.

jschiwal 09-03-2007 04:33 AM

You are implying that the connection to the router is fiber. Does computer B have a fiber NIC or does it feed into a fiber transceiver?

If it is the latter, you could check if the transceiver has spare input (ethernet) ports. Or you insert a switch in between.

If it is the former, you could simply set up computer C on a different subnet, and set up a route on computer B. You will need to use computer B's second NIC IP address as the default gateway address on computer C. You also need to enable ip forwarding on computer B. ( From personal experience, I needed to modprobe the ip_conntrack module before forwarding would work. )

Your distro probably has a GUI configuration to setup the routes and enable forwarding on computer B. Look either in the networking setup or the firewall setup. You can do it in a script using either the IP command or the route command. To enable forwarding, is simple:
as root# echo 1 >/proc/sys/net/ipv4/ip_forward

Ynot Irucrem 09-05-2007 03:36 AM

Ah yes, IP forwarding. That's what I was looking for. Thanks.

fhleung 09-05-2007 09:46 PM

The post would be helpful for others if they got similar linux questions. :)

From the network diagram, if all connections are by ethernet, no fiber. (They could be difference of standards, config between on fiber and ethernet NIC.)

Code:

  router             
    |  |               
____|  |____           
|          |           
|          |           
A          B........C 

| = CAT5
. = crossover

The subnet of computer B and C has to be different and so the ip address class?
Quote:

If it is the former, you could simply set up computer C on a different subnet, and set up a route on computer B. You will need to use computer B's second NIC IP address as the default gateway address on computer C. You also need to enable ip forwarding on computer B. ( From personal experience, I needed to modprobe the ip_conntrack module before forwarding would work. )



and how would I have computer C and A NOT talk to each other? Please help

Ynot Irucrem 09-06-2007 01:16 AM

I must have filtered out where jschiwal talked about fiber. All connections are just normal Cat 5e, except of course the crossover, which is a crossover Cat 5e.

The 5 mile measurement was an embellishment intended to discourage replies of "move the router closer and use a normal Cat 5", because I don't want to do that.

To have A and C NOT talk to each other, just don't turn on IP forwarding on B.


All times are GMT -5. The time now is 04:56 PM.