Page 2 of 2

Re: Cannot Connect To Internet

Posted: Sat Feb 25, 2017 9:56 pm
by HarrisonChuuu
Ernst wrote:Are there any files in the directory "/etc/network/interfaces.d" ?
Seems like it is empty:
pi@raspberrypi-rOoUXv2QaS:~ $ cd /etc/network/interfaces.d
pi@raspberrypi-rOoUXv2QaS:/etc/network/interfaces.d $ ls
pi@raspberrypi-rOoUXv2QaS:/etc/network/interfaces.d $

Re: Cannot Connect To Internet

Posted: Sat Feb 25, 2017 10:05 pm
by Ernst
The mystery continues. Please post the output of the following commands:

Code: Select all

cat /var/log/syslog | grep 'dhcp' | tail -25
cat /var/log/syslog | grep '169.254.0' | tail -25

Re: Cannot Connect To Internet

Posted: Sat Feb 25, 2017 10:08 pm
by HarrisonChuuu
Ernst wrote:The mystery continues. Please post the output of the following commands:

Code: Select all

cat /var/log/syslog | grep 'dhcp' | tail -25
cat /var/log/syslog | grep '169.254.0' | tail -25

'dhcp' outputs this:
pi@raspberrypi-rOoUXv2QaS:~ $ sudo cat /var/log/syslog | grep 'dhcp' | tail -25
Jul 6 22:11:06 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: adding address fe80::4a3d:5277:2ff2:82d2
Jul 6 22:11:06 raspberrypi-rOoUXv2QaS dhcpcd[445]: wlan0: adding address fe80::37dc:4340:8406:ea8
Jul 6 22:11:06 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: waiting for carrier
Jul 6 22:11:06 raspberrypi-rOoUXv2QaS dhcpcd[445]: wlan0: waiting for carrier
Jul 6 22:11:08 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: carrier acquired
Jul 6 22:11:08 raspberrypi-rOoUXv2QaS dhcpcd[445]: DUID 00:01:00:01:1e:da:ef:17:b8:27:eb:ae:8a:d4
Jul 6 22:11:08 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: IAID eb:12:39:a1
Jul 6 22:11:08 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: soliciting an IPv6 router
Jul 6 22:11:09 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: soliciting a DHCP lease
Jul 6 22:11:18 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: using IPv4LL address 169.254.0.2
Jul 6 22:11:18 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: adding route to 169.254.0.0/16
Jul 6 22:11:19 raspberrypi-rOoUXv2QaS dhcpcd[445]: forked to background, child pid 655
Jul 6 22:11:19 raspberrypi-rOoUXv2QaS systemd[1]: Started dhcpcd on all interfaces.
Jul 6 22:11:21 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: no IPv6 Routers available
Jul 6 22:17:59 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: carrier lost
Jul 6 22:18:00 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: deleting address fe80::4a3d:5277:2ff2:82d2
Jul 6 22:18:00 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: deleting route to 169.254.0.0/16
Jul 6 22:18:02 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: carrier acquired
Jul 6 22:18:02 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: adding address fe80::4a3d:5277:2ff2:82d2
Jul 6 22:18:02 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: IAID eb:12:39:a1
Jul 6 22:18:03 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: soliciting an IPv6 router
Jul 6 22:18:03 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: soliciting a DHCP lease
Jul 6 22:18:13 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: using IPv4LL address 169.254.0.2
Jul 6 22:18:13 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: adding route to 169.254.0.0/16
Jul 6 22:18:16 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: no IPv6 Routers available
'169.254.0' outputs this:
pi@raspberrypi-rOoUXv2QaS:~ $ sudo cat /var/log/syslog | grep '169.254.0' | tail -25
Jul 6 20:39:54 raspberrypi-rOoUXv2QaS dhcpcd[438]: eth0: using IPv4LL address 169.254.0.2
Jul 6 20:39:54 raspberrypi-rOoUXv2QaS dhcpcd[438]: eth0: adding route to 169.254.0.0/16
Jul 6 20:39:54 raspberrypi-rOoUXv2QaS avahi-daemon[447]: Joining mDNS multicast group on interface eth0.IPv4 with address 169.254.0.2.
Jul 6 20:39:54 raspberrypi-rOoUXv2QaS avahi-daemon[447]: Registering new address record for 169.254.0.2 on eth0.IPv4.
Jul 6 20:39:54 raspberrypi-rOoUXv2QaS ntpd[673]: Listen normally on 3 eth0 169.254.0.2 UDP 123
Jul 6 21:44:47 raspberrypi-rOoUXv2QaS avahi-daemon[447]: Leaving mDNS multicast group on interface eth0.IPv4 with address 169.254.0.2.
Jul 6 21:45:02 raspberrypi-rOoUXv2QaS dhcpcd[451]: eth0: using IPv4LL address 169.254.0.2
Jul 6 21:45:02 raspberrypi-rOoUXv2QaS avahi-daemon[456]: Joining mDNS multicast group on interface eth0.IPv4 with address 169.254.0.2.
Jul 6 21:45:02 raspberrypi-rOoUXv2QaS dhcpcd[451]: eth0: adding route to 169.254.0.0/16
Jul 6 21:45:02 raspberrypi-rOoUXv2QaS avahi-daemon[456]: Registering new address record for 169.254.0.2 on eth0.IPv4.
Jul 6 21:45:03 raspberrypi-rOoUXv2QaS ntpd[680]: Listen normally on 3 eth0 169.254.0.2 UDP 123
Jul 6 22:11:18 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: using IPv4LL address 169.254.0.2
Jul 6 22:11:18 raspberrypi-rOoUXv2QaS avahi-daemon[453]: Joining mDNS multicast group on interface eth0.IPv4 with address 169.254.0.2.
Jul 6 22:11:18 raspberrypi-rOoUXv2QaS dhcpcd[445]: eth0: adding route to 169.254.0.0/16
Jul 6 22:11:18 raspberrypi-rOoUXv2QaS avahi-daemon[453]: Registering new address record for 169.254.0.2 on eth0.IPv4.
Jul 6 22:11:19 raspberrypi-rOoUXv2QaS ntpd[682]: Listen normally on 3 eth0 169.254.0.2 UDP 123
Jul 6 22:18:00 raspberrypi-rOoUXv2QaS avahi-daemon[453]: Withdrawing address record for 169.254.0.2 on eth0.
Jul 6 22:18:00 raspberrypi-rOoUXv2QaS avahi-daemon[453]: Leaving mDNS multicast group on interface eth0.IPv4 with address 169.254.0.2.
Jul 6 22:18:00 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: deleting route to 169.254.0.0/16
Jul 6 22:18:01 raspberrypi-rOoUXv2QaS ntpd[682]: Deleting interface #3 eth0, 169.254.0.2#123, interface stats: received=0, sent=0, dropped=0, active_time=402 secs
Jul 6 22:18:13 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: using IPv4LL address 169.254.0.2
Jul 6 22:18:13 raspberrypi-rOoUXv2QaS dhcpcd[655]: eth0: adding route to 169.254.0.0/16
Jul 6 22:18:13 raspberrypi-rOoUXv2QaS avahi-daemon[453]: Joining mDNS multicast group on interface eth0.IPv4 with address 169.254.0.2.
Jul 6 22:18:13 raspberrypi-rOoUXv2QaS avahi-daemon[453]: Registering new address record for 169.254.0.2 on eth0.IPv4.
Jul 6 22:18:15 raspberrypi-rOoUXv2QaS ntpd[682]: Listen normally on 7 eth0 169.254.0.2 UDP 123

Re: Cannot Connect To Internet

Posted: Sat Feb 25, 2017 10:19 pm
by Ernst
I think we have come to a point where to give up. There are a few things that I do not understand, why the hostname, why are 169.254.0.X addresses configured through DHCP, why does the Pi not receive a DHCP reply from the laptop.

Please post the output of the following command:

Code: Select all

uname -a
It is now time for me to close for the night. I suggest you try the following:
- get another memory card, download raspbian and try with a new installation.
- try another ethernet cable

Re: Cannot Connect To Internet

Posted: Sat Feb 25, 2017 10:21 pm
by HarrisonChuuu
Ernst wrote:I think we have come to a point where to give up. There are a few things that I do not understand, why the hostname, why are 169.254.0.X addresses configured through DHCP, why does the Pi not receive a DHCP reply from the laptop.

Please post the output of the following command:

Code: Select all

uname -a
It is now time for me to close for the night. I suggest you try the following:
- get another memory card, download raspbian and try with a new installation.
- try another ethernet cable

The output for uname -a is the following:
pi@raspberrypi-rOoUXv2QaS:~ $ uname -a
Linux raspberrypi-rOoUXv2QaS 4.4.13-v7+ #894 SMP Mon Jun 13 13:13:27 BST 2016 armv7l GNU/Linux
I do have another memory card on standby and will try it right now.

Edit: I tried it with another memory card and it has the same issue of not connecting.

Re: Cannot Connect To Internet

Posted: Sun Feb 26, 2017 10:16 am
by Ernst
What did you do with the other memory card ?
- Did you download a fresh, new, image of Raspbian ?
- Did you write this virgin image to the memory card ?

After booting with a fresh, new, image what is the host name ?
What is the IP-address assigned to eth0 ?

Re: Cannot Connect To Internet

Posted: Sun Feb 26, 2017 10:33 am
by DougieLawson
The address on the RPi should be left completely unconfigured. If no DHCP results are sent it will get an automatic 169.254.xxx.yyy/16 address.

Code: Select all

eth0      Link encap:Ethernet  HWaddr b8:27:eb:8d:d2:6c
          inet6 addr: fe80::ba27:ebff:fe8d:d26c/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
The ethernet & WiFi interfaces on Windows should be set up like this: http://www.windowscentral.com/how-set-a ... windows-10

Connection sharing is easier and works better.

Re: Cannot Connect To Internet

Posted: Sun Feb 26, 2017 11:02 am
by Ernst
DougieLawson wrote:The address on the RPi should be left completely unconfigured. If no DHCP results are sent it will get an automatic 169.254.xxx.yyy/16 address.

Code: Select all

eth0      Link encap:Ethernet  HWaddr b8:27:eb:8d:d2:6c
          inet6 addr: fe80::ba27:ebff:fe8d:d26c/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
The ethernet & WiFi interfaces on Windows should be set up like this: http://www.windowscentral.com/how-set-a ... windows-10
Sorry but I can not recommend this option to bridge network connections, see the following extract from the url above:
It's important to note that Network Bridge is very similar to the Internet Connection Sharing (ICS) feature, but they're not the same.

When you use Internet Connection Sharing (ICS), you will convert your computer into a router, which uses a built-in DHCP server to assign IP addresses to computers participating in ICS. It also offers Network Address Translation (NAT) that allows multiple devices to connect to the network using the ICS host as the middle man.

On the other hand, Network Bridge doesn't turn the host computer into a router and you won't get Network Address Translation. It only provides a medium (bridge) in which other devices can connect directly to the network and obtain the same IP address scheme every other computer connected to the network is using.

Which feature you should use? The answer to the question is: "depends". Both features offer similar benefits. If your local network already includes a router connected to the internet and you want a seamless network integration where all devices share the same network addressing scheme, then you should consider using Network Bridge.

If you need a router-like feature, and you want to keep the network segments separated while taking advantage of the security benefits of Network Address Translation, then you'll be better suited using Internet Connection Sharing.
It is advisable to only use bridging on a "foreign" network when given permission by the adminstrators. If the Pi is/can be connected in an educational environment it is highly advisable to use ICS only.

Re: Cannot Connect To Internet

Posted: Sun Feb 26, 2017 1:18 pm
by DougieLawson
You are not wrong. Internet Connection Sharing effectively bridges the network and is an order of magnitude easier to use.
https://answers.syr.edu/display/os/Disa ... Windows+10 [reverse the action on the last step]

Re: Cannot Connect To Internet

Posted: Sun Feb 26, 2017 8:59 pm
by HarrisonChuuu
Ernst wrote:What did you do with the other memory card ?
- Did you download a fresh, new, image of Raspbian ?
- Did you write this virgin image to the memory card ?

After booting with a fresh, new, image what is the host name ?
What is the IP-address assigned to eth0 ?


I downloaded a fresh image, but I am currently having it setup by MATLAB due to my need for it to be directly integrated with MATLAB. And the image is a virgin image onto a new SD card.
The host name and IP address are the following:
pi@raspberrypi-tH8xSvKXek:~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:12:39:a1
inet addr:169.254.0.2 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::4a3d:5277:2ff2:82d2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:415 errors:0 dropped:0 overruns:0 frame:0
TX packets:220 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:39122 (38.2 KiB) TX bytes:32406 (31.6 KiB)

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:65536 Metric:1
RX packets:384 errors:0 dropped:0 overruns:0 frame:0
TX packets:384 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:31104 (30.3 KiB) TX bytes:31104 (30.3 KiB)

wlan0 Link encap:Ethernet HWaddr b8:27:eb:47:6c:f4
inet6 addr: fe80::37dc:4340:8406:ea8/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:2 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:123 (123.0 B) TX bytes:0 (0.0 B)

Re: Cannot Connect To Internet

Posted: Sun Feb 26, 2017 9:50 pm
by Ernst
Can somebody explain to me what is happening here ?
Why is the host name being changed ?
Why are the IP-addresses in the range 169.254.0.1 / .0.2 ?

Re: Cannot Connect To Internet

Posted: Mon Feb 27, 2017 2:12 am
by HarrisonChuuu
Ernst wrote:Can somebody explain to me what is happening here ?
Why is the host name being changed ?
Why are the IP-addresses in the range 169.254.0.1 / .0.2 ?
Yeah, I am really stuck and I honestly don't know what else to do.

Re: Cannot Connect To Internet

Posted: Mon Feb 27, 2017 8:04 am
by DougieLawson
Start with a new SDCard and a fresh untouched copy of NOOBS 2.1 or plain Raspbian Jessie. Just connect it to your laptop, enable internet connection sharing for your WiFi adapter and see what happens.

Re: Cannot Connect To Internet

Posted: Mon Feb 27, 2017 9:17 am
by Ernst
I see two problems:
1) You do not volunteer information
2) You do not follow instructions.

DougieLawson gave you the same information as I did a few posts back. To be able to find your problem you have to go back to a "reference" configuration, meaning a software configuration that has not been modified. The first step is to install a new, unmodified, version of raspbian (https://www.raspberrypi.org/downloads/raspbian/) on an unused/spare card. Before you take the card from your laptop create a file named "ssh" in the root directory ("echo > [driveletter]:\ssh") When start this version it must come up with the host name "raspberrypi" (1st check point) and when you connect the Pi to a laptop without ICS configured (and without some other 3rd party dhcp service) the ethernet interface will receive a random address in the 169.254.X.X subnet which will not be equal to 169.254.0.1 or .2. (2nd check point).

Once you have reached the above state (hostname, ip-address) you can configure Internet Connection Sharing on your laptop for the WiFi interface giving the ethernet interface as your private connection. You should see a message box telling you that the address 192.168.137.1 has been assigned to your laptop ethernet interface. You can verify this with the "ipconfig" command from the command line.

Now pull the ethernet cable from the Pi, wait a moment, put the cable back. This will cause the interface to search for a dhcp service. Now the ICS installed dhcp service must provide an address in the subnet 192.168.137.0 and 192.168.137.1 will be used as the gateway address (default route) and name server (dns) on the Pi. You can use "uname -a", "hostname", "ifconfig", and "route" on the Pi to inspect the configuration.

Once this has been confirmed you can continue with updating the Pi and to install other applications.

Re: Cannot Connect To Internet

Posted: Mon Feb 27, 2017 7:02 pm
by HarrisonChuuu
Ernst wrote:I see two problems:
1) You do not volunteer information
2) You do not follow instructions.

DougieLawson gave you the same information as I did a few posts back. To be able to find your problem you have to go back to a "reference" configuration, meaning a software configuration that has not been modified. The first step is to install a new, unmodified, version of raspbian (https://www.raspberrypi.org/downloads/raspbian/) on an unused/spare card. Before you take the card from your laptop create a file named "ssh" in the root directory ("echo > [driveletter]:\ssh") When start this version it must come up with the host name "raspberrypi" (1st check point) and when you connect the Pi to a laptop without ICS configured (and without some other 3rd party dhcp service) the ethernet interface will receive a random address in the 169.254.X.X subnet which will not be equal to 169.254.0.1 or .2. (2nd check point).

Once you have reached the above state (hostname, ip-address) you can configure Internet Connection Sharing on your laptop for the WiFi interface giving the ethernet interface as your private connection. You should see a message box telling you that the address 192.168.137.1 has been assigned to your laptop ethernet interface. You can verify this with the "ipconfig" command from the command line.

Now pull the ethernet cable from the Pi, wait a moment, put the cable back. This will cause the interface to search for a dhcp service. Now the ICS installed dhcp service must provide an address in the subnet 192.168.137.0 and 192.168.137.1 will be used as the gateway address (default route) and name server (dns) on the Pi. You can use "uname -a", "hostname", "ifconfig", and "route" on the Pi to inspect the configuration.

Once this has been confirmed you can continue with updating the Pi and to install other applications.

I am sorry. I am new to working with the Pi as well as just Python commands in general. I am doing most of the image setup through MATLAB so I don't quite know a lot of these things. I am going to try to download raspbian by itself, but my project requires me to connect it to MATLAB, which is the problem. However, I do apologize for inconveniencing everyone and will try to download it and work with it that way.

Re: Cannot Connect To Internet

Posted: Mon Feb 27, 2017 7:37 pm
by Ernst
I have done some research and I suspect that you can not have the Pi connect to the internet with MATLAB installed. I have seen a hint that MATLAB changes the IP-address on here: https://de.mathworks.com/help/supportpk ... #bua1af1-1

My suggestion is to follow the procedure to create a new installation (without MATLAB) to connect to the internet and to use the original card for MATLAB.

Re: Cannot Connect To Internet

Posted: Mon Feb 27, 2017 10:36 pm
by DougieLawson
If you've paid for matlab then use their support to help. That's what your matlab subscription pays for along with a licence for their exceedingly expensive software.