LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 07-21-2006, 02:00 PM   #1
torger
Member
 
Registered: Feb 2006
Distribution: Ubuntu
Posts: 137

Rep: Reputation: 15
Question ad hoc network


I would like to make an ad hoc network in ubuntu that would share the internet with my xp computer. Also I can't do it the other way around.
 
Old 07-21-2006, 10:36 PM   #2
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
This may be un-geek of me but the most fool proof was to do this is a separate router. I use a WiFi router and plug in my boxes. Assuming DCHP, no change in configuration is required and there isn't a proxy to set up. You get an external firewall and all the advantages of NAT for all your boxes. You have a full functioning LAN behind the router.
 
Old 07-21-2006, 11:38 PM   #3
lockpicker
Member
 
Registered: Feb 2006
Location: Sikkim Manipal Institute of Technology, Sikkim
Distribution: Slackware 10.2
Posts: 80

Rep: Reputation: 15
iwconfig <interface name> essid <essid here> mode ad-hoc channel <channel here>
 
Old 07-22-2006, 07:37 AM   #4
torger
Member
 
Registered: Feb 2006
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 15
Well I don't want to pay for a router. OK lockpicker if that will make my computer host an ad hoc network I would also like to know how to switch back to normal mode.
 
Old 07-22-2006, 01:14 PM   #5
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
torger,

What is the physical connections between your systems and the current internet connection. The solution offered will work for wireless on both boxes. If you've a dialup Internet connection the ethernet ports of two boxes can be connected with a crossover cable. If you have broadband and use an ethernet connection to the modem you will need to add a second ethernet port to the Internet connected box. The physical connectivity determines the approach.
 
Old 07-22-2006, 02:51 PM   #6
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
One thing you might need to do is "sysctl net.ipv4.ip_forward=1" (in addition to the command lockpicker gave).

To get back to "Managed Mode" just change `ad-hoc' to `managed'.

If you are using the madwifi drivers with atheros chipsets, however (I assume you aren't), the iwconfig command will not work. You'll need to create a virtual interface in ad-hoc mode (`wlanconfig ath0 dev wifi0 wlanconfig ath create wlandev wifi0 wlanmode ad-hoc'). (change `ad-hoc' to `sta' for managed mode (sta means station)).

Anyway, if you are using madwifi (or prism) drivers already, I suggest that instead of ad-hoc you set up as master mode and become your own wireless access point. This will enable you to have a much better control of security (if you chose to use the many programs that take advantage of it).

Even if you decide you're going to buy something, I would suggest a cheap/plain atheros card over a proprietary access point. If you decide to go with an access point, I suggest a Linksys WRT54G, as you can (if you so chose) to run linux on it (the openwrt project).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ad-Hoc Linux to Windows Network Mr_C Linux - Wireless Networking 11 03-02-2011 07:46 AM
Setting up a ad-hoc network - queries TotalLinuxNoob Linux - Wireless Networking 5 03-11-2006 12:20 AM
How to interconnect an ad-hoc network with an infrastructure network tonydeb Linux - Wireless Networking 3 08-08-2005 02:42 PM
Ad-Hoc Network using ndiswrapper Raftysworld Linux - Wireless Networking 4 02-12-2005 07:17 PM
Internet sharing on ad-hoc network MikeSmith36 Linux - Wireless Networking 1 02-22-2004 10:48 AM


All times are GMT -5. The time now is 10:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration