Is 'staging' a reserved LAN hostname?

Issues related to configuring your network
Post Reply
rothmail
Posts: 40
Joined: 2005/12/27 06:33:34
Location: New York City metro area

Is 'staging' a reserved LAN hostname?

Post by rothmail » 2018/03/08 09:03:37

I created an instance of CentOS 7.4 with KVM. This is on a LAN, so the domain names are only local for the LAN. Since this KVM instance is for staging, I decided to give it a hostname of staging. However, I am unable to get this to be recognized on the LAN.

I suspected it might be the hostname so I changed it to foobaz and it worked. I then changed it back to staging and that doesn't work. Here is my shell session.

Q: Is staging a reserved or restricted LAN hostname? If so, where is this stored and what other names might there be?

Q: Could this have anything to do with the Actiontech Router itself? That it has an issue with a hostname of staging?

Code: Select all

[root@myhost ~]# ping foobaz
PING foobaz.home (192.168.1.12) 56(84) bytes of data.
64 bytes from foobaz.home (192.168.1.12): icmp_seq=1 ttl=64 time=0.196 ms
64 bytes from foobaz.home (192.168.1.12): icmp_seq=2 ttl=64 time=0.215 ms
^C
--- foobaz.home ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.196/0.205/0.215/0.017 ms
[root@myhost ~]# ssh root@foobaz
root@foobaz's password: 
Last login: Thu Mar  8 03:20:00 2018 from myhost.home
[root@foobaz ~]# hostname
foobaz
[root@foobaz ~]# hostnamectl
   Static hostname: foobaz
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4c46dc4edca649fc83ff2d7aabe877c9
           Boot ID: 1c79030162d74a099f4241a531257ad7
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.17.1.el7.x86_64
      Architecture: x86-64
[root@foobaz ~]# hostnamectl set-hostname staging
[root@foobaz ~]# hostnamectl
   Static hostname: staging
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4c46dc4edca649fc83ff2d7aabe877c9
           Boot ID: 1c79030162d74a099f4241a531257ad7
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.17.1.el7.x86_64
      Architecture: x86-64
[root@foobaz ~]# hostname
staging
[root@foobaz ~]# reboot
Connection to foobaz closed by remote host.
Connection to foobaz closed.
[root@myhost ~]# ping staging
PING staging (92.242.140.21) 56(84) bytes of data.
^C
--- staging ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

[root@myhost ~]# host 92.242.140.21
21.140.242.92.in-addr.arpa domain name pointer unallocated.barefruit.co.uk.
[root@myhost ~]# ping foobaz
PING foobaz (92.242.140.21) 56(84) bytes of data.
^C
--- foobaz ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

[root@myhost ~]# ssh root@192.168.1.12
root@192.168.1.12's password: 
Last login: Thu Mar  8 03:24:12 2018 from myhost.home
[root@staging ~]# hostname
staging
[root@staging ~]# hostnamectl
   Static hostname: staging
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4c46dc4edca649fc83ff2d7aabe877c9
           Boot ID: 159e9b0e2f844e62b3220552dc5c68a1
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.17.1.el7.x86_64
      Architecture: x86-64
[root@staging ~]# ping staging
PING staging (92.242.140.21) 56(84) bytes of data.
^C
--- staging ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 5999ms
[root@staging ~]# ping staging
PING staging (92.242.140.21) 56(84) bytes of data.
64 bytes from unallocated.barefruit.co.uk (92.242.140.21): icmp_seq=1 ttl=246 time=35.0 ms
64 bytes from unallocated.barefruit.co.uk (92.242.140.21): icmp_seq=2 ttl=246 time=35.6 ms
64 bytes from unallocated.barefruit.co.uk (92.242.140.21): icmp_seq=3 ttl=246 time=35.3 ms
64 bytes from unallocated.barefruit.co.uk (92.242.140.21): icmp_seq=4 ttl=246 time=35.9 ms
64 bytes from unallocated.barefruit.co.uk (92.242.140.21): icmp_seq=5 ttl=246 time=35.6 ms
^C
--- staging ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 35.038/35.510/35.945/0.370 ms
[root@staging ~]# ping foobaz
PING foobaz (92.242.140.21) 56(84) bytes of data.
^C
--- foobaz ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

[root@staging ~]# [b]# Now to change it back to foobaz[/b]
[root@staging ~]# hostnamectl
   Static hostname: staging
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4c46dc4edca649fc83ff2d7aabe877c9
           Boot ID: 159e9b0e2f844e62b3220552dc5c68a1
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.17.1.el7.x86_64
      Architecture: x86-64
[root@staging ~]# hostnamectl set-hostname foobaz
[root@staging ~]# hostnamectl
   Static hostname: foobaz
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4c46dc4edca649fc83ff2d7aabe877c9
           Boot ID: 159e9b0e2f844e62b3220552dc5c68a1
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.17.1.el7.x86_64
      Architecture: x86-64
[root@staging ~]# hostname
foobaz
[root@staging ~]# reboot
Connection to 192.168.1.12 closed by remote host.
Connection to 192.168.1.12 closed.
[root@myhost ~]# ping foobaz
PING foobaz.home (192.168.1.12) 56(84) bytes of data.
64 bytes from foobaz.home (192.168.1.12): icmp_seq=1 ttl=64 time=0.299 ms
64 bytes from foobaz.home (192.168.1.12): icmp_seq=2 ttl=64 time=0.195 ms
64 bytes from foobaz.home (192.168.1.12): icmp_seq=3 ttl=64 time=0.163 ms
^C
--- foobaz.home ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 0.163/0.219/0.299/0.058 ms
[root@myhost ~]# [b]# It knows about foobaz now.[/b]
[root@myhost ~]# ssh root@foobaz
root@foobaz's password: 
Last login: Thu Mar  8 03:25:46 2018 from myhost.home
[root@foobaz ~]# hostnamectl
   Static hostname: foobaz
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4c46dc4edca649fc83ff2d7aabe877c9
           Boot ID: aca6a0d428e041c39f24edde921cf886
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.17.1.el7.x86_64
      Architecture: x86-64
[root@foobaz ~]# 

User avatar
TrevorH
Forum Moderator
Posts: 23500
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Is 'staging' a reserved LAN hostname?

Post by TrevorH » 2018/03/08 09:39:46

Just updating a hostname is not enough to also update DNS. What are you using as your DHCP server and DNS server?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

rothmail
Posts: 40
Joined: 2005/12/27 06:33:34
Location: New York City metro area

Re: Is 'staging' a reserved LAN hostname?

Post by rothmail » 2018/03/08 09:54:13

Thanks for your reply.

Since this is on the LAN, the Actiontec Router is acting as the DHCP server. The IP address for the router is 192.168.1.1.

Why would it work when the hostname is foobaz, but not when it is staging is very puzzling to me.

I'd be happy to include any configuration files or output of commands here.

Code: Select all

[root@foobaz network-scripts]# cat /etc/resolv.conf 
# Generated by NetworkManager
search home
nameserver 192.168.1.1

rothmail
Posts: 40
Joined: 2005/12/27 06:33:34
Location: New York City metro area

[SOLVED]Re: Is 'staging' a reserved LAN hostname?

Post by rothmail » 2018/03/08 17:13:08

It turns out it was the ActionTec router that was the issue. It still had the old IP address and name of staging from a previous CentOS version, and since I was unable to easily purge it, I did a factory reset/restore on the router. This cleared out anything, and it now works with the hostname of staging.

So the issue was the DHCP server, which was in the router. Thanks for your reply, it helped steer me in the right direction.

Post Reply