"Linux" SOLARIS10 Configure host name hostname to resolve hostname as unknown problem

Source: Internet
Author: User
1. The phenomenon of problems


Host name (hostname) is displayed as unknown


2. How to Solve


My environment is for unknown, one is not set host name, two are using DHCP assigned IP mode

The workaround steps are described below:


First procedure: Modifying the hostname configuration file and creating a new node file


Vi/etc/hosts

bash-3.00# cat/etc/hosts
#
# Internet Host Table
#
:: 1 localhost
127.0.0.1 localhost
192.168.1.111 Devin-wu-svr # Added by DHCP


Vi/etc/nodename

Vi/etc/hostname.e1000g0

bash-3.00# Cat/etc/nodename
Devin-wu-svr
Vi/etc/hostname.e1000g0

bash-3.00# cat/etc/hostname.e1000g0
Devin-wu-svr


Second procedure: Configuring a network gateway, default route

Vi/etc/netmasks

bash-3.00# Cat/etc/netmasks
#
# The Netmasks file Associates Internet Protocol (IP) address
# Masks with IP network numbers.
#
# Network-number Netmask
#
# The term network-number refers to a number obtained from the Internet network
# information Center.
#
# Both The Network-number and the netmasks are specified in
# "Decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
192.168.1.0 255.255.255.0

Vi/etc/defaultrouter

bash-3.00# Cat/etc/defaultrouter
192.168.1.1


The third process: Reboot reboot the system to make it effective.


References: http://www.linuxdiyf.com/viewarticle.php?id=106062

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.