fastnetmon icon indicating copy to clipboard operation
fastnetmon copied to clipboard

multiple BGP communities are not working for ExaBGP

Open Epaphus opened this issue 8 years ago • 9 comments

Hello,

The config file suggests the following.

# specify multiple communities with this syntax:
# exabgp_community = [65001:666 65001:777]

However, When I setup multiple communities the fastnetmon log says it can't parse that bit of the configuration.

2016-11-08 14:50:29,666 [ERROR] Can't parse config line: 'exabgp_community = [65001:666 65001:777]

I don't think it likes the spaces, I have tried the following but none work

exabgp_community = "[65001:666 65001:777]"
exabgp_community = '[65001:666 65001:777]'
exabgp_community = [65001:666\ 65001:777]

This parses correctly, but then EXABGP fails to add the route. exabgp_community = [65001:666,65001:777]

Tue, 08 Nov 2016 14:32:13 | WARNING | 14551 | reactor | Command could not parse route in : announce route xx.xx.xx.45/32 next-hop xxx.x.x.x community [ 65001:666 , 65001:777 ] Running FastNetMon 1.1.3. Any ideas on how to correctly sent multiple BGP communities to EXABGP?

Thanks

Epaphus avatar Nov 08 '16 15:11 Epaphus

Hello!

Thanks for investigation! This question more related to ExaBGP than FNM. FNM just read specified value and use it as is in ExaBGP API.

pavel-odintsov avatar Nov 09 '16 00:11 pavel-odintsov

The correct format for ExaBGP is [65001:666 65001:777]

I think the spaces are an issue for FNM, which is why it says it fails to read the config line when I have it in the correct format.

2016-11-08 14:50:29,666 [ERROR] Can't parse config line: 'exabgp_community = [65001:666 65001:777]

Epaphus avatar Nov 10 '16 10:11 Epaphus

alright, i just hit this error too, any possible fix?

Thu, 29 Jun 2017 11:28:21 11040  processes     Command from process announce-routes : announce route 2.2.2.2/32 next-hop 1.1.0.1 community
Thu, 29 Jun 2017 11:28:21 11040  reactor       callback | handling 'announce route 2.2.2.2/32 next-hop 1.1.0.1 community' with announce_route
Thu, 29 Jun 2017 11:28:21 11040  reactor       callback | installing announce_route
Thu, 29 Jun 2017 11:28:21 11040  reactor       callback | running
Thu, 29 Jun 2017 11:28:21 11040  configuration . route            | '2.2.2.2/32' 'next-hop' '1.1.0.1' 'community'
Thu, 29 Jun 2017 11:28:21 11040  configuration
Thu, 29 Jun 2017 11:28:21 11040  configuration syntax error in api command
Thu, 29 Jun 2017 11:28:21 11040  configuration line 1: route 2.2.2.2/32 next-hop 1.1.0.1 community ;
Thu, 29 Jun 2017 11:28:21 11040  configuration
Thu, 29 Jun 2017 11:28:21 11040  configuration invalid community name
Thu, 29 Jun 2017 11:28:21 11040  reactor       command could not parse route in : announce route 1.1.1.1/32 next-hop 1.1.0.1 community
Thu, 29 Jun 2017 11:28:21 11040  reactor       reason: invalid community name
Thu, 29 Jun 2017 11:28:21 11040  reactor       responding to announce-routes : error
Thu, 29 Jun 2017 11:28:21 11040  reactor       callback | removing

exabgp_community = [65001:666 2222:666]

nidotech avatar Jun 29 '17 03:06 nidotech

Hello!

If you could isolate issue we could definitely fix it.

As I remember we do not have any format checks for community:

        // TODO: add community format validation
        if (configuration_map.count("exabgp_community")) {
            exabgp_community = configuration_map["exabgp_community"];
        }

So, you could use any value inside it.

And in announce code we use following format:

sprintf(bgp_message, "announce route %s next-hop %s community %s\n",
            prefix_as_string_with_mask.c_str(), exabgp_next_hop.c_str(), exabgp_community.c_str());

As you can see we use it as is without any conversions.

Could you share log entry from /var/log/fastnetmon.log:

ExaBGP announce message:...

And we could check what we send to ExaBGP and how we could fix it.

pavel-odintsov avatar Jun 30 '17 19:06 pavel-odintsov

the log entry has been quoted on my above post.

nidotech avatar Jul 03 '17 01:07 nidotech

@nidotech do you have same error as @Epaphus 2016-11-08 14:50:29,666 [ERROR] Can't parse config line: 'exabgp_community = [65001:666 65001:777] ? Right?

pavel-odintsov avatar Jul 03 '17 09:07 pavel-odintsov

I've got that error before, but now I'm only getting an empty community string in fastnetmon.log

nidotech avatar Jul 04 '17 02:07 nidotech

I would like to implement this in a particular environment, has this issue been resolved?

MrHamel avatar Jul 01 '18 21:07 MrHamel

Hello!

No, this feature wasn’t implemented. Sorry, I do not have plans about it. For commercial edition we offer workaround using json hook script.

On Mon, 2 Jul 2018 at 01:39, Ryan Hamel [email protected] wrote:

I would like to implement this in a particular environment, has this issue been resolved?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pavel-odintsov/fastnetmon/issues/598#issuecomment-401635106, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnfZin2TpTCwjU9-P6LL6SNl_iI4bB5ks5uCUGcgaJpZM4KsiUY .

-- Sincerely yours, Pavel Odintsov

pavel-odintsov avatar Jul 01 '18 21:07 pavel-odintsov