satelliteuser083 0 Report post Posted June 18, 2008 My wife's Acer, running 2007, keeps losing the DNS-server details on boot (maybe at other times also, but I haven't noticed this yet). This means that, although the network-icon says that the network is UP, the latter is actually DOWN - or, at least, no internet connection is possible. I can't understand this; my Thinkpad, using the same OS, works perfectly in this respect, and I'm pretty sure that I set up the LAN in the same way on both machines. Does anyone know of a solution to this problem? It occurred to me that it might be possible to put some commands in /etc/rc.local, but I'd need further help there, if it were. Thanks. [moved from Software by spinynorman] Quote Share this post Link to post Share on other sites
ianw1974 11 Report post Posted June 18, 2008 How is the machine getting it's IP address? Is it getting it via DHCP? Is the DHCP server also giving the DNS address as well? Or not? What filesystem is the laptop using? If ext3, you can run the chattr command on the /etc/resolv.conf file to stop any changes being made to it. Then, your DNS entries will remain. I have a feeling something is changing it, and it's obviously happening at boot up. Once we understand the network config a little more, we can find out why and fix it. Quote Share this post Link to post Share on other sites
{BBI}Nexus{BBI} 2 Report post Posted June 18, 2008 (edited) I have the same problem with PClinuxOS when I use a fixed ip. It used to work fine, then all of a sudden it started losing the dns settings. I switched back to auto and it's been fine so far. @ianw1974: Can you elaborate on using the chattr command please? Edited June 18, 2008 by {BBI}Nexus{BBI} Quote Share this post Link to post Share on other sites
ianw1974 11 Report post Posted June 18, 2008 For ext2/ext3 filesystems: chattr +i /etc/resolv.conf will lock the file so that it doesn't get overwritten by some other process. I'd usually try to find the process that was doing it. In Mandriva 2008 there was some comments in the /etc/resolv.conf telling you not to edit anything there, because a service would change and reset it again. This was because of a package called resolvconf, and therefore just simple to remove this package to stop it from happening. Although, I'm unsure if this is the same case here. I'd only lock the file last as a last resort to finding what was doing it. Quote Share this post Link to post Share on other sites
{BBI}Nexus{BBI} 2 Report post Posted June 18, 2008 Thanks :) Quote Share this post Link to post Share on other sites
ianw1974 11 Report post Posted June 18, 2008 No probs Quote Share this post Link to post Share on other sites
satelliteuser083 0 Report post Posted June 19, 2008 I've had to use 'static' for the IP address, because no IP can be detected when DHCP is set. I'm currently in central Italy, where our broadband is provided by a somewhat unreliable and slow radio-link (ADSL, I think), which may account for the DCHP problem but shouldn't have anything to do with the DNS-server loss (or perhaps that's wrong :unsure: ). Anyway, I've tried your 'chattr -i /etc/resolv.conf' suggestion, but it didn't work; the file was overwritten at the next boot. The filesystem is ext3, BTW. PS: man chattr states A file with the ‘i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute. ; perhaps that's the cause of the overwrite?? Quote Share this post Link to post Share on other sites
ianw1974 11 Report post Posted June 19, 2008 If you are using DHCP, then it would overwrite /etc/resolv.conf. What desktop are you using? Gnome? KDE? Do you have NetworkManager packages installed for Gnome/KDE? If so, this will explain your problem even if you have configured static IP. I had the same problem with NetworkManager installed. rpm -qa | grep -i networkman and see what results come back? If not, then there must be something else with your network config screwing up the /etc/resolv.conf file. Quote Share this post Link to post Share on other sites
satelliteuser083 0 Report post Posted June 19, 2008 A bit of crossover there :mellow: . I'm using kde and a search revealed that networkman is NOT installed. Quote Share this post Link to post Share on other sites
scarecrow 0 Report post Posted June 19, 2008 There is not much one can do with several Italian ISP's (and FastWeb in particular). You will never have a proper IP, and the DNS server will be lost now and then. Maybe try using some other DNS server, e.g. OpenDNS, but this will not cure the issue 100%. It's the way their networks in the big cities are constructed. Quote Share this post Link to post Share on other sites
ianw1974 11 Report post Posted June 19, 2008 Perhaps I wrote it wrong, chattr +i /etc/resolv.conf my first one took the attribute off as I used a - minus, therefore try with the + to activate it. I've amended my above post, so this one now becomes irrelevant!! :D Quote Share this post Link to post Share on other sites
satelliteuser083 0 Report post Posted June 19, 2008 Thanks for the info, scarecrow, I've suspected for some time that this network operates differently to my British one; just have to live with fallouts, I suppose. Many thanks, Ian, for the correction (should have seen it myself :unsure: ); have now booted/restarted the system 5 times and, joy oh joy, the network now comes up correctly each time. Great !! Just hope that it stays that way. :thumbs: Quote Share this post Link to post Share on other sites
ffi 0 Report post Posted June 19, 2008 on 2008.1 there is a bug, don't know about 2007.1 though, with some cards and dhcpclient, maybe try another dhcp client (dhcp pump or dhcppcd) look under the network options for the network device.... Quote Share this post Link to post Share on other sites