troubleshooting Question

localhost mapped to incorrect ip address

Avatar of deadlock_
deadlock_ asked on
Unix OS
5 Comments1 Solution799 ViewsLast Modified:
Hi

I have a strange problem on my OpenBSD box.
localhost seem to be mapped to an incorrect ip address. (or for some
other reason)


# ping localhost
PING localhost.rby.se (85.228.196.87): 56 data bytes
--- localhost.rby.se ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss


So localhost gets expanded to localhost.rby.se (rby.se is my domain)
Then it seem to be resolved by the DNS. I am totally confused


I am thankful for any help


Below is the output from some standard commands:
# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33208
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:05:5d:0c:fd:e4
        groups: egress
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet6 fe80::205:5dff:fe0c:fde4%vr0 prefixlen 64 scopeid 0x1
        inet 192.168.0.5 netmask 0xffffff00 broadcast 192.168.0.255
enc0: flags=0<> mtu 1536


# cat /etc/hosts
#       $OpenBSD: hosts,v 1.11 2002/09/26 23:35:51 krw Exp $
#
# Host Database
#
# RFC 1918 specifies that these networks are "internal".
# 10.0.0.0      10.255.255.255
# 172.16.0.0    172.31.255.255
# 192.168.0.0   192.168.255.255
#
::1 localhost.rby.se localhost
27.0.0.1 localhost.rby.se localhost
::1 whiterussian.rby.se whiterussian
127.0.0.1 whiterussian.rby.se whiterussian


# cat /etc/hostname.vr0
dhcp


# cat /etc/hostname.lo0
127.0.0.1 localhost


# cat /etc/resolv.conf
nameserver 192.168.0.1


$ cat /etc/hosts
#       $OpenBSD: hosts,v 1.11 2002/09/26 23:35:51 krw Exp $
#
# Host Database
#
# RFC 1918 specifies that these networks are "internal".
# 10.0.0.0      10.255.255.255
# 172.16.0.0    172.31.255.255
# 192.168.0.0   192.168.255.255
#
::1 localhost.rby.se localhost
127.0.0.1 localhost.rby.se localhost
::1 whiterussian.rby.se whiterussian
127.0.0.1 whiterussian.rby.se whiterussian


Another thing. This error appeared on my fresh install.
During installation the network failed to configure because I was not
able to connect an ethernet cable to the computer.
I configued it afterwards by adding the hostname.* files.
It worked before the reinstall and my other computers
are able to ping localhost without problems.

Thankful for any help
/Jens
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros