Configuring ethernet interface
DHCP
Default configuration:
pi@raspberrypi ~ $ cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
Configures interface eth0.
See also link.
Static IP
Configure for static IP address:
pi@raspberrypi ~ $ cat /etc/network/interfaces
auto lo
iface lo inet loopback
#iface eth0 inet dhcp
iface eth0 inet static
address 10.1.2.201
netmask 255.255.255.0
gateway 10.1.2.1
Here the DHCP line is commented out and followed by a static configuration.
After editing reboot to get the change to take effect.
See also link.