对等测试台动态powerdns后端
pdyndns的Python项目详细描述
动态PowerDNS后端[pypi](https://img.shields.io/pypi/v/pdyndns.svg)(https://pypi.org/project/pdyndns/)
[![python](https://img.shields.io/pypi/pyversions/pdyndns.svg)(https://pypi.org/project/pdyndns/)
回复是从
文本文件中读取的预定义列表中循环读取的。我们使用此后端根据实验要求,将成熟的atlas traceroute测量引向对等前缀
。此模块使用powerdns的[pipe
后端][1]协议版本3与powerdns通信。该工具接收一个
配置文件作为参数,并通过标准输入和输出与
powerdns交换信息。配置文件
采用json格式,并由"config schema.json"[json
schema][2]验证。
[1]:https://doc.powerdns.com/md/authority/backend pipe/
[2]:http://json schema.org/
backend configuration
----
n file指定后端负责的dns域,以及回答"soa"和"ns"dns查询所需的信息:
```{.json}
{
"domain":"atlas.peering.usc.edu",
"soa":"atlas.peering.usc.edu noc.peering.usc.edu 20170723 7200 3600 7200 120",
"nam"eservers":[
"对等atlas ns.vms.uscnsl.net",
"对等atlas ns.peering vms.usc.edu"
],
"ttl":3600,
"…"…"
}
`````
"参数指定后端负责哪个域。'soa'参数指定区域特定的计时器
和配置,并在dns'soa`
查询的答复中逐字使用。"nameserver"参数指定区域的名称
服务器列表,用于答复"ns"查询。
time to live参数(`ttl`)指定应缓存
对"soa"和"ns"查询的响应的时间段。通常,"soa"参数(`20170723`,[serial
number][3])中的
第三个字段需要在区域更新时更新。
虽然在动态地址
重新配置时更新序列号不是必需的(因为回复的生存时间
为0到如果更新了"soa"或"nameservers"参数,则需要更新序列号。处理程序以循环顺序对文本文件中IP地址为的查询进行答复。每个处理程序都有三个参数:
``{.json}
{
"…",
"处理程序":[
{
"qname":"target1.atlas.peering.usc.edu",
"qtype":"a",
"file":"data/peering-v4.txt",
{
"qname":"target2.atlas.peering.usc.edu"",
"qtype":"aaaa",
"file":"data/peering-v6.txt"
},
"…"
]
}
``````
"qtype`
字段指定"file"中的IP地址是IPv4地址
(`qtype=a`)还是IPv6地址(`qtype=aaaa`)。
域(`peering.usc.edu`在我们的例子中)将对`atlas.peering.usc.edu`的所有
请求转发到运行
动态后端的计算机上。
如果使用bind并且动态后端服务器是
`peering atlas ns.vms.uscnsl.net`,可以通过在z中添加
一个数据库(可以将等效条目添加到powerdns to achie同样的效果):
````
pdyndns-1 A 35.196.250.129
atlas.peering.usc.edu。ns pdyndns-1.peering.usc.edu.
```
这应该在区域内开始(类似于在soa peering.usc.edu中):
```
。窥视-ns.usc.edu.(
```
testing pdyndns.py
=====
我们有一个"pdyndns.py"的测试套件。您可以通过安装
[nose][10]和运行"nosetests"来运行它。注意,对于
python 3,我们需要nose。我们还有一个[tox][11]脚本,它检查格式化
,并执行一些linting操作。
[10]:http://nose.readthedocs.io/en/latest/
[11]:https://pypi.python.org/pypi/tox
ude[ripe
atlas][8]的[atlas dyndns][5],emile aben的[scapy dns ninja][6]和
[zeerover dns][7]。
[8]:https://atlas.ripe.net
[5]:https://github.com/ripe-ncc/atlas dyndns
[6]:https://github.com/emileaben/scapy dns ninja
[7]:https://github.com/usc-nsl/ripe2015hack阿森纳< BR>
[![python](https://img.shields.io/pypi/pyversions/pdyndns.svg)(https://pypi.org/project/pdyndns/)
回复是从
文本文件中读取的预定义列表中循环读取的。我们使用此后端根据实验要求,将成熟的atlas traceroute测量引向对等前缀
。此模块使用powerdns的[pipe
后端][1]协议版本3与powerdns通信。该工具接收一个
配置文件作为参数,并通过标准输入和输出与
powerdns交换信息。配置文件
采用json格式,并由"config schema.json"[json
schema][2]验证。
[1]:https://doc.powerdns.com/md/authority/backend pipe/
[2]:http://json schema.org/
backend configuration
----
n file指定后端负责的dns域,以及回答"soa"和"ns"dns查询所需的信息:
```{.json}
{
"domain":"atlas.peering.usc.edu",
"soa":"atlas.peering.usc.edu noc.peering.usc.edu 20170723 7200 3600 7200 120",
"nam"eservers":[
"对等atlas ns.vms.uscnsl.net",
"对等atlas ns.peering vms.usc.edu"
],
"ttl":3600,
"…"…"
}
`````
"参数指定后端负责哪个域。'soa'参数指定区域特定的计时器
和配置,并在dns'soa`
查询的答复中逐字使用。"nameserver"参数指定区域的名称
服务器列表,用于答复"ns"查询。
time to live参数(`ttl`)指定应缓存
对"soa"和"ns"查询的响应的时间段。通常,"soa"参数(`20170723`,[serial
number][3])中的
第三个字段需要在区域更新时更新。
虽然在动态地址
重新配置时更新序列号不是必需的(因为回复的生存时间
为0到如果更新了"soa"或"nameservers"参数,则需要更新序列号。处理程序以循环顺序对文本文件中IP地址为的查询进行答复。每个处理程序都有三个参数:
``{.json}
{
"…",
"处理程序":[
{
"qname":"target1.atlas.peering.usc.edu",
"qtype":"a",
"file":"data/peering-v4.txt",
{
"qname":"target2.atlas.peering.usc.edu"",
"qtype":"aaaa",
"file":"data/peering-v6.txt"
},
"…"
]
}
``````
"qtype`
字段指定"file"中的IP地址是IPv4地址
(`qtype=a`)还是IPv6地址(`qtype=aaaa`)。
域(`peering.usc.edu`在我们的例子中)将对`atlas.peering.usc.edu`的所有
请求转发到运行
动态后端的计算机上。
如果使用bind并且动态后端服务器是
`peering atlas ns.vms.uscnsl.net`,可以通过在z中添加
一个数据库(可以将等效条目添加到powerdns to achie同样的效果):
````
pdyndns-1 A 35.196.250.129
atlas.peering.usc.edu。ns pdyndns-1.peering.usc.edu.
```
这应该在区域内开始(类似于在soa peering.usc.edu中):
```
。窥视-ns.usc.edu.(
```
testing pdyndns.py
=====
我们有一个"pdyndns.py"的测试套件。您可以通过安装
[nose][10]和运行"nosetests"来运行它。注意,对于
python 3,我们需要nose。我们还有一个[tox][11]脚本,它检查格式化
,并执行一些linting操作。
[10]:http://nose.readthedocs.io/en/latest/
[11]:https://pypi.python.org/pypi/tox
ude[ripe
atlas][8]的[atlas dyndns][5],emile aben的[scapy dns ninja][6]和
[zeerover dns][7]。
[8]:https://atlas.ripe.net
[5]:https://github.com/ripe-ncc/atlas dyndns
[6]:https://github.com/emileaben/scapy dns ninja
[7]:https://github.com/usc-nsl/ripe2015hack阿森纳< BR>