I am having this problem everytime i change NIC or CPU. Ubuntu does not take network configuration automatically.
After a lot effort this time i can access Ubuntu in LAN. But still i can't access internet.

Output of commands i tried :
ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether ec:a8:6b:f0:c6:f9 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.139/24 brd 192.168.0.255 scope global eth2
inet6 fe80::eea8:6bff:fef0:c6f9/64 scope link
valid_lft forever preferred_lft forever


dmesg |grep eth
[ 0.743255] i2c-core: driver [aat2870] using legacy suspend method
[ 0.743257] i2c-core: driver [aat2870] using legacy resume method
[ 1.479450] r8169 0000:02:00.0: eth0: RTL8168evl/8111evl at 0xffffc9000064c000, ec:a8:6b:f0:c6:f9, XID 0c900800 IRQ 43
[ 1.479458] r8169 0000:02:00.0: eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 10.789250] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 10.877426] udevd[368]: renamed network interface eth0 to eth2
[ 1061.312562] r8169 0000:02:00.0: eth2: link down
[ 1061.312569] r8169 0000:02:00.0: eth2: link down
[ 1061.312825] ADDRCONF(NETDEV_UP): eth2: link is not ready
[ 1062.878234] r8169 0000:02:00.0: eth2: link up
[ 1062.878613] ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
[ 1073.140947] eth2: no IPv6 routers present


dhclient

Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service smbd reload

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the reload(8) utility, e.g. reload smbd

dhclient eth2
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service smbd reload

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the reload(8) utility, e.g. reload smbd
RTNETLINK answers: File exists

/etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... Cannot find device "eth0"
Failed to bring up eth0.

ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether ec:a8:6b:f0:c6:f9 brd ff:ff:ff:ff:ff:ff

lspci -v : 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
Subsystem: Intel Corporation Device 2042
Flags: bus master, fast devsel, latency 0, IRQ 43
I/O ports at e000 [size=256]
Memory at f0004000 (64-bit, prefetchable) [size=4K]
Memory at f0000000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 02-00-00-00-68-4c-e0-00
Kernel driver in use: r8169
Kernel modules: r8169

May i change eth2 to eth0 ??? Because i can't change /etc/network/interfaces file. It shows read-only mode. I tried with root in terminal to change , Used gksudo nautilus command , Gedit or nano even cant change. I tried a lot to edit but still can't.
Help me..
I have to send dhcp request manually for ip right now by using this command:
dhclient eth2

But that is for only LAN access. Still cant access internet. Help me to change eth2 to eth0 or i can write in /etc/network/interfaces file (read-only).