简体   繁体   English

AWS-Route53-托管区域和子域

[英]AWS - Route53 - Hosted Zones and Sub domains

We are migrating to AWS, and so far we are quite pleased with the performance and ease of use the AWS console provides, especially the Route53 UX. 我们正在迁移到AWS,到目前为止,我们对AWS控制台提供的性能和易用性感到非常满意,尤其是Route53 UX。 However we ran into an issue. 但是,我们遇到了一个问题。

We have 3 subnets (datacenters), and our old DNS provider we had it set-up like this: 我们有3个子网(数据中心),而我们的旧DNS提供程序的设置如下:

example.us

    www

sn1.example.us (local datacenter)

    gateway (CNAME)
    demo1
    feature1

sn2.example.us (old datacenter)

    gateway (A record for static ip)
    app-a-1
    service-a-1

sn3.example.us (aws vpc)

    gateway (A record for elastic ip)
    app-a-1
    service-a-1

So when we migrated to Route53, I maintained the same structure, in that I created a separate "hosted zone" for each subdomain, as it makes each zone easier to administer. 因此,当我们迁移到Route53时,我保持了相同的结构,因为我为每个子域创建了一个单独的“托管区域”,因为它使每个区域的管理更加容易。

The problem I am seeing is that gateway.sn1 and gateway.sn3 are not resolving, however gateway.sn2 is resolving. 我看到的问题是gateway.sn1和gateway.sn3无法解析,但是gateway.sn2正在解析。 With respect to Route53, is it ok to maintain this structure, or should I just have one hosted zone for example.us, and put everything in there? 关于Route53,可以保持这种结构吗?还是我应该只拥有一个托管区域(例如example.us),然后将所有内容放在那里?


Update #1 更新#1

When I created each separate zone, they each were defaulted to differing nameserver records, so I went in and updated all the other zones NS records to match sn2.example.us (as it was the only one working). 当我创建每个单独的区域时,它们各自默认使用不同的名称服务器记录,因此我进入并更新了所有其他区域NS记录以匹配sn2.example.us(因为这是唯一的工作)。


Update #2 更新#2

Bad idea trying to share nameservers across the various hosted zones, when testing behavior, I was getting REFUSED responses. 在测试行为时,尝试在各个托管区域中共享名称服务器是一个坏主意,我得到了“拒绝”响应。 So it does look like I have to move all entries from subdomains (in other hosted zones) up into the parent zone, so I can use the parent's zone nameservers when updating registrar's nameserver information for the domain example.us 因此,看起来我必须将所有子域(在其他托管区域中)的所有条目都移到父区域中,因此在为域example.us更新注册服务商的名称服务器信息时,可以使用父区域的名称服务器。

You can definitely do this in Route 53... just not the specific way you tried to do it. 您绝对可以在Route 53中执行此操作……只是您尝试执行此操作的特定方法不行。

Create 4 hosted zones, example.com, sn1.example.com, sn2.example.com, and sn3.example.com. 创建4个托管区域,例如example.com,sn1.example.com,sn2.example.com和sn3.example.com。

Don't change the NS entries. 不要更改NS条目。 You can't. 你不能 (You technically can, but it doesn't work, if you try.) (从技术上讲您可以,但是如果尝试尝试,则不起作用。)

Give the assigned nameservers for example.com to the registrar. 将分配给example.com的名称服务器提供给注册商。

Then, in the example.com hosted zone, create one NS entry with hostname sn1, and paste the 4 automatically assigned nameservers for sn1 (as assigned by Route 53 to the hosted zone for sn1.example.com) in the box. 然后,在example.com托管区域中,创建一个主机名为sn1的NS条目,然后在框中粘贴sn1的4个自动分配的名称服务器(由Route 53分配给sn1.example.com的托管区域)。 Repeat the process for sn2 and sn3 using the correct NS records originally assigned by Route 53 in each case. 在每种情况下,请使用路由53最初分配的正确NS记录对sn2和sn3重复此过程。

The way you tried to implement this can't work, because changing the NS in a hosted zone doesn't change which actual Route 53 servers will respond to requests. 您尝试执行此操作的方法无法正常工作,因为在托管区域中更改NS不会更改实际的Route 53服务器将响应请求的方式。 That can't be changed. 那是无法改变的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM