The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации / Документация по FreeBSD / Руководства по FreeBSD на английском

2.4. Creating the List of other LAN Hosts(/etc/hosts)

The final step in configuring the LAN side of the FreeBSD system is to create a list of the names and TCP/IP addresses of the various systems that are connected to the Local Area Network. This list is stored in the '/etc/hosts' file.

The default version of this file has only a single host name listing in it: the name and address of the loopback device ('lo0'). By networking convention, this device is always named "localhost" and always has an IP address of 127.0.0.1. Section 2.2.

To edit the /etc/hosts file enter the following command:

     # ee /etc/hosts


Scroll all the way to the bottom of the file (paying attention to the comments along the way; there's some good information there!) and enter (assuming our sample network) the following IP addresses and host names:

    192.168.1.1    curly  curly.my.domain  # FreeBSD System
    192.168.1.2    larry  larry.my.domain  # Windows '95 System
    192.168.1.3    moe    moe.my.domain    # Windows for Workgroups
    System
    192.168.1.4    shemp  shemp.my.domain  # Windows NT System


(No changes are needed to the line for the '127.0.0.1 localhost' entry.)

Once you've entered these lines, press the 'Esc' key to invoke the control menu. Select "leave editor" and be sure to select "save changes" when prompted.

For questions about FreeBSD, e-mail <[email protected]>.
For questions about this documentation, e-mail <[email protected]>.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру