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.

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

--EDIT--

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
add comment

4 Answers 4

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
add comment

Yes it's absolutely possible.

This may or may not work it's adapted from https://help.ubuntu.com/community/Router

  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>
    address 192.168.0.1
    network 192.168.0.0
    netmask 255.255.255.0
    broadcast 192.168.0.255
    
  5. Next bridge the two interfaces within /etc/networking/interfaces

    auto br0 iface br0 inet static
    address 192.168.0.1
    network 192.168.0.0
    netmask 255.255.255.0
    broadcast 192.168.0.255
    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 https://help.ubuntu.com/community/Router

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
add comment

See this article: How to: Create an Ad-Hoc Network, Part 1.

share|improve this answer
add comment

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
add comment

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.