BGP Documentation

Embed Size (px)

Text of BGP Documentation

  • BGP Module Documentationfor the PYenca Agent

    Release: BGP-PYenca-1.0.0

    Humberto Abdelnur, Humberto.Abdenur@loria.fr

    Radu STATE, state@loria.fr

    Madynes Research team

    LORIA-INRIA Lorraine

    rue du jardin botanique

    Villers-les-Nancy

    FRANCE

    1

  • Contents

    1 Introduction 41.1 Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    1.1.1 BGP-PYencas author information . . . . . . . . . . . . . 41.1.2 Software information . . . . . . . . . . . . . . . . . . . . . 41.1.3 Other information . . . . . . . . . . . . . . . . . . . . . . 4

    2 Installation 62.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . 62.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3 Launching the Module . . . . . . . . . . . . . . . . . . . . . . . . 72.4 Test Bed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2.4.1 Trying the Test-Bed . . . . . . . . . . . . . . . . . . . . . 8

    3 Lessons Learned 93.1 Semantic differences and side effects . . . . . . . . . . . . . . . . 9

    4 Functionality Overview 94.1 Message Processing Unit . . . . . . . . . . . . . . . . . . . . . . . 104.2 BGP CLI Connection . . . . . . . . . . . . . . . . . . . . . . . . 114.3 BGP Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.4 Meta Translation Language . . . . . . . . . . . . . . . . . . . . . 13

    4.4.1 Language Elements for the CLI-to-XML mapping . . . . . 144.4.2 Language Elements for the XML-to-CLI mapping . . . . . 14

    4.5 XML Protocol Translator . . . . . . . . . . . . . . . . . . . . . . 174.5.1 CLI to XML example . . . . . . . . . . . . . . . . . . . . 174.5.2 XML to CLI Command example . . . . . . . . . . . . . . 19

    5 Meta Translation Language 205.1 Language Elements for the CLI-to-XML mapping . . . . . . . . . 215.2 Language Elements for the XML-to-CLI mapping . . . . . . . . . 225.3 Conditional Language Elements . . . . . . . . . . . . . . . . . . . 24

    6 To do 256.1 Attributes in the Meta Translation Language . . . . . . . . . . . 256.2 Classes generator . . . . . . . . . . . . . . . . . . . . . . . . . . . 266.3 Parser Autogeneration . . . . . . . . . . . . . . . . . . . . . . . . 26

    A BGP XML Configuration 27A.1 Main Structure of the BGP Protocol . . . . . . . . . . . . . . . . 27A.2 BGP Router Configuration . . . . . . . . . . . . . . . . . . . . . 27

    A.2.1 bgprouter . . . . . . . . . . . . . . . . . . . . . . . . . . . 27A.2.2 distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30A.2.3 address-families . . . . . . . . . . . . . . . . . . . . . . . . 30A.2.4 ipv4-address-family . . . . . . . . . . . . . . . . . . . . . . 31A.2.5 vpnv4-address-family . . . . . . . . . . . . . . . . . . . . . 32A.2.6 ipv6-address-family . . . . . . . . . . . . . . . . . . . . . . 32A.2.7 network (IPv4) . . . . . . . . . . . . . . . . . . . . . . . . 33A.2.8 network (VPNv4) . . . . . . . . . . . . . . . . . . . . . . 34A.2.9 network (IPv6) . . . . . . . . . . . . . . . . . . . . . . . . 34

    2

  • A.2.10 aggregate-address (IPv4) . . . . . . . . . . . . . . . . . . 35A.2.11 aggregate-address (IPv6) . . . . . . . . . . . . . . . . . . 35A.2.12 redistribute (IPv4-Unicast) . . . . . . . . . . . . . . . . . 36A.2.13 redistribute (IPv6) . . . . . . . . . . . . . . . . . . . . . . 37A.2.14 confederation-peer . . . . . . . . . . . . . . . . . . . . . . 37A.2.15 peer-group (description) . . . . . . . . . . . . . . . . . . . 38A.2.16 neighbor (description) . . . . . . . . . . . . . . . . . . . . 38A.2.17 neighbor (Casting) . . . . . . . . . . . . . . . . . . . . . . 41A.2.18 bind-filters . . . . . . . . . . . . . . . . . . . . . . . . . . 43A.2.19 distribute-list (access-list) . . . . . . . . . . . . . . . . . . 43A.2.20 prefix-list . . . . . . . . . . . . . . . . . . . . . . . . . . . 44A.2.21 filter-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45A.2.22 router-map . . . . . . . . . . . . . . . . . . . . . . . . . . 45A.2.23 unsuppress-map . . . . . . . . . . . . . . . . . . . . . . . 46

    A.3 Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46A.3.1 access-list (distribute-list) . . . . . . . . . . . . . . . . . . 46A.3.2 ipv6-access-list . . . . . . . . . . . . . . . . . . . . . . . . 48A.3.3 as-path (filter-list) . . . . . . . . . . . . . . . . . . . . . . 49A.3.4 prefix-list . . . . . . . . . . . . . . . . . . . . . . . . . . . 49A.3.5 ipv6-prefix-list . . . . . . . . . . . . . . . . . . . . . . . . 50A.3.6 route-map . . . . . . . . . . . . . . . . . . . . . . . . . . . 51A.3.7 match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51A.3.8 set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

    A.4 Communities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55A.4.1 community-list . . . . . . . . . . . . . . . . . . . . . . . . 55A.4.2 extcommunity-list . . . . . . . . . . . . . . . . . . . . . . 56

    List of Figures

    1 Manager/Agent paradigm with NetConf . . . . . . . . . . . . . . 52 BGP Configuration Constraints . . . . . . . . . . . . . . . . . . . 103 BGP Modules Functional Architecture . . . . . . . . . . . . . . . 104 BGP CLI Configuration example . . . . . . . . . . . . . . . . . . 115 Parser File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Typed Data example . . . . . . . . . . . . . . . . . . . . . . . . . 137 Meta Translation Language . . . . . . . . . . . . . . . . . . . . . 148 Command Generation process for a node . . . . . . . . . . . . . . 159 CLI Commands Request . . . . . . . . . . . . . . . . . . . . . . 1610 CLI to XML process construction . . . . . . . . . . . . . . . . . . 1811 XML to CLI process interpretation . . . . . . . . . . . . . . . . . 1912 Meta Translation Language . . . . . . . . . . . . . . . . . . . . . 2013 Meta Translation Language Condition . . . . . . . . . . . . . . . 24

    3

  • Abstract

    This documentation stand for the design, implementation ideas and

    some features and capabilities added to the NETCONF Protocol through

    the BGP implementation process. Also, it explains a resulting library

    created for this implementation to transforms from the data device to the

    XML design and backward, that could be use for the implementation of

    new modules.

    1 Introduction

    1.1 Information

    1.1.1 BGP-PYencas author information

    Author names and organism attachment:Humberto Abdelnur and Radu STATEMadynes Research teamLORIA-INRIA Lorrainerue du jardin botaniqueVillers-les-NancyFRANCE

    If you have any requests, comments, ideas for improvement or questionsconcerning Fuzzy Packet, if you think you find a bug, please send emails toHumberto.Abdelnur@loria.fr.

    1.1.2 Software information

    Software name: BGP-PYencaVersion: 1.0.0Programming language: PythonOperating System: Linux (tested in Gentoo)License: GNU Lesser General Public License (LGPL)

    1.1.3 Other information

    This environment is strongly tied to the NetConf Configuration protocol. Thisprotocol is based on the Manager/Agent paradigm, illustrated on Figure 1,which states that a manager (the client) sends some XML-based queries to theagent (the server) which, in turn, sends back, also, a XML-based reply for eachquery to the manager. A query will be one of these well-defined operations:

    get, get-config allows to retrieve the state and configuration data of the de-vice. Two methods may be used to fetch remote data: subtree filteringand XPath selection if that capability is supported by the agent,

    edit-config allows to modify the remote configuration. The operation optioncan be set to replace, merge, create or delete some XML nodes,

    copy-config, delete-config allows to push or to delete a target (running, can-didate, startup) XML configuration of a device,

    4

  • lock, unlock allows to lock and unlock some resources. For instance, lockingthe access to one or more resources so that no other modification can beperformed on the device.

    close-session, kill-session allows to close a session when needed and respec-tively to kill a session, if needed (for instance after a management fault).

    WAN

    Ag1 Agn1 Agn

    Mg1

    Ag2

    Manager i

    Agent j

    Netconf request Netconf response

    Mgm

    Figure 1: Manager/Agent paradigm with NetConf

    In order for NETCONF to manage different devices, it allows to add newPlugins (or Modules) easily. Those modules should implement some defaultinterface which will allow them to be added dynamicly to the Agent.

    The BGP Network Management Framework is implemented as a module ofthe NetConf Agent. It must be registered as a module in the modules configu-ration file.

    The BGP module is presented in detail in this document explaining its ar-chitecture, functional and static Design as well as the XML design specified tomanage the device. Also, the implementation of this module made a librarythat could be use for the construction of other protocols, making their imple-mentation much easier.

    This is the first module implemented for the NetConf Agent, giving us a fulltest-bed for testing its ability to deal with complex and large-scale configuration.We guess that many other modules will follow a similar approach that can bedefined over the following main steps:

    building a XML data model with XML Schema,

    building a parser to read proprietary configuration files,

    providing a mapping schema from one data model to the other.

    5

  • 2 Installation

    2.1 System Requirements

    Python[7]: 2.3.0 or newer. The whole implementation of the Moduleis done in Python so, check the appropriate Python package for yourdistribution or download the sources from www.python.org .

    4Suite[1]: 1.0 alpha