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            |

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!

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

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


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.
  • 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


A bridge is a layer 2 device that works at the data link layer and delivers packets based on the destination MAC address. Bridges can be used to segment network traffic and reduce the collision domain; the amount of devices competing for the same bandwidth. Even though you may not realize it bridges are most commonly seen in network switches. Traffic only leaves a particular port on a switch if the destination MAC address is available on that port. This differs from the older hub that sent traffic out on each port of the hub regardless of the data-link address. [Source]

Here is how to implement an Ethernet bridge on Ubuntu 16.04 LTS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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