Network problems troubles me.


8 posts
by xberlino » Wed Jan 09, 2013 12:24 pm
I use a usb wireless adaptor and it works .I plug the pi into the router and i can ssh both the wireless and ethernet,but when i ping from my pi to my computer,it doesn't work.
Here is my /etc/network/interfaces
Code: Select all
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.106
netmask 255.255.255.0
gateway 192.168.1.1
#auto wlan0
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-driver wext
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
auto wlan0
iface wlan0 inet static
wpa-ssid "**********"
wpa-psk "******"
address 192.168.1.102
netmask 255.255.255.0
gateway 192.168.1.1
iface default inet dhcp

i can ping from my computer to pi,and in pi i can not get conneted with internet.
any suggestions,guys?
Posts: 4
Joined: Wed Jan 09, 2013 10:17 am
by nazouille » Wed Jan 09, 2013 12:39 pm
ping pi -> computer : firewall issue ?
internet connection not working on the pi : dns issu ?
Posts: 28
Joined: Thu Jan 03, 2013 12:30 pm
Location: France
by xberlino » Wed Jan 09, 2013 12:46 pm
nazouille wrote:ping pi -> computer : firewall issue ?
internet connection not working on the pi : dns issu ?

i think it's not dns issue because i ping 192.168.1.* which seems not to use dns.
And firewall issue , i cannot even use apt-get install ,maybe not firewall issue.
Thank u very much.
Posts: 4
Joined: Wed Jan 09, 2013 10:17 am
by nazouille » Wed Jan 09, 2013 4:53 pm
if the ping is not working it can be a firewall issue. Most likely on the Desktop PC.

What is the result for a ping 8.8.8.8 ?
Posts: 28
Joined: Thu Jan 03, 2013 12:30 pm
Location: France
by cyrano » Wed Jan 09, 2013 5:44 pm
xberlino wrote:I use a usb wireless adaptor and it works .I plug the pi into the router and i can ssh both the wireless and ethernet,but when i ping from my pi to my computer,it doesn't work.


Could you please specify clearly how both computers are connected?

It reads now as if you might have two routes from the Pi to the PC. And that would explain why ping isn't working.
User avatar
Posts: 496
Joined: Wed Dec 05, 2012 11:48 pm
Location: Belgium
by ski522 » Thu Jan 10, 2013 12:06 am
xberlino wrote:i can ping from my computer to pi,and in pi i can not get conneted with internet.
any suggestions,guys?


You computer probably has firewall services enabled which is most likely blocking ICMP packets when trying to ping your computer. As for getting out to the Internet, you probably need to setup a dns resolver.

sudo nano /etc/resolv.conf
Code: Select all
nameserver 8.8.8.8


That's googles DNS server, should work for you.
Posts: 394
Joined: Sun Sep 30, 2012 2:22 pm
by xberlino » Thu Jan 10, 2013 1:59 am
cyrano wrote:
xberlino wrote:I use a usb wireless adaptor and it works .I plug the pi into the router and i can ssh both the wireless and ethernet,but when i ping from my pi to my computer,it doesn't work.


Could you please specify clearly how both computers are connected?

It reads now as if you might have two routes from the Pi to the PC. And that would explain why ping isn't working.

I got one router between pi and PC,my pi just have two ip,one from eth0,the other from wlan0(the usb)
Posts: 4
Joined: Wed Jan 09, 2013 10:17 am
by cyrano » Thu Jan 10, 2013 3:27 am
xberlino wrote:I got one router between pi and PC,my pi just have two ip,one from eth0,the other from wlan0(the usb)


Try unplugging ethernet or wireless on the Pi and ping you PC again. Which OS is on it, BTW?
User avatar
Posts: 496
Joined: Wed Dec 05, 2012 11:48 pm
Location: Belgium