Documente Academic
Documente Profesional
Documente Cultură
Client and Server: When we connect our RPi to internet through Wifi, our RPi becomes client and the system
(modem/router) becomes the server.
IP( Internet Protocol): It is a set of rules governing the format of data sent over the Internet or other network.
IP Address (Internet Protocol Address): It is numerical label assigned to each device (e.g., computer, printer)
participating in a computer network. Each computer (known as a host) on the Internet has at least one IP
address that uniquely identifies it from all other computers on the Internet. My IP address looks like this:
192.168.0.105
DHCP Server - Dynamic Host Configuration Protocol is a client/server protocol that automatically provides an
Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet
mask and default gateway. Normally, the networks at school and home have DCP servers.In case if it is not
there you will set it up manually.
Preliminaries
Network Interfaces: It is the point of interconnection between a computer and a private or public
network.Network interface is a system's (software and/or hardware) interface between two pieces of
equipment or protocol layers in a computer network.If you can connect to an internet through two different
routers - you have two interfaces.
Gateway: It is the IP address of your router or cable modem.A gateway is a network point that acts as an
entrance to another network. You are connected to the outer world through the router. (so its IP address)
Netmask: A netmask is a 32-bit mask used to divide an IP address into subnets and specify the networks
available hosts. In a netmask, two bits are always automatically assigned. For example, in 255.255.225.0, "0"
is the assigned network address; and in 255.255.255.255, "255" is the assigned broadcast address.
Preliminaries
SSID - A service set identifier (SSID) is a sequence of characters that uniquely names a wireless local area
network (WLAN). It is nothing but name of your Wifi.
Domain Name System: The domain name system (DNS) is the way that Internet domain names are located and
translated into Internet Protocol addresses. A domain name is a meaningful and easy-to-remember "handle"
for an Internet address. It is easy to remember http://aws.amazon.com/ then to remember 72.21.214.144
Domain Name Servers: DNS are the Internet's equivalent of a phone book. They maintain a directory of domain
names and translate them to Internet Protocol (IP) addresses.
Preliminaries
Wi-Fi Protected Access (WPA) and Wi-Fi Protected Access II (WPA2) are two security protocols and security
certification programs developed by the Wi-Fi Alliance to secure wireless computer networks.
Check whether you USB wireless adaptor is compatible with the type of network. If compatible, you need to
see if you have the required firmware for the adaptor. (Firmware is the software that helps you interact
with the USB wireless adatpor)
To know which wifi-firmware to install follow the following steps (knowing the brand of the adaptor is not
sufficient to know the firmware - there are many brands who but very few builds it )
type dmesg | grep ^ usbon command prompt (dmesg - gives you kernel messages)
Connecting to the internet with your Raspberry Pi (RPi)
Step 2(only for wifi): Installing the firmware
Replace the package name with the name of the file you
downloaded
sudo iwlist scan | less: run this command on the terminal to see if the USB wifi adaptor is working . This will show the list
of all the wifi networks there in the vicinity.
If there is an error message at this point, it means that you have installed a wrong firmware
Next step is to configure the network interface. The list of interfaces along with how they are to be configured is present
in a file called interfaces present in etc/network.
sudo nano etc/network/interfaces: run this on the terminal. This will open our nano text editor. The following is the
default view:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Step 4: Configuring the network interface
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Make the following changes in case of ethernet (manual setting):
auto lo
iface lo inet loopback
iface eth0 inet static
[tab] IP Address
[tab] netmask
[tab] gateway
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Step 4: Configuring the network interface
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Make the following changes in case of wifi:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa_conf/etc/wpa_.conf The last edited line make a reference to a file called
iface default inet dhcp wpa_conf which is consumed by a tool called
wpasupplicant.
This step is only for Wifi. Wpasupplicant stores its configuration in a file wpa.conf under /etc directory.
nameserver 8.8.8.8
nameserver 8.8.8.4