please try this
First backup your /etc/network/interfaces
Code:
sudo cp /etc/network/interfaces /etc/network/interfaces.bak
Code:
gksudo gedit /etc/network/interfaces
Edit the file so that it contains only these two lines
Code:
auto lo
iface lo inet loopback
save the file and close
Right-click on the NM icon(two opposite arrows on top right) and then click on Edit Connections.
Select the tab, wired
select the ethernet connection you want and click edit(you can add the ethernet connection if not listed)
select ipv4
method-manual
click add
address 192.168.1.231
mask 255.255.255.0
gateway 192.168.1.254
then hit enter
DNS 4.2.2.1
(You can any working DNS)
then click apply
Bookmarks