2018.06.06 / 11:31
¸®´ª½º hosts ÆÄÀÏ
ÀλçÀ̵åÀÚ¹Ù
Ãßõ ¼ö 128
1 °³¿ä[ÆíÁý]
- ¸®´ª½º È£½ºÆ® ÆÄÀÏ
- ¸®´ª½º /etc/hosts
- ¸®´ª½º¿¡¼ DNSº¸´Ù ¸ÕÀú È£½ºÆ®¸íÀ» IP·Î Ç®¾îÁÖ´Â ÆÄÀÏ
2 ¿¹½Ã: CentOS[ÆíÁý]
hosts ÆÄÀÏÀÇ ±âº»°ª(default)Àº CentOS 5, 6, 7ÀÇ °æ¿ì ´ÙÀ½°ú °°¾Ò´Ù.
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
3 ¿¹½Ã: Ubuntu[ÆíÁý]
127.0.0.1 localhost
127.0.1.1 zetawiki
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
4 ¿¹½Ã: Mac OS X 10.7.3[ÆíÁý]
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
5 Å×½ºÆ®[ÆíÁý]
¿¹¸¦ µé¾î hosts ÆÄÀÏ ³»¿ëÀ» ¾Æ·¡¿Í °°ÀÌ °°Àº À̸§ test1À» 2°³ ¼³Á¤ÇÑ °æ¿ì, test1À» È£ÃâÇϸé À§¿¡ ÀÖ´Â 8.8.8.8·Î Á¢¼ÓÀ» ½ÃµµÇÑ´Ù.
[root@zetawiki ~]# cat /etc/hosts
8.8.8.8 test1
8.8.4.4 test1
[root@zetawiki ~]# ping test1
PING test1 (8.8.8.8) 56(84) bytes of data.