pierky / arouteserver

A tool to automatically build (and test) feature-rich configurations for BGP route servers.
https://arouteserver.readthedocs.org/
GNU General Public License v3.0
284 stars 46 forks source link

Add routeserver attribute to IX-F export #120

Closed bluikko closed 1 year ago

bluikko commented 1 year ago

The IX-F export JSON schema includes attribute "routeserver" (bool). Since we are configuring a routeserver with the same data we know that all the peers are routeserver clients. So, "routeserver": true should be set for each peer in the IX-F export.
Example:

    {
      "asnum": 112,
      "name": "AS112",
      "connection_list": [
        {
          "ixp_id": 1,
          "vlan_list": [
            {
              "vlan_id": 0,
              "ipv4": {
                "address": "192.0.2.1",
                "routeserver": true
              }
            },
            {
              "vlan_id": 0,
              "ipv6": {
                "address": "2001:db8::1",
                "routeserver": true
              }
            }
          ]
        }
      ]
    },
rlaager commented 1 year ago

Is arouteserver exporting or import this? If arouteserver is importing this, then it makes perfect sense that not all participants are necessarily using the route server, and thus those with routeserver set to false should not have a configuration built.

bluikko commented 1 year ago

@rlaager The IX-F JSON file is generated by arouteserver. Since arouteserver is used to configure route server all peers are obviously route server clients.
Or maybe I am misunderstanding what you are asking.

rlaager commented 1 year ago

Yeah, in that case, I agree. I am looking at this in the opposite direction, where I'm using arouteserver to import clients from a file.

pierky commented 1 year ago

Just to clarify a bit: ARouteServer can both import from and export to the IX-F JSON file.

When importing from the file, the arouteserver clients-from-euroix sub-command already allows to skip participants for which the "routeserver" attribute is not set via the --routeserver-only:

  --routeserver-only    Exclude members whose 'ixp_list.[].vlan.[].ipv[4|6].routeserver' attribute is false.

This issue is to let the tool to set the "routeserver" attribute when generating the JSON file starting from the list of clients which are configured in clients.yml. In that case, setting the attribute to true makes sense, because we're sure that all those clients are configured on the route server.

pierky commented 1 year ago

Hello,

thanks for reporting this issue and for the discussion here. I've just started the CI/CD pipeline for v1.21.0, which contains a fix. If everything goes well, the release will be pushed in about 1 hour to PyPi.