Skip to content

6.3.1 Links to writers

rod edited this page Aug 15, 2019 · 1 revision

python

All IGP data sent by EXABGP services to Rabbitmq, is consumend by the Links to writers service. Messages are parsed for relevant values and translated into neo4j cypher query-like messages. Instead of directly updating the database with these queries, query messages are once again sent to Rabbitmq and there will be services strictly in charge of doing so.

Example of IGP data received (sent by EXABGP service):

{
   "exabgp":"4.0.1",
   "time":1563208719.18,
   "host":"exabgp-region2-0",
   "pid":9,
   "ppid":1,
   "counter":56707,
   "type":"update",
   "neighbor":{
      "address":{
         "local":"10.43.0.8",
         "peer":"7.188.102.45"
      },
      "asn":{
         "local":55259,
         "peer":55259
      },
      "direction":"receive",
      "message":{
         "update":{
            "attribute":{
               "origin":"igp",
               "local-preference":100,
               "bgp-ls":{
                  "admin-group-mask":[
                     0
                  ],
                  "maximum-link-bandwidth":1250000000.0,
                  "maximum-reservable-link-bandwidth":1250000000.0,
                  "unreserved-bandwidth":[
                     1188540288.0,
                     1188540288.0,
                     1188540288.0,
                     1188540288.0,
                     1188540288.0,
                     1188540288.0,
                     1188540288.0,
                     1188540288.0
                  ],
                  "te-metric":30,
                  "igp-metric":30,
                  "shared-risk-link-groups":[
                     100216
                  ]
               }
            },
            "announce":{
               "bgp-ls bgp-ls":{
                  "7.188.102.45":[
                     {
                        "ls-nlri-type":2,
                        "l3-routing-topology":0,
                        "protocol-id":2,
                        "local-node-descriptors":{
                           "autonomous-system":55259,
                           "router-id":"010010010010"
                        },
                        "remote-node-descriptors":{
                           "autonomous-system":55259,
                           "psn":"12",
                           "router-id":"010010010010"
                        },
                        "interface-address":{
                           "interface-address":"10.10.20.217"
                        },
                        "neighbor-address":{

                        }
                     }
                  ]
               }
            }
         }
      }
   }
}

Example of query-like message sent after processing:

MERGE (n:Node {IGP_Router_Identifier:'010010010010', topology_id:'igp'})
  ON CREATE SET
      n.topology_id='igp',
      n.First_Seen = timestamp(),
      n.IGP_Router_Identifier='010010010010'
MERGE (pn:Pseudonode {IGP_Router_Identifier:'01001001001012'})
  ON CREATE SET
    pn.IGP_Router_Identifier='01001001001012'
MERGE (n)-[link:Link]->(pn)
  ON CREATE SET
    link.First_Seen = timestamp(),
    link.IPv4_Interface_Address = '10.10.20.217',
    link.Maximum_Link_Bandwidth = 1250000000,
    link.Maximum_Reservable_Bandwidth = 1250000000,
    link.Unreserved_Bandwidth = [1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0],
    link.Shared_Risk_Link_Groups = [306, 1330, 2354, 100200],
    link.asn = 55259,
    link.Operational_Status = True,
    link.Last_Event = timestamp()
  ON MATCH SET
    link.IPv4_Interface_Address = '10.10.20.217',
    link.Maximum_Link_Bandwidth = 1250000000,
    link.Maximum_Reservable_Bandwidth = 1250000000,
    link.Unreserved_Bandwidth = [1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0, 1188540288.0],
    link.Shared_Risk_Link_Groups = [100216],
    link.asn = 55259,
    link.Operational_Status = True,
    link.Last_Event = timestamp()

Clone this wiki locally