public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.]
@ 2010-10-13 13:50 daid kahl
  2010-10-13 14:59 ` Alan McKinnon
  0 siblings, 1 reply; 7+ messages in thread
From: daid kahl @ 2010-10-13 13:50 UTC (permalink / raw
  To: gentoo-user

On 13 October 2010 22:38, daid kahl <daidxor@gmail.com> wrote:
>> On 10/11/2010 11:38 PM, daid kahl wrote:
>>
>>> However, I noticed that logins, su, and sudo are all responding
>>> slowly.  This was all fixed and fine once I updated my configuration
>>> files, but this week it's acting up again.  Before it was just su and
>>> sudo that I noticed as slow (authentication takes around 20 seconds).
>>> But now even logins are delayed (xdm or command line).
>
> On 13 October 2010 07:12, walt <w41ter@gmail.com> wrote:
>>
>> Whenever I see something that eventually works, but only after a long
>> delay, I think of DNS problems.
>>
>> Who might be doing a nonsensical DNS lookup, I have no idea.  But you
>> might consider running a packet sniffer (wireshark, etc) while logging
>> in or doing an su.  Are you running your own local name server?
>
> Very very intersting!!
>
> The main correlation I've seen so far is with dhcpcd.  Sometimes at my
> work I get a 192. IP (which doesn't work), and other times I get a
> 133. IP (which is correct).  In fact, sometimes dhcp is giving me an
> IP address and resolv.conf related to a university I was visiting like
> a month ago.
>
> In other words, I know I have some networking problems, but I was
> reluctant to imagine it was at all related to this login problem, even
> though I had some basic empirical data on it.
>
> Anyway, it happened again tonight, and it was resolved after I did
> some of the same emerges as before, but I think that might be just
> chance.
>
> I look into the DNS stuff.  Thanks for the sanity check!
>
> ~daid
>
> PS: Sorry for the initial top posting on myself...
>

I've been having some networking problems lately, and apparently it's
mucking up my logins and things like sudo sometimes as well.  Thanks
to Walt for telling me these two problems might be related.

I'm on a MacBook, and I wouldn't say this is the first time I've had
networking issues, but the hardware may not be at all the problem.

At home I use wireless and NetworkManager for that.  This is because
I've never managed to get wicd working correctly for my wireless.
Just tonight I had to stop dhcpcd for NM to actually connect.  Maybe
this is normal, I kind of forget how I hack things sometimes, though.

At work I'm using DHCP, and the nameserver is controlled by the
network.  In that case, if I reboot, I (sometimes) get a correct IP.
Normally I'm on top of what's controlling what, but I'm more confused
these days.  I can't tell if it's done by net, or dhcpd or what, since
restarting them doesn't usually reboot net.eth0.  Sometimes I get wicd
working on it.  It's kind of a mess!

Very curiously, as in my previous post I mentioned, sometimes I'm
getting resolv.conf for a university I visited like last month.  Why
or how that would happen I don't know.  It's some config problem?  I
need to dig through everything, since sometimes at the university I
statically connect, but I'm pretty sure all those are commented out.
Why it will assign me up to three different nameservers, seemingly
randomly, for ethernet, I can't understand.

So, firstly I'll need some troubleshooting.  I already have wireshark
installed, so that could be helpful.

I guess what might be helpful right now is how to purge my networking
stuff and just start it all from scratch.  There is so much garbage
installed right now so I can hack it together that it's just a mess
(this happened because I can get it to function eventually, yuck).

Cheers,
daid



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.]
  2010-10-13 13:50 DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.] daid kahl
@ 2010-10-13 14:59 ` Alan McKinnon
  2010-10-13 16:40   ` Neil Bothwick
  0 siblings, 1 reply; 7+ messages in thread
From: Alan McKinnon @ 2010-10-13 14:59 UTC (permalink / raw
  To: gentoo-user; +Cc: daid kahl

Apparently, though unproven, at 15:50 on Wednesday 13 October 2010, daid kahl 
did opine thusly:

> I guess what might be helpful right now is how to purge my networking
> stuff and just start it all from scratch.  There is so much garbage
> installed right now so I can hack it together that it's just a mess
> (this happened because I can get it to function eventually, yuck).


Some tips that will get you sorted about 19 times out of 20:

Yes, purge all the /etc/init/net.<interface> stuff. I've yet to get that 
method to work on notebooks, which can be anywhere anyplace when started up. 
That system is great for servers and desktops that don't move around, lousy 
for notebooks.

Dump NetworkManager. This too I never got to work reliably, if at all. It 
seems to want to hook into the distro default stuff, meaning /etc/init.d/net.* 
and has the same issues.

Use wicd. Really, use wicd.

All your problems will just magically go away. It is designed to do what 
notebooks need done - dynamically connect to the best network connection at 
any given time. It's highly scriptable too.

The number of people here over the years complaining about nm is obscene. 
The number of people here over the years complaining about wicd is close to 0.

Seriously, just use wicd, dump the rest.

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.]
  2010-10-13 14:59 ` Alan McKinnon
@ 2010-10-13 16:40   ` Neil Bothwick
  2010-10-13 17:17     ` Paul Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Bothwick @ 2010-10-13 16:40 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

On Wed, 13 Oct 2010 16:59:25 +0200, Alan McKinnon wrote:

> Seriously, just use wicd, dump the rest.

+1


-- 
Neil Bothwick

Is that "woof" feed me; "woof" walk me; "woof" there's a burglar? What??

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.]
  2010-10-13 16:40   ` Neil Bothwick
@ 2010-10-13 17:17     ` Paul Hartman
  2010-10-13 17:30       ` Willie Wong
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Hartman @ 2010-10-13 17:17 UTC (permalink / raw
  To: gentoo-user

On Wed, Oct 13, 2010 at 11:40 AM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Wed, 13 Oct 2010 16:59:25 +0200, Alan McKinnon wrote:
>
>> Seriously, just use wicd, dump the rest.
>
> +1

Call me old-fashioned, I use wpa_supplicant. :)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.]
  2010-10-13 17:17     ` Paul Hartman
@ 2010-10-13 17:30       ` Willie Wong
  2010-10-13 19:00         ` Paul Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Willie Wong @ 2010-10-13 17:30 UTC (permalink / raw
  To: gentoo-user

On Wed, Oct 13, 2010 at 12:17:02PM -0500, Paul Hartman wrote:
> On Wed, Oct 13, 2010 at 11:40 AM, Neil Bothwick <neil@digimed.co.uk> wrote:
> > On Wed, 13 Oct 2010 16:59:25 +0200, Alan McKinnon wrote:
> >
> >> Seriously, just use wicd, dump the rest.
> >
> > +1
> 
> Call me old-fashioned, I use wpa_supplicant. :)

Actually, I'll call you confused :)

Comparing wpa_supplicant and wicd is comparing the apples to, uh, pig,
I guess. wpa_supplicant provides the user-end of the WPA
authentication process; wicd provides a system of managing networks.
In fact, wicd calls wpa_supplicant on networks encrypted that way. 

It would be more proper for you to say (if it is true), that you
prefer to issue the '/etc/init.d/net.something start' commands by
hand. That will make you properly curmudgeonly. 

I was that way once. But after using one flaky network too many
(it is mighty annoying to have to open a console and type
'/etc/init.d/net.eth1 restart' every five minutes), I've since
converted to wicd too. 

HTH,

W
-- 
Willie W. Wong                                     wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
         et vice versa   ~~~  I. Newton



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.]
  2010-10-13 17:30       ` Willie Wong
@ 2010-10-13 19:00         ` Paul Hartman
  2010-10-14 12:52           ` Mick
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Hartman @ 2010-10-13 19:00 UTC (permalink / raw
  To: gentoo-user

On Wed, Oct 13, 2010 at 12:30 PM, Willie Wong <wwong@math.princeton.edu> wrote:
> On Wed, Oct 13, 2010 at 12:17:02PM -0500, Paul Hartman wrote:
>> On Wed, Oct 13, 2010 at 11:40 AM, Neil Bothwick <neil@digimed.co.uk> wrote:
>> > On Wed, 13 Oct 2010 16:59:25 +0200, Alan McKinnon wrote:
>> >
>> >> Seriously, just use wicd, dump the rest.
>> >
>> > +1
>>
>> Call me old-fashioned, I use wpa_supplicant. :)
>
> Actually, I'll call you confused :)

You are probably right. :) In my brain I was only thinking about
wireless networks. It never occurred to me to need network management
for wired connections as well (I've never had any need for it so it
didn't enter my mind).

All I've ever done with wired network is enable dhcp in
/etc/conf.d/net and install ifplugd. For wireless I enable
wpa_supplicant module in /etc/conf.d/net and add the networks either
manually to the config file or by using wpa_supplicant's GUI for
scanning, adding and editing the defined networks. Everything starts
automatically when I turn on my computer and connects automatically. I
don't do any /etc/init.d/net.xxx stuff manually at all.

That was probably the recommended way to config back in 2003-2004 when
I set up my Gentoo machines and I've never had any reason to change it
since it keeps working. So that's why I called myself old-fashioned.

I've never used wicd or networkmanager and I suppose I've been lucky
to not encounter the problems that you guys have. I will keep it in
mind if my luck changes for the worse in the future. :)

Thanks
Paul



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.]
  2010-10-13 19:00         ` Paul Hartman
@ 2010-10-14 12:52           ` Mick
  0 siblings, 0 replies; 7+ messages in thread
From: Mick @ 2010-10-14 12:52 UTC (permalink / raw
  To: gentoo-user

On 13 October 2010 20:00, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> On Wed, Oct 13, 2010 at 12:30 PM, Willie Wong <wwong@math.princeton.edu> wrote:
>> On Wed, Oct 13, 2010 at 12:17:02PM -0500, Paul Hartman wrote:
>>> On Wed, Oct 13, 2010 at 11:40 AM, Neil Bothwick <neil@digimed.co.uk> wrote:
>>> > On Wed, 13 Oct 2010 16:59:25 +0200, Alan McKinnon wrote:
>>> >
>>> >> Seriously, just use wicd, dump the rest.
>>> >
>>> > +1
>>>
>>> Call me old-fashioned, I use wpa_supplicant. :)
>>
>> Actually, I'll call you confused :)
>
> You are probably right. :) In my brain I was only thinking about
> wireless networks. It never occurred to me to need network management
> for wired connections as well (I've never had any need for it so it
> didn't enter my mind).
>
> All I've ever done with wired network is enable dhcp in
> /etc/conf.d/net and install ifplugd. For wireless I enable
> wpa_supplicant module in /etc/conf.d/net and add the networks either
> manually to the config file or by using wpa_supplicant's GUI for
> scanning, adding and editing the defined networks. Everything starts
> automatically when I turn on my computer and connects automatically. I
> don't do any /etc/init.d/net.xxx stuff manually at all.

Same here and no, I would not call you confused at all.

The wpa_supplicant *gui* does what NM/wicd do with wireless networks,
albeit less glamorously.

BTW, configuring /etc/wpa_supplicant/wpa_supplicant.conf for your
known/permanent APs is not really difficult, when using the well
commented example file as a guide. /etc/init.d/net is also relatively
easy to configure for using arp with particular subnets.

Now, about being old fashioned ... hmmm ...

PS.  For the avoidance of doubt, I'm not advocating that everyone
*must* use the existing /etc/init.d/ scripts instead of NM/wicd - just
choose what suits you best - this is Gentoo after all.  :-)
-- 
Regards,
Mick



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-14 12:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-13 13:50 DNS Issues [Was: [gentoo-user] Re: Slow Login, Sudo, etc.] daid kahl
2010-10-13 14:59 ` Alan McKinnon
2010-10-13 16:40   ` Neil Bothwick
2010-10-13 17:17     ` Paul Hartman
2010-10-13 17:30       ` Willie Wong
2010-10-13 19:00         ` Paul Hartman
2010-10-14 12:52           ` Mick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox