PDA

View Full Version : [SOLVED] Wired Connection is not detecting.



๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 08:13 AM
I just installed Ubuntu 11.10 Oneiric Ocelot on my Compaq Presario CQ61 Notebook.
The problem is I can't connect to internet using my eth0 connection. When I use ifconfig in the terminal, the interfaces I can see are lo & wlan0.
Even though I used some old versions of Ubuntu like Lucid Lynx and Maverick Meerkat , I'm not a advanced user. But, I can remember while I was using the older versions like Lucid Lynx, the wired connection was working. I just love to work with Linux flavours, that is why I wish to use it. I configured Dual Booting on my lap With Windows 7 & Ubuntu 11.10.

I think, I'm using Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC (NDIS 6.20).

Hope anyone can help me. Thanks in advance & Take Care

praseodym
December 25th, 2011, 12:15 PM
Hi,

please show the terminal outputs of:


lspci -nnk | grep -iA2 net
ifconfig -a
cat /etc/network/interfaces
cat /etc/resolv.conf
lsmod
cat /etc/udev/rules.d/70-persistent-net.rules

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 04:09 PM
First of all, thanks for your kind response.
I just worked around the terminal with your instructions. But, How can I save it to work with Windows? When I paste the contents of the terminal window into a text editor & save it, that file is not seen inside windows. As, I can't connect to the internet via Ubuntu, I need to login to my windows. But, when I browse the file I saved on Ubuntu using the text editors like gedit or Libre Office Writer, I can't find the file. I had this many times with different formats but I can't find the file which I need.
Kindly, help me with this.

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 04:30 PM
First of all, thanks for your kind response.
I just worked around the terminal with your instructions. But, How can I save it to work with Windows? When I paste the contents of the terminal window into a text editor & save it, that file is not seen inside windows. As, I can't connect to the internet via Ubuntu, I need to login to my windows. But, when I browse the file I saved on Ubuntu using the text editors like gedit or Libre Office Writer, I can't find the file. I had this many times with different formats but I can't find the file which I need.
Kindly, help me with this.

Solved that problem. That was because I used to hibernate windows. Restarted & working properly.

Here is the Output of the terminal:



hackerinside@HackerInside:~$ lspci -nnk | grep -iA2 net
02:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) [168c:001c] (rev 01)
Subsystem: Hewlett-Packard Company Device [103c:137b]
Kernel driver in use: ath5k
--
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 02)
Subsystem: Hewlett-Packard Company Device [103c:306a]
Kernel driver in use: r8169
hackerinside@HackerInside:~$
hackerinside@HackerInside:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:44 Base address:0x2000


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:16436 Metric:1
RX packets:96 errors:0 dropped:0 overruns:0 frame:0
TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7584 (7.5 KB) TX bytes:7584 (7.5 KB)


wlan0 Link encap:Ethernet HWaddr 00:24:2c:18:8d:81
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


hackerinside@HackerInside:~$
hackerinside@HackerInside:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback


hackerinside@HackerInside:~$
hackerinside@HackerInside:~$ cat /etc/resolv.conf
# Generated by NetworkManager
hackerinside@HackerInside:~$
hackerinside@HackerInside:~$ lsmod
Module Size Used by
parport_pc 32114 0
ppdev 12849 0
bnep 17923 2
rfcomm 38408 8
arc4 12473 2
snd_hda_codec_hdmi 31426 1
hp_wmi 13652 0
joydev 17393 0
snd_hda_codec_idt 60049 1
sparse_keymap 13658 1 hp_wmi
uvcvideo 67271 0
videodev 85626 1 uvcvideo
snd_hda_intel 24262 2
snd_hda_codec 91754 3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel
snd_hwdep 13276 1 snd_hda_codec
snd_pcm 80468 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
binfmt_misc 17292 1
btusb 18160 2
psmouse 73673 0
bluetooth 148839 23 bnep,rfcomm,btusb
snd_seq_midi 13132 0
serio_raw 12990 0
ath5k 145100 0
ath 19387 1 ath5k
mac80211 272785 1 ath5k
nouveau 663211 2
snd_rawmidi 25241 1 snd_seq_midi
cfg80211 172392 3 ath5k,ath,mac80211
ttm 65224 1 nouveau
snd_seq_midi_event 14475 1 snd_seq_midi
drm_kms_helper 32889 1 nouveau
drm 192226 4 nouveau,ttm,drm_kms_helper
i2c_algo_bit 13199 1 nouveau
mxm_wmi 12859 1 nouveau
snd_seq 51567 2 snd_seq_midi,snd_seq_midi_event
snd_timer 28932 2 snd_pcm,snd_seq
snd_seq_device 14172 3 snd_seq_midi,snd_rawmidi,snd_seq
wmi 18744 2 hp_wmi,mxm_wmi
snd 55902 14 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel ,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_s eq,snd_timer,snd_seq_device
video 18908 1 nouveau
soundcore 12600 1 snd
snd_page_alloc 14115 2 snd_hda_intel,snd_pcm
lp 17455 0
parport 40930 3 parport_pc,ppdev,lp
usbhid 41905 0
hid 77367 1 usbhid
r8169 43104 0
ahci 21634 3
libahci 25727 1 ahci
hackerinside@HackerInside:~$
hackerinside@HackerInside:~$ cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.


# PCI device 0x168c:0x001c (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:2c:18:8d:81", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
hackerinside@HackerInside:~$


Thanks in advance & Take Care

praseodym
December 25th, 2011, 05:05 PM
Go to the network-manager applet (or start it with

gksu nm-connection-editor
from terminal), checkbox "available to all users" and "connect automatically", remove your profile and reboot. Check:

ifconfig -a
cat /var/lib/NetworkManager/NetworkManager.state
cat /etc/resolv.conf

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 06:05 PM
The terminal shows the following log:


hackerinside@HackerInside:~$ ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:44 Base address:0x2000

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:16436 Metric:1
RX packets:592 errors:0 dropped:0 overruns:0 frame:0
TX packets:592 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:45104 (45.1 KB) TX bytes:45104 (45.1 KB)

wlan0 Link encap:Ethernet HWaddr 00:24:2c:18:8d:81
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

hackerinside@HackerInside:~$ cat /var/lib/NetworkManager/NetworkManager.state

[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true
hackerinside@HackerInside:~$ cat /etc/resolv.conf
# Generated by NetworkManager
hackerinside@HackerInside:~$Thanks in advance & Take Care

praseodym
December 25th, 2011, 06:28 PM
There is no hardware address for your card. Can you check


ifconfig -a
cat /etc/udev/rules.d/70-persistent-net.rules

with Live-CD?

Maybe this is enough:


echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf
sudo /etc/init.d/networking restart

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 06:35 PM
Yeah! Okay... I want to use


ifconfig -a
cat /etc/udev/rules.d/70-persistent-net.rules

via Live DVD & then later log in to the Ubuntu OS & do


echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf sudo /etc/init.d/networking restart

Is that what I want to do?

praseodym
December 25th, 2011, 06:48 PM
Starting with "echo" you can try right now. With Live-DVD you should have a look if the card is recognized with a Hardware address. You may also want to copy the file "70-persistent-net.rules" if there is an entry for eth0

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 07:48 PM
Looks like my NIC doesn't have any valid MAC address. As you told me, I checked it via Live DVD & also Windows. It appears 00-00-00-00-00-00.

Terminal Log(via Live DVD) :


ubuntu@ubuntu:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:44 Base address:0x2000

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:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:24:2c:18:8d:81
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

ubuntu@ubuntu:~$ cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x168c:0x001c (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:2c:18:8d:81", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
ubuntu@ubuntu:~$I also used


echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf sudo /etc/init.d/networking restart But, no use. the problem still exist!

What I can do now? How can I change back the MAC address to a valid one?

Thanks in advance & Take Care

praseodym
December 25th, 2011, 08:02 PM
Do you get a MAC address with Windows? The Windows terminal command is


ipconfig /all

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 08:14 PM
Hmmm... Actually. Nope...
It was 00:00:00:00:00. Then I checked on internet, and tweaked using Freeware tool called Technitium (http://www.technitium.com/). Now my NIC got the MAC address in windows.

praseodym
December 25th, 2011, 08:29 PM
Try to:


gksu gedit /etc/udev/rules.d/70-persistent-net.rules
Add the lines in green with your MAC-address:


# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
#PCi device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x168c:0x001c (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:2c:18:8d:81", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
hackerinside@HackerInside:~$
save, close the editor and

sudo service udev reload
sudo /etc/init.d/networking restart
sudo dhclient eth0
Check:

ifconfig -a

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 08:30 PM
So, I straightened the windows problem. How can I change the MAC address of my NIC in Ubuntu?
I think that would solve my whole problem.

Thanks in advance & Take Care

praseodym
December 25th, 2011, 08:41 PM
Try the one from #13. Also check the BIOS and Windows settings, if one of these shut down the card pe default...

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 09:02 PM
That session too end in errors.
I used the MAC address which I used with Windows. Still the Ubuntu shows invalid MAC address(00:00:00:00:00).

Terminal Log:


hackerinside@HackerInside:~$ gksu gedit /etc/udev/rules.d/70-persistent-net.rules
(gksu:2278): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksu:2278): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksu:2278): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksu:2278): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gedit:2280): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recentlyused.
xbel', but failed: No such file or directory
(gedit:2280): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recentlyused.
xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.HB856V': No such
file or directory
(gedit:2280): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recentlyused.
xbel', but failed: No such file or directory
(gedit:2280): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recentlyused.
xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.FE316V': No such
file or directory
(gedit:2280): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recentlyused.
xbel', but failed: No such file or directory

hackerinside@HackerInside:~$ sudo service udev reload

hackerinside@HackerInside:~$ sudo /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some
interfaces
* Reconfiguring network interfaces... [ OK ]

hackerinside@HackerInside:~$ sudo dhclient eth0
RTNETLINK answers: Cannot assign requested address

^Chackerinside@HackerInside:~$ ifconfig

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:16436 Metric:1
RX packets:672 errors:0 dropped:0 overruns:0 frame:0
TX packets:672 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:51632 (51.6 KB) TX bytes:51632 (51.6 KB)

wlan0 Link encap:Ethernet HWaddr 00:24:2c:18:8d:81
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

hackerinside@HackerInside:~$ ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:43 Base address:0xa000
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:16436 Metric:1
RX packets:672 errors:0 dropped:0 overruns:0 frame:0
TX packets:672 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:51632 (51.6 KB) TX bytes:51632 (51.6 KB)

wlan0 Link encap:Ethernet HWaddr 00:24:2c:18:8d:81
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
hackerinside@HackerInside:~$

praseodym
December 25th, 2011, 10:44 PM
Ok, try this:


sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.bak
sudo udevadm trigger
sudo service udev reload
Check the new file "70-" again and "ifconfig"

๖ۣۜStorm ๖ۣۜShadow
December 25th, 2011, 11:14 PM
No change. The problem still exist. ifconfig doesn't shown any changes & the file too.

praseodym
December 25th, 2011, 11:28 PM
Ok, reset the BIOS to manufacturer settings, reboot, and check again

๖ۣۜStorm ๖ۣۜShadow
December 26th, 2011, 12:05 AM
No change at all. Facing same problems. In windows, my NIC is working perfectly. Its only with Ubuntu.

praseodym
December 26th, 2011, 12:18 AM
Maybe the card is loose in its slot, or try another one?

๖ۣۜStorm ๖ۣۜShadow
December 26th, 2011, 12:27 AM
Maybe the card is loose in its slot, or try another one?

I'm using Compaq Presario CQ61(Notebook). How can it be loose or broken when it is perfectly working in Windows!?

praseodym
December 26th, 2011, 12:51 AM
So check in the Windows settings if it shuts it down during shutdown the OS

๖ۣۜStorm ๖ۣۜShadow
December 26th, 2011, 10:24 AM
Hooray! Sorted the problem.
All you need is to get a valid MAC address for your NIC.
I just followed 4 simple steps from How-To Geek . (http://www.howtogeek.com/howto/ubuntu/change-your-network-card-mac-address-on-ubuntu/)Just insert a valid MAC address in the file & restart the service & you're done. Now everything works perfectly.

:KS Thank you praseodym (http://ubuntuforums.org/member.php?u=1411497) for helping me. Keep up the good work

Take Care & Season's greetings...