Home > Hosting > Server

What does bogon mean in linux?

2023-11-20 14:38:02

Designed for programming, automatic code writing robot, free to open. This article mainly introduces the knowledge about what bogon refers to in linux. Xiaobian shows you the operation process through practical cases. The operation method is simple, fast and practical. I hope this article about bogon in linux can help you solve the problem.

In linux, bogon is the host name; When the HOSTNAME is bogon, it refers to the address that should not appear in the internet routing table, including private addresses and addresses that have not been officially allocated. You can use hostnamectl to check that the host name is bogon, and you can use vi /etc/sysconfig/network to modify the host name.

Operating environment of this tutorial: linux7.3 system and Dell G3 computer.

What does bogon mean in linux? bogon is the host name.

Use hostname to view the current hostname.

Modify HOSTNAME= in vi /etc/sysconfig/network.

Must be restarted to take effect.

Bogon refers to those addresses that should not appear in the internet routing table.

These addresses should include:

1. The private address is 10,172.16-32,192.168. .....

2, the address that has not been officially allocated.

Check with hostnamectl, the host name is bogon.

[root@bogon ~]# cat /etc/resolv.conf

It is found that there is an extra line of search localdomain, which should be caused by the configuration of this line. The configuration in resolv.conf is automatically issued by vmware 8 network card, so it is useless to change the configuration here.

Parse the IP address: check which installation package the nslookup command comes from.

[root@bogon ~]# yum provides */nslookup

[root@bogon ~]# yum -y install bind-utils

The configuration description of this block is to analyze the IP address of the host after loading the configuration file, and the returned domain name is echoed to the command line as the host name to try to analyze the local IP.

The IP address of this machine is resolved to bogon, which means that if the search localdomain is configured in resolv.conf, the host name obtained here takes precedence over the configuration in the hosts and network files.

To solve this problem, the simplest solution is to resolve it without going through dns, and use the hosts file to directly resolve the IP address of this machine to your host name (not localhost).

That's all for what bogon means in linux. Thank you for reading. If you want to know more about the industry, you can pay attention to the Yisu cloud industry information channel, and Xiaobian will update different knowledge points for everyone every day.

Ask AI for details


Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us