RPSL. Ох уж этот adress prefix range

Статическая и динамическая, протоколы

RPSL. Ох уж этот adress prefix range

Сообщение Artem » 17 авг 2010, 11:49

Здравствуйте. Сразу хочу извиниться за мой французский, т.к. в сетях я мало соображаю, но разбираться кроме меня некому, поэтому:
разбираюсь с БД RIPE. Как я понял, она описывается языком RPSL. А в этом языке встречаются конструкции, которые мне вообще не понятны.
adress prefix range записывается как 10.0.0.0/8^- или 10.0.0.0/8^+ или 10.0.0.0/8^16 или 10.0.0.0/8^16-24.
Я думал, что запись 10.0.0.0/8^+ это (10.0.0.0/9...10.0.0.0/32), но кажется не так, ведь 10.0.0.0/8^- не может быть меньше 8, про 2 последнее понятнее, но смутно.
Объясните пожалуйста на пальцах
Artem
новичок
 
Сообщения: 15
Зарегистрирован: 17 авг 2010, 11:33

Re: RPSL. Ох уж этот adress prefix range

Сообщение lehisnoe » 18 авг 2010, 09:15

Привет!

Встречный вопрос: а какие объекты тебе нужно описать в DB RIPE? М.б. все будет не так уж и страшно ;-)
No users
No troubles
No money
------------
www.mega-net.ru - IT аутсорсинг
Аватара пользователя
lehisnoe
Site Admin
 
Сообщения: 539
Зарегистрирован: 11 июн 2008, 14:09
Откуда: Moscow

Re: RPSL. Ох уж этот adress prefix range

Сообщение root » 18 авг 2010, 10:40

lehisnoe писал(а):а какие объекты тебе нужно описать в DB RIPE?

+1
Мою статью: Объекты БД RIPE (ripe.net): mntner, as-set, aut-num, route, inetnum, person, domain, role
читал ?

Artem писал(а):adress prefix range записывается как 10.0.0.0/8^- или 10.0.0.0/8^+ или 10.0.0.0/8^16 или 10.0.0.0/8^16-24.

это ты где прочел ? ссылку дай
С уважением, root

Изображение
------------
www.mega-net.ru - IT аутсорсинг
Аватара пользователя
root
Site Admin
 
Сообщения: 1894
Зарегистрирован: 11 июн 2008, 13:05
Откуда: Moscow, Russia

Re: RPSL. Ох уж этот adress prefix range

Сообщение Artem » 19 авг 2010, 07:56

это members'ы объекта route-set, статью читал, там по этому поводу ничего не писали.
Мне надо описать много объектов, пока затырка с route-set, filter-set и в объекте aut-num с полями export, import и default
Artem
новичок
 
Сообщения: 15
Зарегистрирован: 17 авг 2010, 11:33

Re: RPSL. Ох уж этот adress prefix range

Сообщение Artem » 19 авг 2010, 08:00

вот ссылка http://book.itep.ru/4/4/rpsl.htm описания rpsl
Artem
новичок
 
Сообщения: 15
Зарегистрирован: 17 авг 2010, 11:33

Re: RPSL. Ох уж этот adress prefix range

Сообщение root » 19 авг 2010, 11:45

http://www.db.ripe.net/whois?form_type= ... rch=Search
Код: Выделить всё
The route-set class:

      A route-set object defines a set of routes that can be
      represented by route objects or by address prefixes. In the
      first case, the set is populated by means of the "mbrs-by-ref:"
      attribute, in the latter, the members of the set are explicitly
      listed in the "members:" attribute. The "members:" attribute is
      a list of address prefixes or other route-set names.  Note that
      the route-set class is a set of route prefixes, not of database
      route objects.
   
route-set:       [mandatory]  [single]     [primary/look-up key]
descr:           [mandatory]  [multiple]   [ ]
members:         [optional]   [multiple]   [ ]
mp-members:      [optional]   [multiple]   [ ]
mbrs-by-ref:     [optional]   [multiple]   [inverse key]
remarks:         [optional]   [multiple]   [ ]
org:             [optional]   [multiple]   [inverse key]
tech-c:          [mandatory]  [multiple]   [inverse key]
admin-c:         [mandatory]  [multiple]   [inverse key]
notify:          [optional]   [multiple]   [inverse key]
mnt-by:          [mandatory]  [multiple]   [inverse key]
mnt-lower:       [optional]   [multiple]   [inverse key]
changed:         [mandatory]  [multiple]   [ ]
source:          [mandatory]  [single]     [ ]

The content of the attributes of the route-set class are defined below:

route-set

   Specifies the name of the route set. It is a primary key for
   the route-set object.
   
     An route-set name is made up of letters, digits, the
     character underscore "_", and the character hyphen "-"; it
     must start with "rs-", and the last character of a name must
     be a letter or a digit.

     A route-set name can also be hierarchical.  A hierarchical
     set name is a sequence of set names and AS numbers separated
     by colons ":".  At least one component of such a name must
     be an actual set name (i.e. start with "rs-").  All the set
     name components of a hierarchical route-name have to be
     route-set names.
       
descr

   A short decription related to the object.
   
     A sequence of ASCII characters.
       
members

   Lists the members of the set.
   
     <address-prefix-range> or
     <route-set-name> or
     <route-set-name><range-operator>.
       
mp-members

   Lists the multiprotocol members of the set.
   
     list of <address-prefix-range> or
     <route-set-name> or
     <route-set-name><range-operator>.
       
mbrs-by-ref

   This attribute can be used in all "set" objects; it allows
   indirect population of a set. If this attribute is used, the
   set also includes objects of the corresponding type (aut-num
   objects for as-set, for example) that are protected by one of
   these maintainers and whose "member-of:" attributes refer to
   the name of the set. If the value of a "mbrs-by-ref:"
   attribute is ANY, any object of the corresponding type
   referring to the set is a member of the set. If the
   "mbrs-by-ref:" attribute is missing, the set is defined
   explicitly by the "members:" attribute.
   
     <mntner-name> | ANY
       
remarks

   Contains remarks.
   
     A sequence of ASCII characters.
       
org

    Points to an existing organisation object representing the entity that
    holds the resource.
   
     The 'ORG-' string followed by 2 to 4 characters, followed by up to 5 digits
     followed by a source specification.  The first digit must not be "0". 
     Source specification starts with "-" followed by source name up to
     9-character length.
       
tech-c

   References a technical contact.
   
     From 2 to 4 characters optionally followed by up to 5 digits
     optionally followed by a source specification.  The first digit
     must not be "0".  Source specification starts with "-" followed
     by source name up to 9-character length.
       
admin-c

   References an on-site administrative contact.
   
     From 2 to 4 characters optionally followed by up to 5 digits
     optionally followed by a source specification.  The first digit
     must not be "0".  Source specification starts with "-" followed
     by source name up to 9-character length.
       
notify

   Specifies the e-mail address to which notifications of changes
   to an object should be sent.
   This attribute is filtered from the default whois output.
   
     An e-mail address as defined in RFC 2822.
       
mnt-by

   Specifies the identifier of a registered mntner object used
   for authorisation of operations performed with the object
   that contains this attribute.
   
     Made up of letters, digits, the character underscore "_",
     and the character hyphen "-"; the first character of a name
     must be a letter, and the last character of a name must be a
     letter or a digit.  The following words are reserved by
     RPSL, and they can not be used as names:
   
      any as-any rs-any peeras and or not atomic from to at
      action accept announce except refine networks into inbound
      outbound
   
     Names starting with certain prefixes are reserved for
     certain object types.  Names starting with "as-" are
     reserved for as set names.  Names starting with "rs-" are
     reserved for route set names.  Names starting with "rtrs-"
     are reserved for router set names. Names starting with
     "fltr-" are reserved for filter set names. Names starting
     with "prng-" are reserved for peering set names. Names
     starting with "irt-" are reserved for irt names.
       
mnt-lower

   Specifies the identifier of a registered mntner object used
   for hierarchical authorisation.  Protects creation of objects
   directly (one level) below in the hierarchy of an object type.
   The authentication method of this maintainer object will then
   be used upon creation of any object directly below the object
   that contains the "mnt-lower:" attribute.
   
     Made up of letters, digits, the character underscore "_",
     and the character hyphen "-"; the first character of a name
     must be a letter, and the last character of a name must be a
     letter or a digit.  The following words are reserved by
     RPSL, and they can not be used as names:
   
      any as-any rs-any peeras and or not atomic from to at
      action accept announce except refine networks into inbound
      outbound
   
     Names starting with certain prefixes are reserved for
     certain object types.  Names starting with "as-" are
     reserved for as set names.  Names starting with "rs-" are
     reserved for route set names.  Names starting with "rtrs-"
     are reserved for router set names. Names starting with
     "fltr-" are reserved for filter set names. Names starting
     with "prng-" are reserved for peering set names. Names
     starting with "irt-" are reserved for irt names.
       
changed

   Specifies who submitted the update, and when the object was
   updated.
   This attribute is filtered from the default whois output.
   
     An e-mail address as defined in RFC 2822, followed by a date
     in the format YYYYMMDD.
       
source

   Specifies the registry where the object is registered.  Should
   be "RIPE" for the RIPE Database.
   
     Made up of letters, digits, the character underscore "_",
     and the character hyphen "-"; the first character of a
     registry name must be a letter, and the last character of a
     registry name must be a letter or a digit.


http://www.db.ripe.net/whois?form_type= ... rch=Search
Код: Выделить всё
The filter-set class:

       A filter-set object defines a set of routes that are matched by
       its filter.  The "filter-set:" attribute defines the name of
       the filter.  It is an RPSL name that starts with "fltr-".  The
       "filter:" attribute defines the set's policy filter.   A policy
       filter is a logical expression which when applied to a set of
       routes returns a subset of these routes.
   
filter-set:      [mandatory]  [single]     [primary/look-up key]
descr:           [mandatory]  [multiple]   [ ]
filter:          [optional]   [single]     [ ]
mp-filter:       [optional]   [single]     [ ]
remarks:         [optional]   [multiple]   [ ]
org:             [optional]   [multiple]   [inverse key]
tech-c:          [mandatory]  [multiple]   [inverse key]
admin-c:         [mandatory]  [multiple]   [inverse key]
notify:          [optional]   [multiple]   [inverse key]
mnt-by:          [mandatory]  [multiple]   [inverse key]
mnt-lower:       [optional]   [multiple]   [inverse key]
changed:         [mandatory]  [multiple]   [ ]
source:          [mandatory]  [single]     [ ]

The content of the attributes of the filter-set class are defined below:

filter-set

   Defines the name of the filter.
   
     A filter-set name is made up of letters, digits, the
     character underscore "_", and the character hyphen "-"; it
     must start with "fltr-", and the last character of a name
     must be a letter or a digit.

     A filter-set name can also be hierarchical.  A hierarchical
     set name is a sequence of set names and AS numbers separated
     by colons ":".  At least one component of such a name must
     be an actual set name (i.e. start with "fltr-").  All the
     set name components of a hierarchical filter-name have to be
     filter-set names.
       
descr

   A short decription related to the object.
   
     A sequence of ASCII characters.
       
filter

   Defines the set's policy filter.
   
     Logical expression which when applied to a set of routes
     returns a subset of these routes. Please refer to RFC 2622
     for more information.
       
mp-filter

   Defines the set's multiprotocol policy filter.
   
     Logical expression which when applied to a set of multiprotocol
     routes returns a subset of these routes. Please refer to RPSLng
     Internet Draft for more information.
       
remarks

   Contains remarks.
   
     A sequence of ASCII characters.
       
org

    Points to an existing organisation object representing the entity that
    holds the resource.
   
     The 'ORG-' string followed by 2 to 4 characters, followed by up to 5 digits
     followed by a source specification.  The first digit must not be "0". 
     Source specification starts with "-" followed by source name up to
     9-character length.
       
tech-c

   References a technical contact.
   
     From 2 to 4 characters optionally followed by up to 5 digits
     optionally followed by a source specification.  The first digit
     must not be "0".  Source specification starts with "-" followed
     by source name up to 9-character length.
       
admin-c

   References an on-site administrative contact.
   
     From 2 to 4 characters optionally followed by up to 5 digits
     optionally followed by a source specification.  The first digit
     must not be "0".  Source specification starts with "-" followed
     by source name up to 9-character length.
       
notify

   Specifies the e-mail address to which notifications of changes
   to an object should be sent.
   This attribute is filtered from the default whois output.
   
     An e-mail address as defined in RFC 2822.
       
mnt-by

   Specifies the identifier of a registered mntner object used
   for authorisation of operations performed with the object
   that contains this attribute.
   
     Made up of letters, digits, the character underscore "_",
     and the character hyphen "-"; the first character of a name
     must be a letter, and the last character of a name must be a
     letter or a digit.  The following words are reserved by
     RPSL, and they can not be used as names:
   
      any as-any rs-any peeras and or not atomic from to at
      action accept announce except refine networks into inbound
      outbound
   
     Names starting with certain prefixes are reserved for
     certain object types.  Names starting with "as-" are
     reserved for as set names.  Names starting with "rs-" are
     reserved for route set names.  Names starting with "rtrs-"
     are reserved for router set names. Names starting with
     "fltr-" are reserved for filter set names. Names starting
     with "prng-" are reserved for peering set names. Names
     starting with "irt-" are reserved for irt names.
       
mnt-lower

   Specifies the identifier of a registered mntner object used
   for hierarchical authorisation.  Protects creation of objects
   directly (one level) below in the hierarchy of an object type.
   The authentication method of this maintainer object will then
   be used upon creation of any object directly below the object
   that contains the "mnt-lower:" attribute.
   
     Made up of letters, digits, the character underscore "_",
     and the character hyphen "-"; the first character of a name
     must be a letter, and the last character of a name must be a
     letter or a digit.  The following words are reserved by
     RPSL, and they can not be used as names:
   
      any as-any rs-any peeras and or not atomic from to at
      action accept announce except refine networks into inbound
      outbound
   
     Names starting with certain prefixes are reserved for
     certain object types.  Names starting with "as-" are
     reserved for as set names.  Names starting with "rs-" are
     reserved for route set names.  Names starting with "rtrs-"
     are reserved for router set names. Names starting with
     "fltr-" are reserved for filter set names. Names starting
     with "prng-" are reserved for peering set names. Names
     starting with "irt-" are reserved for irt names.
       
changed

   Specifies who submitted the update, and when the object was
   updated.
   This attribute is filtered from the default whois output.
   
     An e-mail address as defined in RFC 2822, followed by a date
     in the format YYYYMMDD.
       
source

   Specifies the registry where the object is registered.  Should
   be "RIPE" for the RIPE Database.
   
     Made up of letters, digits, the character underscore "_",
     and the character hyphen "-"; the first character of a
     registry name must be a letter, and the last character of a
     registry name must be a letter or a digit.


сам лично объекты route-set и filter-set никогда не делал

Artem писал(а):и в объекте aut-num с полями export, import

а там в чем затык ?
что же такого ты там хочешь описать ?
С уважением, root

Изображение
------------
www.mega-net.ru - IT аутсорсинг
Аватара пользователя
root
Site Admin
 
Сообщения: 1894
Зарегистрирован: 11 июн 2008, 13:05
Откуда: Moscow, Russia

Re: RPSL. Ох уж этот adress prefix range

Сообщение Artem » 19 авг 2010, 11:52

Я хочу пропарсить и залить бд RIPE в SQL SERVER. некоторые объекты я уже залил, но когда я дошел до фильтрации, то тут началось... для создания запросов оптимальные выборки идут с числами. любую подсеть можно представить как нач. и конеч. IP-адреса(которые можно представить числами). А вот запись 10.0.0.0/8^16-24 я не знаю как преобразовать в подсеть, оттуда и вопросы

и в объекте aut-num с полями export, import
Я не понимаю, как увидеть в этих полях связи между АС, вроде выберу одну АС и смотрю с кем она связана, а на сайте http://www.robtex.com/ иногда связи рисуются по другому или не все

Да, еще этот BGPlAy в тоску вгоняет, ведь мне нужно сделать что-то похожее
Последний раз редактировалось Artem 19 авг 2010, 11:56, всего редактировалось 1 раз.
Artem
новичок
 
Сообщения: 15
Зарегистрирован: 17 авг 2010, 11:33

Re: RPSL. Ох уж этот adress prefix range

Сообщение root » 19 авг 2010, 12:19

Artem писал(а):Я хочу пропарсить и залить бд RIPE в SQL SERVER.

мы тоже это как то делали, нужно было вытянуть соответствие ASки и маршрута (префикса), для построения графиков по трафику в ту или иную AS
сделали это вполне успешно :)
вот так получилось у нас:
as_traf.jpg

bgp_traf.jpg


Artem писал(а):А вот запись 10.0.0.0/8^16-24 я не знаю как преобразовать в подсеть, оттуда и вопросы

сколько уже занимаюсь этим делом, таких не видел :)
скажи имя объекта в RIPE, хочу поглядеть

Artem писал(а):Я не понимаю, как увидеть в этих полях связи между АС

ну там же написано от кого импорт и кому экспорт, например там будет указана или AS или as-set
Код: Выделить всё
aut-num:         AS100
.................
import:          from AS200 accept AS200;
export:          to AS200 announce ANY;

AS100 принимает от AS200 только маршруты, которые принадлежат AS200
AS100 анонсирует для AS200 полную таблицу маршрутизации (full-view)
соответственно связность AS100 (апстрим)<->AS200(клиент)

если указан as-set:
Код: Выделить всё
aut-num:         AS100
.................
import:          from AS200 accept AS-TEST;
export:          to AS200 announce AS-TEST2;

AS100 принимает от AS200 as-set AS-TEST, его состав:
Код: Выделить всё
as-set: AS-TEST
members:         AS300

значит связность такая получается: AS100<->AS200<->AS300
в as-set может быть указан и другой as-set, например:
Код: Выделить всё
members:         AS-PUPKIN

соответственно смотришь состав as-set AS-PUPKIN:
Код: Выделить всё
members:         AS400

получается связность: AS100<->AS200<->AS300 + AS100<->AS200<->AS400
ну и т.д. и т.п.
у нас на сайте есть тулза (Настройка фильтров по as-set провайдера), которая как раз по AS-SET вытягивает все зависимости и может показать как номера автономок так и их префиксы

Artem писал(а):вроде выберу одну АС и смотрю с кем она связана, а на сайте http://www.robtex.com/ иногда связи рисуются по другому или не все

робтекс не онлайн тулза, они обновляют не больше чем раз в неделю, а то и более
они могут дать приблизительную картину, но не всегда полную, это факт

Artem писал(а):иногда связи рисуются по другому или не все

ну как и на основе чего они строят рисунок мне лично не совсем понятно, т.е. какие критерии ими используются

Artem писал(а):Да, еще этот BGPlAy в тоску вгоняет, ведь мне нужно сделать что-то похожее

ого куда замахнулся, сильно, респект
С уважением, root

Изображение
------------
www.mega-net.ru - IT аутсорсинг
Аватара пользователя
root
Site Admin
 
Сообщения: 1894
Зарегистрирован: 11 июн 2008, 13:05
Откуда: Moscow, Russia

Re: RPSL. Ох уж этот adress prefix range

Сообщение Artem » 19 авг 2010, 13:08

объект route-set rs-six-mobikom

про import/export все понятно было, пока я не начал сравнивать с robtex, оттуда и вопрос

да, у вас круто получилось, только у меня мало исходных данных, вернее только БД RIPE. Так что трафик не увижу :( . Зато алгоритмы отрисовки точно не хуже BGPlay. Да и нацепить можно много всего, чего у них нет
Artem
новичок
 
Сообщения: 15
Зарегистрирован: 17 авг 2010, 11:33

Re: RPSL. Ох уж этот adress prefix range

Сообщение root » 19 авг 2010, 14:15

Artem писал(а):объект route-set rs-six-mobikom

Код: Выделить всё
route-set:       RS-SIX-MOBIKOM
descr:           Routes advertised by Mobikom into Sofia Internet Exchange
remarks:         Mobikom
members:         62.176.64.0/18^18-24,
              212.5.128.0/19^19-24
remarks:         ElitSat Rousse
members:         209.239.78.0/23^23-24
...................

а тогда тут все понятно, получается так:
на примере префикса 62.176.64.0/18, у него есть объект route:
Код: Выделить всё
route:           62.176.64.0/18
descr:           Radio Telecommunications Company Ltd. / Mobikom -PA space
origin:          AS8795
mnt-by:          MOBIKOM-NOC

так вот объект route-set говорит нам о том, что данный префикс может анонсироваться не только полным куском /18 (каким и был выдан RIPE`ом изначально), а кусками этого блока побитыми на части вплоть до /24
т.е. может придти один маршрут 62.176.64.0/18, а так же например два маршрута 62.176.64.0/19 и 62.176.96.0/19 (что вместе все равно является блоком 62.176.64.0/18) и т.п. вплоть до /24, т.е. 64 префикса по /24

тока я пока не могу понять зачем тебе это нужно. показывай полный блок, т.е. тот который описан объектом route, а каким он макаром анонсится ты можешь узнать уже только из реальных анонсов
т.е. тебе придется парсить не тока БД RIPE, но иметь парочку маршрутизаторов, с которых забирать таблицу маршрутизации и сравнивать реальность с тем что написано в RIPE

Artem писал(а):пока я не начал сравнивать с robtex, оттуда и вопрос

как я уже говорил, robtex не онлайн тулза, отсюда и расхождения

Artem писал(а):да, у вас круто получилось

спасибо, нам тоже нравится :) по крайней мере выполняет те задачи, для которых это и писалось

Artem писал(а):Так что трафик не увижу

ну да, т.к. трафик собирать нужно, а затем его аналайзить, без этого не получится

Artem писал(а):Зато алгоритмы отрисовки точно не хуже BGPlay. Да и нацепить можно много всего, чего у них нет

ну если сделаешь, покажешь нам ? интересно все же ;)
С уважением, root

Изображение
------------
www.mega-net.ru - IT аутсорсинг
Аватара пользователя
root
Site Admin
 
Сообщения: 1894
Зарегистрирован: 11 июн 2008, 13:05
Откуда: Moscow, Russia

След.

Вернуться в Маршрутизация / Routing

Кто сейчас на конференции

Сейчас этот форум просматривают: Google [Bot] и гости: 13

cron