These are chat archives for Exa-Networks/exabgp

19th
Feb 2016
Nikos Skalis
@nskalis
Feb 19 2016 14:12
hi guys, can you please advise on how-to decode an extended community, for example 592284684054003 according to https://github.com/Exa-Networks/exabgp/wiki/Extended-Communities
Thomas Mangin
@thomas-mangin
Feb 19 2016 14:31
Can you show me the output from ExaBGP please
592284684054003 is 0x21aae0632edf3
but 0x21 as a start surprises me (hence my question for the output of ExaBGP)
Thomas Mangin
@thomas-mangin
Feb 19 2016 14:36
sorry - I am tired - '%016X' % 592284684054003 is 00021AAE0632EDF3
This message was deleted
Quickly looking 02 is Route Target - I may decode this wrongly BTW
RouteTargetASNIP in the code
Thomas Mangin
@thomas-mangin
Feb 19 2016 14:41
so ASN 6830
and IP … 6.50.237.243 … you have the idea .
Nikos Skalis
@nskalis
Feb 19 2016 14:45
thanks Thomas, where is RouteTargetASNIP located in the code (grep does not return it), i am trying to write a generic unpack method
Thomas Mangin
@thomas-mangin
Feb 19 2016 14:46
If you use the text display, I believe exabgp does parse it for you
for the JSON it may just dump you the number … I need to look to make sure
from exabgp.bgp.message.update.attribute.community.extended.rt import RouteTargetASNIP
Nikos Skalis
@nskalis
Feb 19 2016 14:47
yes it dumps the number (json is my only option when using exabgp)
Thomas Mangin
@thomas-mangin
Feb 19 2016 14:47
if you have the raw packet just do :
./sbin/exabgp qa/conf/simple-v4.conf —decode <BINARY OUTPUT of the PACKET>
the format is hexadecimal of the packet
it should parse it and give you the textual representation of the extended community
Nikos Skalis
@nskalis
Feb 19 2016 14:51
thanks @thomas-mangin i just checked how you are doing that in rt.py
unfortunately, i don't have the binary output, just the decimal (taken from the json output)
but now i have a guide how-to
:)
Thomas Mangin
@thomas-mangin
Feb 19 2016 14:57
you can ask to be given in the JSON both the parsed output and the raw data
using the ‘raw’ option.
Nikos Skalis
@nskalis
Feb 19 2016 15:05
thanks. i'll check it since it is the only way to figure out the the community type of the rt
Thomas Mangin
@thomas-mangin
Feb 19 2016 15:08
Feel free to add a feature request for 4.0 to include the parsed community (text) in the output .. I should really do it.
Nikos Skalis
@nskalis
Feb 19 2016 15:12
"consolidate" just learned about it
sure. i will do. :)
when v4.0 is expected more or less ?
Thomas Mangin
@thomas-mangin
Feb 19 2016 17:05
less :-(
Need some work and I can not find the time atm.
But it is stable and can be used - just be careful when updating as I will change the configuration and JSON format at some point ( config a lot, JSON a very little )