DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th October 2016
sag sag is offline
New User
 
Join Date: Jan 2016
Posts: 4
Default Name resolution problem with /etc/hosts entry

My lpd printing setup, which has always worked until today and which I haven't changed, all of a sudden isn't connecting because the name of my network printer isn't being resolved from its entry in /etc/hosts.
Code:
> ping netlaser
PING netlaser (198.105.254.130): 56 data bytes

> ping 192.168.1.74
PING 192.168.1.74 (192.168.1.74): 56 data bytes
64 bytes from 192.168.1.74: icmp_seq=0 ttl=255 time=86.315 ms
64 bytes from 192.168.1.74: icmp_seq=1 ttl=255 time=2.924 ms
64 bytes from 192.168.1.74: icmp_seq=2 ttl=255 time=3.785 ms
64 bytes from 192.168.1.74: icmp_seq=3 ttl=255 time=4.230 ms

> cat /etc/hosts
127.0.0.1	localhost puffy.my.domain
::1		localhost puffy.my.domain
192.168.1.74	netlaser

> ls -l /etc/hosts
-rw-r--r--  1 root  wheel  89 Jul 24  2015 /etc/hosts

> uname -a
OpenBSD puffy.my.domain 6.0 GENERIC.MP#2319 amd64
I dual-boot with FreeBSD, where I have the identical configuration, and I have no problem there with netlaser resolving to 192.168.1.74. How can I troubleshoot and solve?

Last edited by ocicat; 8th October 2016 at 05:45 AM. Reason: Please use [code] & [/code] tags when posting command output.
Reply With Quote
  #2   (View Single Post)  
Old 7th October 2016
da1 da1 is offline
Fdisk Soldier
 
Join Date: Feb 2009
Location: Berlin, DE
Posts: 49
Default

Hi,

Paste the content of your /etc/resolv.conf pls.
Reply With Quote
  #3   (View Single Post)  
Old 7th October 2016
sag sag is offline
New User
 
Join Date: Jan 2016
Posts: 4
Default

Thank you for the pointer in the right direction.
Code:
> cat /etc/resolv.conf
# Generated by iwn0 dhclient
search attlocal.net
nameserver 192.168.1.254
Since I've never had to look at the contents of this file before, I don't know whether the search attlocal.net line has always been there or whether its inclusion is a recent change to the DHCP lease I get from my provider (AT&T U-verse). Anyway, I referred to the resolv.conf man page and created resolv.conf.tail
Code:
> cat /etc/resolv.conf.tail
lookup	file bind
Upon reboot, my print job from yesterday emerged from the printer lickety-split.
Code:
> ping netlaser
PING netlaser (192.168.1.74): 56 data bytes
64 bytes from 192.168.1.74: icmp_seq=0 ttl=255 time=3.169 ms
64 bytes from 192.168.1.74: icmp_seq=1 ttl=255 time=4.392 ms
64 bytes from 192.168.1.74: icmp_seq=2 ttl=255 time=4.985 ms
64 bytes from 192.168.1.74: icmp_seq=3 ttl=255 time=4.790 ms
--- netlaser ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 3.169/4.334/4.985/0.706 ms
All is well. Thanks again.

Last edited by ocicat; 7th October 2016 at 11:18 PM. Reason: Please use [code] & [/code] tags when posting command output.
Reply With Quote
  #4   (View Single Post)  
Old 10th October 2016
da1 da1 is offline
Fdisk Soldier
 
Join Date: Feb 2009
Location: Berlin, DE
Posts: 49
Default

You can also just append "lookup file bind" to your /etc/resolv.conf. This was btw what I was aiming for
Reply With Quote
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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hosts.allow and hosts.deny amrogers3 OpenBSD Security 10 10th November 2011 11:28 AM
ATI Radeon HD 6250 1366x768 resolution problem Mako_Elite OpenBSD General 6 26th March 2011 07:11 PM
Xorg + Xfce4 resolution problem sniper007 FreeBSD General 4 30th April 2009 04:38 PM
Resolution problem.. PCBSD3000 FreeBSD General 5 13th April 2009 07:56 PM
Console Resolution Problem kienjakenobi FreeBSD General 19 12th September 2008 12:20 PM


All times are GMT. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick