|
호스트 파일에는 일반적으로 IP 주소, 시스템 이름, 시스템 이름 별칭 및 사용자 설명이 포함됩니다. 사용자가 만든 호스트 파일에는 시스템에 대한 추가 정보가 포함될 수 있습니다. 이 정보는 시스템에 대한 호스트 파일 항목 앞에 추가된 하나 이상의 설명으로 나타납니다. 다른 값을 지정하지 않으면 기본값이 사용됩니다. 기본값은 다음 매개 변수에 대해 제공됩니다.
호스트 파일을 수정하여 한 항목의 기본값을 특정 값으로 대체하거나 모든 후속 항목의 기본값을 변경할 수 있습니다. 호스트 파일에서 단일 시스템 항목의 값을 변경하려면 다음 예에 표시된 대로 해당 호스트 항목 앞의 줄에 설명으로 특정 문을 호스트 파일에 추가합니다. 이 문은 뒤에 나오는 시스템에만 적용됩니다. 다음 예에서 기본 TYPE은 시스템 EngProliant의 서버로 변경됩니다.
다음 파일 항목과 모든 후속 항목에 영향을 주도록 전역적으로 기본값을 변경하려면 다음 예와 비슷한 문을 사용합니다. 다음 항목의 기본값이 라우터로 변경됩니다. 다른 #$IMXE_DEFAULT 문이 값을 변경할 때까지 라우터는 모든 항목의 기본값으로 유지됩니다. 하나의 TYPE 인스턴스가 #$IMXE 문에 의해 변경되면 기본값이 다음 항목에 대해서만 사용되지 않고 라우터로 돌아갑니다.
호스트 파일에서 인용된 다음 텍스트는 여러 개의 문을 보여 줍니다. 파운드 기호(#)로 시작하는 설명은 호스트 파일에 표시되지 않습니다.
# Title: Systems in database
# Sorted by: IP address
# Date: 28-Mar-00 2:29:31 PM
# Author: administrator
The system EngProliant uses all current defaults. There are no
additional comments.
16.26.176.92 EngProliant.compaq.com EngProliant #user comments
The system testServer in the following example defaults for TYPE.
The defaults for SNMP Timeouts and Retries were
restored for this system but only apply to testServer. The SNMP
write community string default was changed and only applies
to testServer.
#$IMXE: TYPE=Server
#$IMXE: SNMP_TIM=0 SNMP_RET=0 SNMP_MON=public
SNMP_CON=private
16.26.160.20 testServer.compaq.com testServer
All defaults in the following example for the system BldRtr1 are
the same as for testServer, but had to be specified because
they are not the global defaults. These changes apply only to
BldRtr1.
#$IMXE: TYPE=Router
#$IMXE: SNMP_TIM=0 SNMP_RET=0 SNMP_MON=public
SNMP_CON=private
16.26.160.23 BldRtr1.compaq.com BldRtr1
For the system BldRtr5, the TYPE and protocols used for discovery
were changed from the current defaults. Because the remaining
keyword entries are missing, the standard defaults
are applied for the SNMP timeouts, retries, and community strings.
#$IMXE: TYPE=Router
16.26.160.24 BldRtr5.compaq.com BldRtr5
For the system AcctServer, only the TYPE was changed from the
current defaults.
#$IMXE: TYPE=Server
16.26.176.36 AcctServer.compaq.com AcctServer #user comments
The global default for TYPE was changed from Unknown to Router.
All subsequent entries will be identified as routers until a TYPE
statement is used to specify another type or restore the default.
#$IMXE_DEFAULT: TYPE=Router
16.25.176.38 FloorRtr2a.compaq.com FloorRtr2a #user comments
The default for the next host entry was changed to management
processor, which is enclosed in quotes. #$IMXE:
TYPE="Management Processor" AcctSvriLo.compaq.com
16.25.176.37 AcctSvriLo #user comments
...
기본값호스트 파일에 매개 변수가 없으면 기본값이 적용됩니다.
관련 절차
관련 항목
|