LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-27-2010, 07:49 AM   #1
im1crazyassmofo
Member
 
Registered: Jan 2003
Distribution: Slackware/Debian
Posts: 91

Rep: Reputation: 15
Network very slow if static ip settings but fine with DHCP


I've been using slackware for many years. I think I started with Slack 8. I know how to configure the network, I've had this same POS Dell computer for a few years now but the other day I tried to go to a different distro (first mistake) everything worked fine but it was not for me. Once you go slack you never go back! Anyway I had slack on here prior to the change and it all worked fine. I'm running slack 13 and all of a sudden my network is slow as balls! I set it up as I always have so I did some research and tried a few things, nothing worked. So i enabled DHCP and its fine now.. I have a dell xps 420. onboard intel nic. worked fine when i first installed slack 13. Anyone have any clue what to do? I would like my static IP on this machine.
 
Old 01-27-2010, 08:29 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Well, you didn't mention what you're using for an internet connection -- got a router, doing dial-up, connected directly to the NIC?

But this kinda sounds like maybe you haven't got DNS server entries in /etc/resolv.conf?

I've been using fixed-IP forever (and have no intent to ever switch); I have a DSL modem connected to a Linsys 4-port router and all my systems are fixed-IP. They all have entries in /etc/hosts of this form:
Code:
# For loopbacking.
127.0.0.1               localhost
192.168.1.10            fubar.com fubar
192.168.1.15            InkJet
192.168.1.20            snafu.com snafu
192.168.1.30            pita.com pita
They all talk to the world and to each other with zero problems (and they all send print jobs to "InkJet" with CUPS).
Here's the relevant entries from /etc/rc.d/rc.inet1.conf (the examples at the bottom are all commented-out so they're not in this list):
Code:
# Config information for eth0:
IPADDR[0]="192.168.1.10"      
NETMASK[0]="255.255.255.0"    
USE_DHCP[0]=""                
DHCP_HOSTNAME[0]=""           

# Config information for eth1:
IPADDR[1]=""                  
NETMASK[1]=""                 
USE_DHCP[1]=""                
DHCP_HOSTNAME[1]=""           

# Config information for eth2:
IPADDR[2]=""                  
NETMASK[2]=""                 
USE_DHCP[2]=""                
DHCP_HOSTNAME[2]=""           

# Config information for eth3:
IPADDR[3]=""                  
NETMASK[3]=""                 
USE_DHCP[3]=""                
DHCP_HOSTNAME[3]=""           

# Default gateway IP address:
GATEWAY="192.168.1.1"        

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.                                        
DEBUG_ETH_UP="no"
Hope this helps some.
 
Old 01-28-2010, 08:00 AM   #3
im1crazyassmofo
Member
 
Registered: Jan 2003
Distribution: Slackware/Debian
Posts: 91

Original Poster
Rep: Reputation: 15
I checked those two files and everything is OK. I'm using a cable modem hooked up to a Linksys wireless router. This machine is wired though. I've been trying to fix this for awhile. Today DHCP was not working. It was very slow so now I'm really confused.
 
Old 01-28-2010, 09:09 AM   #4
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Rep: Reputation: 20
I saw the same symptoms once, which turned out to be a DNS related issue. Is there a difference in DNS between static and DHCP?
 
Old 01-28-2010, 11:28 AM   #5
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Well, a difference is that static IP doesn't wipe out /etc/resolv.conf. You have to prevent that with DHCP by removing the comment-out # in /etc/inent1.conf on the line
Quote:
#DHCP_KEEPRESOLV[4]="yes" # If you dont want /etc/resolv.conf overwritten
Otherwise, if you ever start up DHCP, your /etc/resov.conf will be wiped out.

You know, another thing might be if you're using the router as a DNS server; they sorta-kinda will for a while then they tend to not want to work any more. My ISP provides two DNS server addresses (that I keep in /etc/resolv.conf); if yours does not, I would highly recommend that you find at least two open DNS servers and stick 'em in /etc/resolv.conf (and do the DHCP thing above). Someplace like http://www.dnsserverlist.org provides a list and you want to ping 'em to find two that are electrically close to you. You want to use two in case one of them is not available every so often. For example, two arbitrarily picked from the list would look like this in /etc/resolv.conf:
Code:
search com
nameserver 64.81.79.2
nameserver 69.111.95.106
The above is what you'll get if you define a nameserver address when running netconfig.
 
Old 01-29-2010, 06:55 AM   #6
im1crazyassmofo
Member
 
Registered: Jan 2003
Distribution: Slackware/Debian
Posts: 91

Original Poster
Rep: Reputation: 15
Seems to be working now... I did the first step there a few days ago, and the second step I also did but before but I must have been using a slow dns server. dnsserverlist.org worked great! I put their recommended servers in and walla!

Thanks alot for the help.
 
Old 01-29-2010, 07:05 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by im1crazyassmofo View Post
dnsserverlist.org worked great! I put their recommended servers in and walla!
Your ISP's DNS servers should (TM) be faster than third party's DNS servers because they are closer in network terms.

You could modify the script in this LQ post to measure the response time of whichever DNS servers you use (including your ISP's).

If your ISP's DNS servers are erratic, you could use dnsmsq; it can be configured to use many DNS servers; at start up it tests the response time of them all; log inspection shows it then switches servers dynamically, presumably to use the current fastest.
 
  


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
Slackware 12.1 with Static IP behind DHCP router resolves DNS verrrry slow. Help? skelter42 Slackware 11 09-25-2009 08:48 PM
setting up DHCP from a static network vj2k Linux - Networking 4 08-05-2006 03:36 AM
Static Network settings scott4957 Linux - Wireless Networking 2 11-16-2005 09:58 AM
how to config. network settings for having a static ip with a router kkeith Linux - Newbie 2 10-19-2005 05:00 AM
Network Changes from Static to DHCP RemusX2 Linux - Networking 5 06-15-2005 01:15 PM

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

All times are GMT -5. The time now is 04:39 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