Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to configure my computer as internet switch to pass DHCP packets and normal internet transfer from LAN to WiFi. Is it possible?


I've got Wireless network and one computer is connected by its WLAN card to it. But I want to add one new computer which I would like to plug into this one computer connected by wifi. And I've got question is it possible for to pass DHCP packets to this second computer from this wireless router.

share|improve this question
Yes, it is possible! – AndrejaKo Nov 2 '10 at 19:13
Sorry for before edit post. – oneat Nov 2 '10 at 19:33

Very simply in windows, select the two network connections from "Network Connections" (this is found differently in each version of windows, in Windows XP it is in the control panel, in Windows Vista/7 it is a link from "Network and Sharing" in the control panel) and select "Bridge Connections".

Your two connections should be one coming from your "internet source" (e.g. a router or modem) and the other going onwards, either a second network jack or a wireless card. Obviously to do this you need at least two network connections, at least one of them "wired".

share|improve this answer

Yes it's absolutely possible.

This may or may not work it's adapted from

  1. Create a backup of your interfaces file

    sudo cp /etc/network/interfaces /etc/network/interfaces.bak
  2. Setup loopback and your wired interfaces (lo and eth0 most likely). Remove whatever is currently in /etc/network/interfaces and replace it with what's below

    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet dhcp
  3. If you want to generate a WEP key for the wifi connection the following will generate a key (be sure to take note of it)

    dd if=/dev/random bs=1 count=13 2>/dev/null | xxd -p
  4. Setup your wireless interface (wlan0 most likely) set the IP addresses to whatever your network is using. Append the following to /etc/networking/interfaces. Wireless Key can be commented out if you don't want to use it.

    auto wlan0
    iface wlan0 inet static
    wireless-mode master
    wireless-essid "UbuntuWireless"
    wireless-channel 1
    wireless-key <key goes here>
  5. Next bridge the two interfaces within /etc/networking/interfaces

    auto br0 iface br0 inet static
    bridge-ports eth1 wlan0

The document also states that this setup alone won't work as a Router supporting NAT/IP Forwarding, if you want that functionality you need to run the script that's mentioned in that article

share|improve this answer
Best to see the article as for some reason the code hasn't formatted properly :/ – chunkyb2002 Nov 2 '10 at 19:39
try using backticks '`' to separate what you want formatted as 'code' – warren Nov 3 '10 at 0:45

I hope that someone will be able to post more specific instructions than these, I don't have time at the moment to look up tutorials.

First you'll need to decide what you need. Is it a switch or a router? IF you want to just connect several computer together, it's a switch. f you want to connect your WiFi/wired network to Internet, you'll need a router.

Next are wired network cards. You'll need obviously enough ports for each cable. There are cards available with multiple ports, so they could be a good solution.

Next you'll need a WiFi card which can run as an access point (if you need that!). Here's a list of some cards that support that capabilities (I haven't used that company's product, so I can't comment if it's good or bad. Anyway, it's not necessary.). There's a technical term fot that capability, but I can't remember it at the moment. It's not the same as ability to make an Ad-Hoc network.

After that you'll need an OS which can be used as a router. Most popular are various GNU/Linux distributions, but it can be done with windows too.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .