How to Configure a Host for Local Files Mode (System Administration Guide, Volume 3) (2024)

Use this procedure for configuring TCP/IP on a machine that runs in local files mode.

  • Become superuser and change to the /etc directory.

  • Type the host name of the machine in the file /etc/nodename.

    For example, if the name of the host is tenere, type tenere in the file.

  • Create a file named /etc/hostname.interface for each network interface.

    (The Solaris installation program automatically creates this file for the primary network interface.) Refer to "/etc/hostname.interface File" for details. If you are using IPv6, see "IPv6 Network Interface Configuration File".

  • Type either the interface IP address or the interface name in each /etc/hostname.interface file.

    For example, create a file named hostname.ie1, and type either the IP address of the host's interface or the host's name.

  • Edit the /etc/inet/hosts file to add:

    1. IP addresses that you have assigned to any additional network interfaces in the local machine, along with the corresponding host name for each interface.

      The Solaris installation program has already created entries for the primary network interface and loopback address.

    2. IP address or addresses of the file server, if the /usr file system is NFS mounted.

      Note -

      The Solaris installation program creates the default /etc/inet/hosts for the local machine. If the file does not exist, create it as shown in "hosts Database". Also, if you are using IPv6, see "/etc/inet/ipnodes File".

  • Type the host's fully qualified domain name in the /etc/defaultdomain file.

    For example, suppose host tenere was part of the domain deserts.worldwide.com. Therefore, you would type: deserts.worldwide.com in /etc/defaultdomain. See "/etc/defaultdomain File" for more information.

  • Type the router's name in /etc/defaultrouter.

    See "/etc/defaultrouter File" for information about this file.

  • Type the name of the default router and its IP addresses in /etc/inet/hosts.

    Additional routing options are available. Refer to the discussion on routing options in "How to Configure Hosts for Network Client Mode". You can apply these options to a local files mode configuration.

  • If your network is subnetted, type the network number and the netmask in the file /etc/inet/netmasks.

    If you have set up a NIS or NIS+ server, you can type netmask information in the appropriate database on the server as long as server and clients are on the same network.

  • Reboot each machine on the network.

  • How to Configure a Host for Local Files Mode (System Administration Guide, Volume 3) (2024)

    FAQs

    What is the host file for the local network? ›

    Description. The /etc/hosts file contains the Internet Protocol (IP) host names and addresses for the local host and other hosts in the Internet network. This file is used to resolve a name into an address (that is, to translate a host name into its Internet address).

    How do I add an IP address to a host file? ›

    How to add a static entry in the hosts file?
    1. Open your text editor in Administrator mode.
    2. In the text editor, open C:\Windows\System32\drivers\etc\hosts.
    3. Add the IP Address and hostname. Example: 171.10.10.5 opm.server.com.
    4. Save the changes.

    How do I connect to my local host? ›

    Typically, you can access the localhost of any computer through a loopback address called 127.0. 0.1. By default, this IP address points to a server that is running on the same device. So when your computer asks for the IP address 127.0.

    How do I add a local host to my host file? ›

    Get to C:\Windows\System32\Drivers\etc and make sure to select All Files to find the hosts file. Now you can edit the hosts file. Add the custom IP address you've made earlier, followed by a space, then your domain name. When you're finished, don't forget to save your changes.

    How do I find host IP address? ›

    First, click on your Start Menu and type cmd in the search box and press enter. A black and white window will open where you will type ipconfig /all and press enter. There is a space between the command ipconfig and the switch of /all. Your IP address will be the IPv4 address.

    How do I access local files using IP address? ›

    In the search box in the Windows taskbar, enter \\ followed by the IP address of the remote computer (for example \\192.168. 10.20) and press Enter. If you are asked for a username and password: Enter the name and password of a user who is authorized to access shares and devices.

    Where is the host file located? ›

    A: In Windows, hosts files are typically located at 'C:\Windows\System32\drivers\etc\hosts'.

    What is my local host and port? ›

    The default is often port 80 or 8080. Open a web browser: Any browser will do—like Chrome, Safari, or Firefox. Type in localhost: In the browser's address bar, type http://localhost followed by the port number, like http://localhost:8080. Press enter: The browser will now try to access your localhost server.

    What is local host on Windows? ›

    In computer networking, localhost is a hostname that refers to the current computer used to access it. The name localhost is reserved for loopback purposes. It is used to access the network services that are running on the host via the loopback network interface.

    What is the host file for in Windows? ›

    A hosts file which is used by operating systems to map a connection between an IP address and domain names before going to domain name servers. This file is a simple text file with the mapping of IPs and domain names.

    Top Articles
    Latest Posts
    Article information

    Author: Edwin Metz

    Last Updated:

    Views: 6180

    Rating: 4.8 / 5 (78 voted)

    Reviews: 93% of readers found this page helpful

    Author information

    Name: Edwin Metz

    Birthday: 1997-04-16

    Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

    Phone: +639107620957

    Job: Corporate Banking Technician

    Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

    Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.