Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-15-2005, 05:45 PM
|
#1
|
LQ Newbie
Registered: Sep 2003
Location: Easton, PA, US
Distribution: Fedora Core 3
Posts: 3
Rep:
|
NFS mount takes 6 seconds
I am running autofs on two Fedora Core 3 systems. (They were Mandrake 10.0 until recently. I was having problems with Mandrake so after a couple of years I punted.)
I have a problem which comes down to nfs mount taking too long. I never had this problem under Mandrake or any other variant but I'm disinclined to go back. Also, the only thing that changed was the distro. The firewall is unchanged (w/ fixed ports for NFS.) and the export and auto.* files are the same.
Running mount on the client under strace shows that it spends 6 seconds on the connect() to port 111 (portmapper) of the server.
Running mountd "-d all" on the server shows that the mount seems to happen in a flash (I don't know if this flash is at the beginning or the end of the 6 second wait on the client machine.)
The mount is eventually successful. It just takes way too long.
|
|
|
03-15-2005, 11:18 PM
|
#2
|
Member
Registered: Sep 2003
Location: Dallas, Tx, USA
Distribution: Red Hat, Gentoo, Libranet
Posts: 98
Rep:
|
From the symptoms, I strongly suspect a name resolution issue. I'm going to describe the stuff I look for on a Red Hat system. I've run RH 4.x up to 9.0, and the current RHEL stuff, but I haven't ever run Fedora. Some of these filenames may be off.
Run /sbin/ifconfig to get your IP address. (You can run all this stuff as an ordinary user, although you'll have to be root to edit any of the files.)
Check /etc/nsswitch.conf, and make sure the "hosts" line is appropriate (usually, it's "files dns").
Do a forward and backward check with "host". (I believe you can force it to use the hosts file (if present) with a "-n" option.)
Check /etc/hosts. You should have a 127.0.0.1 localhost loopback localhost.localdomain.
You should also have whatever hostname the machine has. You can either put it on the same line as the localhost stuff (that's what I normally do, especially with my laptop, since it's constantly in DHCP environments), or you can set it to your ethernet address, if that's predictable.
If you have DNS, and your machine is in it, do a forward and reverse lookup of DNS.
Oh, medium important - do this on BOTH machines - either one could be confused.
Look at your routing tables ("route -n"). (This presumes you know enough about networking to recognize weirdities, but if you don't, we'll burn that bridge when we get to it.)
Run "dmesg | grep eth", and see if you can see what speed your card(s) is running at. If that doesn't match the type of network you have, that could be the problem. (I don't think this one is very likely - that mismatch usually has little or no effect for small, infrequent network traffic (such as an NFS mount). It's on big transfers that it bites you. (Bites HARD, too!) You can also run mii-tool to get that info, if the stuff from the boot has rolled off the back end of dmesg.
Pretty much every time I've run into a mysterious network delay, where things eventually work, but take an unreasonable amount of time, it's been a name resolution issue.
Post the results, if/when you get it figured out - I'd be interested to know what it was. Feel free to post results and ask more questions here if I didn't go into enough detail. (If I went into too much, it was partly because I was also answering the next guy to come along...)
Hope this helps,
Charles Lacour
|
|
|
03-15-2005, 11:34 PM
|
#3
|
LQ Newbie
Registered: Mar 2005
Location: INDIA
Distribution: Fedora Core 3
Posts: 11
Rep:
|
Quote:
Originally posted by clacour
Check /etc/hosts. You should have a 127.0.0.1 localhost loopback localhost.localdomain.
You should also have whatever hostname the machine has.
|
would a /etc/hosts entry of the (yp)server required when I am doing nfs mounting using IPs only and not names ? name resolution would be a trouble, i guess, only when i use the name as in my-ypserver.mydomain.....
|
|
|
03-16-2005, 12:31 AM
|
#4
|
Member
Registered: Sep 2003
Location: Dallas, Tx, USA
Distribution: Red Hat, Gentoo, Libranet
Posts: 98
Rep:
|
Quote:
...when I am doing nfs mounting using IPs only and not names ? name resolution would be a trouble, i guess, only when i use the name as in my-ypserver.mydomain.....
|
The correct answer to that would be "Yes". Or "No". Or "Maybe". Or "it depends".
In theory, if you're specifying everything my IP address, name resolution shouldn't enter into it. In practice, especially because of security concerns, lots of programs will do things like a reverse name lookup. If your name-resolution stuff (hosts files, dns, yp, whatever) doesn't know that box, or (worse, sometimes) has wrong info, all kinds of weird stuff can happen.
I honestly don't know how NFS handles such things - the "6 seconds" stuff caught my eye, and that's why I responded.
|
|
|
03-16-2005, 11:12 AM
|
#5
|
LQ Newbie
Registered: Mar 2005
Location: INDIA
Distribution: Fedora Core 3
Posts: 11
Rep:
|
Thanks clacour for ur enthusiasm to help and time That was detailed stuff u said up there!
|
|
|
03-16-2005, 10:34 PM
|
#6
|
LQ Newbie
Registered: Sep 2003
Location: Easton, PA, US
Distribution: Fedora Core 3
Posts: 3
Original Poster
Rep:
|
In which I admit to being a dope
Every test of the mounting process on both sides worked and showed no problems. (Host, by the way, on my system only searches DNS in which only the servers are listed, but both are also in each others host files.)
The actual problem was that I had the following lines in my iptables files
-A INPUT -p tcp -m tcp --tcp-flags SYN,ACK,RST SYN -j SYN-FLOOD
-A INPUT -p tcp -m tcp -m state ! --tcp-flags SYN,ACK,RST SYN --state NEW -j DROP
-A SYN-FLOOD -m limit --limit 1/second --limit-burst 4 -j RETURN
-A SYN-FLOOD -j DROP
Which I guess I stuck in a couple of years ago. The idea is to inhibit a DoS attack. So these lines dropped packets that were part of the portmapper/NFS negotiation. This significantly extended the negotiation as some packets had to be resent. Actually, this problem probably also explains the problems I was having with Mandrake. Oh well, there are some things I like better about both systems. Not going back now.
Thank you for your detailed response. It helped me get to the bottom of this.
|
|
|
All times are GMT -5. The time now is 05:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|