yyyyazj
Posts: 4
Joined: Tue Mar 04, 2014 11:05 am

Connect Internet

Tue Mar 04, 2014 11:11 am

I want to connect my RaspberryPi with Ethernet by using DNS, but I have a problem like: cannot resolve proxy hostname. How can I fix this?

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Connect Internet

Tue Mar 04, 2014 11:48 am

Please post the output from the following commands
cat /etc/network/interfaces
ifconfig -a
route -n
cat /etc/resolv.conf
ping -c3 8.8.8.8
ping -c3 google.com
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

yyyyazj
Posts: 4
Joined: Tue Mar 04, 2014 11:05 am

Re: Connect Internet

Thu Mar 06, 2014 8:09 am

Here is the result of these command:
cat /etc/network/interfaces:
auto lo
iface lo inet loopback
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.50.175
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.50.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

ifconfig -a:
eth0 Link encap:Ethernet Hwaddr b8:27:eb:38:2f:84
inet addr:192.168.50.175 Bcast:192.168.0.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST
MTU:1500 Metric:1
RX packets:3188 errors:0 dropped:0 overruns:0
frame:0
TX packets:72 errors:0 dropped:0 overruns:0
carrier:0
collisions:0 txqueuelen:1000
RX bytes:261189(255.0 KiB) TX bytes:9507(9.2KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:163 errors:0 dropped:0 overruns:0
frame:0
TX packets:163 errors:0 dropped:0 overruns:0
carrier:0
collisions:0 txqueuelen:0
RX bytes:13564(13.2 KiB)
TX bytes:13564(13.2 KiB)

route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric
0.0.0.0 192.168.50.1 0.0.0.0 UG 0
192.168.50.0 0.0.0.0 255.255.255.0 U 0
Ref Use Iface
0 0 eth0
0 0 eth0

cat /etc/resolv.conf:
domain home
search home
Nameserver 194.167.30.130

ping -c3 8.8.8.8:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss,
time 2006ms

ping -c3 google.com:
ping: unknown host google.com

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Connect Internet

Thu Mar 06, 2014 8:14 am

Can you open a command window on your Windows system and post the output from an
ipconfig /all
command.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

yyyyazj
Posts: 4
Joined: Tue Mar 04, 2014 11:05 am

Re: Connect Internet

Thu Mar 06, 2014 8:57 am

No, because the result is obtained in Raspberry PI, I cannot open a Windows system to test the command

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Connect Internet

Thu Mar 06, 2014 8:58 am

Can you ping your router?
ping -c3 192.168.50.1
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

yyyyazj
Posts: 4
Joined: Tue Mar 04, 2014 11:05 am

Re: Connect Internet

Fri Mar 07, 2014 7:24 am

Yes, I can. But it can't always connect. They change information three times and then disconnect.

ping -c3 192.168.50.1:
64 bytes from 192.168.50.1: icmp_req=1 ttl=64 time=2.06ms
64 bytes from 192.168.50.1: icmp_req=2 ttl=64 time=3.20ms
64 bytes from 192.168.50.1: icmp_req=3 ttl=64 time=4.58ms
---192.168.50.1 ping statistics---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev=2.065/3.284/4.584/1.031 ms

ripat
Posts: 191
Joined: Tue Jul 31, 2012 11:51 am
Location: Belgium

Re: Connect Internet

Fri Mar 07, 2014 7:46 am

I don't know if this was intended or if this is the cause of your problem but your broadcast mask is not on the same subnet than your IP.

In the /etc/network/interfaces file:

Code: Select all

#  change to
broadcast 192.168.50.255
And restart your network service.
Using Linux command line usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Connect Internet

Fri Mar 07, 2014 8:15 am

ripat wrote:I don't know if this was intended or if this is the cause of your problem but your broadcast mask is not on the same subnet than your IP.

In the /etc/network/interfaces file:

Code: Select all

#  change to
broadcast 192.168.50.255
And restart your network service.
It's much easier to simply remove any broadcast and network statements.

With ip address netmask and gateway you can easily calculate the broadcast and network addresses. The ip and ifconfig commands do that maths.

Coding them in /etc/network/interfaces just opens up another way to get it wrong.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

ripat
Posts: 191
Joined: Tue Jul 31, 2012 11:51 am
Location: Belgium

Re: Connect Internet

Fri Mar 07, 2014 8:54 am

DougieLawson wrote:It's much easier to simply remove any broadcast and network statements.
True.
Using Linux command line usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Return to “Beginners”