LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   simple wireless router & ip command (https://www.linuxquestions.org/questions/linux-newbie-8/simple-wireless-router-and-ip-command-643421/)

fmpfmpf 05-14-2008 08:42 AM

Laptop as a router
 
i am using Ubuntu 7.04.
How do i setup my laptop to function as a wirelss router?
So that other laptop can receive signal from the 1st laptop and connect to the internet.

thank you very much

Caeda 05-14-2008 09:57 AM

Short answer... You dont, you go spend the 15$ a cheap router would cost and use it to share the internet and not have headaches for the rest of your surfing days.

If your avoiding the router cause you have dial-up... Forget it. Dial-ups to crappy and slow to mess around with all the fuss setting it up. It also violates the terms of service for every dial-up carrier I've ever seen. They all say ONE computer at a time.

Other than that. You'd be creating an ad-hoc network if the network cards are capable. And one computer would have to be running properly configured proxy software to share the net.

I could go into severe details on how to create the ad-hoc and which proxy software and how to config it but...
Out of curiosity I typed just 2 words into google and got no less than 25 threads on ubuntu forums, just-linux.com and a few other sites in which people have literally beaten this topic into the ground with ways to do it, so it's ridiculous to type it again here.

ncsuapex 05-14-2008 10:05 AM

^ seconded!

Buy an inexpensive wireless router/Access Point and put your laptop to a better use. Make a music server or a digital picture frame or anything.. There are TONS of better ways to utilize that old laptop than turning it into a router.

pentode 05-14-2008 10:35 AM

Thirded! Just because it is possible to do something doesn't mean it makes any sense to do it. If you just want to do it as a "learning experience", then there is no point in having someone here tell you how to do it - you can dig up the necessary info yourself.

I've done something similar exactly ONCE in order to do a one-time net install of Debian on an old system. It was much more trouble than it was worth. Also, not all network card drivers are capable of doing what you want.

knockout_artist 05-14-2008 11:17 AM

I give you a scenario.

wireless router is upstairs. I have no cable access there.
When I need to install linux it need internet access which I can't provide.
I have tried putting wireless router in my room attach cable to it.
But it wont work like a router on a wireless link.

It doesn't consider wireless link as "UP LINK".
So it doesnt forward traffic to router up stairs.

OdinnBurkni 05-14-2008 04:55 PM

Wireless repeater
 
Hello.
I know that some wireless access point can act as a repeater. At least some of the DLink AP's are. I remember DLink DWL-900 and DWL-2000 could do that.

fmpfmpf 05-15-2008 01:38 AM

i just need a laptop to function as a router to test my WLAN card.
it aint worth investing €15 on something which i will only use 1x

fmpfmpf 05-19-2008 04:06 AM

simple wireless router & ip command
 
i am using Ubuntu 7.10

i have 2 laptops, A and B, both with WLAN cards.
A is connected to the internet through an ethernet cable.
how can i make A function as an access point so that B can receive the signal from A and surf the internet?

i use "Create New Wireless Network", but it keeps failing. It just reverts back to itz wired connection.

p/s - pls DONT ask me to buy a new router

thank you.

fmpfmpf 05-19-2008 05:51 AM

Additional niformation : you can say that i want to turn my laptop into a wireless hotspot

ddaemonunics 05-19-2008 06:00 AM

You must first check if the wireless card suports AP mode or "master mode" and if so enable it and configure.
Then all you have to do is enable forwarding between the ethernet and the wireless card.

check gentoo-wiki.com/HOWTO_Building_a_Wireless_Access_Point

fmpfmpf 05-19-2008 07:28 AM

it has AP mode.
So what procedure whould i take?

thank you

fmpfmpf 05-19-2008 07:47 AM

siple wireless router
 
i am trying to link 2 comps using Ad-Hoc.
http://www.wlug.org.nz/WirelessSetupNotes

Ad-Hoc Mode
Mode: Ad-Hoc
Channel: 6
ESSID: wlug-test
Network: 10.10.10.0/24, this computer will be 10.10.10.1, Remote Computer will be 10.10.10.254

The above is and example for a step. My question is, how do i determine my Network values?

thank you

i92guboj 05-19-2008 08:01 AM

Quote:

Originally Posted by fmpfmpf (Post 3157840)
i am trying to link 2 comps using Ad-Hoc.
http://www.wlug.org.nz/WirelessSetupNotes

Ad-Hoc Mode
Mode: Ad-Hoc
Channel: 6
ESSID: wlug-test
Network: 10.10.10.0/24, this computer will be 10.10.10.1, Remote Computer will be 10.10.10.254

The above is and example for a step. My question is, how do i determine my Network values?

thank you

If I understand correctly what you need is to locate the IP for each machine. There are a number of tools to do so. I bet your distro has some kind of graphical tool to set up the network and they IP's should be visible somewhere around there.

In any case, you could also use ifconfig, which is a command line tool.

Log in as root user on a terminal or vt, and run ifconfig. It should work all the network interfaces available on the machine along with their IP direction.

ddaemonunics 05-19-2008 12:30 PM

well I posted a link:
gentoo-wiki.com/HOWTO_Building_a_Wireless_Access_Point
Try to get the info you need from there. It's very easy to follow

ddaemonunics 05-19-2008 12:37 PM

It realy deppends on your distribution and the tools you use to configure.
I guess you use iwconfig.
If you have the right drivers and the card is working properly by using iwconfig you can enable master mode and the other options:
check out this link .
linuxcommand.org/man_pages/iwconfig8.html
see iwconfig mode options.

if the card is configured correctly
set the IP adresses for the ethernet and the wireless card,
enable ip forward
echo "1" > /proc/sys/net/ipv4/ip_forward
set the policy to allow forward traffic
/sbin/iptables -P FORWARD ALLOW
enable masquerade for the wlan card
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE


All times are GMT -5. The time now is 10:34 AM.