Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#367718 - 10/10/2016 14:43 Weird DHCP Resolve Issue
Tim
veteran

Registered: 25/04/2000
Posts: 1522
Loc: Arizona
This is baffling.

I have a CentOS 6.5 laptop, and everything was working great. The network was setup as DHCP, but the IP was very static (hasn't changed since I built the box). I had to remove it from the network, so I modified the IP to be static (for a trip).

I did hook it up to another network during my trip, but it worked fine.

Upon returning, I changed it back to DHCP, which gave me a new IP. However, now only root is able to resolve its hostname. From a regular user account, ping to its own hostname results in hostname not being found. The host file is set up with the new IP, hoping that was it. It can resolve other hostnames without a problem, just not its own. However, logging in as root allows it to resolve its own name.

It is really bizarre.

I did check resolve.conf and it is set up with read permissions for everybody.

Does anybody have any suggestions? I'm at a loss.

Thanks!
Tim

Top
#367721 - 10/10/2016 16:52 Re: Weird DHCP Resolve Issue [Re: Tim]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
What does your DHCP config file look like?

Top
#367722 - 10/10/2016 17:25 Re: Weird DHCP Resolve Issue [Re: canuckInOR]
Tim
veteran

Registered: 25/04/2000
Posts: 1522
Loc: Arizona
I can't get to the server DHCP config file (the server is owned by IT), so I don't know what that one looks like (if that is the file you are asking about). I'm not a networking guy, so I probably just don't know which file you mean.

One other weird thing I forgot to mention - when I got back, the Network Manager quit being able to talk to the DHCP server. The command line tools (ifconfig, ifup, ifdown) still work, so I disabled the manager.

The machines that weren't taken off the network have no problem resolving their hostname as a regular user.

These are the config files that I'm aware of:
/etc/sysconfig/network
Code:
NETWORKING=yes
HOSTNAME=a5303280
NTPSERVERARGS=iburst
GATEWAY=134.51.18.1
GATEWAYDEV=em1

/etc/sysconfig/network-scripts/ifcfg-em1
Code:
DEVICE=em1
TYPE=Ethernet
UUID=b5db4a96-fd99-4121-b6c6-c7ab10c8ce28
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System em1"
HWADDR=F0:1F:AF:46:33:F3
PEERDNS=yes
PEERROUTES=yes
DHCP_CLIENT_ID=a5303280
LAST_CONNECT=1474908533

[root@a5303280 dhcp]# ping a5303280
PING a5303280 (134.51.19.73) 56(84) bytes of data.
64 bytes from a5303280 (134.51.19.73): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from a5303280 (134.51.19.73): icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from a5303280 (134.51.19.73): icmp_seq=3 ttl=64 time=0.021 ms
^C
--- a5303280 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2309ms
rtt min/avg/max/mdev = 0.017/0.020/0.022/0.002 ms
[root@a5303280 dhcp]# exit
a5303280_jcats1231 23: ping a5303280
ping: unknown host a5303280

Thanks for helping.

Top
#367723 - 10/10/2016 18:40 Re: Weird DHCP Resolve Issue [Re: Tim]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
Looks like some config file is owned by root and not world-readable. If you can't find one by inspection, try "strace ping a5302380" (in a non-root account) and look for permission errors.

Peter

Top
#367724 - 10/10/2016 18:42 Re: Weird DHCP Resolve Issue [Re: Tim]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14472
Loc: Canada
Overriding NetworkManager is very difficult to do successfully, and this is likely the cause of the issue. Probably best to just restore it and let it do its thing.

I don't use Redhat/CentOS/Fedora -- personal preference: I find them to be user-hostile, and I gag at their package "management" system. smile But most distros have a checkbox for "Share this connection" or some such thing. Always check it.

Cheers

Top
#367725 - 10/10/2016 18:44 Re: Weird DHCP Resolve Issue [Re: Tim]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14472
Loc: Canada
The config file currently giving you grief is most likely something like /etc/resolv.conf or a file inside /etc/resolvconf/

Have a look in those places for permissions issues.

Top
#367726 - 10/10/2016 20:14 Re: Weird DHCP Resolve Issue [Re: peter]
Tim
veteran

Registered: 25/04/2000
Posts: 1522
Loc: Arizona
Well, that was absolutely bizarre. The strace showed errors opening /etc/hsots, but on another machine that works it didn't. The permissions and owners/groups for /etc/hosts were identical and I used the same account to do the ping from on each machine. Adding world +r to the broken machine's host file fixed the problem.

This machine is really afflicted, after this current project (2 weeks until the end), I am probably going to nuke and repave it. At the very least that will get Network Manager up and going again.

I do wish another distribution was an option.

Thanks for the tips.


Edited by Tim (10/10/2016 20:15)

Top