LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices



Reply
 
Search this Thread
Old 10-02-2005, 05:28 AM   #1
tasdevil
LQ Newbie
 
Registered: Aug 2005
Posts: 5

Rep: Reputation: 0
Setting up Ad Hoc to Infrastructure mode gateway


Hi Everyone,
I needed some advice on how to set up a adhoc to
infrastructure gateway.
I have 2 wireless cards in the same laptop (Dell
Latitude). Both the nics share the same ESSID and in the implementation explained below, I have tried to put both nics on the same channel 6 as well as on different channels (6 & 11).
I am running Linux FC4 2.6.12 kernel.
wlan0 (Netgear MA401, Prism 2.5) is in hostap (master) mode at 192.168.1.1
and the second wireless nic eth0 (Dell Truemobile 1150) is at 192.168.2.1 in
Ad Hoc mode.
eth0 uses AODV-UU-0.9.1 to network and route with other PCs on 192.168.2.0/24.

I tried setting "192.168.2.1" and "192.168.1.1" on each Nic to be the
default gateway for each of those networks, though the laptop saw both
networks the other PC's on the AD hoc network did not see the 192.168.1.0/24 network.

I also tried to make a bridge between the two networks on the laptop with
br0 set to 192.168.2.1 but that did not work, as pings did not pass between
networks.

Can anyone suggest a way to set up something like this where i can pass
between two mode's of networks using one laptop and 2 wireless nics in the same laptop using hostap and Possibly AODV (I am using AODV as i was aiming to extend the reach of the Network in adhoc mode.)
AODV uses hello messages to establish a route before transmitting and binds
while running to one Nic which i set as eth0 although i did try it on wlan0
without any difference.

Thanks in advance for any suggestions.
Cheers.
 
Old 10-03-2005, 05:12 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

I do something like this with a wireless and a wired card to hook my laptop up in the house.

First thing, you should have a different ESSID (and probably channel) for each f the two cards - you'll confuse things if they're the same. Do that.

2nd, you'll have to set up IP Forwarding, so do 'echo 1 > /proc/sys/net/ipv4/ip_forward'.

3rd, (assuming wlan0 is 192.168.1.1, and wlan1 is 192.168.2.1), set up two interface routes with 'route add -net 192.168.1.0/24 wifi0' and 'route add -net 192.168.2.0/24 wifi1'. This might not be necessary, have a look at 'route'.

Both sides should be able to ping each other now. Hopefully.
 
Old 10-05-2005, 08:21 AM   #3
tasdevil
LQ Newbie
 
Registered: Aug 2005
Posts: 5

Original Poster
Rep: Reputation: 0
I did try those options but non of them worked. Here is a update on the situation. I can ping from adhoc to insfrastructure network now and vice versa.. BUT only when i stop AODV from working on the Ad Hoc side. I need AODV for routing to extend the reach of the adhoc portion of the lan. On the AODV UU site.. they mention 0.9.1 works but the gateway has a buffer overflow. A solution is to use the 0.8.1 version that only works on the 2.6.9 kernel as it does not compile on the 2.6.12 kernel.
Does anyone know where i can get the fedora 4 2.6.9 kernel as its off the fedora site....... Tried the one's at soure forge but got a kernel panic when i compiled them...
 
Old 10-06-2005, 08:44 AM   #4
tasdevil
LQ Newbie
 
Registered: Aug 2005
Posts: 5

Original Poster
Rep: Reputation: 0
here is a copy of my routing table for all three networks .. the forth routing table is again the gateway with the routing table while pinging from infrastructure mode to adhoc mode.. (which works) but not vice versa.. the entries are there but AODV has not marked 192.168.2.1 as a gateway even when i ran it with the -w flag

Hope the tables paste alright here..

IP Route For DELL LAPTOP (GATEWAY) with wlan0 and eth0 wireless cards.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.3 * 255.255.255.255 UH 1 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
169.254.0.0 * 255.255.0.0 U 0 0 0 wlan0
default * 0.0.0.0 U 0 0 0 eth0
Kernel IP routing cache
Source Destination Gateway Flags Metric Ref Use Iface
192.168.2.1 192.168.2.1 192.168.2.1 l 0 0 2 lo
192.168.1.6 192.168.2.3 192.168.2.3 i 0 0 14 eth0
192.168.2.1 144.6.9.130 144.6.9.130 0 2 0 eth0
192.168.2.3 192.168.1.6 192.168.1.6 i 0 0 14 wlan0
192.168.2.1 131.217.9.130 131.217.9.130 0 0 0 eth0
192.168.2.3 255.255.255.255 255.255.255.255 ibl 0 0 17 lo
192.168.2.1 255.255.255.255 255.255.255.255 bl 0 0 21 eth0
192.168.2.1 131.217.9.130 131.217.9.130 0 0 6 eth0
192.168.2.3 255.255.255.255 255.255.255.255 ibl 0 0 207 lo
192.168.2.1 255.255.255.255 255.255.255.255 bl 0 0 213 eth0


IP ROUTE FOR 192.168.1.6 (Infrastructure Managed Mode)

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default * 0.0.0.0 U 0 0 0 eth0
Kernel IP routing cache
Source Destination Gateway Flags Metric Ref Use Iface
localhost.local localhost.local localhost.local l 0 0 3 lo
localhost.local localhost.local localhost.local l 0 0 7 lo
192.168.1.6 192.168.1.1 192.168.1.1 0 0 5 eth0
192.168.1.1 192.168.1.6 192.168.1.6 il 0 0 5 lo
192.168.1.6 192.168.1.1 192.168.1.1 0 0 0 eth0

IP Route for 192.168.2.3 (Ad Hoc mode with AODV implemented)

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.1 * 255.255.255.255 UH 1 0 0 wlan0
192.168.2.0 * 255.255.255.0 U 0 0 0 wlan0
169.254.0.0 * 255.255.0.0 U 0 0 0 wlan0
default * 0.0.0.0 U 0 0 0 wlan0
Kernel IP routing cache
Source Destination Gateway Flags Metric Ref Use Iface
192.168.2.3 255.255.255.255 255.255.255.255 bl 0 0 32 wlan0
192.168.2.1 255.255.255.255 255.255.255.255 ibl 0 0 32 lo
127.0.0.1 127.0.0.1 127.0.0.1 l 0 0 19 lo
127.0.0.1 127.0.0.1 127.0.0.1 l 0 0 9 lo
 
  


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
How To Get IP Range in AD-HOC mode v1tn1k Linux - Wireless Networking 0 08-20-2005 12:06 PM
How to interconnect an ad-hoc network with an infrastructure network tonydeb Linux - Wireless Networking 3 08-08-2005 03:42 PM
setting a wlan in ad-hoc mode Uncle Bob Linux - Wireless Networking 2 04-04-2005 02:55 AM
Can`t configure G530 card in Ad-hoc mode fahad26 Linux - Wireless Networking 1 02-11-2005 10:50 AM
Belkin F5D6001 and ad-hoc mode rmdnet Linux - Wireless Networking 1 12-28-2004 12:03 PM


All times are GMT -5. The time now is 03:54 AM.

Main Menu
Advertisement
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