Quantcast
Channel: stunning co.de
Viewing all articles
Browse latest Browse all 20

Sharing Internet connection with Raspberry Pi.

$
0
0

Bridge network interface

This article shows how to share the Internet connection on your Mac with Raspberry Pi. The Pi is connected to Mac using an Ethernet cable. It also shows how to get the IP address of the Pi once the connection is established.

Sharing internet connection with Raspberry Pi

Changing network settings.

nmap scanning ip addresses

Connect your Raspberry Pi to the Mac using an Ethernet cable. The Raspberry Pi will automatically acquire an IP address.

To find out the Pi’s IP address type ifconfig in the Terminal and look for bridge interface. Usually it will be bridge0 and the interface will have an IP address of 192.168.2.1

Bridge interface is a special, emulated network interface used for sharing Internet connection. If you switch off the Internet Sharing the bridge interface will disappear.

To figure out IP address of the Pi you can use the nmap utility. In my example the Pi’s IP address belongs to 192.168.2.0/24 network. This is the same network where the bridge interface is.

nmap 192.168.2.0/24

The last screenshot shows the output of the nmap command. Only one host is up on this network (this does not count the bridge interface). Obviously, since it is a point to point Ethernet one cable connection this host must be Pi. It’s IP address is 192.168.2.3/24.

ping + ssh to the pi    Switching on the internet sharing

The post Sharing Internet connection with Raspberry Pi. appeared first on stunning co.de.


Viewing all articles
Browse latest Browse all 20

Trending Articles