Raspberry

From 太極
Jump to navigation Jump to search

Raspberry Pi

Miscellaneous

Get internet from sharing the internet from another machine

sudo nano /etc/network/interfaces

iface eth0 inet static
address 192.168.100.1
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
gateway 192.168.100.254

The gateway is important and in most cases will always point to your firewalls, switch or routers IP address.

In my current setting, the host machine's eth0 has IP 10.42.0.1 (inet addr). The RPi has IP 10.42.0.37 and gateway 10.42.0.1.

And the others may be worth to be changed too

/etc/hostname
/etc/resolv.conf
/etc/hosts