Barry O'Donovan edited this page May 19, 2017 · 6 revisions

DEPRECATED IN V4: please use the new framework for this - see here

AS112 is a service many IXP operators provide for their members.

This page will not rewrite the book on AS112 documentation! Please see https://www.as112.net/ for details on the project and the following links for instructions on building an AS112 service:

IXP Manager will generate the relevant bits of an AS112 configuration for you. In the example below, we use Quagga.

Configuration Options in application.ini

To enable AS112 UI elements, set the following configuration option:

as112_ui_active = 1

Conversely, set to 0 to disable AS112 UI elements.

The following configuration options are available for basic AS112 configuration generation:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; AS112 Details
router.as112.conf.target = "quagga"
router.as112.conf.dstpath = APPLICATION_PATH "/../var/spool"

The target option above is only used to specify the template directory to use in the generation of the configuration - specifically: application/views/router-cli/as112/{$target}/index.cfg. There is a full Quagga example available in the default templates at application/views/router-cli/as112/quagga/index.cfg. NB: Note that the target can also be specified on the command line - see below.

If dstpath is not set, the configuration will be generated to stdout. Otherwise, the configuration will be placed in the specified path in a file called as112-{$vlanid}.conf where $vlanid is the database ID of the VLAN for which we are generating the configuration.

Writing / Altering Configuration Templates

Remember - use skinning to make changes to this or add your own. For example, if you set target above to bird and had you skin configured as myixpskin, then the configuration would be generated from application/views/_skins/myixpskin/router-cli/as112/bird/index.cfg.

Contribute back - if you write a config generator for another router, please open a pull request and contribute it back to the project.

The follow variables are available for each member's IPv4 / IPv6 VLAN interface in the $v4ints array:

 * `cid` - customer ID;
 * `cname` - full customer name;
 * `cshortname` - customer shortname;
 * `autsys` - customer AS number;
 * `peeringmacro` - customer's appropriate peering macro (if V6 interface then the V6 macro if defined, else the v4 macro. If no macro, it will be `AS65500` where 65500 is their AS number);
 * `vliid` - VLAN interface ID
 * `address` - IPv4/6 address
 * `bgpmd5secret` - their configured BGP MD5 secret (or false if not defined)
 * `as112client` - if the member wants to use the AS112 service;
 * `maxprefixes` - the configured maximum prefix setting.

As mentioned above, there is a complete example provided in application/views/router-cli/as112/quagga which should give you all the details you need.

Generating the Configuration

Once you have set the application.ini settings, all you need is the database ID of the VLAN you wish to generate the configuration for. You'll get this by hovering over any of the actions in the VLAN section of IXP Manager and examining the URL.

Then, by executing the following, all active VLAN interfaces will have a BGP configuration generated for them via:

${APPLICATION_PATH}/bin/ixptool.php -a router-cli.gen-as112-conf -p vlanid=X

You can also pass additional options - do this using comma separated option=value pairs on the -p switch above - e.g. -p vlanid=X,rc=1.

The available additional options are:

  • target=qwerty - the target directory (in router-cli/as112/) from which to load theindex.cfg` template file;
  • rc=1 - add a (MD5-less) session for any IPv4 route collectors defined in your VLAN's [network information](Network Information). NB: to have a session created for your AS112 service on the route collector, add a pro-bono AS112 member to your IXP. This will also advertise the AS112 service on member lists, the peering manager, etc.
  • rcasn=65500 - if you set rc=1 above, ensure you configure your route collector ASN here.

Syncing the Configuration with the Router

Note that the provided Quagga example does not generate a complete router configuration - rather it just generates the necessary BGP clauses (and a few other bits). This is because, unfortunately, Quagga does not have a reload method for it's BGP daemon - updating a complete configuration would require a daemon restart which is unacceptable.

Instead, we start with a [base Quagga configuration](AS112 - Sample Quagga Base Config) and then use RANCID to push the generated changes to it. For example, if /tmp/as112-X.conf is the generated configuration, we push that via:

/path/to/clogin -x /tmp/as112-X.conf as112.example.com 

Other BGP daemons such as OpenBGPd and Bird do have a reload function and, for these, your templates could easily contain a complete configuration.

Please note - due to the way these changes are pushed to Quagga / Cisco IOS, you will need to manually remove sessions for departed members until we develop a way of automating that.

If your AS112 router is listening on multiple VLANs, just push a configuration separately for each VLAN.

User Facing Information and Documentation

IXP Manager comes with dynamic AS112 documentation for your members.

First, add the AS112 service(s) to the VLAN [network information](Network Information). Also, ensure your have skinning enabled.

Then, on the filesystem, proceed as follows:

cd APPLICATION_PATH/application/views/_skins/$YOURSKIN
mkdir static
cp ../inex/static/as112.phtml ./static
// if not already done:
cp ../../header-documentation.phtml .

Then edit ''header-documentation.phtml'' and add a clause such as:

<li>
    <a href="{genUrl controller="static" action="as112"}">AS112 Service</a>
</li>

There should now be an AS112 link in your documentation menu advertising the service.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.