AS information available via DNS
Folks, As one of the actions from the last RIPE meeting we have been thinking about a nice way to have an automatic update procedure based on DNS. As a trial for this an auto-script has been been produced that loads current AS derived data into zonefiles under the domain aut-num.ripe.net. This has two very nice features straight away. It allows you to see a list of networks associated with an AS. For example... [mature-tony-1480] host -lt txt as1104.aut-num.ripe.net AS1104.aut-num.ripe.net TXT 192.16.185.0 AS1104.aut-num.ripe.net TXT 192.16.186.0 AS1104.aut-num.ripe.net TXT 192.16.194.0 AS1104.aut-num.ripe.net TXT 192.16.195.0 AS1104.aut-num.ripe.net TXT 192.16.199.0 AS1104.aut-num.ripe.net TXT 192.87.45.0 I currently use TXT records for the zonefiles (suggestions are welcome if something else is more appropriate ?). Also, you can do more interesting things like perhaps generate access-lists.. For Example... [mature-tony-1482] host -lt txt as1104.aut-num.ripe.net | awk '{ printf ("acces s-list 30 permit %s\n", $3)}' access-list 30 permit 192.16.185.0 access-list 30 permit 192.16.186.0 access-list 30 permit 192.16.194.0 access-list 30 permit 192.16.195.0 access-list 30 permit 192.16.199.0 access-list 30 permit 192.87.45.0 and so on. You can also see what ASes are currently in the RIPE database. host -lt ns aut-num.ripe.net aut-num.ripe.net NS mature.ripe.net AS760.aut-num.ripe.net NS mature.ripe.net AS766.aut-num.ripe.net NS mature.ripe.net AS590.aut-num.ripe.net NS mature.ripe.net NONE-LOCAL.aut-num.ripe.net NS mature.ripe.net AS1717.aut-num.ripe.net NS mature.ripe.net AS2107.aut-num.ripe.net NS mature.ripe.net AS2108.aut-num.ripe.net NS mature.ripe.net AS2111.aut-num.ripe.net NS mature.ripe.net AS1205.aut-num.ripe.net NS mature.ripe.net AS786.aut-num.ripe.net NS mature.ripe.net AS2116.aut-num.ripe.net NS mature.ripe.net AS789.aut-num.ripe.net NS mature.ripe.net AS1213.aut-num.ripe.net NS mature.ripe.net AS2119.aut-num.ripe.net NS mature.ripe.net AS1899.aut-num.ripe.net NS mature.ripe.net AS2122.aut-num.ripe.net NS mature.ripe.net AS1739.aut-num.ripe.net NS mature.ripe.net AS1741.aut-num.ripe.net NS mature.ripe.net AS1923.aut-num.ripe.net NS mature.ripe.net AS1752.aut-num.ripe.net NS mature.ripe.net AS1755.aut-num.ripe.net NS mature.ripe.net AS1241.aut-num.ripe.net NS mature.ripe.net AS2148.aut-num.ripe.net NS mature.ripe.net AS137.aut-num.ripe.net NS mature.ripe.net AS1770.aut-num.ripe.net NS mature.ripe.net AS513.aut-num.ripe.net NS mature.ripe.net AS1257.aut-num.ripe.net NS mature.ripe.net AS2004.aut-num.ripe.net NS mature.ripe.net AS517.aut-num.ripe.net NS mature.ripe.net AS679.aut-num.ripe.net NS mature.ripe.net AS1104.aut-num.ripe.net NS mature.ripe.net AS1267.aut-num.ripe.net NS mature.ripe.net AS1274.aut-num.ripe.net NS mature.ripe.net AS1275.aut-num.ripe.net NS mature.ripe.net AS697.aut-num.ripe.net NS mature.ripe.net AS174.aut-num.ripe.net NS mature.ripe.net AS719.aut-num.ripe.net NS mature.ripe.net AS544.aut-num.ripe.net NS mature.ripe.net AS1290.aut-num.ripe.net NS mature.ripe.net AS2380.aut-num.ripe.net NS mature.ripe.net AS2036.aut-num.ripe.net NS mature.ripe.net AS553.aut-num.ripe.net NS mature.ripe.net AS2043.aut-num.ripe.net NS mature.ripe.net AS1324.aut-num.ripe.net NS mature.ripe.net AS559.aut-num.ripe.net NS mature.ripe.net AS378.aut-num.ripe.net NS mature.ripe.net AS1849.aut-num.ripe.net NS mature.ripe.net NONE.aut-num.ripe.net NS mature.ripe.net AS1853.aut-num.ripe.net NS mature.ripe.net AS565.aut-num.ripe.net NS mature.ripe.net AS224.aut-num.ripe.net NS mature.ripe.net AS60.aut-num.ripe.net NS mature.ripe.net The NONE and NONE-LOCAL zones are not currently loaded. The second aspect of this is the possibilty of having an update procedure based on DNS. Here we could delegate the zone to the "guardian" and if we provided a consistency checking tool to avoid conflicts it would be a nice "dynamic" mechanism for updating AS information. We would like to go this way if you feel using DNS is reasonable as opposed to using some form of login/ftp mechanism as previous used for ripe-60 tags and planned for ripe-81. Please let us know your views on this and also please try looking at the information in the aut-num.ripe.net zone. --Tony
As one of the actions from the last RIPE meeting we have been thinking about a nice way to have an automatic update procedure based on DNS. As a trial for this an auto-script has been been produced that loads current AS derived data into zonefiles under the domain aut-num.ripe.net. This has two very nice features straight away. It allows you to see a list of networks associated with an AS. For example...
[mature-tony-1480] host -lt txt as1104.aut-num.ripe.net AS1104.aut-num.ripe.net TXT 192.16.185.0 AS1104.aut-num.ripe.net TXT 192.16.186.0 AS1104.aut-num.ripe.net TXT 192.16.194.0 AS1104.aut-num.ripe.net TXT 192.16.195.0 AS1104.aut-num.ripe.net TXT 192.16.199.0 AS1104.aut-num.ripe.net TXT 192.87.45.0
I've only one comment (I think): for large ASes there will be a lot of text stored for a single label. If you should try using DNS/UDP to query for TXT for this label, default maximum DNS response packet size (512 bytes?) will likely overflow. If the resolver library in use followed the Host Requirements it should notice a truncated response, and retry with TCP, but who has a resolver library which correctly implements this? I'm not sure the resolver library in BIND does this right... Witness the attached output of "dig" and note the "tc" flag. You could use A records instead, I guess, and save some space in the DNS response packets, but this just postpons the problem a short while. I see you already did that (see below), but I still get a truncated response to the as224.aut-num.ripe.net query, so there you go... However, if all you are interested in doing is zone transfers, then TCP is already in use anyway, so maybe this is not of such a great concern. I should however point out that storing massive amounts of information on a single label is fairly "unconventional use" of the DNS (?), which may stress-test some pieces of code in new ways... I'm not sure of what a solution to this problem should be, however, or whether we just ignore the problem. - Havard skarv% dig @mature.ripe.net. as224.aut-num.ripe.net. any ; <<>> DiG 2.0 <<>> @mature.ripe.net. as224.aut-num.ripe.net. any ;; truncated answer ;; response truncated ;; ->>HEADER<<- opcode: QUERY , status: NOERROR, id: 11 ;; flags: qr aa tc rd ra ; Ques: 1, Ans: 58, Auth: 0, Addit: 0 ;; QUESTIONS: ;; as224.aut-num.ripe.net, type = ANY, class = IN ;; ANSWERS: as224.aut-num.ripe.net. 14400 NS mature.ripe.net. as224.aut-num.ripe.net. 14400 SOA mature.ripe.net. hostmaster.ripe.net. ( 93051001 ;serial 14400 ;refresh 1800 ;retry 14400 ;expire 14400 ) ;minim as224.aut-num.ripe.net. 14400 A 32.0.0.0 as224.aut-num.ripe.net. 14400 A 128.39.0.0 as224.aut-num.ripe.net. 14400 A 129.177.0.0 as224.aut-num.ripe.net. 14400 A 129.240.0.0 as224.aut-num.ripe.net. 14400 A 129.241.0.0 as224.aut-num.ripe.net. 14400 A 129.242.0.0 as224.aut-num.ripe.net. 14400 A 132.150.0.0 as224.aut-num.ripe.net. 14400 A 134.47.0.0 as224.aut-num.ripe.net. 14400 A 136.164.0.0 as224.aut-num.ripe.net. 14400 A 139.105.0.0 as224.aut-num.ripe.net. 14400 A 139.111.0.0 as224.aut-num.ripe.net. 14400 A 139.120.0.0 as224.aut-num.ripe.net. 14400 A 144.164.0.0 as224.aut-num.ripe.net. 14400 A 146.172.0.0 as224.aut-num.ripe.net. 14400 A 152.94.0.0 as224.aut-num.ripe.net. 14400 A 155.73.0.0 as224.aut-num.ripe.net. 14400 A 156.116.0.0 as224.aut-num.ripe.net. 14400 A 157.249.0.0 as224.aut-num.ripe.net. 14400 A 158.36.0.0 as224.aut-num.ripe.net. 14400 A 158.37.0.0 as224.aut-num.ripe.net. 14400 A 158.38.0.0 as224.aut-num.ripe.net. 14400 A 158.39.0.0 as224.aut-num.ripe.net. 14400 A 161.4.0.0 as224.aut-num.ripe.net. 14400 A 192.5.46.0 ;; Sent 2 pkts, answer found in time: 305 msec ;; FROM: skarv to SERVER: mature.ripe.net. 192.87.45.6 ;; WHEN: Mon May 10 23:32:43 1993 ;; MSG SIZE sent: 40 rcvd: 1012 skarv%
Havard Eidnes <Havard.Eidnes@runit.sintef.no> writes: * ------- =_aaaaaaaaaa0 * Content-Type: text/plain; charset="us-ascii" * * > As one of the actions from the last RIPE meeting we have been thinking * > about a nice way to have an automatic update procedure based on DNS. As a * > trial for this an auto-script has been been produced that loads current * > AS derived data into zonefiles under the domain aut-num.ripe.net. This * > has two very nice features straight away. It allows you to see a list of * > networks associated with an AS. For example... * > * > [mature-tony-1480] host -lt txt as1104.aut-num.ripe.net * > AS1104.aut-num.ripe.net TXT 192.16.185.0 * > AS1104.aut-num.ripe.net TXT 192.16.186.0 * > AS1104.aut-num.ripe.net TXT 192.16.194.0 * > AS1104.aut-num.ripe.net TXT 192.16.195.0 * > AS1104.aut-num.ripe.net TXT 192.16.199.0 * > AS1104.aut-num.ripe.net TXT 192.87.45.0 * * I've only one comment (I think): for large ASes there will be a lot of text * stored for a single label. If you should try using DNS/UDP to query for * TXT for this label, default maximum DNS response packet size (512 bytes?) * will likely overflow. If the resolver library in use followed the Host * Requirements it should notice a truncated response, and retry with TCP, but * who has a resolver library which correctly implements this? I'm not sure * the resolver library in BIND does this right... Witness the attached * output of "dig" and note the "tc" flag. You could use A records instead, I * guess, and save some space in the DNS response packets, but this just * postpons the problem a short while. I see you already did that (see * below), but I still get a truncated response to the as224.aut-num.ripe.net * query, so there you go... * Sure - this we knew about but not sure how else to do it. My feeling is that most people well probably do zone transfers of the data anyway. Some of us do have good resolvers as well but I agree this is not a very good answer. One thing I did on the suggestion of Peter Koch was change the entries to A RRs. A RRs use less RDATA than TXT as you say but it doesn't help much. * However, if all you are interested in doing is zone transfers, then TCP is * already in use anyway, so maybe this is not of such a great concern. I * should however point out that storing massive amounts of information on a * single label is fairly "unconventional use" of the DNS (?), which may * stress-test some pieces of code in new ways... * Yes - this is interesting. Currently it is not too bad although it takes a little while (order of seconds) to load the data from scrath however as you saw from the RIPE meeting we only have about 25% AS coverage so far. * I'm not sure of what a solution to this problem should be, however, or * whether we just ignore the problem. * That was my feeling too. If people like the idea and we can reliably use it for the update procedure then I'll just make sure we either make "warning" documentation to use TCP based queries or we put up a good resolver. * * - Havard * Thanks for your comments, --Tony
* > [mature-tony-1480] host -lt txt as1104.aut-num.ripe.net * > AS1104.aut-num.ripe.net TXT 192.16.185.0 * > AS1104.aut-num.ripe.net TXT 192.16.186.0 * > AS1104.aut-num.ripe.net TXT 192.16.194.0 * > AS1104.aut-num.ripe.net TXT 192.16.195.0 * > AS1104.aut-num.ripe.net TXT 192.16.199.0 * > AS1104.aut-num.ripe.net TXT 192.87.45.0 * ... * I'm not sure of what a solution to this problem should be, however, or * whether we just ignore the problem.
That was my feeling too. If people like the idea and we can reliably use it for the update procedure then I'll just make sure we either make "warning" documentation to use TCP based queries or we put up a good resolver.
I've given this some further thought, and a possibility could be to do it like this: $origin as224.aut-num.ripe.net. @ IN SOA ... ; @ NS ... @ NS ... ; 1 A 32.0.0.0 2 A 128.39.0.0 3 A 129.177.0.0 4 A 129.240.0.0 ; etc. Since you are primarily concerned with the value parts of the RRs in the zone, the labels you use to identify each individual entry is of lesser concern. This avoids the problem of truncated UDP response packets, but also removes the possibility to retrieve the network list by using a single DNS query (over TCP). Instead, one have to use a zone transfer to accomplish the same task. I'm not sure this is a desireable solution... I think the technically more correct thing would be to deploy/distribute (contribute to BIND) a better resolver library but it will take a while for it to be widely distributed (eg. via vendors). - Havard
Havard Eidnes <Havard.Eidnes@runit.sintef.no> writes: * > * > [mature-tony-1480] host -lt txt as1104.aut-num.ripe.net * > * > AS1104.aut-num.ripe.net TXT 192.16.185.0 * > * > AS1104.aut-num.ripe.net TXT 192.16.186.0 * > * > AS1104.aut-num.ripe.net TXT 192.16.194.0 * > * > AS1104.aut-num.ripe.net TXT 192.16.195.0 * > * > AS1104.aut-num.ripe.net TXT 192.16.199.0 * > * > AS1104.aut-num.ripe.net TXT 192.87.45.0 * > * ... * > * I'm not sure of what a solution to this problem should be, however, o * r * > * whether we just ignore the problem. * > * > That was my feeling too. If people like the idea and we can reliably use * > it for the update procedure then I'll just make sure we either make * > "warning" documentation to use TCP based queries or we put up a good * > resolver. * * I've given this some further thought, and a possibility could be to do it * like this: * * $origin as224.aut-num.ripe.net. * @ IN SOA ... * ; * @ NS ... * @ NS ... * ; * 1 A 32.0.0.0 * 2 A 128.39.0.0 * 3 A 129.177.0.0 * 4 A 129.240.0.0 * ; * * etc. * Hmm... Don't like this too much either sorry. I agree about the labels are immaterial but doesn't really get round the main thing which in my opinion is listing the nets. * Since you are primarily concerned with the value parts of the RRs in the * zone, the labels you use to identify each individual entry is of lesser * concern. This avoids the problem of truncated UDP response packets, but * also removes the possibility to retrieve the network list by using a single * DNS query (over TCP). Instead, one have to use a zone transfer to * accomplish the same task. * * I'm not sure this is a desireable solution... I think the technically more * correct thing would be to deploy/distribute (contribute to BIND) a better * resolver library but it will take a while for it to be widely distributed * (eg. via vendors). * I agree. Anyone know if this will happen in 4.9 or not ? On this whole subject. It appers that from the repsonses I've had the general feeling is not to do the update procedure this way. We will use the standard "centralised" type mechanism based on logins and guarded files and not persure this any further. However as part of this whole idea I plan to leave the ability to list all the nets from the DNS so will generate network lists based on AS so at least the functionality is there for those who want to make use of it. --Tony.
participants (2)
-
Havard Eidnes
-
Tony Bates