Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

At my home, I have two desktop PCs in two rooms. The router / DSL modem is in one of these rooms. Now I want to configure a home server (having 2 LAN ports, running 24/7) in the corridor between the two rooms, using only one LAN cable at each door. This gives me the following physical configuration:

     (door)          (door)
 .----/-/----.  .-----/-/----------._ FritzBox
 |           |  |             .----´´ DSL Router
PC1         Server            |
                             PC2 

As just said, the server has 2 network interfaces and is running Ubuntu.

What I need now is a network configuration which enables both the server and PC1 to connect to the router. I think the server needs to serve as a bridge or switch.

Currently, all computers are configured having static IP addresses. If I'm understanding it correctly, a bridge / switch doesn't have its own IP address, but as the server needs to be configured as an own end device, it needs to have one. My first question is, do I have to configure both interfaces separately, giving both the same static IP address?

My next question is, how do I bridge the two physical networks into one? I have basic understanding (but am always confused again and again) of bridges and switches, but I don't know how to configure it in software. I only know that it's possible to do so :)

The third question is: Is it possible to configure this in a way that network packets from/to PC1 to/from the router only go through hardware or only consume low CPU in the server?

Can you help me? Thanks in advance!

share|improve this question

migrated from serverfault.com Aug 28 '12 at 2:00

This question came from our site for system and network administrators.

1 Answer 1

up vote 6 down vote accepted

You have two options:

  1. Run the server as a router. In this case, PC1 and PC2 will be located in two different subnets. IP forwarding should be enabled on the server and each NIC will be assigned a different IP.
  2. Bridge the network interfaces of server and in this case the IP is assigned to the bridge interface of server. Also, both PCs will be assigned IPs from same subnet.
share|improve this answer
    
Thanks. Option 2 will be my choice, since configuring two NATs and another IP address space will be a lot more confusing. I want to keep it simple (as long as no major disadvantage comes with this solition). So option 2 would require me to setup a (virtual) bridge in software? How do I do this? –  leemes May 12 '12 at 13:15
    
And am I right that the server itself can still be configured as a (the third) end system in the bridge? So the bridge has 3 systems connected: PC1, the router, the server. –  leemes May 12 '12 at 13:17
2  
@leemes: You can see this link and this. –  Khaled May 12 '12 at 13:51
    
It works. I set up a bridge using brctl via /etc/network/interfaces configuration like in the last section of your second link. Thank you! :) –  leemes May 14 '12 at 12:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.