GithubHelp home page GithubHelp logo

alice-lg / alice-lg Goto Github PK

View Code? Open in Web Editor NEW
196.0 13.0 46.0 7.53 MB

Alice - Through the Looking Glass https://lg.de-cix.net https://lg.ecix.net

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.32% Go 73.27% JavaScript 22.89% CSS 0.10% HTML 0.13% Shell 0.51% Dockerfile 0.15% SCSS 2.63%

alice-lg's Introduction

Alice-LG - Your friendly looking glass

"No, no! The adventures first, explanations take such a dreadful time."
Lewis Carroll, Alice's Adventures in Wonderland & Through the Looking-Glass

Take a look at Alice-LG production examples at:

And checkout the API at:

Breaking Changes

6.0.0

With the new functional react UI, the DOMContentLoaded event can no longer be used for injecting additional content. Please use Alice.onLayoutReady(function(main) { ... }); instead.

5.1.0

The spelling of "neighbors" is now harmonized. Please update your config and replace e.g. neighbour.asn with neighbor.asn (in case of java script errors).

Explanations

Alice-LG is a BGP looking glass which gets its data from external APIs.

Currently Alice-LG supports the following APIs:

Birdwatcher

Normally you would first install the birdwatcher API directly on the machine(s) where you run BIRD on and then install Alice-LG on a seperate public facing server and point her to the afore mentioned birdwatcher API.

This project was a direct result of the RIPE IXP Tools Hackathon just prior to RIPE73 in Madrid, Spain.

Major thanks to Barry O'Donovan who built the original INEX Bird's Eye BIRD API of which Alice-LG is a spinnoff

GoBGP

Alice-LG supports direct integration with GoBGP instances using gRPC. See the configuration section for more detail.

OpenBGPD

Alice-LG supports OpenBGP via bgplgd and openbgpd-state-server.

Building Alice-LG from scratch

These examples include setting up your Go environment, if you already have set that up then you can obviously skip that

CentOS:

First add the following lines at the end of your ~/.bash_profile:

GOPATH=$HOME/go
export GOPATH
PATH=$PATH:$GOPATH/bin
export PATH

Now run:

source ~/.bash_profile

# Install frontend build dependencies
sudo yum install golang npm
sudo npm install --global yarn

mkdir -p ~/go/bin ~/go/pkg ~/go/src/github.com/alice-lg/

cd ~/go/src/github.com/alice-lg
git clone https://github.com/alice-lg/alice-lg.git

cd alice-lg
make

Your Alice-LG source will now be located at ~/go/src/github.com/alice-lg/alice-lg and your alice-LG executable should be at ~/go/src/github.com/alice-lg/alice-lg/bin/alice-lg-linux-amd64

Configuration

An example configuration can be found at etc/alice-lg/alice.example.conf.

You can copy it to any of the following locations:

etc/alice-lg/alice.conf        # local
etc/alice-lg/alice.local.conf  # local
/etc/alice-lg/alice.conf       # global

You will have to edit the configuration file as you need to point Alice-LG to the correct backend source. Multiple sources can be configured.

Birdwatcher:

[source.rs1-example-v4]
name = rs1.example.com (IPv4)
[source.rs1-example-v4.birdwatcher]
api = http://rs1.example.com:29184/
neighbors_refresh_timeout = 2
# show_last_reboot = true
# timezone = UTC
# type = single_table / multi_table
type = multi_table
# not needed for single_table
peer_table_prefix = T
pipe_protocol_prefix = M

[source.rs1-example-v6]
name = rs1.example.com (IPv6)
[source.rs1-example-v6.birdwatcher]
api = http://rs1.example.com:29186/

GoBGP:

[source.rs2-example]
name = rs2.example.com
group = AMS

[source.rs2-example.gobgp]
# Host is the IP (or DNS name) and port for the remote GoBGP daemon
host = rs2.example.com:50051
# ProcessingTimeout is a timeout in seconds configured per gRPC call to a given GoBGP daemon
processing_timeout = 300

Configure TLS with:

tls_crt = /path/to/cert
tls_common_name = "common name"

You can disable TLS with insecure = true.

OpenBGPD via openbgpd-state-server:

[source.rs-example]
name = rs-example.openbgpd-state-server

[source.rs-example.openbgpd-state-server]
api = http://rs23.example.net:29111/api

# Optional response cache time in seconds
# Default: disabled (0)
cache_ttl = 100

OpenBGPD via bgplgd:

[source.rs-example]
name = rs-example.openbgpd-bgplgd

[source.rs-example.openbgpd-bgplgd]
api = http://rs23.example.net/bgplgd

# Optional response cache time in seconds
# Default: disabled (0)
cache_ttl = 100

Running

Launch the server by running

./bin/alice-lg-linux-amd64

Customization

Alice now supports custom themes! In your alice.conf, you now can specify a theme by setting:

[theme]
path = /path/to/my/alice-theme

with the optional parameter (the "mountpoint" of the theme) url_base = /theme

You can put assets (images, fonts, javscript, css) in this folder.

Stylesheets and Javascripts are automatically included in the client's html and are served from the backend.

Alice provides early stages of an extension API, which is for now only used to modify the content of the welcome screen, by providing a javascript in your theme containing:

Alice.updateContent({
    welcome: {
        title: "My Awesome Looking Glass",
        tagline: "powered by Alice"
    }
});

A callback for running custom javascript after the base application was initialized can be installed using:

Alice.onLayoutReady(function(page) {
    // page is the layout HTML root element
});

For an example check out: https://github.com/alice-lg/alice-theme-example

Hacking

The client is a Single Page React Application. All sources are available in ui/.

Yarn is required for building the UI.

Create a fresh UI build with

cd ui/
make

This will install all dependencies with yarn install and run yarn build.

As this is a create-react-app application, react-scripts are present and you can just run a development server using yarn start.

All this available as a containerized environment:

Running docker-compose up in the ./dev will build and start the backend and run a webpack dev server for the UI.

The UI is then available on http://localhost:3000/ and on http://localhost:7340/ the backend will serve the API.

Sponsors

The development of Alice is now sponsored by

DE-CIX Logo

Many thanks go out to ECIX, where this project originated and was backed over the last two years.

Support for OpenBGPD was sponsored by the Route Server Support Foundation.

alice-lg's People

Contributors

annikahannig avatar benerudolph avatar bluikko avatar ctassisf avatar daswafford avatar dependabot[bot] avatar hellerve avatar itzwam avatar jof avatar johannesmoos avatar mxsasha avatar nicko170 avatar stv0g 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  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

alice-lg's Issues

Consistent route server IDs

The route server IDs configured in the config differ from the IDs used in the URL/API.

Configuration:

[source.42]
name = rs1.my.ixp
...
[source.42.birdwatcher]
...

If this is the first RS, it is referred to with ID 0 (and so on):

UI: https://lg.my.ixp/alice/routeservers/0
API: https://lg.my.ixp/api/v1/routeservers/0/status

Would be nice if the ID from the config is used - for the example config above, it should look like this:

UI: https://lg.my.ixp/alice/routeservers/42
API: https://lg.my.ixp/api/v1/routeservers/42/status

Small Cosmetic Issue

We are planning to replace all our Cisco Collector devices on our peering LAN's with BRID and will use AliceLG/Birdwatcher for the Looking-Galss.

One very small issue we have found is we can not change the title "Route-Servers" from the menu panel on the left of the AliceLG page as show in the attached screenshot.

Screenshot 2020-10-22 at 11 53 56

Is it possible add a feature where this can be changed and AliceLG could be used not just for Route-Servers but for Routers/ Collectors as well.

If there is a method where this can be changed please let me know how .

Kind Regards

Mo
(on behalf of LINX)

Document usage of variable "asn" in configuration

There are a few issues that refer using the asn = configuration option as a list and then somehow that list of ASNs can be used in large communities.

But I could not figure out how to even use the simple asn = 65534 in communities.

Say, I have:

[server]
...
# In reality I'm testing with a 32-bit ASN
asn = 65534

And then a large community beginning with this ASN:

[bgp_communities]
65534:123:45 = Some community

If I understand correctly, somehow the asn variable could be used in place of the ASN in the community.

I have tested:

asn:123:45 = ...
ASN:123:45 = ...
$asn:123:45 = ...
:123:45 = ...
$ASN:123:45 = ...

None of these work and the large community 65534:123:45 is undetected in Alice-LG.

Am I understanding the purpose of the asn variable correctly? What is the syntax of using it?

This should be documented in my opinion - or an example of usage in the example config file.

Some other points, I'd prefer not to open more issues without feedback if these are valid issues or user errors:

  • At de-cix Alice-LG instance the communities drop-down list has colorized communities. Is this a feature of Alice-LG or themed or a specific modification at de-cix?
  • At Alice-LG startup I am seeing Skipping malformed BGP community: but no line is listed as pkg/backend/config.go would indicate. As a test I commented out all 3 community stanza from configuration and then this line was displayed 3 times... could not locate where this error comes from.
  • With BIRD2 the IPv4 and IPv6 features are merged. This leads to the IPv4 birdwatcher listing all IPv6 neighbors with 0 routes - and conversely the IPv6 birdwatcher instance lists all IPv4 neighbors with 0 routes.

Integration issue between Alice-LG and Birdwatcher

Situation
We require your support in order to complete the correct integration between Alice-LG and Birdwatcher API.
We installed Alice-LG in a CentOs 7 Server. We can start Alice-LG with the Binary generaded from "make" without trouble. But the Alice-LG indicated that it was an error comuniicating with a JSON on the Birdwatcher Server.
The birdwatcher was installed in a Ubuntu Server. In the same server is running the Bird daemon. We can start Birdwatcher in Docker mode and with the Binary generaded from make /Makefile too. In the case of make, we tried with amd64 and 386 in the variable GOARCH. In both cases the log informs http errors next to start Birdwatcher (301, 500, 429).
General Info
โ€ขAlice-LG Server: Hostname alice, IP 10.7.102.208, CentOs 7, adm64, RAM 4 GB. Apache Webserver. We can access to the Alice-LG Web Interface but a windows popup inidicated thas there is a trouble with the Route Server.
โ€ขBird/Birdwatcher Server: Hostname bird-devel-test, IP 10.7.103.227, Ubuntu 18.04 LTS, amd64, RAM 4 GB. Running Birdseye too
โ€ขHandle for birdc daemon: rs1-lantest-ipv4 (This handle was put into the hosts file en /etc on both servers
Applications status and outputs
From Alice-LG Server:
[ppuser@alice bin]$ ./alice-lg-linux-amd64
2021/02/17 12:08:04 Adding birdwatcher source of type multi_table with peer_table_prefix T and pipe_protocol_prefix M
** *** Alice 4.2.0
***** *** *
* *** ** *** Listening on: 10.7.102.208:7345
*** ** * Routeservers: 1
* ** **
* ** ** *** **** ***
* ** ** *** * *** * * ***
* ** ** ** * **** * ***
* ** ** ** ** ** ***
********* ** ** ** ********






**
2021/02/17 12:08:04 Using configuration: ../etc/alice-lg/alice.conf
2021/02/17 12:08:04 Starting local routes store
2021/02/17 12:08:04 Routes Store refresh interval set to: 5m0s
2021/02/17 12:08:04 Starting local neighbours store
2021/02/17 12:08:04 Neighbours Store refresh interval set to: 5m0s
2021/02/17 12:08:04 Preparing and installing assets
2021/02/17 12:08:04 Using theme at: /home/ppuser/go/src/github.com/alice-lg/alic e-lg/alice-theme-example/
2021/02/17 12:08:04 Refreshing the routes store failed for: rs1-lantest-ipv4 (IP v4) ( rs0-lantest-ipv4 ) with: unexpected end of JSON input - NEXT STATE: ERROR
2021/02/17 12:08:04 Refreshed routes store for 0 of 1 sources with 1 error(s) in 17.052435ms
2021/02/17 12:08:04 Routes store:
2021/02/17 12:08:04 Routes Imported: 0 Filtered: 0
2021/02/17 12:08:04 Routeservers:
2021/02/17 12:08:04 - rs1-lantest-ipv4 (IPv4)
2021/02/17 12:08:04 State: ERROR
2021/02/17 12:08:04 UpdatedAt: 2021-02-17 12:08:04.054366654 -0500 EST m =+0.031546064
2021/02/17 12:08:04 Routes Imported: 0 Filtered: 0
2021/02/17 12:08:04 Refreshing the neighbors store failed for: rs1-lantest-ipv4 (IPv4) ( rs0-lantest-ipv4 ) with: bird unreachable - NEXT STATE: ERROR
2021/02/17 12:08:04 Refreshed neighbors store for 0 of 1 sources with 1 error(s) in 17.290347ms
2021/02/17 12:08:04 Neighbours store:
2021/02/17 12:08:04 Neighbours: 0
2021/02/17 12:08:04 - rs1-lantest-ipv4 (IPv4)
2021/02/17 12:08:04 State: ERROR
2021/02/17 12:08:04 UpdatedAt: 2021-02-17 12:08:04.05479604 -0500 EST m= +0.031974283
2021/02/17 12:08:04 Neighbours: 0

From Bird/Birdwatcher Server:
root@bird-devel-test:/home/ppuser/go/src/github.com/alice-lg/birdwatcher# docker build . -t alicelg/birdwatcher:latest
Sending build context to Docker daemon 19.79MB
Step 1/14 : FROM golang:1.13 AS app
---> d6f3656320fe
Step 2/14 : WORKDIR /src/birdwatcher
---> Using cache
---> ae1f387591fd
Step 3/14 : ADD vendor .
---> Using cache
---> eae4881e1e9a
Step 4/14 : ADD go.mod .
---> Using cache
---> e2fb844133db
Step 5/14 : ADD go.sum .
---> Using cache
---> f16bcfe74f94
Step 6/14 : RUN go mod download
---> Using cache
---> a9b0a57425d1
Step 7/14 : ADD . .
---> 6577355de47d
Step 8/14 : RUN make
---> Running in ce189559b4bc
GO111MODULE=on GOARCH=amd64 GOOS=linux go build -o birdwatcher-linux-amd64
Built 2.2.0_462fe13 @ linux
Removing intermediate container ce189559b4bc
---> 21b4a56c35ed
Step 9/14 : FROM ehlers/bird2
---> d869eef20c36
Step 10/14 : COPY --from=app /src/birdwatcher/birdwatcher-linux-amd64 /usr/bin/birdwatcher
---> Using cache
---> ebcc7b16c8c3
Step 11/14 : ADD etc/birdwatcher/birdwatcher.conf /etc/birdwatcher/birdwatcher.conf
---> Using cache
---> 37515a4cbd1c
Step 12/14 : EXPOSE 29184/tcp
---> Using cache
---> 8278fc41fb90
Step 13/14 : EXPOSE 29186/tcp
---> Using cache
---> 7fdc682838fe
Step 14/14 : ENTRYPOINT ["/usr/bin/birdwatcher", "-config", "/etc/birdwatcher/birdwatcher.conf"]
---> Using cache
---> 995aaf95f49a
Successfully built 995aaf95f49a
Successfully tagged alicelg/birdwatcher:latest
root@bird-devel-test:/home/ppuser/go/src/github.com/alice-lg/birdwatcher# docker run -p 29184:29184 -v /var/run/rs1-lantest-ipv4.ctl:/usr/local/var/run/rs1-lantest-ipv4.ctl -it --rm alicelg/birdwatcher:latest
Using config file: /etc/birdwatcher/birdwatcher.conf
Starting Birdwatcher
Using: birdc
Listen: 0.0.0.0:29184
Cache TTL: 10
AllowFrom: ALL
Caching backend: MEMORY
ModulesEnabled:
- status
- protocols
- protocols_bgp
- protocols_short
- routes_protocol
- routes_peer
- routes_table
- routes_table_filtered
- routes_table_peer
- routes_filtered
- routes_prefixed
- routes_noexport
- routes_pipe_filtered_count
- routes_pipe_filtered
10.7.102.208 - - [22/Feb/2021:23:35:42 +0000] "GET //protocols HTTP/1.1" 301 45
10.7.102.208 - - [22/Feb/2021:23:35:42 +0000] "GET //protocols HTTP/1.1" 301 45
10.7.102.208 - - [22/Feb/2021:23:35:42 +0000] "GET /protocols HTTP/1.1" 500 28
10.7.102.208 - - [22/Feb/2021:23:35:42 +0000] "GET /protocols HTTP/1.1" 429 0
// The same ocurrs with the binary
Troubleshooting
We made some tasks in order to detect the problem
From Bird/Birdwatcher Server:

root@bird-devel-test # netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 917/lighttpd
tcp 0 0 10.7.103.227:179 0.0.0.0:* LISTEN 6473/bird
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 687/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 903/sshd
tcp 0 0 127.0.0.1:43703 0.0.0.0:* LISTEN 855/containerd
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 5440/sshd: ppuser@p
tcp 0 0 127.0.0.1:6011 0.0.0.0:* LISTEN 6386/sshd: ppuser@p
tcp 0 0 127.0.0.1:6012 0.0.0.0:* LISTEN 7655/sshd: ppuser@p
tcp6 0 0 :::29184 :::* LISTEN 7718/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 903/sshd
tcp6 0 0 ::1:6010 :::* LISTEN 5440/sshd: ppuser@p
tcp6 0 0 ::1:6011 :::* LISTEN 6386/sshd: ppuser@p
tcp6 0 0 ::1:6012 :::* LISTEN 7655/sshd: ppuser@p

From Alice-LG Server:
[root@alice ppuser]# telnet rs1-lantest-ipv4 29184
Trying 10.7.103.227...
Connected to rs1-lantest-ipv4.
Escape character is '^]'.
[root@aliceppuser]#curl rs1-lantest-ipv4:29184
curl: (7) Failed connect to rs1-lantest-ipv4:29184; Connection refused

.conf files:

Centos Alice-LG_alice.conf.log
Bird Devel_birdwatcher.conf.log

Support LPM lookups for addresses

One feature I feel missing is that currently an user must query the exact advertised prefix instead of an address in the prefix. Thus implementing LPM lookup for an exact address would help. In birdc one would accomplish this by show route for 1.2.3.4

Columns "Routes Received" and "Filtered" show the same values

We've updated alice-lg and birdwatcher to their current versions today. Now both columns "Received" + "Filtered" show the same values although in most cases all routes are accepted or only some of them are filtered.

image

We're running BIRD 1. Is there any configuration parameter I may be missing?

On the details page for the respective ASes, the routes are shown correctly as filtered / accepted.

image

RPKI flags & exported routes

Hello team!

We have been using Alice for several months now, but we have not been able to use some of the functionality.

  1. We tried to use flags along with RPKI functionality (to get RPKI icons, like here: https://lg.de-cix.net/routeservers/rs1_fra_ipv4/protocols/R194_42/routes ), however, as soon as routes match with community from RPKI section , the routes in the neighbor's section on the alice stop loading.

The config looks like this:

[rpki]
enabled = true
valid = 50952:1000:0
unknown = 50952:1000:1
not_checked = 50952:1000:2
invalid = 50952:1000:3

Could this be due to the fact that we are using both large community and extended community at the same time on the same prefix?

  1. Also, we are looking for a way to show the exported prefixes for a specific neighbor.
    Now, we can show only their total numbers, but we cannot upload to the neighbor's page, as it happens with accepted, filtered and not exported routes.
    Is there any way to do this?

Thanks!

Error handling for too long/invalid RS IDs

The RS IDs are limited to 15 characters. While this might be sufficient, Alice happily loads the config but then complains at runtime with

Alice has trouble connecting to the API (got GENERIC_ERROR).

for the corresponding RS.

It should not start at all in this case or the error message should be made more clear for this case.

Works:

[source.abcdefghijklmno]
name = rs1.my.ixp
[source.abcdefghijklmno.birdwatcher]
...

Does not work (GENERIC_ERROR):

[source.abcdefghijklmnop]
name = rs2.my.ixp
[source.abcdefghijklmnop.birdwatcher]
...

ASN not searchable from 'search on all route servers'

Short Description

When searching for an ASN in the 'search on all route servers'-searchfield (on the front page), there are 0 results for several ASN that are actually present at route servers.

Reproduce the Error

  1. go to lg.de-cix.net
  2. search for AS 6939 or AS6939 (Hurricane Electric) on all route servers
    • 0 results will show up
  3. click on rs1.fra.de-cix.net (IPv4) in the side bar
  4. search for AS 6939 or AS6939 (Hurricane Electric) on rs1.fra.de-cix.net
    • 1 result shows up

Problem with TLS

I'm trying run Alice-LG an i'm getting the following error

2020/08/28 02:48:19 could not load tls cert: open : no such file or directory

There is any way to disable TLS ?

Issue in IRR error detection

In present logic if a IX member (say AS100) announce a route of it's downstream AS200. Now AS 200 has bad route-object and instead of putting AS200 in IRR route object, it puts AS300.

In this case there's clearly it route object issue but instead, current looking glass detects it as AS SET issue because it feels that AS300 is missing from AS SET which shouldn't be there in first place.

Error I see in this case:
IRRDB lookup: AS-SET does not include origin AS

Desired Error:
IRRDB lookup: Mismatching origin AS in the route object

"SEARCH" by BGP Communities on "ON ALL ROUTE SERVERS"

Considering that now days most of route-servers have a particularly good filtering and communities marking, the possibility of searching by BGP Communities (Standard, Extended, and Large) would be a particularly good feature.

image

Not to sure

I get a build error, because node-sass uses python2 and the print syntax is wrong:

deavmi@bababooey:~/Documents/Builds/alice-lg $ make -C client/ client_prod
make: Entering directory '/home/deavmi/Documents/Builds/alice-lg/client'
Installing dependencies
yarn install
yarn install v1.22.11
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /home/deavmi/Documents/Builds/alice-lg/client/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments: 
Directory: /home/deavmi/Documents/Builds/alice-lg/client/node_modules/node-sass
Output:
Building: /usr/bin/node /home/deavmi/Documents/Builds/alice-lg/client/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/bin/node',
gyp verb cli   '/home/deavmi/Documents/Builds/alice-lg/client/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "/usr/bin/python3" in the PATH
gyp verb `which` succeeded /usr/bin/python3 /usr/bin/python3
gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:319:12)
gyp ERR! stack     at ChildProcess.emit (events.js:376:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Linux 5.13.7-200.fc34.x86_64
gyp ERR! command "/usr/bin/node" "/home/deavmi/Documents/Builds/alice-lg/client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/deavmi/Documents/Builds/alice-lg/client/node_modules/node-sass
gyp ERR! node -v v14.17.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
make: *** [Makefile:27: deps] Error 1
make: Leaving directory '/home/deavmi/Documents/Builds/alice-lg/client'

Have no idea how I'd fix this.

make failed

image
[root@harbor alice-lg]# make
go test ./pkg/...
client/assets.go:11:12: pattern build/*: no matching files found
make: *** [backend_tests] Error 1
[root@harbor alice-lg]#

Status message for empty routes cache

If the routes cache is still empty (after Alice start) a search brings up a message like this:

Routes cache was built 2018 years ago and is currently being refreshed.

In case of an empty cache, the message should be changed to something like this:

Routes cache is still empty and is currently being built.

unknown net, unknown gateway, unknown interface - bird2 + birdwatcher

I'm running alice with birdwatcher and bird2. bird acts just as a pure route collector from a route-reflector in our network. I have no errors in the logs, and everything launches correctly, but whenever I try to bring up a peer's accepted routes table on the frontend (routeservers/debug0v4/protocols/debug0v4/routes), there's just a single entry with "unknown net, unknown gateway, unknown interface". This is a full-table peer and alice sees 820,000+ routes received on the neighbor. I followed some advice from
ecix/alice-lg#12
and made sure there's no special characters in the protocol's name. Stumped on this one.

/etc/bird.conf

router id 1.2.3.4;

protocol bgp 'debug0v4' {
        local as 1234;
        description "debug0";
        neighbor 1.2.3.5 as 1234;
        capabilities off;
        ipv4 {
                import filter {accept;};
                export filter {reject;};
        };
}

protocol bgp 'debug0v6' {
        local as 1234;
        description "debug0";
        neighbor 1:2:3::6 as 1234;
        ipv6 {
               import filter {accept;};
               export filter {reject;};
        };
}


timeformat base         iso long;
timeformat log          iso long;
timeformat protocol     iso long;
timeformat route        iso long;


------------------------


/etc/birdwatcher/birdwatcher.conf

# Everything except these two contexts are just default config

[bird]
listen = "0.0.0.0:29184"
config = "/etc/bird.conf"
birdc  = "birdc"
ttl = 5 # time to live (in minutes) for caching of cli output

[bird6]
listen = "0.0.0.0:29186"
config = "/etc/bird.conf"
birdc  = "birdc"
ttl = 5 # time to live (in minutes) for caching of cli output

--------------------------

/etc/alice-lg/alice.conf

[server]
listen_http = :80
enable_prefix_lookup = true
enable_neighbors_status_refresh = true
asn = 1234

[housekeeping]
interval = 5
force_release_memory = true

[pagination]
routes_filtered_page_size = 250
routes_accepted_page_size = 250
routes_not_exported_page_size = 250

[rpki]
enabled = true

[neighbours_columns]
address = Neighbour
asn = ASN
state = State
Uptime = Uptime
Description = Description
routes_received = Routes Received
routes_filtered = Filtered

[routes_columns]
network = Network
gateway = Gateway
interface = Interface
metric = Metric
bgp.as_path = AS Path

[lookup_columns]
network = Network
gateway = Gateway
neighbour.asn = ASN
neighbour.description = Description
bgp.as_path = AS Path
routeserver.name = RS

[source.debug0v4]
name = debug0
group = AMS

[source.debug0v4.birdwatcher]
api = http://127.0.0.1:29184
neighbors_refresh_timeout = 2
type = single_table
servertime = 2006-01-02T15:04:05.999999999Z07:00
servertime_short = 2006-01-02 15:04:05
servertime_ext = 2006-01-02 15:04:05

[source.debug0v6]
name = debug0
group = AMS

[source.debug0v6.birdwatcher]
api = http://127.0.0.1:29186
neighbors_refresh_timeout = 2
type = single_table
servertime = 2006-01-02T15:04:05.999999999Z07:00
servertime_short = 2006-01-02 15:04:05
servertime_ext = 2006-01-02 15:04:05

Logs during page load:

127.0.0.1 - - [02/Nov/2020:16:43:45 -0500] "GET /status HTTP/1.1" 200 267
127.0.0.1 - - [02/Nov/2020:16:43:45 -0500] "GET /status HTTP/1.1" 200 268
127.0.0.1 - - [02/Nov/2020:16:43:46 -0500] "GET /protocols/short?uncached=true HTTP/1.1" 200 249
127.0.0.1 - - [02/Nov/2020:16:43:48 -0500] "GET /protocols/short?uncached=true HTTP/1.1" 200 248
127.0.0.1 - - [02/Nov/2020:16:43:48 -0500] "GET /routes/noexport/debug0v4 HTTP/1.1" 200 175
127.0.0.1 - - [02/Nov/2020:16:43:48 -0500] "GET /routes/protocol/debug0v4 HTTP/1.1" 200 15891236
127.0.0.1 - - [02/Nov/2020:16:44:37 -0500] "GET /routes/filtered/debug0v4 HTTP/1.1" 200 173

birdc

 show protocols all
BIRD 2.0.7 ready.
Name       Proto      Table      State  Since         Info
debug0v4   BGP        ---        up     2020-11-02 16:16:20  Established
  Description:    debug0
  BGP state:          Established
    Neighbor address: 1.2.3.5
    Neighbor AS:      1234
    Local AS:         1234
    Neighbor ID:      1.2.3.5
    Local capabilities
    Neighbor capabilities
    Session:          internal multihop
    Source address:   172.17.0.7
    Hold timer:       21.482/30
    Keepalive timer:  4.480/10
  Channel ipv4
    State:          UP
    Table:          master4
    Preference:     100
    Input filter:   (unnamed)
    Output filter:  (unnamed)
    Routes:         820099 imported, 0 exported, 820099 preferred
    Route change stats:     received   rejected   filtered    ignored   accepted
      Import updates:         850527          0          0          0     850527
      Import withdraws:          761          0        ---          0        761
      Export updates:         850527     850527          0        ---          0
      Export withdraws:          761        ---        ---        ---          0
    BGP Next hop:   172.17.0.7
    IGP IPv4 table: master4

debug0v6   BGP        ---        up     2020-11-02 16:16:21  Established
  Description:    debug0
  BGP state:          Established
    Neighbor address: 1:2:3:::6
    Neighbor AS:      1234
    Local AS:        1234
    Neighbor ID:      1.2.3.5
    Local capabilities
      Multiprotocol
        AF announced: ipv6
      Route refresh
      Graceful restart
      4-octet AS numbers
      Enhanced refresh
      Long-lived graceful restart
    Neighbor capabilities
      Multiprotocol
        AF announced: ipv6
      Route refresh
      Extended next hop
        IPv6 nexthop: ipv4 ipv4-mc vpn4-mpls
      Graceful restart
        Restart time: 120
        AF supported: ipv6
        AF preserved:
      4-octet AS numbers
    Session:          internal multihop AS4
    Source address:   fd00::242:ac11:7
    Hold timer:       21.244/30
    Keepalive timer:  5.849/10
  Channel ipv6
    State:          UP
    Table:          master6
    Preference:     100
    Input filter:   (unnamed)
    Output filter:  (unnamed)
    Routes:         95117 imported, 0 exported, 95117 preferred
    Route change stats:     received   rejected   filtered    ignored   accepted
      Import updates:         110698          0          0          0     110698
      Import withdraws:          892          0        ---          0        892
      Export updates:         110698     110698          0        ---          0
      Export withdraws:          892        ---        ---        ---          0
    BGP Next hop:   fd00::242:ac11:7
    IGP IPv6 table: master6

Screenshots

image
image
image

The last screenshot shows that it's parsing something meaningful from bird.

Disable search until backend is ready

Right now when the UI tries to use the search while the backend is not ready a 500 error is returned and displayed.

Improvements:

  • Display better error
  • Disable search (and display message) until backend is ready to accept requests.

ipv6 routes with % interface

I've joined the DN42 network to learn and mess around, and I've setup Alice and haev no issues with the ipv4 part of it, but it seems when I try to look at ipv6 routes with IPV6IP%interfacename I get the below error:

API ERROR :: xxxx (IPv6).routes_filtered(sheepjp) :: parse "http://ip.here:29186//routes/peer/fd88:ee35:b221:1::100%sheepjp": invalid URL escape "%sh"

I run wireguard interfaces as with bird2 I use the ip%interface I the bgp peer.
I'm sure I'm just overlooking something.

Thank you,

Full support for multiple ASNs

At DE-CIX we use different RS ASNs for different locations but all RS are queried by a single Alice instance. RS ASN is set with asn = 6695

While it is possible (but does not really scale in case of many Communities and different RS ASNs) to use e.g.

65501:1101:3 = Bogon prefix (RFC1918 network)
65502:1101:3 = Bogon prefix (RFC1918 network)
65502:1101:3 = Bogon prefix (RFC1918 network)

and so on this does (for example) not apply to the [rpki] section.

Full support could be implemented by allowing multiple RS ASNs:
asn = { 65501, 65502, 65503, ... }

The ASN should not need to be specified in e.g.
65501:1101:3 = Bogon prefix (RFC1918 network)

Question: FRR/Quagga Support

Hi,

just a short question. Is there a intention to support FRR / Quagga in the near future?

Greetings
Matthias

Error making Alice

Hi! Thanks a lot for the project, It's very interesting and useful.

We get problems compiling the source after cloning repo.

If we compile the old one ([https://github.com/ecix/alice-lg]) all works without problem.

FYI.

Where to place the ```build/``` directory in normal (non docker) install at deployment ?

Hi,

  • I could build the binary for alice-lg (from tag 5.1.1)
  • I deployed it (/opt/alice-lg/alice-lg/bin + symlink in /usr/bin) alongside a .conf (/etc/alice-lg)
  • I configured a systemd service

However, I am stuck on this issue:

โ— alice-lg.service - Alice Looking Glass
     Loaded: loaded (/etc/systemd/system/alice-lg.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-10-24 15:19:51 UTC; 1s ago
    Process: 18794 ExecStart=/opt/alice-lg/alice-lg/bin/alice-lg-linux-amd64 (code=exited, status=1/FAILURE)
   Main PID: 18794 (code=exited, status=1/FAILURE)
        CPU: 24ms

Oct 24 15:19:51 alice alice-lg-linux-amd64[18794]:   *****      **     **      **    ***     *  ****    *
Oct 24 15:19:51 alice alice-lg-linux-amd64[18794]:  *   ****    ** *   *** *   *** *  *******    *******
Oct 24 15:19:51 alice alice-lg-linux-amd64[18794]: *     **      **     ***     ***    *****      *****
Oct 24 15:19:51 alice alice-lg-linux-amd64[18794]: *
Oct 24 15:19:51 alice alice-lg-linux-amd64[18794]:  **
Oct 24 15:19:51 alice alice-lg-linux-amd64[18794]: 2022/10/24 15:19:51 Using configuration: /etc/alice-lg/alice.conf
Oct 24 15:19:51 alice alice-lg-linux-amd64[18794]: 2022/10/24 15:19:51 Preparing and installing assets
Oct 24 15:19:51 alice alice-lg-linux-amd64[18794]: 2022/10/24 15:19:51 open build/index.html: file does not exist
Oct 24 15:19:51 alice systemd[1]: alice-lg.service: Main process exited, code=exited, status=1/FAILURE
Oct 24 15:19:51 alice systemd[1]: alice-lg.service: Failed with result 'exit-code'.

My question: please, where to copy the build/ (containing the website part, statics, etc.) directory I obtained after building alice-lg ?

I was potentially expecting some parameter to change in the .conf, but could not find anything. Any reference in the golang sources seems to be related maybe to the root of the programm ? Do we have to deploy being some server (gunicorn ?) that would serve the build/ files ?

Incorrect uptime of BGP neighbours

Hi team,

In our Alice deployment we see in the BGP sessions Established section an uptime of 292 years, both for the IPv4 version and the IPv6 version. You can observe it clearly in the following screenshot.
screenshot-alice2

Can you provide a fix for this issue? The birdwatcher is attached to a Bird v2 instance and we run the latest version both for Alice and birdwatcher.

Thanks
Stavros | AMS-IX NOC

Erroneous peer description on OpenBGP peers.

When using openbgp and bgp-state-server, the peer description is set to the format PEER AS{ASN} {PEER_ADDRESS} instead of the given description from bgp-state-server.

(PR is coming to fix this)

make error

Hi guys !

Im trying to install alice on ubuntu 16.04, but I got this message when run make:

make -C client/ client_prod
make[1]: Entering directory '/home/pop/go/src/github.com/alice-lg/alice-lg/client'
Installing dependencies
yarn install
Building alice UI (production)
DISABLE_LOGGING=1 NODE_ENV=production gulp
assert.js:340
throw err;
^

AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/home/pop/go/src/github.com/alice-lg/alice-lg/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/home/pop/go/src/github.com/alice-lg/alice-lg/node_modules/undertaker/lib/task.js:13:8)
at Object. (/home/pop/go/src/github.com/alice-lg/alice-lg/client/gulp/tasks/app.js:46:6)
at Module._compile (internal/modules/cjs/loader.js:799:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
at Module.load (internal/modules/cjs/loader.js:666:32)
at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
at Function.Module._load (internal/modules/cjs/loader.js:598:3)
at Module.require (internal/modules/cjs/loader.js:705:19)
at require (internal/modules/cjs/helpers.js:14:16)
Makefile:34: recipe for target 'client_prod' failed
make[1]: *** [client_prod] Error 1
make[1]: Leaving directory '/home/pop/go/src/github.com/alice-lg/alice-lg/client'
Makefile:36: recipe for target 'client_prod' failed
make: *** [client_prod] Error 2

Please, can someone help me?

Docker image out of date - automate image builds with GitHub Action

There is an extremely convenient Docker image available at https://hub.docker.com/r/alicelg/alice but unfortunately it is version 4.0.3.

The Docker image makes it possible for small operations to use Alice-LG. I would like to inquire how is that image built if it is so out of date - is it built manually?

Would it be possible to create a GitHub Action for creating Docker images automatically from tagged releases? This would be the modern way to do it. Unfortunately I have experience only with GitLab and not GitHub CI but could try to have a go at it if nobody more experienced is interested.

Similarly for birdwatcher - there could be a GitHub Action to build the RPM. I would say it is more likely that route servers would install using an RPM than the (also 2 years old version) Docker image.

Edit: there is a proof of concept for building and packing birdwatcher as an RPM in alice-lg/birdwatcher#40 and something similar could be done to build the Docker image.

make error No such file or directory: 'install'

make -C client/ client_prod
make[1]: Entering directory '/root/go/src/github.com/alice-lg/alice-lg/client'
Installing dependencies
yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'
make[1]: *** [Makefile:27: deps] Error 1
make[1]: Leaving directory '/root/go/src/github.com/alice-lg/alice-lg/client'
make: *** [Makefile:36: client_prod] Error 2

OS is debian 10

Show exported routes (not just total)?

Hi,

A feature request was brought up in #57, which went on to focus on the other reported issue - is there any way (currently) to show a list of routes exported to a peer, alongside routes received and routes not exported?

If not, does anyone have any interest in adding this feature?

panic: runtime error, using goBGP with insecure=true

alice.conf

[server]
listen_http = 127.0.0.1:80
enable_prefix_lookup = true
enable_neighbors_status_refresh = false
asn = 1234

[housekeeping]
interval = 5
force_release_memory = true


[pagination]
routes_filtered_page_size = 250
routes_accepted_page_size = 250
routes_not_exported_page_size = 250

[rpki]
enabled = true

[neighbours_columns]
address = Neighbour
asn = ASN
state = State
Uptime = Uptime
Description = Description
routes_received = Routes Received
routes_filtered = Filtered

[routes_columns]
network = Network
gateway = Gateway
interface = Interface
metric = Metric
bgp.as_path = AS Path

[lookup_columns]
network = Network
gateway = Gateway
neighbour.asn = ASN
neighbour.description = Description
bgp.as_path = AS Path
routeserver.name = RS

[source.debug0]
name = debug0
group = AMS

[source.debug0.gobgp]
host = 127.0.0.1:6060
processing_timeout = 300

I have insecure=true set as I could not find any solution to TLS issues mentioned in another thread.
Now I get runtime errors:

alice@521a2d4ee8fa:~/go/src/github.com/alice-lg/alice-lg/bin$ sudo ./alice-lg-linux-amd64
2020/10/23 15:25:36 Skipping malformed BGP community:
2020/10/23 15:25:36 Skipping malformed BGP community:
2020/10/23 15:25:36 Skipping malformed BGP community:
        **        ***               Alice 4.2.0
     *****         ***      *
    *  ***          **     ***      Listening on: 127.0.0.1:80
       ***          **      *       Routeservers: 1
      *  **         **
      *  **         **    ***        ****       ***
     *    **        **     ***      * ***  *   * ***
     *    **        **      **     *   ****   *   ***
    *      **       **      **    **         **    ***
    *********       **      **    **         ********
   *        **      **      **    **         *******
   *        **      **      **    **         **
  *****      **     **      **    ***     *  ****    *
 *   ****    ** *   *** *   *** *  *******    *******
*     **      **     ***     ***    *****      *****
*
 **
2020/10/23 15:25:36 Using configuration: /etc/alice-lg/alice.conf
2020/10/23 15:25:36 Starting local routes store
2020/10/23 15:25:36 Routes Store refresh interval set to: 5m0s
2020/10/23 15:25:36 Starting local neighbours store
2020/10/23 15:25:36 Neighbours Store refresh interval set to: 5m0s
2020/10/23 15:25:36 Preparing and installing assets
**panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x90a5d9]**

goroutine 7 [running]:
github.com/alice-lg/alice-lg/backend/sources/gobgp.(*GoBGP).Neighbours(0xc000330
000, 0x0, 0x0, 0x0)
        /home/alice/go/src/github.com/alice-lg/alice-lg/backend/sources/gobgp/so
urce.go:159 +0x259
main.(*NeighboursStore).update(0xc0000ab5c0)
        /home/alice/go/src/github.com/alice-lg/alice-lg/backend/neighbours_store
.go:120 +0x263
main.(*NeighboursStore).init(0xc0000ab5c0)
        /home/alice/go/src/github.com/alice-lg/alice-lg/backend/neighbours_store
.go:73 +0x2b
created by main.(*NeighboursStore).Start
        /home/alice/go/src/github.com/alice-lg/alice-lg/backend/neighbours_store
.go:68 +0xf0
alice@521a2d4ee8fa:~/go/src/github.com/alice-lg/alice-lg/bin$

Let me know what other info/outputs I can provide to help.

global route search problems

We are seeing that sometime for some of our routeservers the cache doesn't seem to be updated/loaded which means that the global prefix search doesn't work.

It seems to be specific per routeserver as a prefix which we is known on 2 separate routeserver might be found on 1 but not the other, as if the cache of the other routeserver is not loaded somehow?

I also noticed this popping up sometimes:
{code}
Found 0 received and 0 filtered routes.
Query took 1.18 ms to complete.
Routes cache was built 2020 years ago and is currently being refreshed.
{code}

Wrong date "Last reconfig"

FYI

All works flawlessly but when you navigate to any routeserver, on the right column you can view a date for the Last reconfig, but always shows a extrange date.

If you find, please let us know. Thx!!!

the_date

make communities accept lists as input

for example:

asn = [1234, 5678, 8787]
...
asn:1101:1 = Prefix is to long (>24 or >64)
asn:1101:2 = Prefix too short
asn:1101:3 = An IP Bogon was detected

Building client with Docker "recipe"

Hi,

I am trying to build the client (5.1.1) using the docker image (docker is running in a Debian 11 VM, but I guess it is independant fact), following the instructions:

cd client/
make -f Makefile.docker client_prod

All I can get is this output:

Building alice UI (production)
docker run --rm -t -i -a stdin -a stdout -a stderr -v `pwd`:/client/ --name alice-lg-node-build alice-lg-node:latest /bin/bash -c "DISABLE_LOGGING=1 NODE_ENV=production ./node_modules/.bin/gulp"
internal/modules/cjs/loader.js:857
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /client/node_modules/node-sass/vendor/linux-x64-67/binding.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:857:18)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at module.exports (/client/node_modules/node-sass/lib/binding.js:19:10)
    at Object.<anonymous> (/client/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
make: *** [Makefile.docker:26: client_prod] Error 1

What am I missing ?

timezone configuration broken on Docker

Edit: I found out in https://github.com/alice-lg/alice-lg/blob/master/etc/alice-lg/alice.example.conf an example for the timezone (Europe/Brussels) - even this setting fails. So I can only suspect that the whole timezone configuration is broken currently.

The README.md has an example for setting a time zone:

# timezone = UTC

And indeed setting the timezone to UTC works. But I could not get any other setting to work. The syntax for this configuration parameter should be documented.
Formats tested and not working:

  • GMT+2
  • GMT+2:00
  • PST
  • EET
  • UTC+2
  • UTC+2:00
  • Paris
  • Europe/Paris
  • europe/paris
  • Europe_Paris
  • +2
  • 2
  • 120
  • +120
  • paris

All of them result in error like with: unknown time zone EET - NEXT STATE: ERROR.

Either the timezone configuration parameter does not work at all and should be removed from README.md; or it is using some convoluted format that I cannot figure out and should be documented.

Edit: it is obvious that the timezone configuration is broken since the example configuration does not work either.

runtime: out of memory

fatal error: runtime: out of memory

runtime stack:
runtime.throw(0xaf7e25, 0x16)
        /usr/local/go/src/runtime/panic.go:617 +0x72
runtime.sysMap(0xc1e0000000, 0x4000000, 0x16b3e18)
        /usr/local/go/src/runtime/mem_linux.go:170 +0xc7
runtime.(*mheap).sysAlloc(0x169b820, 0x2000, 0x169b830, 0x1)
        /usr/local/go/src/runtime/malloc.go:633 +0x1cd
runtime.(*mheap).grow(0x169b820, 0x1, 0x0)
        /usr/local/go/src/runtime/mheap.go:1222 +0x42
runtime.(*mheap).allocSpanLocked(0x169b820, 0x1, 0x16b3e28, 0xc000047d20)
        /usr/local/go/src/runtime/mheap.go:1150 +0x37f
runtime.(*mheap).alloc_m(0x169b820, 0x1, 0x4b, 0xc0000b0fc0)
        /usr/local/go/src/runtime/mheap.go:977 +0xc2
runtime.(*mheap).alloc.func1()
        /usr/local/go/src/runtime/mheap.go:1048 +0x4c
runtime.systemstack(0x4575c9)
        /usr/local/go/src/runtime/asm_amd64.s:351 +0x66
runtime.mstart()
        /usr/local/go/src/runtime/proc.go:1153

Time format in column "Uptime"

The time in the column "Uptime" is displayed relative to the last state change of the BGP session, e.g. 5 hours or 2 months

I would prefer Alice to display the exact time stamp, e.g.

2019-01-04 13:37

Because this is of course a user preference it should be configurable.

Alice Crashes with generic extended community on OpenBGPd Route-Server.

We have had an issue where both our Alice Looking Glasses crashed when they received data from Open-BGPd-state-server for a peer that had a generic extended community tagged to their prefixes. The same community on BIRD route-servers seemed to be handled okay with Alice and did not crash.

An example of one of the prefixes on our OpenbGPd route-server shows the community as

BGP routing table entry for 115.84.76.0/24
    24482 24482 45430 9873
    Nexthop 195.66.246.16 (via 195.66.246.16) Neighbor 195.66.246.16 (124.6.36.1)
    Origin IGP, metric 185022, localpref 100, weight 0, ovs valid, external, valid
    Last update: 00:02:12 ago
    Communities: 8714:65010 8714:65012
    Ext. Communities: [0] 0x8000000000000000

On BIRD the same prefix shows

115.84.76.0/24     via 195.66.246.16 on eno2 [R195.66.246.16 2022-08-09 19:25:21] (100) [AS9873i]
    Type: BGP unicast univ
    BGP.origin: IGP
    BGP.as_path: 24482 24482 45430 9873
    BGP.next_hop: 195.66.246.16
    BGP.med: 185022
    BGP.local_pref: 100
    BGP.community: (7613,1113) (8714,8714) (9741,1113) (9873,50539) (45430,2111) (45458,2117) (65131,9931) (65131,25386) (65131,45458) (65131,45788) (65231,9741) (65331,7613) (65431,17499)
    BGP.ext_community: (generic, 0x80000000, 0x10000)

And Alice displays that as it shows in the CLI.

A trace at the time when Alice refreshed and picked up the peer showed

Aug 10 17:32:07 alice1-rs-tch-u.linx.net alice-lg-linux-amd64[45039]: panic: runtime error: index out of range [0] with length 0
Aug 10 17:32:07 alice1-rs-tch-u.linx.net alice-lg-linux-amd64[45039]: github.com/alice-lg/alice-lg/pkg/sources/openbgpd.decodeExtendedCommunities({0x96dc40, 0xc0ae1d72c0})

Once the peer scrubbed of the communities AliceLG remained stable.

Very high memory consumption (full BGP table)

I'm using alice-lg with a goBGP backend which collects a full BGP table from a route-reflector in our network. This configuration tries to consume over 50Gb of ram on the system! Is there anything I can do to improve this?

gobgpd.conf
 -------------
[global.config]
  as = 1234
  router-id = "1.2.3.4"

[[neighbors]]
[neighbors.config]
  neighbor-address = "1.2.3.5"
  peer-as = 1234

[[neighbors]]
[neighbors.config]
  neighbor-address = "1:2:3::6"
  peer-as = 1234

[[rpki-servers]]
  [rpki-servers.config]
    address = "1.2.3.7"
    port = 1234


 alice.conf
 ---------------
[server]
 listen_http = :80
 enable_prefix_lookup = true
 enable_neighbors_status_refresh = true
 asn = 1234

[housekeeping]
 interval = 5
 force_release_memory = true


[pagination]
 routes_filtered_page_size = 250
 routes_accepted_page_size = 250
 routes_not_exported_page_size = 250

[rpki]
 enabled = true

[neighbours_columns]
 address = Neighbour
 asn = ASN
 state = State
 Uptime = Uptime
 Description = Description
 routes_received = Routes Received
 routes_filtered = Filtered

[routes_columns]
 network = Network
 gateway = Gateway
 interface = Interface
 metric = Metric
 bgp.as_path = AS Path

[lookup_columns]
 network = Network
 gateway = Gateway
 neighbour.asn = ASN
 neighbour.description = Description
 bgp.as_path = AS Path
 routeserver.name = RS

[source.debug0]
 name = debug0
 group = AMS

[source.debug0.gobgp]
 host = 127.0.0.1:50051
 processing_timeout = 300

When running gobgpd on its own, with peers established, I only consume under 2Gb of ram.
For reference, this is an ubuntu docker container named 'alice-lg'

root@3a3fe0a973c7:/$ gobgp neighbor
Peer              AS  Up/Down State       |#Received  Accepted
1.2.3.5         1234 00:05:58 Establ      |   819821    819821
1:2:3::6        1234 00:06:03 Establ      |    95955     95955

CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT    MEM %               NET I/O             BLOCK I/O           PIDS
3a3fe0a973c7        alice-lg            0.32%               1.24GiB / 62.86GiB   1.97%               384MB / 21.3MB      1.52GB / 251MB      39

When starting alice-lg, it skyrockets, I had to kill it here as it kept climbing:


CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
3a3fe0a973c7        alice-lg            100.46%             43.25GiB / 62.86GiB   68.80%              384MB / 21.3MB      1.52GB / 251MB      71

top - 11:53:24 up 6 days,  2:26,  0 users,  load average: 3.44, 4.00, 2.71
Tasks:  14 total,   1 running,  12 sleeping,   1 stopped,   0 zombie
%Cpu(s):  7.7 us,  1.0 sy,  0.0 ni, 91.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  64371.3 total,   1129.1 free,  59302.6 used,   3939.5 buff/cache
MiB Swap:   8192.0 total,   6626.9 free,   1565.1 used.  10923.4 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 1501 root      20   0   20.4g  18.3g  10320 S  99.7  29.1   3:08.22 alice-lg
 1471 root      20   0   25.5g  24.9g  12172 S   0.0  39.6  10:14.24 gobgpd

As seen here, alice-lg and gobgpd are consuming similar amounts of high memory. Should this be happening? Is something configured incorrectly? I understand a full BGP table will consume a decent amount of mem, but I have a feeling this is a bit excessive. Please let me know if there's logs or outputs I can collect to help with this issue.

I have issues opened in both alice-lg/alice-lg and osrg/gobgp as I'm not sure which piece is the culprit. Forgive me, I'm a net-eng by trade and only stand up unix applications occasionally, so if there's something I'm doing wrong feel free to let me know.

Routes not exported error

Hello,
When someone goes to fetch routes not exported the following error occurs

2023/03/24 09:52:54 API ERROR :: rs1.example.com (IPv6).routes_not_exported(PROTO) :: invalid API response received from server

Anyone have a suggestion or a fix for this?

my birdwatcher modules are as follows

ModulesEnabled:
- status
- protocols
- protocols_bgp
- protocols_short
- routes_protocol
- routes_peer
- routes_table
- routes_table_filtered
- routes_table_peer
- routes_filtered
- routes_prefixed
- routes_noexport
- routes_pipe_filtered_count
- routes_pipe_filtered

Issue with uptime on peers & Last Reconfig date/time

Hi

I wonder if you could help. I have set Alice-LG up and and seeing a issue with my uptime values. It displays 292 years for all peers.

If I change the config to be "Uptime = uptime" in the Alice-LG config I then get a very large epoch value.

Any ideas what could be the issue here ?

Also I am getting a incorrect Last Reconfig date as shown in the a screen show attached.

Any suggestions would be great.
Screenshot 2019-06-12 at 15 56 03

Thanks

Mo

Bird 2.0.7 Route Server IPv4 and IPv6 Session and Route issue.

Hi

We are using alice-lg and birdwatcher for our Bird Route Servers since years. Since we updated our Route Servers to Bird Version 2, all of our Route Server Sections (IPv4 and IPv6) show all Sessions (IPv4 and IPv6).

Example:
https://as58057.net/routeservers/sbix-rs1-v4
This is SBIX RS1 (IPv4) and should show only all IPv4 Sessions and Routes. IPv4 work as expected, but it also show all IPv6 Sessions and 0 Routes for all IPv6 Sessions.
The question is now, how to solve this issue?

We saw that there is a new Birdwatcher Version and we deployed the new version. But still got the same result.
When accessing the birdwatcher on /protocols/bgp we saw that there are also the tables visible and changed our alice config from single-table to
type = multi_table main_table = master4 peer_table_prefix = T pipe_protocol_prefix = M
But still see ipv4 and ipv6 sessions on all route servers.

Does anyone have fixed this issue?
Or know what else we can try here?

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.