LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-10-2008, 08:02 AM   #31
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435

Quote:
On the network configuring window in Ubuntu, should it be "dhcp wired connection", or "roaming"?
No idea really but I expect "dhcp wired connection" of you are using ethernet.
I never use GUI tools to configure the network (see below)
Quote:
eth0 Link encap:Ethernet HWaddr 00:21:85:0F:9A:F0
inet6 addr: fe80::221:85ff:fe0f:9af0/64 Scope:Link
You seem to be getting an IPV6 address. AFAIK nobody in the UK is using this yet.
Try disabling it like this:

Open the file /etc/modprobe.d/aliases (you'll need to be root to edit this file).
Find the bit that says
Code:
alias net-pf-10 ipv6
and change it to
Code:
alias net-pf-10 off
Check that wretched GUI has not messed up your interfaces file. It needs to be as in my post #29
Then reboot, and see what happens.

Quote:
It appeared to have added the extra "auto eth0" line itself, as I rechecked the file after rebooting when it still didn't work. Is there a spelling mistake anywhere?
That's what GUIs do - they go around changing things you maybe do not want to be changed. Best to stick to editing the configuration files.
No spelling mistakes.
 
Old 09-10-2008, 02:05 PM   #32
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
No, I did exactly what you said. Still no luck. However, you may want to note that when I did check the status of the network (using the GUI, I know no other way), it still registered as being "off" (no tick in the box). Also, on the other tabs there are no entries for DNS servers or anything like that. Should there be? (Note: having used the network GUI and stuck a tick in the box, I checked the "interfaces" file again, and sure enough it had added "auto eth0" to the end of the file again, so I deleted it and resaved).

I also note (using XP) that the BT broadband hub is made by Realtek and if you Google "ubuntu Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethernet", there appears to be some people saying there is a bug with it. All a bit beyond me. Could it be that Ubuntu (specifically) doesn't like BT Broadband after all?

So anyway, still having to using Windows XP to access the internet. Is there anything else I could check? How about the fact that Ubuntu's network GUI doesn't have a "tick in the box", therefore indicated that Ubuntu doesn't even think I'm connected to the hub at all?
 
Old 09-10-2008, 03:23 PM   #33
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
I also note (using XP) that the BT broadband hub is made by Realtek and if you Google "ubuntu Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethernet", there appears to be some people saying there is a bug with it. All a bit beyond me. Could it be that Ubuntu (specifically) doesn't like BT Broadband after all?
The Realtek is the adapter in your PC - not the home hub.

Googling around for you I see people having problems with this hardware. You may need to download the driver for you card here - although as your adapter seems to be getting recognized as eth0 this may not help.

People seem to be reporting problems with dual boot machines where XP effectively turns off the card so when you boot to Linux it won't work. Here is some info about that :
Quote:
As of 27 May 2007, in kernel 2.6.21.3, you may experience the issues with the r8169 driver if you dual boot Windows on some systems. Windows by defaults disables the NIC at Windows shutdown time in order to disable Wake-On-Lan, and this NIC will remain disabled until the next time Windows turns it on. The r8169 driver in the kernel does not know how to turn the NIC on from this disabled state; therefore, the device will not respond, even if the driver loads and reports that the device is up. To work around this problem, simply enable the feature "Wake-on-lan after shutdown." You can set this options through Windows' device manager.

Edit: Problem with dual-booting with Windows exist also in 2.6.19.5 and 2.6.20.8 kernel, so it is safe to assume that it will concern all 2.6 kernels until the kernel developers update the drivers for RTL8168 to the version that will be able to turn on the NIC from disabled state. (Corey)

Second edit: Powering off and unplugging the machine for a few seconds (around 10 usually does it) seems to reset the card, so it will work in Linux again until you boot Windows again.

Third edit: 2.6.22.4 still cannot power up the NIC.

Fourth edit: Some BIOSes also disable the NIC when resuming, independent of whether Windows is installed or not (Fujitsu-Siemens Amilo Xi 2428).
All the information is from Google as I have no experience with your hardware or Ubuntu.

Hopefully someone with experience of either will chip in and help you out - sorry I can't be more helpful.
 
Old 09-11-2008, 01:24 AM   #34
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
Hmm. Well that wake-on-lan after shutdown is already enabled, but there was another option to "turn off the device to save power", which was also enabled, so I disabled it. I've only just got the PC built by a local computer shop, and as far as I know it doesn't have a network "card", the ethernet cable plugs into the motherboard.

So, can I logically assume (from what I know so far) that it might be a Ubuntu incompatibility with the network card/chip? I mean, people on this thread have said the BT Home Hub works with Ubuntu so it is probably not an issue with the Hub itself or Ubuntu; unless the fact I originally installed Ubuntu when I was using a dial-up modem, and should instead remove Ubuntu from my PC and do a complete reinstall, with my broadband turned on so the installation program knows what it is doing. However, I have tried loading up my other distro, Knoppix 5.1.1, which is a Live DVD, and still cannot get online - although that may just be because I don't know how to set up the networking properly on Knoppix.

Is there any way I can narrow down what's wrong by posting the output of any shell commands to this thread? Surely it should be possible in Ubuntu to tell whether it is recognising the network card and/or the hub itself. If the network card had been switched off by Windows on shutdown, shouldn't Ubuntu be capable of reporting this by looking at the output of a file?
 
Old 09-11-2008, 02:22 AM   #35
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
Also, elsewhere on Linuxquestions, there is this problem:

http://www.linuxquestions.org/questi...-issue-615047/

... concerning hassle with Realtek stuff. It ends with a poster saying "By the way, I gave up", so could it be that my motherboard contains the ethernet equivalent of a Winmodem? Is there any way around this, or perhaps I should buy a separate network card for my PC and stop using the onboard one?

Or perhaps someone can decipher the rather complicated (to me!) discussion going on in the aforementioned thread, if it may be of help for my particular problem...?
 
Old 09-11-2008, 04:07 AM   #36
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
I've only just got the PC built by a local computer shop, and as far as I know it doesn't have a network "card", the ethernet cable plugs into the motherboard.
Yes - sorry about that - bad choice of words on my part..

Quote:
Is there any way around this, or perhaps I should buy a separate network card for my PC and stop using the onboard one?
I wouldn't go spending any money just yet ! I know it must be frustrating having your new Home Hub and not getting your Linux OS to work with it but it's early days yet..

Anyway - I found this which seems to be a fix .. This involves downloading a new driver as I referred to in an earlier post and has instructions specific to Ubuntu..
Quote:
01 - Download the latest driver from Realtek from
http://www.realtek.com.tw/downloads/...&GetDown=false,
this version being r8168-8.005.00 for the 2.4, 2.6 kernel
02 - Copy the file to the Desktop and extract it then open a terminal. cd
Desktop
03 - $ sudo mv r8168-8.005.00 /usr/src
04 - $ cd /usr/src/r8168-8.005.00
05 - $ sudo make clean modules
06 - $ sudo make install
07 - $ sudo depmod -a
08 - $ sudo insmod ./src/r8168.ko
09 - $ cd /etc/modprobe.d
10 - $ sudo touch blacklist-network #is this line required? Dunno!
11 - $ sudo gedit blacklist-network
12 - add text "blacklist r8169" to the file (without quotes) and save
13 - $ sudo update-initramfs -u #to make the change permanent
14 - $ sudo reboot
15 - test the internet (ie, open Terminal and type ping www.google.com).
Obviously you'll have to download the driver using Windows as your Ubuntu can't see the internet yet. I don't know if your Ubuntu is set up to mount your Windows partition but if not it may be easier just for now to write the downloaded driver to a CD and then read it into Ubuntu and continue from step 2.

I was hoping someone familiar with Ubuntu or your hardware would have chimed in by now but they all must be asleep !!
 
Old 09-11-2008, 04:24 AM   #37
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
Yes, I just spotted that too so I'm going to give it a go a bit later today. I have also tried accessing broadband using some other Linux (live) distro CDs, and they all seem to recognise eth0's existence, but cannot find a network to link to. Although, of course, perhaps all of these distros need separately drivers for the chipset too.

I have no trouble accessing my Windows partition from Ubuntu, so I've saved off these instructions for when I try to compile the TAR file.
 
Old 09-11-2008, 04:57 AM   #38
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
The hardware in the BT box is immaterial: It just presents an ethernet interface. That's it.

There iseems to be some mis-configuration problem between ubuntu and your Pc's ethernet hardware.
Realtek devices are known to behave strangely, and if you ever boot to windows, you MUST have "Wake-on-lan after shutdown" enabled (you have already done this). Otherwise the chipset is disabled as far as linux is concerned.

It would be worth checking your BIOS to see if "Wake on LAN" is enabled there, sometimes this is an option.

Quote:
when I did check the status of the network (using the GUI, I know no other way)
The command to check the status of the network is ifconfig
Your DNS servers, if any have been assigned, will be listed in the file /etc/resolv.conf


Did you disable IPV6? (Post #31)

What happens if you issue the following commands?:
Code:
ifconfig
sudo ifdown eth0
sudo dhclient eth0
ifconfig
(Please don't just say "There is an error", tell us WHAT)

Explanation: dhclient eth0 sends a request for a LAN IP address and the IP number(s) of your ISP's DNS server(s) to your router. If your realtek is working, there will be some response. If not there may be useful error messages.

It is possible that you need to install a different module to handle your realtek as bgeddy says, but I think we should check the basics first. Ubuntu 8.04 is current and should handle your realtek chipset (if it has not been disabled, or put in a stupid non-functioning state by either windows or your BIOS).

The network GUIs are currently useless and best avoided at all costs.

Please be aware that there are several network GUIs and we usually do not use them or even know which one you are using, so telling us about a "tick in the box" is meaningless: "WHAT tick? WHAT box? Grrrrrr!"

If you are going to follow bgeddy's advice and install a different module, be aware that those instructions (to compile a new module) will not work until you have downloaded and installed your linux kernel headers and build-essential (which includes the C compiler etc).

This may be difficult as you have not connected linux to the internet yet.

If things become really impossible then I am tempted to say that ethernet cards ("NICs") are cheap, and anything made by 3-Com is likely to work out-of-the-box. When I have a PC made I am very specific: "NVIDIA video, 3-Com ethernet, Intel wireless, ASUS MoBo". Fewer problems then.

So, what happened to IPV6 and what is the output of those commands?
 
Old 09-11-2008, 10:08 AM   #39
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
Ah! Something's happened, Tredegar, after I followed your instructions!

I'm typing this to you from Ubuntu, logged onto my BT Home Hub! Success - but for how long?

I logged onto Windows XP to read your response, then saved off the page to my Windows partition so I could go back onto Ubuntu and carry out your instructions.

I did download and install the driver as outlined in #36, but didn't think it had worked as no change on reboot. I still don't know whether it had anything to do with it.

However, on executing those four lines (I assumed I was meant to type them in separately, not as one big script?), I got:

ifconfig

eth0 Link encap:Ethernet HWaddr 00:21:85:0F:9A:F0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 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:1345 (1.3 KB) TX bytes:0 (0.0 b)
Interrupt:17 Base address:0xc000

Then sudo ifdown eth0:

/etc/network/interfaces:13: interface eth0 declared allow-auto twice
ifdown: couldn't read interfaces file "/etc/network/interfaces"

Then sudo dhclient eth0:

Internet Systems Consortium DHCP Client V3.0.5
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:21:85:0f:9a:f0
Sending on LPF/eth0/00:21:85:0f:9a:f0
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 192.168.1.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.254
bound to 192.168.1.64 -- renewal in 34767 seconds.


Then ifconfig BUT THIS TIME GOT SOMETHING SLIGHTLY DIFFERENT (note 2nd line):

eth0 Link encap:Ethernet HWaddr 00:21:85:0F:9A:F0
inet addr:192.168.1.64 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2409 (2.3 KB) TX bytes:2999 (2.9 KB)
Interrupt:17 Base address:0xc000

Now, my concern at this point is - is this permanent? I did go to my network GUI (yeah, I know...) and noticed there was an entry in the "DNS servers" tab that was not there before. Could this be as a result of installing the drivers?

Oh, and yes I did change the IPV6 entry as you instructed to OFF.

And I do have all Build-Essential stuff. Not sure what you mean by Linux kernel headers.

However, at the moment, as I type, Ubuntu is connected so there appears to be no physical inability to connect through Ubuntu. From the output I have given above, can you tell why it suddenly started working? And is it likely to keep working on reboot?

Thank you for your patience, as always, Tredegar. And you too, Bgeddy.

Last edited by Steve W; 09-11-2008 at 10:13 AM. Reason: Grammar!
 
Old 09-11-2008, 10:25 AM   #40
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Looks like it is working at last.
The first ifconfig showed that you were not connected.
ifdown complained about your interfaces file
dhclient eth0 connected you
the second ifconfig showed you are connected
Maybe you did need to recompile that module.
Luckily you had enough stuff installed to be able to compile it.

Quote:
I did go to my network GUI (yeah, I know...) and noticed there was an entry in the "DNS servers" tab that was not there before.
That's because it is working as it should.
....Almost
Quote:
/etc/network/interfaces:13: interface eth0 declared allow-auto twice
ifdown: couldn't read interfaces file "/etc/network/interfaces"
The Network GUI has messed up your interfaces file again. Please correct it (see post #29).
Then reboot.
Your eth0 should be brought up automatically ready for you to use (for as long as you can resist the temptation to play with the network GUI)
 
Old 09-11-2008, 11:11 AM   #41
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
A postscript:

Be warned that when you next update your kernel, that rt8168 module you compiled may stop working, and you'll have to recompile it against your new kernel. Now you are connected to the internet, ubuntu will probably want to do an update, and it may well update the kernel for you, so consider this when you have rebooted after an update and eth0 is suddenly "broken" again.

Next time, you won't need to do steps 1,2,3 9,10,11,12 in bgeddy's post because you have already downloaded the code, put it in the right place, and blacklisted the r8169 module, but it will still be something of a nuisance.

You can find your current kernel version with uname -a , mine returns
Code:
Linux laptop 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux
so my running kernel is 2.6.24-19-generic
and in order to be able to compile things I need linux-headers-2.6.24-19-generic (and, it seems, linux-headers-2.6.24 ) to be in my /usr/src/ directory. That's what I meant by "your kernel headers". Take a look in your /usr/src/ directory, and you'll see what I mean.
 
Old 09-11-2008, 12:03 PM   #42
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
Well I have switched off my PC and waited 10 minutes, then switched back on and loaded Ubuntu. Instant internet access, no problems. Thank you for all your help again. With any luck, other people with the same motherboard/chipset who are unable to connect to the internet with Linux will find the thread and also follow your advice.

uname for me gives: Linux steve-desktop 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux

I don't have auto-updates switched on, and I rarely update stuff and never the kernel. Since starting to use Linux (with Breezy Badger), I have gone through 7.04 Feisty and my current distro 7.10 Gutsy, but never updating, always installing afresh. This was mainly due to only having dial-up before; not sure whether to start updating at least any "critical" or security stuff now...

I have not gone over to Hardy Heron at all, as some comments on the internet say it isn't very good/stable and may even have been released before it was ready. Obviously this will be a point of some debate, but as Ubuntu gets released every 6 months anyway, I might as well wait for 8.10 in October now. It may even have the right drivers for the Realtek chipset with it; I don't know how cutting-edge the Realtek 8168/8111 is.

The only downside is that I won't be able to go onto the internet with any of my Live DVDs/CDs anymore, as they will presumably also require the correct driver, and cannot use the one I installed for Ubuntu.

Slightly off-topic: If I now install applications using my new broadband connection, is there a directory in Linux where they tend to live, that I can back up and recover, so that I don't have to download them all again once I install a new version of Ubuntu? Or is it normally a good idea to download again after installing a new version (an updated version of the app may be available, for instance)?

Last edited by Steve W; 09-11-2008 at 12:07 PM.
 
Old 09-11-2008, 12:33 PM   #43
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Well I have switched off my PC and waited 10 minutes, then switched back on and loaded Ubuntu. Instant internet access, no problems.
Excellent! That's the way it is supposed to be. Even if I do rather regret my flippant post @ #2:
Quote:
100% Compatible.
Turn on plug in, boot, done
I had assumed your eth0 would "just work". Obviously, it didn't. No fault of BT's or their hub though.
Quote:
I don't have auto-updates switched on, and I rarely update stuff and never the kernel.
People will say that you should - especially for the security updates (Eg the recent scare in May 2008 with key-based authentication for ssh with debian derived distros, like ubuntu See here: http://www.debian.org/security/2008/dsa-1571
Your 7.10 distro will have this horrible flaw, and possibly many other security holes open as well).

7.10 may no longer be supported.
6.06LTS (Long Term Support) is good for another few months IIRC, and I think 8.04 also has LTS. I am using 8.04.1 - it is OK.

Quote:
The only downside is that I won't be able to go onto the internet with any of my Live DVDs/CDs anymore, as they will presumably also require the correct driver, and cannot use the one I installed for Ubuntu
Well you can: just follow the steps in bgeddy's post @ #36. You already have a copy of the realtek module sourcecode, it just needs compiling and installing (each time you boot - boring, I know) for each live distro, untiil the distro-builders wake up to your hardware.

Don't forget my earlier post - NICs are cheap (£12?). If the hardware is driving you mad, you are free to change it!
Quote:
Slightly off-topic: If I now install applications.... [snip]
You obviously aren't yet quite used to how beautifully linux works with a fast internet connection: Just download the latest stable whatever. Clicky Clicky Zap Done

Have fun, and thanks for your patience. We have both learnt new things.
 
Old 09-12-2008, 03:24 AM   #44
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
Academically, I'm still not sure whether it was installing the new driver that did the trick, or typing in your "sudo dhclient eth0" command. I think I'll print out the whole of this thread and keep it for future reference, as I did with the "Putting your home on a separate partition" thread you helped me with earlier in the year.

But I shall go online this weekend and have a look through the updates. I also might download a couple of games that feature in the Linux magazines now I've got the bandwidth for it.

Thanks again to you and bgeddy for the help given.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembler Compatible Not Binary Compatible, Linux btbx Programming 1 09-22-2007 06:17 PM
Cannot find compatible driver--T-Mobile GC89 broadband card?? jerrynewt Linux - Laptop and Netbook 2 01-23-2007 02:10 PM
Linux DSL/cable/broadband compatible modems pantherlehr Linux - Hardware 8 11-28-2006 03:34 AM
Can anyone tell me if any version of Linux is compatible with broadband cable? 212790 Linux - General 5 09-28-2005 12:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration