Code Monkey home page Code Monkey logo

gixlg's People

Contributors

citizen-insane avatar crami avatar dpiekacz avatar modir avatar tbaschak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gixlg's Issues

Traceback on GIXLG Collector

Helllo!

I have installed ExabGP and i'm trying to get GIXLG to work on a server. I have one eBGP-speaker advertising several IPv4-prefixes to ExaBGP. When i add the process to collect information and install them to the mysql database i get the following:

INFO:root:EXABGP: { "exabgp": "3.5.0", "time": 1476214266.24, "host" : "exabgp01", "pid" : 2740, "ppid" : 1, "counter": 16, "type": "update", "neighbor": { "address": { "local": "172.16.1.5", "peer": "172.16.1.14" }, "asn": { "local": "65129", "peer": "65300" }, "direction": "receive", "message": { "eor": { "afi" : "ipv4", "safi" : "unicast" } } } }
ERROR:root:GIXLG: collector / exception: (<type 'exceptions.KeyError'>, KeyError('ip',), <traceback object at 0x7f179a55d7a0>)
Traceback (most recent call last):
File "/etc/exabgp/processes/collector.py", line 180, in Collector_Worker
prefix["neighbor"] = prefix_json["neighbor"]["ip"]
KeyError: 'ip'

collector.py is configured to debug so i also see the following spamming my logfile

INFO:root:GIXLG: cached prefixes: 0
INFO:root:GIXLG: stats / update
INFO:root:GIXLG: collector queue empty

collector / exception: (<type 'exceptions.KeyError'>, KeyError('neighbor',)

With the newest ExaBGP releas (3.4) some of the json structures have changed.
I get the following error:

INFO:root:EXABGP: { "exabgp": "3.4.0", "time": 1405677894, "host" : "bgpws","pid" : "20236","ppid" : "1","counter": 4, "type": "update","neighbor": { "ip": "2001:67c:8:fefe::1", "message": { "update": { "attribute": { "origin": "igp", "as-path": [ 196621, 15576, 174, 2914, 2500 ], "atomic-aggregate": true, "atomic-aggregate": true, "aggregator": "( 2500:203.178.136.29 )" }, "announce": { "ipv6 unicast": { "2001:67c:8:fefe::1" : { "2001:200::/32": { } } } } } } } }
INFO:root:GIXLG: collector / exception: (<type 'exceptions.KeyError'>, KeyError('neighbor',), <traceback object at 0x1153d40>)

When do you plan to update to the new version?

KeyError exception

I think this might be an issue between different versions of exabgp, can you tell me which version I should be running? I am getting a KeyError exception on originas dictionary.

I added this code to the exception testing:

        except:
            e = sys.exc_info()
            logging.info(e)
            if config["debug"]:
                logging.info("GIXLG: collector / exception")
                if 'prefix' in globals():
                    logging.info(str(prefix))
            Running = False
            os._exit(1)

and I get this log:

INFO:root:GIXLG: main / start
INFO:root:GIXLG: stats / start
INFO:root:GIXLG: collector / start
INFO:root:EXABGP: { "exabgp": "3.3.2", "time": 1399316900.92, "neighbor": { "ip": "10.191.6.119", "state": "connected" } }
INFO:root:GIXLG: connected, neighbor: 10.191.6.119
INFO:root:EXABGP: { "exabgp": "3.3.2", "time": 1399316900.94, "neighbor": { "ip": "10.191.6.119", "state": "up" } }
INFO:root:GIXLG: up, neighbor: 10.191.6.119
INFO:root:GIXLG: main / all threads started
INFO:root:GIXLG: main / 2s loop
INFO:root:EXABGP: { "exabgp": "3.3.2", "time": 1399316900.96, "neighbor": { "ip": "10.191.6.119", "update": { "attribute": { "origin": "igp", "med": 0, "local-preference": 100, "atomic-aggregate": false }, "announce": { "10.191.6.119" : { "10.10.10.0/24": {  } } } } } }
INFO:root:(<type 'exceptions.KeyError'>, KeyError('originas',), <traceback object at 0x188dc68>)

IPv6 ip_end is wrong when prefix is received from an IPv4 neighbor

diff --git a/exabgp/collector.py b/exabgp/collector.py
index e848009..152c844 100755
--- a/exabgp/collector.py
+++ b/exabgp/collector.py
@@ -245,6 +253,11 @@ def Collector_Worker():
prefix["subnet"][i] = int(route[x + 1:])
prefix["ip_start"][i] = IP2int(route[:x])

  •                        if "." in prefix["route"][i]:
    
  •                            prefix["ip_type"] = 4
    
  •                        else:
    
  •                            prefix["ip_type"] = 6
    
    •                    if prefix["ip_type"] == 4:
                             prefix["ip_end"][i] = prefix["ip_start"][i] + (2 *\* (32 - prefix["subnet"][i])) - 1
                         else:
      

Date can not be zero

In the current "sql install script" the date has a default value of zero like e.g. here:

lastup timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',

This is not supported anymore in newer versions of MySQL/MariaDB. I wanted to write a pull request but I am not sure what the real solution is. I could set the default to either NULL or CURRENT_DATETIME. I am not sure though why you have chosen all zeros as the default till now. Could you tell me what was the idea behind it?

In the collector script there is often '0000-00-00 00:00:00' as well. So the bug fix brings code changes there as well.

members table does not get updated

Hi Daniel

Since a long time the member table does not get updated, probably since you introduced the delayed updates. I looked at the code an all seams fine. Do you have any Idea where to start debugging?

Regards

Matthias

exabgp-4.x support

greetings,

I managed to migrate the exabgp.conf to the new format following this guideline and exabgp successfully connects to quagga. I can see the BGP messages in the log_exabgp but it looks like none of them is been passed to the mysql database as all the gixl tables are empty.

Is gixlg compatible with the exabgp-4.x brunch?

regards

PHP fatal errors

When running the PHP code with PHP 7 I get two fatal error and a deprecated message:

PHP Fatal error:  'break' not in the 'loop' or 'switch' context in ./gixlg-core.php on line 151
Errors parsing ./gixlg-core.php

PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; Math_BigInteger has a deprecated constructor in ./lib/BigInteger.php on line 190

PHP Fatal error:  'break' not in the 'loop' or 'switch' context in ./gixlg-map.php on line 24
Errors parsing ./gixlg-map.php

What is the minimum version of PHP you still want to support? I could provide a pull request with changes.

sql/gixlg.sql

I had to edit and remove all the INSERTs in order to successfully import this file to mariaDB. I guess those INSERTs they shouldn't be there in the first place?

Exabgp may receive updates of both address families from the same neighbor.

Hi Daniel, first thanks for such a cool LG. I needed to change your code to make it work properly in my setup, which is something like this:

neighbor 192.0.2.1 {
	local-address 192.0.2.2;
        peer-as 65000;
        local-as 65000;
        family {
               ipv4 unicast;
               ipv6 unicast;
        }
    }
  • exabgp receives both inet and inet6 updates from same neighbor.
  • exabgp and its neighbors are in the same as (doing iBGP).

I made changes in gixlg.sql, collector.py, and gixlg-map.php so it will work in all possible setups.
Also, MySQL's MBRCONTAINS() function does not match 1.0.0.0 to 1.0.0.0/24 prefix, so it needs to be MBRINTERSECTS().

I've shot you PR #18, hoping you'll take time and review it.

Traceback on route advertisement from same AS

Hi,
I've gotten gixlg set up on my server, however I'm having trouble getting some routes installed into the database

The ExaBGP server has an iBGP peering with another router, which has an eBGP peering with a couple of other routers.
It appears whenever Gixlg receives an iBGP route, it isn't installed into the data and a traceback is dumped to the log.
Is this due to gixlg not supporting iBGP routes in its current state?
As follows:

INFO:root:EXABGP: { "exabgp": "3.4.8", "time": 1444819471, "host" : "routeserver.local", "pid" : "10123", "ppid" : "1", "type": "update", "neighbor": { "ip": "125.254.64.18", "address": { "local": "58.96.130.174", "peer": "125.254.64.18"}, "asn": { "local": "65000", "peer": "65000"}, "message": { "update": { "attribute": { "origin": "igp", "med": 0, "local-preference": 100 }, "announce": { "ipv4 unicast": { "125.254.64.18": { "99.99.99.0/24": { } } } } } }} }
INFO:root:GIXLG: worker / {'origin': u'igp', 'subnet': {0: 24}, 'next-hop': u'125.254.64.18', 'med': 0, 'extended-community': '', 'aggregator': '', 'route': {0: u'99.99.99.0/24'}, 'as-path': '', 'atomic-aggregate': '', 'poly': {0: 'GEOMFROMWKB(POLYGON(LINESTRING(POINT(1667457792, -1), POINT(1667458047, -1), POINT(1667458047, 1), POINT(1667457792, 1), POINT(1667457792, -1))))'}, 'state': 'announce', 'community': '', 'neighbor': u'125.254.64.18', 'time': '2015-10-14 21:44:31', 'ip_type': 4, 'ip_end': {0: 1667458047L}, 'as-set': '', 'ip_start': {0: 1667457792L}}
ERROR:root:GIXLG: collector / exception: (<type 'exceptions.KeyError'>, KeyError('originas',), <traceback object at 0x7fb8f4032050>)
Traceback (most recent call last):
File "/opt/gixlg/collector.py", line 457, in Collector_Worker
", atomic-aggregate: " + str(prefix["atomic-aggregate"]) +
KeyError: 'originas'

GIX LG installation guide

Hi,

I have successfully configured ExaBGP on my linux machine having CentOS 7 but now i am unable to find the way forward to install GIX LG. Below are the outputs of few commands. Kindly suggest steps to install GIX LG.


uname -a

Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


exabgp --version

ExaBGP : 4.1.2-d006a34a
Python : 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Uname : Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64
Root : /usr


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.