Ethernet Tweaks

Using mDNS/Bonjour Naming

If you don't want to have to remember your Pi's IP address, you don't have to! Jessie Lite includes and automatically enables avahi which lets you use names like raspberrypi.local

If for some reason its not activated, we have a full tutorial that will help you get set up.

Don't forget, Windows doesn't have native Bonjour support, so download & install Bonjour Print Services!
(check the tutorial above for a link on where/how to install, you only have to do it once)

So, after you get ping'ing working...try ping raspberrypi.local

Or for ssh, it's also perfectly fine:

Sharing Network Access to Your Pi

On OS X, open the Network tab of System Preferences.

Select the existing CDC or RNDIS USB connection to your Raspberry Pi by selecting Manually from the Configure IPv4 menu. Use 192.168.2.1 for the IP Address, and 255.255.255.0 for the Subnet Mask. Click Apply to save your changes.

Then, open the Sharing tab in System Preferences.

Turn on Internet Sharing to share your existing internet connection from Wi-Fi or ethernet with the CDC or RNDIS Raspberry Pi connection.

Edit your /etc/network/interfaces file on your Pi to match the one below.

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo usb0
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug usb0
iface usb0 inet manual

The important lines are:

auto lo usb0

and also:

allow-hotplug usb0
iface usb0 inet manual

Restart your Pi using sudo reboot, and SSH back in to it using ssh pi@raspberrypi.local. You can then attempt to ping google.com.

$ ping -c 5 google.com
PING google.com (216.58.219.238): 56 data bytes
64 bytes from 216.58.219.238: icmp_seq=0 ttl=55 time=20.975 ms
64 bytes from 216.58.219.238: icmp_seq=1 ttl=55 time=20.904 ms
64 bytes from 216.58.219.238: icmp_seq=2 ttl=55 time=20.646 ms
64 bytes from 216.58.219.238: icmp_seq=3 ttl=55 time=20.401 ms
64 bytes from 216.58.219.238: icmp_seq=4 ttl=55 time=20.379 ms

--- google.com ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 20.379/20.661/20.975/0.247 ms

If using Windows, open Network and Sharing Center and click on Change Adapter Settings

Right-Click on your internet connection and select Properties.

Select the Sharing tab. Click the checkbox if it is not already checked. Then click on Select a private network connection and select PiZero from the dropdown. 

Restart your Pi using sudo reboot, and SSH back in to it using ssh pi@raspberrypi.local. You can then attempt to ping google.com.

$ ping -c 5 google.com
PING google.com (216.58.219.238): 56 data bytes
64 bytes from 216.58.219.238: icmp_seq=0 ttl=55 time=20.975 ms
64 bytes from 216.58.219.238: icmp_seq=1 ttl=55 time=20.904 ms
64 bytes from 216.58.219.238: icmp_seq=2 ttl=55 time=20.646 ms
64 bytes from 216.58.219.238: icmp_seq=3 ttl=55 time=20.401 ms
64 bytes from 216.58.219.238: icmp_seq=4 ttl=55 time=20.379 ms

--- google.com ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 20.379/20.661/20.975/0.247 ms
Last updated on 2016-12-04 at 09.05.33 PM Published on 2015-12-24 at 05.29.22 PM