FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-05-2008, 04:53 PM
"Semih Gokalp"
 
Default Share internet connection with Ad-hoc mode.

Hi all.

I have two notebook and i want to share internet connection from old notebook(Debian 4.0 etch) to new notebook(ubuntu 8.04).Old notebook will work ad-hoc mode and other notebooks will connect to internet from debian notebook.


I configured debian notebook like below:

LAN (eth0) : IP: 192.168.1.3 GW:192.168.1.254 DNS:192.168.1.254 and share internet connection with iptables.

Wireless(eth1) : IP:192.168.0.1 GW: dont use , DNS: dont use , Authentication: WEP-128bit HEX , Mode: Ad-hoc , ESSID: debian

Enable ipv4_forward and write iptables configuration like below:


# iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
# iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

and wireless information like below:


--------------------------------------------
#debian:~# iwconfig

lo******* no wireless extensions.

eth0***** no wireless extensions.

eth1** IEEE 802.11b* ESSID:"debian"* Nickname:"ipw2100"

******** Mode:Ad-Hoc* Frequency:2.412 GHz* Cell: 02:0C:F1:42:EF:EF**
* ****** Bit Rate=0 kb/s** Tx-Power:16 dBm***
******** Retry min limit:7** RTS thrff** Fragment thrff
******** Encryption key:PASSWORD is HERE(like xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx) Security modepen

* ****** Power Managementff
******** Link Quality=60/100* Signal level=-83 dBm*
******** Rx invalid nwid:0* Rx invalid crypt:0* Rx invalid frag:0
* ****** Tx excessive retries:0* Invalid misc:0** Missed beacon:0


------------------------------------------------------------------

and ps auxc command like below:

---------------------------------------

root***** 3635* 0.0* 0.2** 2656* 1124 ?******* Ss** 18:54** 0:00 dhcpd3


-------------------------------------------

dhcpd3 is running.

and it works ! but not on ubuntu 8.04 !

it only works vi_sta machine.Vi_sta can connect to internet with wireless and take an ip from debian notebook dhcp server.


Ubuntu8.04 can not connect to internet and can not take an ip from debian dhcp server.

Ubuntu 8.04's route command like below:


Destination**** Gateway******** Genmask******** Flags Metric Ref*** Use Iface
localnet******* *************** 255.255.255.0** U**** 0***** 0******* 0 wlan0
link-local***** *************** 255.255.0.0**** U**** 1000** 0******* 0 wlan0


default******** 192.168.0.1 * 0.0.0.0******** UG*** 100*** 0******* 0 wlan0


ubuntu can find debian wireless , I enter WEP-128 HEX password and it connect to debian essid but DO NOT take an ip from debian dhcp server.


iwconfig command on ubuntu like below:

-------------------------------------
lo******* no wireless extensions.

eth0***** no wireless extensions.

wlan0**** IEEE 802.11g* ESSID:"debian"*

********* Mode:Ad-Hoc* Frequency:2.412 GHz* Cell: 02:0C:F1:42:EF:EF**
********* Bit Rate=54 Mb/s**
********* Power Managementff
********* Link Quality:62/100* Signal level:-56 dBm* Noise level:-96 dBm
********* Rx invalid nwid:0* Rx invalid crypt:0* Rx invalid frag:0

********* Tx excessive retries:4* Invalid misc:1544** Missed beacon:0

---------------------------------------------------------------------------


ifconfig command on ubuntu like below:



--------------------------------------------------------------



lo******* Link encap:Local Loopback*

********* inet addr:127.0.0.1* Mask:255.0.0.0

********* inet6 addr: ::1/128 Scope:Host

********* UP LOOPBACK RUNNING* MTU:16436* Metric:1

********* RX packets:103 errors:0 dropped:0 overruns:0 frame:0

********* TX packets:103 errors:0 dropped:0 overruns:0 carrier:0

********* collisions:0 txqueuelen:0

********* RX bytes:8796 (8.5 KB)* TX bytes:8796 (8.5 KB)



wlan0**** Link encap:Ethernet* HWaddr 00:15:af:4f:46:9d*

********* inet6 addr: fe80::215:afff:fe4f:469d/64 Scope:Link

********* UP BROADCAST RUNNING MULTICAST* MTU:1500* Metric:1

********* RX packets:9 errors:0 dropped:0 overruns:0 frame:0

********* TX packets:81 errors:0 dropped:0 overruns:0 carrier:0

********* collisions:0 txqueuelen:1000

********* RX bytes:378 (378.0 B)* TX bytes:14357 (14.0 KB)

********* Interrupt:19 Memory:f0300000-f0310000



wlan0:avahi Link encap:Ethernet* HWaddr 00:15:af:4f:46:9d*

********* inet addr:169.254.6.138* Bcast:169.254.255.255* Mask:255.255.0.0

********* UP BROADCAST RUNNING MULTICAST* MTU:1500* Metric:1

********* Interrupt:19 Memory:f0300000-f0310000



-------------------------------------------------------------------------------------------

And i tried dhclient command on ubuntu like below:

# dhclient wlan0

Listening on LPF/wlan0/00:15:af:4f:46:9d

Sending on** LPF/wlan0/00:15:af:4f:46:9d
Sending on** Socket/fallback
DHCPREQUEST of 192.168.0.187 on wlan0 to 255.255.255.255 port 67
DHCPREQUEST of 192.168.0.187 on wlan0 to 255.255.255.255 port 67

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
No DHCPOFFERS received.

Trying recorded lease 192.168.0.187
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---

1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

No working leases in persistent database - sleeping.

--------------------------------------------------------------------------------



it took ip from apipa like 169.254.....

and i tried manual ip configuration but not worked.I can not ping to 192.168.0.1

Why can not I connnection to internet with ubuntu8.04 machine ?


If you help me,i will be happy. Thanks all.




--
Iyi calismalar.Basarilar...
Semih Gokalp
Turkiye
 
Old 06-10-2008, 11:05 AM
"Giorgos D. Pallas"
 
Default Share internet connection with Ad-hoc mode.

Semih Gokalp wrote:



it took ip from apipa like 169.254.....

and i tried manual ip configuration but not worked.I can not ping to
192.168.0.1 <http://192.168.0.1>


Why can not I connnection to internet with ubuntu8.04 machine ?

If you help me,i will be happy. Thanks all.





Vista can ping 192.168.0.1?
How did you manually configure IP? Did you first stop all the
/etc/init.d/network-dispatchers and the network-manager from your desktop?

Try configuring the IP: # ifconfig wlan0 192.168.0.251 netmask 255.255.255.0
and then set the route: # route add default gw 192.168.0.1

To me at least, it is obvious that the 'server' notebook is correctly
configured since vista sees internet...


G.
 
Old 06-11-2008, 05:26 PM
"Semih Gokalp"
 
Default Share internet connection with Ad-hoc mode.

Vista can ping 192.168.0.1?
Yes,Vista can ping 192.168.0.1.







How did you manually configure IP?
I configured ubuntu notebook like below:

iface wlan0 inet static
******* address 192.168.0.187
******* netmask 255.255.255.0




******* gateway 192.168.0.1
auto wlan0

and I clicked "debian" essid from network-manger and I entered WEP-128 HEX password.

and
*
#route add default gw 192.168.0.1





and

vim /etc/resolv.conf

#nameserver 195.175.39.39





Did you first stop all the /etc/init.d/network-dispatchers and the network-manager from your desktop?
No,I haven't got a "network-dispathcers",I have only /etc/init.d/networking.Only,I unpluged wire connection(eth0) and configured wlan0 manually.





To me at least, it is obvious that the 'server' notebook is correctly configured since vista sees internet...




Yes,you are right.If vis_ta connect to internet without problem,server is correctly configure.

I have a news about internet connection on ubuntu.I dont know what is happening,but I am connecting to internet with ubuntu notebook now.I did not reconfigure and not change anything.Everything is same like before.



"debian" essid was found by ubuntu.I entered password and ubuntu took ip (ip,gateway,dns ) from debian dhcp notebook.

But dont work EVERYTIME.I restarted ubuntu machine and did not work !, and tried configure manually(like above) but did not work.

I tried on vi_sta again.Vi_sta is connecting everytime even if I restart the vi_sta

I can not understand why dont ubuntu connect to internet.

Thanks all.

--
Iyi calismalar.Basarilar...

Semih Gokalp
Istanbul/Turkiye
 

Thread Tools




All times are GMT. The time now is 04:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org