1 setting ip and gateway
sudo gedit /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.172
gateway 192.168.0.1
netmask 255.255.255.0
2 setting dns
sudo gedit /etc/resolv.conf
add:
nameserver 192.168.0.1
3 restart net
sudo /etc/init.d/networking restart