DNSã¨ããã¼ã ãµã¼ãã¨ãRoute53ã¨ãAã¬ã³ã¼ãã¨ãCNAMEã¨ããããããªã人ã®ããã®ã¾ã¨ã
表é¡ã®éãã
ããã調ã¹ã¦ããããããã«ã¾ã¨ãã¦ã人ãããªãã¦ãããã«ã ã«ã¤ããã®ã§ã¾ã¨ããã
ãã®è¨äºã®å¯¾è±¡èªè
- ããã¡ã¤ã³ã®è¨å®ãããã¥ããããããæ»ã¬ãã
- ãDNSãµã¼ãã¨ããã¼ã ãµã¼ãã£ã¦ãªããªã®ãã¸ã§ã»ã»ã»ã
- ãAã¬ã³ã¼ãã¨ãCNAMEã¨ãããããããªããããããããªãçç±ã§è¨å®ãæå¦ãããã
- ãããããã£ã¦ãªãã®ã«åãã¡ãã£ããã¤ãã¤æ°ããã¦ãããããã
- ãRoute53ã«ç§»ç®¡ã£ã¦ããåèªãæ»ã¬ã»ã©åºã¦ãããã©ãããããªããªã®ããã
webãµã¼ããå ¬éãã¦ãããåå¾ãããã¡ã¤ã³ã§ãã®ãµã¼ãã«ã¢ã¯ã»ã¹ã§ããããã«ããã¾ã§ã®æµã
ãã¦ãã¾ãã¯å ¨ä½ã®å¤§ã¾ããªæµããè¦ã¦ã¿ããã
- webãµã¼ãã§webãµã¤ããå ¬éãã
- webãµã¼ãã®IPã¢ãã¬ã¹ã確èªãã
- ãã¡ã¤ã³ãåå¾ãã
- ãã¡ã¤ã³ãåå¾ãããµã¼ãã¹ã§ã使ç¨ããDNSãµã¼ã(ãã¼ã ãµã¼ã)ãè¨å®ãã
- DNSãµã¼ãã§ãã¡ã¤ã³ã¨IPã¢ãã¬ã¹ãç´ã¥ããè¨å®ããã
- è¨å®ãåæ ãããã®ãå¾ ã¤
- ã§ããï¼
ãã£ãããã ããªãã ãã©ãDNSãµã¼ãã£ã¦ãªããªãã ã¨ããç´ä»ãã£ã¦ã©ããããã ãã£ã¦ãªã£ã¦ä»çµã¿ãã©ãã©ãããããããªããªãã®ã§æ´çããã
ãã¨ããã¼ã ãµã¼ãã£ã¦åèªããã¡ãã¡ã§åºã¦ããããã«ã©ãã«ããããããã¥ããã¦AWSãªãããç¬èªãµã¼ãã¹åºãããããããã§ä½è¨ãããã¥ãããªã£ã¦ãæ°ãããã®ã§ãã®ããããå«ãã¦æ´çãããã
IPã¢ãã¬ã¹ã¨ãã¡ã¤ã³åã«ã¤ãã¦
ã¨ããããããã ãã¯ç解ãã¦ãªãã¨å ã®è©±ãããããªããªãã®ã§æ´çã
IPã¢ãã¬ã¹
webãéãã¦ä½ããè¦ãããã«ã¯ããã®è¦ãããã®ãç½®ãã¦ããå ´æãPCã«å¯¾ãã¦æå®ããå¿ è¦ãããã
è·ç©ãéãã«ã¯ä½æãããããªãã¨ãããªããã¿ãããªè©±ã
ãã®ä½æã®ãã¨ãIPã¢ãã¬ã¹ã¨ããã
IPã¢ãã¬ã¹ã®å ·ä½ä¾
- 127.0.0.1 (localhost)
- 192.168.0.0 (ãã©ã¤ãã¼ãIPã¢ãã¬ã¹)
- 173.194.117.128 (google.com)
ä¸çªä¸ã®æ°åã®ç¾ åãURLãã¼ã«å ¥ããã¨googleã®ãã¼ã¸ã表示ãããã¯ã(2015å¹´9æ14æ¥ç¾å¨)ã
ããã¯ããã®æ°åãgoogleã®ãµã¤ãã®ä½æã表ãã¦ãããããªã®ã ã
ãã¡ã¤ã³å
ã§ãgoogleã ã£ãããµã¤ãgoogle.comã§ãµã¤ãã«ã¢ã¯ã»ã¹ããã
ãã®ã¨ãã«ä½¿ããã®ããã¡ã¤ã³åã¨å¼ã°ãã¦ããã
ããã¯æ°åã ã¨ä½¿ã人ããããã¥ããããæåã§IPã¢ãã¬ã¹ãä¼ãã¾ãããã¨ãããã¨ã
ãªããã¡ã¤ã³åã使ãã®ã
å½ç«ç«¶æå ´ã«è¡ããã人ã¯ãä»ããæ±äº¬é½æ°å®¿åºéã¶ä¸çº10çª2å·ã«è¡ããã ã¼ãã¨è¨ããªããã¿ãããªè©±ãã©ãèãã¦ããä»ããå½ç«ç«¶æå ´è¡ããã ã¼ãã®æ¹ãä¼ãããããããããã
ããã¨åãã§ã173.194.117.128ããgoogle.comã®æ¹ãããããããã®ã§ããã¡ã¤ã³åã¨ãããã®ã使ãã
DNSã£ã¦ä½ï¼
DNSã¯ãã¡ã¤ã³ãã¼ã ã·ã¹ãã ã¨ãããã®ã§ãä½æã¨å ´æã®ååãã¤ãªãå¯¾ç §è¡¨ã¿ãããªæãã
- å½ç«ç«¶æå ´ã®ä½æ = æ±äº¬é½æ°å®¿åºéã¶ä¸çº10çª2å·
- google.com = 173.194.117.128
ã¿ãããªæãã§ããããããã¡ããã¨ä¸è´ããã¦ããããã®ã
ãããªè¡¨ãããã°ãå½ç«ç«¶æå ´ã«è¡ããããã¨è¨ã£ãã¨ãã«å ·ä½çãªä½æããããã®ã§ããã©ãçããã¨ãã§ããã
ç¾å®ä¸çã§ã¯å°å³ãªã©ãããã«ãããããã ãã©ãwebã«ããã¦ã¯ãDNSã¨ãããã®ã使ã£ã¦å°å¸³ç®¡çããã¦ããããã ã
DNSãµã¼ãã¾ãã¯ãã¡ã¤ã³ãã¼ã ãµã¼ãã«ã¤ãã¦
ãã¦ããããã£ã¦ä½æã¨ååãã¤ãªãå°å¸³ãããããã ããã©ãã«å°å¸³ãè¦ã«è¡ãããã¨ããåé¡ããã(ä¸çä¸ã®æ å ±ãæå ã«ç½®ãã¦ããããã«ããããªãã®ã§)ã
ã¤ã³ã¿ã¼ãããããªãé ã¯ãå°å³å±ã«å°å³ãè²·ãã«è¡ã£ãããå½¹æã«æ¸ç±è¬æ¬ãããã«è¡ã£ãããã¦ããã©ãããã«è¿ãã
ã§ããããã®å°å¸³ã¯DNSãµã¼ãã¨ããã¨ããã§ç®¡çããã¦ããããã¡ã¤ã³ãã¼ã ãµã¼ãã¨ããã¼ã ãµã¼ãã¨ãå¼ã°ããããããã
DNSãµã¼ãèªä½ããããããã®ä½æãæã£ã¦ãããã¾ãã«å½¹æã¿ãããªæãã
ãã¡ã¤ã³ãåã£ãã¨ãã®ãã¼ã ãµã¼ãè¨å®äºã ã¨ããã®ã¯ããã®ãä½æã確ãããããã®å½¹æãæå®ãããã¨ããã®ã«è¿ãã
ä¾ãã°ãååãããã³ã ã§ãã¡ã¤ã³ãåã£ãå ´åã®ãã¼ã ãµã¼ã
ä¾ãã°ãååãããã³ã ã§ãã¡ã¤ã³ãåã£ãå ´åã管çç»é¢ã®ãã¼ã ãµã¼ãã®å¤æ´ãã¨ããã¨ãããããã¼ã ãµã¼ããæå®ã§ããã
ãã¼ã ãµã¼ãã¯ããååãããã³ã ãªã©ã®ãã¡ã¤ã³åå¾ãµã¼ãã¹ããã®ã¾ã¾ç¨æãã¦ãããããããAWSã使ã人ã«ã¯Amazonã
Amazon Route 53(ドメインネームサーバー – DNS サービス) | アマゾン ウェブ サービス(AWS 日本語)
ã¨ãããµã¼ãã¹ãç¨æãã¦ããã
ä»åã¯ããã使ãã®ã§Route53ã«ã¤ãã¦å°ãè¦ã¦ããã¾ãã
Route53ã®ä½¿ãæ¹
ã¨ããããæä½éåãã¾ã§ã®ããã¹ãæé ã ãæ¸ãã¨ä»¥ä¸ã®éãã«ãªãã
- ã¾ãã¯ã¤ãªããããµã¼ãã®IPã¢ãã¬ã¹ã確èªãã
- ããã¸ã¡ã³ãã³ã³ã½ã¼ã«ã§Route53ã«ç§»å
- Create Hosted Zoneãé¸æ
- å³ã«åºã¦ããã¨ããã«ã使ããããã¡ã¤ã³åãå ¥ãã(www.ã¨ãã¯å ¥ããªããxxxxx.jpã¨ãxxxxx.comãã¨ããé¨åã ã)
- ä½ã£ããåºã¦ããNSã¬ã³ã¼ããå ¨ã¦è¨é²ãã¦ãã
- Create Record Setãé¸æ
- å³ã«åºã¦ããã¨ããã®Nameã«wwwããTypeã¯A - IPv4 AddressããValueã«ã¤ãªããããµã¼ãã®IPã¢ãã¬ã¹ãå ¥ãã¦Create
- ãã¡ã¤ã³ãåå¾ãããµã¤ãã«è¡ã£ã¦ããã¼ã ãµã¼ããè¨å®ãããã¼ã¸ã«è¡ã
- ã¢ãã¬ã¹ãå ¥ããã¨è¨ãããã®ã§ãå ã»ã©è¨é²ããNSã¬ã³ã¼ããè²¼ãä»ãã¦ä¿å(â» æå¾ã®ããªãªããåããªãã¨ã¨ã©ã¼ã«ãªã)
- è¨å®ãåæ ãããã¾ã§å¾ ã¤
ä½ããã£ãã®ã
Route53ã¯DNSãµã¼ããä½ãããµã¼ãã¹ãªã®ã§ãã¾ãã¯ä½¿ãããååã§DNSãµã¼ããç«ã¦ãã
ããããã¨ãã®URLãçºè¡ãããã®ã§ããããDNSãµã¼ãã¨ãã¦ä½¿ãããã¨ãã¡ã¤ã³åå¾ãµã¼ãã¹ã®æ¹ã«ä¼ããã
ç«ã¦ãDNSãµã¼ãã«ãèªåã«å¯¾ããã¢ã¯ã»ã¹ãã©ãã«æ¯ãåããããæå®ãã¦ãã(IPã¢ãã¬ã¹ãæãã)
ãããããã¨ã§ããã¡ã¤ã³ããèªåãç«ã¦ãRoute53ã®DNSãµã¼ãã«ã¢ã¯ã»ã¹ãè¡ããRoute53ã®DNSãµã¼ãããæå®ããIPã¢ãã¬ã¹ã«ã¢ã¯ã»ã¹ãè¡ããã¨ããæµãã«ãªãã®ã§ãæå®ãããã¡ã¤ã³åã§æå®ãããµã¼ãã表示ãããããã«ãªããã¨ããæãã
Route53ã«ç§»ç®¡ã¨ã¯ãªãã ã£ãã®ã
ã¢ã¯ã»ã¹ããã£ãã¨ãã«ã©ã®IPã¢ãã¬ã¹ãè¦ã«è¡ããã決ããå ´æãããã¡ã¤ã³åå¾ãµã¼ãã¹ãæä¾ãã¦ãããã®ããRoute53ã«åãæ¿ãã¾ããããã¨ãã話ã ã£ãã®ã§å®ã¯ãããã¾ã解説ãããã¨ããªããä¸è¿°ã®æé ã移管ã«ãããã¾ãã
Aã¨ãCNAMEã¨ãã£ã¦ä½
ã¡ããã¨èª¿ã¹ããã¦ãªããã©ããã£ãããããªæãã¿ããã
Aã¬ã³ã¼ãã¯ããã¡ã¤ã³ã«ã¢ã¯ã»ã¹ãã¦ãã人ãã©ã®IPã¢ãã¬ã¹ãè¦ãããã¨ããã®ãæå®ãããã®ã Aã¬ã³ã¼ãã¯ä¸ã¤ããæå®ã§ããªãããIPã¢ãã¬ã¹ã¯è¤æ°æå®ã§ãããããã
CNAMEã¯ãCanonical Nameã®ãã¨ã§ãããã®ååã§ãããå®éã«ã¯ãããè¦ã¦ããã¨ãããã®ã CNAMEã§è¨å®ããURLã«ã¢ã¯ã»ã¹ããã¨ãæå®ããURLã«é£ã°ãããããã
ãã£ã¡ã®æ¹ãããããããããã