The same cable when connected with my Mac works perfectly but when connected to my Raspberry Pi 3 model b i can't connect to internet. This is the new output of the ifconfig:
eth0 Link encap:Ethernet HWaddr b8:27:eb:97:57:e6
inet addr:169.254.179.161 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::ba27:ebff:fe97:57e6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:325 errors:0 dropped:0 overruns:0 frame:0
TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26577 (25.9 KiB) TX bytes:26146 (25.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:936 errors:0 dropped:0 overruns:0 frame:0
TX packets:936 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:73608 (71.8 KiB) TX bytes:73608 (71.8 KiB)
I changed interfaces file and now looks like this
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf