Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.


  Search this Thread
Old 05-28-2005, 09:02 PM   #1
Registered: Apr 2005
Distribution: Ubuntu, RHEL, Darwin
Posts: 73

Rep: Reputation: 15
How to ad-hoc in linux?

I have a laptop equipped with a wireless card...

My friend next to me also has a laptop with a wireless card...

His laptop is hardwired into a network as well...

How can I:
  • 1. Establish a wireless ad-hoc connection with him
    2. use his computer to access the internet thru his hardwire connection

We are both using ubuntu
Old 05-28-2005, 10:14 PM   #2
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
This sounds like you'll have to connect to each other via the wireless connection. If that's the case, then you'll have to configure the networking via those interfaces. His computer is going to have to be set up as an internet sharing gateway. He can broadcast a DHCP invitation (via the DHCP server) and you can grab an IP via DHCP (with DHCPD) or you can connect through him, naming his machine as the gateway.
Old 05-29-2005, 08:52 AM   #3
Registered: Apr 2005
Distribution: Ubuntu, RHEL, Darwin
Posts: 73

Original Poster
Rep: Reputation: 15
Well, we were both in ad-hoc mode and neither of our laptops saw each other in kwifimanager...

We both had the same essid set, would he need to run the dhcp service on his PC?

Or should we give each other static IP's such as and

If we gave each other static IP's, would we need the dhcp server? How would we connect wirelessly?

I know how to set up an internet gateway via shorewall, the only real thing is connecting...

Old 06-01-2005, 06:54 PM   #4
LQ Newbie
Registered: Jun 2005
Posts: 1

Rep: Reputation: 0
Dunno if this works in ubuntu but. If it's a connection. Then open a shell.

Type: iwconfig <what the internet interface is usually wlan0 if its wireless.> mode Ad-Hoc

But it depends on what ubuntu version u have some don't support iwconfig. But if u set static ip for each other no u don't need dhcp. Though dhcp is used when more machines connect to the same network to prevent ip resolution problems.

Hope it helps.


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
linux ad hoc network with WMM: question elisewin Linux - Wireless Networking 0 11-30-2005 03:31 AM
ad hoc in linux rajen_iiit Linux - Networking 1 08-07-2005 02:42 PM
ad-hoc in Linux. How? dimgr Linux - Wireless Networking 1 04-13-2005 12:23 PM
Linux 2 Windows Ad-hoc theplop Linux - Networking 0 11-15-2004 07:01 PM > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 07:06 AM.

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