├── .coveragerc ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml └── workflows │ ├── codeql-analysis.yml │ ├── functional-3.6.yml │ ├── functional-3.7.yml │ ├── functional-testing.yml │ ├── linting.yml │ ├── release.yml │ └── unit-testing.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .pylintrc ├── CONTRIBUTING.md ├── Dockerfile ├── Dockerfile.remote ├── LICENCE.txt ├── README.md ├── bin ├── exabgpcli └── healthcheck ├── data ├── exabgp.yang ├── models │ ├── exabgp.yang │ ├── ietf-inet-types.yang │ ├── ietf-yang-library.yang │ ├── ietf-yang-types.yang │ ├── openconfig-bgp-types.yang │ ├── openconfig-extensions.yang │ ├── openconfig-inet-types.yang │ └── openconfig-types.yang └── yang-library-data.json ├── debian └── README.md ├── dev ├── bin │ ├── convert-hexdump-raw │ ├── format-raw-bmp-hexdump │ ├── ibgp │ ├── ibgp-open-only │ ├── python-profile │ ├── pythonstats │ ├── recorder-connect │ ├── recorder-listener │ ├── replay-connect │ └── unittest ├── cisco │ └── ibgp4-helper.txt ├── configuration │ ├── first.exa │ └── first.json ├── profile │ ├── analyse │ └── pyprof2calltree.py ├── quagga │ ├── ebgpd.conf.v4 │ ├── ebgpd.conf.v46 │ ├── ebgpd.conf.v6 │ ├── ibgpd.conf.v4.md5 │ ├── ibgpd.conf.v4.parse │ ├── ibgpd.conf.v4.parse.large │ └── ibgpd.conf.v46 ├── release │ └── debian └── static │ └── lint ├── doc ├── CHANGELOG.rst ├── HISTORY.rst ├── README.rst └── man │ ├── exabgp.1 │ └── exabgp.conf.5 ├── etc ├── exabgp │ ├── api-add-remove.conf │ ├── api-announce-processes-match.conf │ ├── api-announce-star.conf │ ├── api-announce.conf │ ├── api-announcement.conf │ ├── api-api.conf │ ├── api-attributes-path.conf │ ├── api-attributes-vpn.conf │ ├── api-attributes.conf │ ├── api-blocklist.conf │ ├── api-broken-flow.conf │ ├── api-check.conf │ ├── api-eor.conf │ ├── api-fast.conf │ ├── api-flow-merge.conf │ ├── api-flow.conf │ ├── api-ipv4.conf │ ├── api-ipv6.conf │ ├── api-manual-eor.conf │ ├── api-multi-neighbor.conf │ ├── api-multiple-api.conf │ ├── api-multisession.conf │ ├── api-mvpn.conf │ ├── api-nexthop-self.conf │ ├── api-nexthop.conf │ ├── api-no-respawn.conf │ ├── api-notification.conf │ ├── api-open.conf │ ├── api-reload.1.conf │ ├── api-reload.2.conf │ ├── api-rib.conf │ ├── api-rr-rib.conf │ ├── api-rr.conf │ ├── api-teardown.conf │ ├── api-vpls.conf │ ├── api-vpnv4.conf │ ├── api-watchdog.conf │ ├── conf-addpath.conf │ ├── conf-aggregator.conf │ ├── conf-attributes.conf │ ├── conf-bgpls.conf │ ├── conf-cap-software-version.conf │ ├── conf-ebgp.conf │ ├── conf-extended-attributes.conf │ ├── conf-flow-redirect.conf │ ├── conf-flow.conf │ ├── conf-generic-attribute.conf │ ├── conf-group-limit.conf │ ├── conf-group.conf │ ├── conf-hostname.conf │ ├── conf-ipself4.conf │ ├── conf-ipself6.conf │ ├── conf-ipv46routes4family.conf │ ├── conf-ipv46routes6family.conf │ ├── conf-ipv6grouping.conf │ ├── conf-l2vpn.conf │ ├── conf-largecommunity.conf │ ├── conf-mvpn.conf │ ├── conf-name.conf │ ├── conf-new-v4.conf │ ├── conf-new-v6.conf │ ├── conf-no-asn4.conf │ ├── conf-parity.conf │ ├── conf-path-information.conf │ ├── conf-prefix-sid-srv6.conf │ ├── conf-prefix-sid.conf │ ├── conf-split.conf │ ├── conf-srv6-mup-v3.conf │ ├── conf-srv6-mup.conf │ ├── conf-template.conf │ ├── conf-unknowncap.conf │ ├── conf-vpn.conf │ ├── example-api-program.run │ ├── example-healthcheck.conf │ ├── extended-nexthop.conf │ ├── parse-community.conf │ ├── parse-dual-neighbor.conf │ ├── parse-md5.conf │ ├── parse-multiple-process.conf │ ├── parse-multisession.conf │ ├── parse-process.conf │ ├── parse-simple-v4.conf │ ├── parse-simple-v6.conf │ ├── parse-ttl.conf │ ├── run │ │ ├── api-add-remove.run │ │ ├── api-announce-star.run │ │ ├── api-announce.run │ │ ├── api-announcement.run │ │ ├── api-api.nothing.run │ │ ├── api-api.receive.run │ │ ├── api-attributes-path.run │ │ ├── api-attributes-vpn.run │ │ ├── api-attributes.run │ │ ├── api-blocklist.run │ │ ├── api-broken-flow.run │ │ ├── api-check.run │ │ ├── api-eor.run │ │ ├── api-fast.run │ │ ├── api-flow-merge.run │ │ ├── api-flow.run │ │ ├── api-ipv4.run │ │ ├── api-ipv6.run │ │ ├── api-manual-eor.run │ │ ├── api-multi-neighbor.run │ │ ├── api-multiple-private.run │ │ ├── api-multiple-public.run │ │ ├── api-multisession.run │ │ ├── api-mvpn.run │ │ ├── api-nexthop-self.run │ │ ├── api-nexthop.run │ │ ├── api-no-respawn-1.run │ │ ├── api-no-respawn-2.run │ │ ├── api-notification.run │ │ ├── api-open.run │ │ ├── api-reload.run │ │ ├── api-rib.run │ │ ├── api-rr-rib.run │ │ ├── api-rr.run │ │ ├── api-teardown.run │ │ ├── api-vpls.run │ │ ├── api-vpnv4.run │ │ ├── dynamic-1.pl │ │ ├── dynamic-1.sh │ │ ├── stderr-1.py │ │ ├── syslog-1.py │ │ ├── watchdog-1.pl │ │ ├── watchdog-1.sh │ │ └── watchdog.run │ └── unknown-message.conf ├── systemd │ ├── exabgp.service │ └── exabgp@.service └── sysusers.d │ └── exabgp.conf ├── logo ├── ExaBGP.png ├── Twitter.indd └── Twitter.jpg ├── pyproject.toml ├── qa ├── add-path-receive.conf ├── add-path-sendreceive.conf ├── bin │ ├── cover │ ├── functional │ ├── functional-3.6 │ └── rmpyc ├── decoding │ ├── bgp-evpn-1 │ ├── bgp-flow-1 │ ├── bgp-flow-2 │ ├── bgp-flow-3 │ ├── bgp-flow-4 │ ├── bgp-ls-1 │ ├── bgp-ls-2 │ ├── bgp-ls-3 │ ├── bgp-ls-4 │ ├── bgp-ls-5 │ ├── bgp-ls-6 │ ├── bgp-ls-7 │ ├── bgp-ls-8 │ ├── bgp-ls-9 │ ├── bgp-open-sofware-version │ ├── ipv4-unicast-1 │ └── ipv4-unicast-2 ├── encoding │ ├── api-add-remove.ci │ ├── api-add-remove.msg │ ├── api-announce-processes-match.ci │ ├── api-announce-processes-match.msg │ ├── api-announce-star.ci │ ├── api-announce-star.msg │ ├── api-announce.ci │ ├── api-announce.msg │ ├── api-announcement.ci │ ├── api-announcement.msg │ ├── api-api.ci │ ├── api-api.msg │ ├── api-attributes-path.ci │ ├── api-attributes-path.msg │ ├── api-attributes-vpn.ci │ ├── api-attributes-vpn.msg │ ├── api-attributes.ci │ ├── api-attributes.msg │ ├── api-broken-flow.ci │ ├── api-broken-flow.msg │ ├── api-check.ci │ ├── api-check.msg │ ├── api-eor.ci │ ├── api-eor.msg │ ├── api-fast.ci │ ├── api-fast.msg │ ├── api-flow-merge.ci │ ├── api-flow-merge.msg │ ├── api-flow.ci │ ├── api-flow.msg │ ├── api-ipv4.ci │ ├── api-ipv4.msg │ ├── api-ipv6.ci │ ├── api-ipv6.msg │ ├── api-manual-eor.ci │ ├── api-manual-eor.msg │ ├── api-multi-neighbor.ci │ ├── api-multi-neighbor.msg │ ├── api-multiple-api.ci │ ├── api-multiple-api.msg │ ├── api-multisession.ci │ ├── api-multisession.msg │ ├── api-mvpn.ci │ ├── api-mvpn.msg │ ├── api-nexthop-self.ci │ ├── api-nexthop-self.msg │ ├── api-nexthop.ci │ ├── api-nexthop.msg │ ├── api-no-respawn.ci │ ├── api-no-respawn.msg │ ├── api-notification.ci │ ├── api-notification.msg │ ├── api-open.ci │ ├── api-open.msg │ ├── api-reload.ci │ ├── api-reload.msg │ ├── api-rib.ci │ ├── api-rib.msg │ ├── api-rr-rib.ci │ ├── api-rr-rib.msg │ ├── api-rr.ci │ ├── api-rr.msg │ ├── api-teardown.ci │ ├── api-teardown.msg │ ├── api-vpls.ci │ ├── api-vpls.msg │ ├── api-vpnv4.ci │ ├── api-vpnv4.msg │ ├── conf-addpath.ci │ ├── conf-addpath.msg │ ├── conf-aggregator.ci │ ├── conf-aggregator.msg │ ├── conf-attributes.ci │ ├── conf-attributes.msg │ ├── conf-cap-software-version.ci │ ├── conf-cap-software-version.msg │ ├── conf-ebgp.ci │ ├── conf-ebgp.msg │ ├── conf-extended-attributes.ci │ ├── conf-extended-attributes.msg │ ├── conf-flow-redirect.ci │ ├── conf-flow-redirect.msg │ ├── conf-flow.ci │ ├── conf-flow.msg │ ├── conf-generic-attribute.ci │ ├── conf-generic-attribute.msg │ ├── conf-group-limit.ci │ ├── conf-group-limit.msg │ ├── conf-group.ci │ ├── conf-group.msg │ ├── conf-hostname.ci │ ├── conf-hostname.msg │ ├── conf-ipself4.ci │ ├── conf-ipself4.msg │ ├── conf-ipself6.ci │ ├── conf-ipself6.msg │ ├── conf-ipv46routes4family.ci │ ├── conf-ipv46routes4family.msg │ ├── conf-ipv46routes6family.ci │ ├── conf-ipv46routes6family.msg │ ├── conf-ipv6grouping.ci │ ├── conf-ipv6grouping.msg │ ├── conf-l2vpn.ci │ ├── conf-l2vpn.msg │ ├── conf-largecommunity.ci │ ├── conf-largecommunity.msg │ ├── conf-mvpn.ci │ ├── conf-mvpn.msg │ ├── conf-name.ci │ ├── conf-name.msg │ ├── conf-new-v4.ci │ ├── conf-new-v4.msg │ ├── conf-new-v6.ci │ ├── conf-new-v6.msg │ ├── conf-no-asn4.ci │ ├── conf-no-asn4.msg │ ├── conf-parity.ci │ ├── conf-parity.msg │ ├── conf-path-information.ci │ ├── conf-path-information.msg │ ├── conf-prefix-sid.ci │ ├── conf-prefix-sid.msg │ ├── conf-split.ci │ ├── conf-split.msg │ ├── conf-srv6-mup-v3.ci │ ├── conf-srv6-mup-v3.msg │ ├── conf-srv6-mup.ci │ ├── conf-srv6-mup.msg │ ├── conf-template.ci │ ├── conf-template.msg │ ├── conf-unknowncap.ci │ ├── conf-unknowncap.msg │ ├── conf-vpn.ci │ ├── conf-vpn.msg │ ├── conf-watchdog.ci │ ├── conf-watchdog.msg │ ├── extended-nexthop.ci │ ├── extended-nexthop.msg │ ├── skip-large-mp.conf │ ├── skip-large.conf │ ├── unknown-message.ci │ └── unknown-message.msg ├── new │ └── simple.conf ├── requirements.txt ├── sbin │ ├── bgp │ └── bgp-3.6 ├── scrutinizer.yml └── self │ ├── api │ ├── receive │ ├── receive.py │ ├── receive.template │ ├── send │ └── send.template │ ├── attribute │ ├── api-internet.py │ ├── receive │ ├── send │ └── send.template │ ├── big │ ├── api-internet.py │ ├── dump-all.py │ ├── dump-number.py │ ├── dump-to-screen.py │ ├── receive │ ├── receive.template │ ├── send │ └── send.template │ ├── flow │ ├── first │ ├── first.template │ ├── flow-change.py │ ├── log-syslog.py │ ├── second │ └── second.template │ ├── json │ ├── receive │ ├── receive.py │ ├── receive.template │ ├── send │ └── send.template │ ├── ka │ ├── ka-receive │ ├── ka-receive.conf │ ├── ka-send │ └── ka-send.conf │ ├── load │ ├── api-internet.py │ ├── dump-all.py │ ├── dump-number.py │ ├── dump-to-screen.py │ ├── receive │ ├── receive.template │ ├── send │ └── send.template │ ├── operational │ ├── .landscape.yaml │ ├── operational-print.py │ ├── operational-receive │ ├── operational-receive.conf │ ├── operational-send │ ├── operational-send.conf │ └── operational-send.py │ ├── refresh │ ├── first │ ├── first.template │ ├── re-ask.py │ ├── second │ └── second.template │ ├── simple │ ├── first │ ├── first.template │ ├── log-syslog.py │ ├── second │ └── second.template │ └── update │ ├── update-receive │ ├── update-receive.conf │ ├── update-receive.py │ ├── update-send │ ├── update-send.conf │ └── update-send.py ├── redhat ├── python-exabgp.spec └── python-exabgp.spec.git ├── release ├── requirements.txt ├── run └── .empty ├── sbin └── exabgp ├── service └── bgp-service-ip │ ├── log │ └── run │ └── run ├── setup.cfg ├── setup.py ├── src └── exabgp │ ├── __init__.py │ ├── __main__.py │ ├── application │ ├── __init__.py │ ├── cli.py │ ├── decode.py │ ├── environ.py │ ├── flow.py │ ├── healthcheck.py │ ├── main.py │ ├── netlink.py │ ├── pipe.py │ ├── server.py │ ├── tojson.py │ ├── validate.py │ └── version.py │ ├── bgp │ ├── __init__.py │ ├── fsm.py │ ├── message │ │ ├── __init__.py │ │ ├── action.py │ │ ├── direction.py │ │ ├── keepalive.py │ │ ├── message.py │ │ ├── nop.py │ │ ├── notification.py │ │ ├── open │ │ │ ├── __init__.py │ │ │ ├── asn.py │ │ │ ├── capability │ │ │ │ ├── __init__.py │ │ │ │ ├── addpath.py │ │ │ │ ├── asn4.py │ │ │ │ ├── capabilities.py │ │ │ │ ├── capability.py │ │ │ │ ├── extended.py │ │ │ │ ├── graceful.py │ │ │ │ ├── hostname.py │ │ │ │ ├── mp.py │ │ │ │ ├── ms.py │ │ │ │ ├── negotiated.py │ │ │ │ ├── nexthop.py │ │ │ │ ├── operational.py │ │ │ │ ├── refresh.py │ │ │ │ ├── software.py │ │ │ │ └── unknown.py │ │ │ ├── holdtime.py │ │ │ ├── routerid.py │ │ │ └── version.py │ │ ├── operational.py │ │ ├── refresh.py │ │ ├── source.py │ │ ├── unknown.py │ │ └── update │ │ │ ├── __init__.py │ │ │ ├── attribute │ │ │ ├── __init__.py │ │ │ ├── aggregator.py │ │ │ ├── aigp.py │ │ │ ├── aspath.py │ │ │ ├── atomicaggregate.py │ │ │ ├── attribute.py │ │ │ ├── attributes.py │ │ │ ├── bgpls │ │ │ │ ├── __init__.py │ │ │ │ ├── link │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── admingroup.py │ │ │ │ │ ├── igpmetric.py │ │ │ │ │ ├── linkname.py │ │ │ │ │ ├── maxbw.py │ │ │ │ │ ├── mplsmask.py │ │ │ │ │ ├── opaque.py │ │ │ │ │ ├── protection.py │ │ │ │ │ ├── rsvpbw.py │ │ │ │ │ ├── rterid.py │ │ │ │ │ ├── sradj.py │ │ │ │ │ ├── sradjlan.py │ │ │ │ │ ├── srlg.py │ │ │ │ │ ├── temetric.py │ │ │ │ │ └── unrsvpbw.py │ │ │ │ ├── linkstate.py │ │ │ │ ├── node │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── isisarea.py │ │ │ │ │ ├── lterid.py │ │ │ │ │ ├── nodeflags.py │ │ │ │ │ ├── nodename.py │ │ │ │ │ ├── opaque.py │ │ │ │ │ ├── sralgo.py │ │ │ │ │ └── srcap.py │ │ │ │ └── prefix │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── igpextags.py │ │ │ │ │ ├── igpflags.py │ │ │ │ │ ├── igptags.py │ │ │ │ │ ├── opaque.py │ │ │ │ │ ├── ospfaddr.py │ │ │ │ │ ├── prefixmetric.py │ │ │ │ │ ├── srigpprefixattr.py │ │ │ │ │ ├── srprefix.py │ │ │ │ │ └── srrid.py │ │ │ ├── clusterlist.py │ │ │ ├── community │ │ │ │ ├── __init__.py │ │ │ │ ├── extended │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── bandwidth.py │ │ │ │ │ ├── chso.py │ │ │ │ │ ├── communities.py │ │ │ │ │ ├── community.py │ │ │ │ │ ├── encapsulation.py │ │ │ │ │ ├── flowspec_scope.py │ │ │ │ │ ├── l2info.py │ │ │ │ │ ├── mac_mobility.py │ │ │ │ │ ├── mup.py │ │ │ │ │ ├── origin.py │ │ │ │ │ ├── rt.py │ │ │ │ │ ├── rt_record.py │ │ │ │ │ └── traffic.py │ │ │ │ ├── initial │ │ │ │ │ ├── communities.py │ │ │ │ │ └── community.py │ │ │ │ └── large │ │ │ │ │ ├── communities.py │ │ │ │ │ └── community.py │ │ │ ├── generic.py │ │ │ ├── localpref.py │ │ │ ├── med.py │ │ │ ├── mprnlri.py │ │ │ ├── mpurnlri.py │ │ │ ├── nexthop.py │ │ │ ├── origin.py │ │ │ ├── originatorid.py │ │ │ ├── pmsi.py │ │ │ └── sr │ │ │ │ ├── __init__.py │ │ │ │ ├── labelindex.py │ │ │ │ ├── prefixsid.py │ │ │ │ ├── srgb.py │ │ │ │ └── srv6 │ │ │ │ ├── __init__.py │ │ │ │ ├── generic.py │ │ │ │ ├── l2service.py │ │ │ │ ├── l3service.py │ │ │ │ ├── sidinformation.py │ │ │ │ └── sidstructure.py │ │ │ ├── eor.py │ │ │ └── nlri │ │ │ ├── __init__.py │ │ │ ├── bgpls │ │ │ ├── __init__.py │ │ │ ├── link.py │ │ │ ├── nlri.py │ │ │ ├── node.py │ │ │ ├── prefixv4.py │ │ │ ├── prefixv6.py │ │ │ └── tlvs │ │ │ │ ├── __init__.py │ │ │ │ ├── ifaceaddr.py │ │ │ │ ├── ipreach.py │ │ │ │ ├── linkid.py │ │ │ │ ├── multitopology.py │ │ │ │ ├── neighaddr.py │ │ │ │ ├── node.py │ │ │ │ ├── ospfroute.py │ │ │ │ └── prefix.py │ │ │ ├── cidr.py │ │ │ ├── evpn │ │ │ ├── __init__.py │ │ │ ├── ethernetad.py │ │ │ ├── mac.py │ │ │ ├── multicast.py │ │ │ ├── nlri.py │ │ │ ├── prefix.py │ │ │ └── segment.py │ │ │ ├── flow.py │ │ │ ├── inet.py │ │ │ ├── ipvpn.py │ │ │ ├── label.py │ │ │ ├── mup │ │ │ ├── __init__.py │ │ │ ├── dsd.py │ │ │ ├── isd.py │ │ │ ├── nlri.py │ │ │ ├── t1st.py │ │ │ └── t2st.py │ │ │ ├── mvpn │ │ │ ├── __init__.py │ │ │ ├── nlri.py │ │ │ ├── sharedjoin.py │ │ │ ├── sourcead.py │ │ │ └── sourcejoin.py │ │ │ ├── nlri.py │ │ │ ├── qualifier │ │ │ ├── __init__.py │ │ │ ├── esi.py │ │ │ ├── etag.py │ │ │ ├── labels.py │ │ │ ├── mac.py │ │ │ ├── path.py │ │ │ └── rd.py │ │ │ ├── rtc.py │ │ │ └── vpls.py │ ├── neighbor.py │ └── timer.py │ ├── cli │ ├── __init__.py │ ├── command.py │ ├── completer.py │ ├── main.py │ ├── test.py │ └── validator.py │ ├── conf │ ├── __init__.py │ └── yang │ │ ├── __init__.py │ │ ├── code.py │ │ ├── datatypes.py │ │ ├── generate.py │ │ ├── model.py │ │ └── parser.py │ ├── configuration │ ├── __init__.py │ ├── announce │ │ ├── __init__.py │ │ ├── flow.py │ │ ├── ip.py │ │ ├── label.py │ │ ├── mup.py │ │ ├── mvpn.py │ │ ├── path.py │ │ ├── vpls.py │ │ └── vpn.py │ ├── capability.py │ ├── check.py │ ├── configuration.py │ ├── core │ │ ├── __init__.py │ │ ├── error.py │ │ ├── format.py │ │ ├── location.py │ │ ├── scope.py │ │ ├── section.py │ │ └── tokeniser.py │ ├── flow │ │ ├── __init__.py │ │ ├── match.py │ │ ├── parser.py │ │ ├── route.py │ │ ├── scope.py │ │ └── then.py │ ├── l2vpn │ │ ├── __init__.py │ │ ├── parser.py │ │ └── vpls.py │ ├── neighbor │ │ ├── __init__.py │ │ ├── api.py │ │ ├── family.py │ │ ├── nexthop.py │ │ └── parser.py │ ├── operational │ │ ├── __init__.py │ │ └── parser.py │ ├── parser.py │ ├── process │ │ ├── __init__.py │ │ └── parser.py │ ├── static │ │ ├── __init__.py │ │ ├── mpls.py │ │ ├── parser.py │ │ └── route.py │ └── template │ │ ├── __init__.py │ │ └── neighbor.py │ ├── data │ ├── __init__.py │ └── check.py │ ├── debug │ ├── intercept.py │ └── report.py │ ├── environment │ ├── __init__.py │ ├── base.py │ ├── environment.py │ ├── hashtable.py │ ├── parsing.py │ └── setup.py │ ├── logger │ ├── __init__.py │ ├── color.py │ ├── format.py │ ├── handler.py │ ├── history.py │ ├── option.py │ └── tty.py │ ├── netlink │ ├── __init__.py │ ├── attributes.py │ ├── firewall.py │ ├── message.py │ ├── netlink.py │ ├── old.py │ ├── route │ │ ├── __init__.py │ │ ├── address.py │ │ ├── link.py │ │ ├── neighbor.py │ │ └── network.py │ ├── sequence.py │ └── tc.py │ ├── protocol │ ├── __init__.py │ ├── family.py │ ├── ip │ │ ├── __init__.py │ │ ├── fragment.py │ │ ├── icmp.py │ │ ├── netmask.py │ │ ├── port.py │ │ └── tcp │ │ │ ├── __init__.py │ │ │ └── flag.py │ ├── iso │ │ └── __init__.py │ └── resource.py │ ├── reactor │ ├── __init__.py │ ├── api │ │ ├── __init__.py │ │ ├── command │ │ │ ├── __init__.py │ │ │ ├── announce.py │ │ │ ├── command.py │ │ │ ├── limit.py │ │ │ ├── neighbor.py │ │ │ ├── reactor.py │ │ │ ├── rib.py │ │ │ └── watchdog.py │ │ ├── processes.py │ │ ├── response │ │ │ ├── __init__.py │ │ │ ├── answer.py │ │ │ ├── json.py │ │ │ └── text.py │ │ └── transcoder.py │ ├── asynchronous.py │ ├── daemon.py │ ├── delay.py │ ├── interrupt.py │ ├── keepalive.py │ ├── listener.py │ ├── loop.py │ ├── network │ │ ├── __init__.py │ │ ├── connection.py │ │ ├── error.py │ │ ├── incoming.py │ │ ├── outgoing.py │ │ └── tcp.py │ ├── peer.py │ └── protocol.py │ ├── rib │ ├── __init__.py │ ├── cache.py │ ├── change.py │ ├── incoming.py │ └── outgoing.py │ ├── util │ ├── __init__.py │ ├── cache.py │ ├── coroutine.py │ ├── dictionary.py │ ├── dns.py │ ├── enumeration.py │ ├── errstr.py │ ├── ip.py │ ├── od.py │ └── usage.py │ ├── vendoring │ ├── __init__.py │ ├── gcdump.py │ ├── objgraph.py │ └── profiler.py │ └── version.py ├── tests ├── bgpls_test.py ├── cache_test.py ├── connection.py ├── control_test.py ├── datatype.py ├── decode_test.py ├── flow_test.py ├── l2vpn_test.py ├── nlri_tests.py ├── notification_test.py ├── open_test.py ├── parsing_test.py └── protocol.py └── uv.lock /.coveragerc: -------------------------------------------------------------------------------- 1 | #[run] 2 | #branch = True 3 | 4 | [report] 5 | exclude_lines = 6 | pragma: no cover 7 | pass 8 | def __repr__ 9 | if __name__ == .__main__.: 10 | if self\.debug 11 | raise AssertionError 12 | raise NotImplementedError 13 | raise RuntimeError 14 | if 0: 15 | if False: 16 | 17 | ignore_errors = True 18 | 19 | [run] 20 | omit = 21 | */python?.?/* 22 | */lib-python/?.?/*.py 23 | */lib_pypy/_*.py 24 | */site-packages/ordereddict.py 25 | */site-packages/nose/* 26 | */__init__.py 27 | /src/exabgp/dep/* 28 | /qa/* 29 | /dev/* 30 | /debian/* 31 | /service/* 32 | 33 | #[path] 34 | #source = 35 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # https://editorconfig.org 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.py] 13 | indent_style = space 14 | indent_size = 4 15 | 16 | [*.{md,rst,txt}] 17 | indent_style = space 18 | indent_size = 4 19 | 20 | [*.{ini,toml}] 21 | indent_style = space 22 | indent_size = 4 23 | 24 | [*.{json,yml,yaml}] 25 | indent_style = space 26 | indent_size = 2 27 | 28 | [*.{html,html.j2}] 29 | indent_style = space 30 | indent_size = 2 31 | 32 | [Makefile] 33 | indent_style = tab 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Publish packages 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*" 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | assets: 13 | name: Release packages 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Check out src from Git 17 | uses: actions/checkout@v4 18 | with: 19 | fetch-depth: 0 20 | 21 | - name: Set up Python 3.8 22 | uses: actions/setup-python@v5 23 | with: 24 | python-version: 3.8 25 | # - name: Build 26 | # run: | 27 | # make init build 28 | 29 | # - name: Publish distribution to PyPI 30 | # uses: pypa/gh-action-pypi-publish@master 31 | # with: 32 | # user: __token__ 33 | # password: ${{ secrets.GH_ACTIONS_EXABGP }} 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.pyo 3 | __pycache__/ 4 | /build/ 5 | /dist/ 6 | /sdist/ 7 | /cover/ 8 | /htmlcov/ 9 | /lib/ 10 | 11 | *.sln 12 | 13 | .DS_Store 14 | .coveralls.yml* 15 | .coverage 16 | .idea 17 | 18 | *.pyproj 19 | *.suo 20 | 21 | .installed.cfg 22 | .mr.developer.cfg 23 | .hg 24 | .bzr 25 | .svn 26 | *.tmp* 27 | *.mo 28 | *.egg-info 29 | *.egg 30 | *.EGG 31 | *.EGG-INFO 32 | 33 | develop-eggs 34 | eggs 35 | fake-eggs 36 | init 37 | artifacts 38 | requirements.txt 39 | 40 | .codegpt -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/astral-sh/ruff-pre-commit 3 | # Ruff version. 4 | rev: v0.7.1 5 | hooks: 6 | # Run the linter. 7 | - id: ruff 8 | args: [--fix] 9 | # Run the formatter. 10 | - id: ruff-format 11 | -------------------------------------------------------------------------------- /bin/exabgpcli: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | path="$(cd "$(dirname "$0")"/.. ; pwd)" 4 | 5 | export PYTHONPATH="$path"/src 6 | 7 | for INTERPRETER in "$INTERPRETER" python3 pypy3; do 8 | INTERPRETER="$(command -v "$INTERPRETER")" && break 9 | done 10 | 11 | if [ "$INTERPRETER" = "" ]; then 12 | echo "ExaBGP could not find a python3 interpreter" 13 | exit 1 14 | fi 15 | 16 | APPLICATION="$("$INTERPRETER" -c " 17 | import sys 18 | import os 19 | 20 | print([os.path.join(_, 'exabgp', 'application', 'cli.py') 21 | for _ in sys.path 22 | if os.path.isfile('/'.join((_, 'exabgp', 'application', 'cli.py')))][0] 23 | )")" 24 | 25 | exec env "$INTERPRETER" "$APPLICATION" "$@" 26 | -------------------------------------------------------------------------------- /bin/healthcheck: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | path="$(cd "$(dirname "$0")"/.. ; pwd)" 4 | 5 | export PYTHONPATH="$path"/src 6 | 7 | for INTERPRETER in "$INTERPRETER" python3 pypy3; do 8 | INTERPRETER="$(command -v "$INTERPRETER")" && break 9 | done 10 | 11 | if [ "$INTERPRETER" = "" ]; then 12 | echo "ExaBGP could not find a python3 interpreter" 13 | exit 1 14 | fi 15 | 16 | APPLICATION="$("$INTERPRETER" -c " 17 | import sys 18 | import os 19 | 20 | print([os.path.join(_, 'exabgp', 'application', 'healthcheck.py') 21 | for _ in sys.path 22 | if os.path.isfile('/'.join((_, 'exabgp', 'application', 'healthcheck.py')))][0] 23 | )")" 24 | 25 | exec env "$INTERPRETER" "$APPLICATION" "$@" 26 | -------------------------------------------------------------------------------- /dev/bin/convert-hexdump-raw: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | from struct import pack 5 | 6 | if len(sys.argv) > 2: 7 | destination = open(sys.argv[2], 'w') 8 | else: 9 | destination = sys.stdout 10 | 11 | with open(sys.argv[1], 'r') as record: 12 | connect = record.readline() 13 | for line in record.readlines(): 14 | split = line.rstrip().split() 15 | format = '!' + 'H' * len(split) 16 | destination.write(pack(format, *[int(_, 16) for _ in split])) 17 | 18 | destination.close() 19 | -------------------------------------------------------------------------------- /dev/bin/format-raw-bmp-hexdump: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | if len(sys.argv) < 3: 6 | print "usage : bmp-format raw-file pretty-file" 7 | sys.exit(1) 8 | 9 | print "reading", sys.argv[1] 10 | memory = open(sys.argv[1]).read() 11 | # Yes this can use lots of memory 12 | parts = memory.split(chr(255) * 16) 13 | # And that split - even more (but it is fast) 14 | 15 | print "writing", sys.argv[2] 16 | with open(sys.argv[2], 'w') as out: 17 | while parts: 18 | part = parts.pop(0) 19 | if len(part) > 44: 20 | data = ''.join('%02X' % _ for _ in part[:-44]) 21 | data += '\n' 22 | data += ''.join('%02X' % _ for _ in part[-44:]) 23 | else: 24 | data = ''.join('%02X' % _ for _ in part) 25 | if parts: 26 | data += '\n' + 'F' * 16 27 | out.write(data) 28 | print "done" 29 | -------------------------------------------------------------------------------- /dev/bin/python-profile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | python -m cProfile -o stat.prof $* 3 | -------------------------------------------------------------------------------- /dev/bin/pythonstats: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | python -m pstats stat.prof 3 | -------------------------------------------------------------------------------- /dev/bin/replay-connect: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import socket 5 | 6 | if len(sys.argv) != 4: 7 | print sys.argv[0], ' ' 8 | sys.exit(1) 9 | 10 | try: 11 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 12 | server_address = (sys.argv[1], int(sys.argv[2])) 13 | sys.stderr('connecting to %s port %s\n' % server_address) 14 | sock.connect(server_address) 15 | except socket.error: 16 | print "failed to connect to server" 17 | sys.exit(1) 18 | 19 | with open(sys.argv[3], 'r') as record: 20 | try: 21 | while True: 22 | data = record.read(10240) 23 | print "read", len(data) 24 | if not data: 25 | break 26 | sock.send(data) 27 | finally: 28 | sock.close() 29 | -------------------------------------------------------------------------------- /dev/bin/unittest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | path="$(cd "$(dirname "$0")"/../.. ; pwd)" 4 | 5 | export PYTHONPATH=$path/src 6 | 7 | for INTERPRETER in "$INTERPRETER" python3 pypy3; do 8 | INTERPRETER="$(command -v "$INTERPRETER")" && break 9 | done 10 | 11 | exec "$INTERPRETER" -m exabgp.debug "$@" 12 | -------------------------------------------------------------------------------- /dev/cisco/ibgp4-helper.txt: -------------------------------------------------------------------------------- 1 | ! 2 | interface Loopback1 3 | description BGP 4 | ip address 192.168.127.128 255.255.255.255 5 | ! 6 | bgp 65533 7 | no synchronization 8 | bgp router-id 172.16.0.1 9 | neighbor service-ip peer-group 10 | neighbor service-ip remote-as 65533 11 | neighbor service-ip description Service IPs 12 | neighbor service-ip ebgp-multihop 5 13 | neighbor service-ip update-source loopback1 14 | neighbor service-ip default-originate 15 | neighbor service-ip route-map bgp-service-ip in 16 | neighbor service-ip route-map deny-any out 17 | neighbor 192.168.127.1 peer-group service-ip 18 | no auto-summary 19 | ! 20 | ip prefix-list service-ip seq 10 permit 192.0.2.1/32 21 | ip prefix-list service-ip seq 99999 deny 0.0.0.0/0 le 32 22 | ! 23 | ip access-list standard match-any 24 | permit any 25 | ! 26 | route-map bgp-service-ip permit 10 27 | match ip address prefix-list service-ip 28 | set community no-export additive 29 | ! 30 | route-map deny-any deny 10 31 | match ip address match-any 32 | ! 33 | 34 | -------------------------------------------------------------------------------- /dev/quagga/ebgpd.conf.v4: -------------------------------------------------------------------------------- 1 | log file /var/log/quagga/bgpd informational 2 | password none 3 | enable password none 4 | ! 5 | router bgp 65533 6 | network 1.2.3.4/32 7 | neighbor 192.168.127.1 remote-as 65500 8 | ! 9 | line vty 10 | ! 11 | 12 | -------------------------------------------------------------------------------- /dev/quagga/ebgpd.conf.v46: -------------------------------------------------------------------------------- 1 | /bin/bash: 2010/10/22: No such file or directory 2 | ssword none 3 | enable password none 4 | log file /var/log/quagga/bgpd informational 5 | ! 6 | router bgp 65533 7 | network 1.2.3.4/32 8 | neighbor 192.168.127.1 remote-as 65500 9 | neighbor 192.168.127.130 remote-as 65500 10 | ! 11 | address-family ipv6 12 | network 1234:5678::/32 13 | neighbor 192.168.127.1 activate 14 | exit-address-family 15 | ! 16 | line vty 17 | ! 18 | 19 | -------------------------------------------------------------------------------- /dev/quagga/ebgpd.conf.v6: -------------------------------------------------------------------------------- 1 | log file /var/log/quagga/bgpd informational 2 | password none 3 | enable password none 4 | ! 5 | router bgp 65533 6 | network 1.2.3.4/32 7 | neighbor 2a02:b80::1 remote-as 65500 8 | ! 9 | address-family ipv6 10 | network 1234:5678::/32 11 | neighbor 2a02:b80::1 activate 12 | exit-address-family 13 | ! 14 | line vty 15 | ! 16 | 17 | -------------------------------------------------------------------------------- /dev/quagga/ibgpd.conf.v4.md5: -------------------------------------------------------------------------------- 1 | log file /var/log/quagga/bgpd informational 2 | password none 3 | enable password none 4 | ! 5 | router bgp 65533 6 | network 1.2.3.4/32 7 | neighbor 192.168.127.1 remote-as 65533 8 | neighbor 192.168.127.130 password abc123 9 | ! 10 | line vty 11 | ! 12 | 13 | -------------------------------------------------------------------------------- /dev/quagga/ibgpd.conf.v4.parse: -------------------------------------------------------------------------------- 1 | ! 2 | ! Zebra configuration saved from vty 3 | ! 2010/10/22 12:37:26 4 | ! 5 | password none 6 | enable password none 7 | log file /var/log/quagga/bgpd informational 8 | ! 9 | router bgp 65533 10 | network 1.2.3.4/32 route-map SetAttr 11 | network 5.6.7.0/24 route-map SetAttr 12 | network 8.9.0.0/16 route-map SetAttr 13 | neighbor 192.168.127.1 remote-as 65533 14 | neighbor 192.168.127.130 remote-as 65533 15 | ! neighbor 192.168.127.130 password abc123 16 | ! 17 | address-family ipv6 18 | network 1234:5678::/32 19 | neighbor 192.168.127.1 activate 20 | exit-address-family 21 | ! 22 | route-map SetAttr permit 10 23 | set community 65000:1 additive 24 | set aggregator as 65002 9.8.7.6 25 | set as-path prepend 64 128 256 26 | set atomic-aggregate 27 | set metric 20 28 | set originator-id 9.8.7.6 29 | set extcommunity rt 65000:1 30 | set extcommunity soo 1.2.3.4:5678 31 | ! 32 | line vty 33 | ! 34 | -------------------------------------------------------------------------------- /dev/quagga/ibgpd.conf.v46: -------------------------------------------------------------------------------- 1 | password none 2 | enable password none 3 | log file /var/log/quagga/bgpd informational 4 | ! 5 | router bgp 65533 6 | network 1.2.3.4/32 7 | neighbor 192.168.127.1 remote-as 65533 8 | neighbor 192.168.127.130 remote-as 65533 9 | ! 10 | address-family ipv6 11 | network 1234:5678::/32 12 | neighbor 192.168.127.1 activate 13 | exit-address-family 14 | ! 15 | line vty 16 | ! 17 | 18 | -------------------------------------------------------------------------------- /dev/release/debian: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Small instruction set done by Henry-Nicolas Tourneur to automate testings. 4 | 5 | apt-get install build-essential dpkg-dev fakeroot lintian debhelper 6 | echo "Make sure you'r in the ExaBGP root folder" 7 | dpkg-buildpackage 8 | echo "To install your package, run dpkg -i exabgp_VERSION_all.deb" 9 | echo "You can check for packaging errors by running lintian on the .changes file." 10 | 11 | -------------------------------------------------------------------------------- /dev/static/lint: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | env \ 3 | PYTHONPATH=$PYTHONPATH:src \ 4 | python2.6 \ 5 | /opt/local/bin/pylint-2.6 \ 6 | --variable-rgx="[a-z_][a-z0-9_]{0,30}$" \ 7 | --disable-msg=W0312 \ 8 | --disable-msg=C0324 \ 9 | --disable-msg=C0111 \ 10 | --disable-msg=C0321 \ 11 | --disable-msg=C0103 \ 12 | --max-line-length=200 \ 13 | $1 14 | 15 | # W0312 : Found indentation with tabs instead of spaces 16 | # C0324 : Comma not followed by a space 17 | # C0111 : Missing docstring 18 | # C0321 : More than one statement on a single line 19 | # C0103 : the regex for class and functions 20 | -------------------------------------------------------------------------------- /etc/exabgp/api-add-remove.conf: -------------------------------------------------------------------------------- 1 | process add-remove { 2 | run ./run/api-add-remove.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | graceful-restart; 19 | } 20 | 21 | api { 22 | processes [ add-remove ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/api-announce-processes-match.conf: -------------------------------------------------------------------------------- 1 | process add-remove { 2 | run ./run/api-announce.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | graceful-restart; 19 | } 20 | 21 | api { 22 | processes-match [ "^add" ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/api-announce-star.conf: -------------------------------------------------------------------------------- 1 | process add-remove { 2 | run ./run/api-announce-star.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | graceful-restart; 19 | } 20 | 21 | api { 22 | processes [ add-remove ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/api-announce.conf: -------------------------------------------------------------------------------- 1 | process add-remove { 2 | run ./run/api-announce.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | graceful-restart; 19 | } 20 | 21 | api { 22 | processes [ add-remove ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/api-announcement.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-announcement.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | graceful-restart; 19 | } 20 | 21 | api { 22 | processes [ announce-routes ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/api-api.conf: -------------------------------------------------------------------------------- 1 | process expecting-a-keepalive { 2 | run ./run/api-api.receive.run; 3 | encoder json; 4 | } 5 | 6 | process expecting-no-data { 7 | run ./run/api-api.nothing.run; 8 | encoder json; 9 | } 10 | 11 | template { 12 | neighbor controller { 13 | family { 14 | ipv4 nlri-mpls; 15 | ipv4 unicast; 16 | } 17 | api speaking { 18 | processes [ expecting-a-keepalive ]; 19 | # neighbor-changes; 20 | receive { 21 | parsed; 22 | keepalive; 23 | update; 24 | } 25 | send { 26 | parsed; 27 | keepalive; 28 | update; 29 | } 30 | } 31 | api listening { 32 | processes [ expecting-no-data ]; 33 | } 34 | } 35 | } 36 | 37 | neighbor 127.0.0.1 { 38 | inherit controller; 39 | router-id 127.0.0.123; 40 | local-address 127.0.0.1; 41 | local-as 65535; 42 | peer-as 65535; 43 | group-updates false; 44 | } 45 | -------------------------------------------------------------------------------- /etc/exabgp/api-attributes-path.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-attributes-path.run; 3 | encoder text; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 300; 10 | peer-as 300; 11 | 12 | family { 13 | ipv4 unicast; 14 | ipv6 unicast; 15 | } 16 | 17 | capability { 18 | add-path send/receive; 19 | route-refresh; 20 | } 21 | 22 | api { 23 | processes [ announce-routes ]; 24 | neighbor-changes; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /etc/exabgp/api-attributes-vpn.conf: -------------------------------------------------------------------------------- 1 | process add-remove { 2 | run ./run/api-attributes-vpn.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | ipv4 mpls-vpn; 16 | ipv4 nlri-mpls; 17 | } 18 | 19 | api { 20 | processes [ add-remove ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /etc/exabgp/api-attributes.conf: -------------------------------------------------------------------------------- 1 | process add-remove { 2 | run ./run/api-attributes.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | api { 18 | processes [ add-remove ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /etc/exabgp/api-blocklist.conf: -------------------------------------------------------------------------------- 1 | 2 | process blocklist-10.0.0.2 { 3 | run ./run/api-blocklist.run; 4 | encoder text; 5 | } 6 | 7 | process blocklist-10.0.0.3 { 8 | run ./run/api-blocklist.run; 9 | encoder text; 10 | } 11 | 12 | template { 13 | neighbor blocklist { 14 | local-as 64512; 15 | peer-as 64512; 16 | router-id 10.0.0.17; 17 | local-address 10.0.0.17; 18 | group-updates true; 19 | hold-time 180; 20 | capability { 21 | graceful-restart 1200; 22 | route-refresh enable; 23 | operational enable; 24 | } 25 | family { 26 | ipv4 unicast; 27 | ipv6 unicast; 28 | } 29 | } 30 | } 31 | 32 | neighbor 10.0.0.2 { 33 | inherit blocklist; 34 | api { 35 | processes [ blocklist-10.0.0.2 ]; 36 | } 37 | } 38 | 39 | neighbor 10.0.0.3 { 40 | inherit blocklist; 41 | api { 42 | processes [ blocklist-10.0.0.3 ]; 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /etc/exabgp/api-broken-flow.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-broken-flow.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 flow; 15 | } 16 | api { 17 | processes [ announce-routes ]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /etc/exabgp/api-check.conf: -------------------------------------------------------------------------------- 1 | process check-and-announce { 2 | run ./run/api-check.run; 3 | encoder text; 4 | } 5 | 6 | template { 7 | neighbor controler { 8 | family { 9 | ipv4 unicast; 10 | ipv6 unicast; 11 | } 12 | 13 | api connection { 14 | processes [ check-and-announce ]; 15 | receive { 16 | parsed; 17 | update; 18 | } 19 | send { 20 | parsed; 21 | update; 22 | } 23 | } 24 | static { 25 | route ::1/128 next-hop ::1; 26 | route 127.0.0.1/32 next-hop 127.0.0.2; 27 | } 28 | } 29 | } 30 | 31 | neighbor 127.0.0.1 { 32 | inherit controler; 33 | local-as 65512; 34 | peer-as 65512; 35 | hold-time 30; 36 | local-address 127.0.0.1; 37 | router-id 10.0.0.139; 38 | } 39 | -------------------------------------------------------------------------------- /etc/exabgp/api-eor.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-eor.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | capability { 14 | graceful-restart; 15 | } 16 | 17 | family { 18 | ipv4 unicast; 19 | ipv6 unicast; 20 | } 21 | 22 | api { 23 | processes [ announce-routes ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /etc/exabgp/api-fast.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-fast.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | 12 | group-updates false; 13 | 14 | family { 15 | ipv4 unicast; 16 | } 17 | 18 | capability { 19 | graceful-restart; 20 | } 21 | 22 | api { 23 | processes [ announce-routes ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /etc/exabgp/api-flow-merge.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-flow-merge.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 flow; 15 | } 16 | api { 17 | processes [ announce-routes ]; 18 | } 19 | flow { 20 | route one { 21 | match { 22 | source 202.255.238.1/32; 23 | } 24 | scope { 25 | interface-set [ non-transitive:input:3405770241:1 ]; 26 | } 27 | then { 28 | discard; 29 | } 30 | } 31 | route two { 32 | match { 33 | source 202.255.238.1/32; 34 | } 35 | scope { 36 | interface-set [ non-transitive:input:3405770241:1 transitive:output:254:254 ]; 37 | } 38 | then { 39 | discard; 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /etc/exabgp/api-flow.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-flow.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 flow; 15 | } 16 | api { 17 | processes [ announce-routes ]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /etc/exabgp/api-ipv4.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-ipv4.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 10.0.0.1; 8 | local-address 127.0.0.1; 9 | local-as 65000; 10 | peer-as 65000; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | ipv4 mup; 16 | } 17 | capability { 18 | graceful-restart; 19 | } 20 | api { 21 | processes [ announce-routes ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /etc/exabgp/api-ipv6.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-ipv6.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 10.0.0.1; 8 | local-address 127.0.0.1; 9 | local-as 65000; 10 | peer-as 65000; 11 | group-updates false; 12 | 13 | family { 14 | ipv6 unicast; 15 | ipv6 mup; 16 | } 17 | capability { 18 | graceful-restart; 19 | } 20 | api { 21 | processes [ announce-routes ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /etc/exabgp/api-manual-eor.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-manual-eor.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | manual-eor true; 13 | 14 | capability { 15 | graceful-restart; 16 | } 17 | 18 | family { 19 | ipv4 unicast; 20 | ipv6 unicast; 21 | } 22 | 23 | api { 24 | processes [ announce-routes ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /etc/exabgp/api-multi-neighbor.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-multi-neighbor.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | graceful-restart; 19 | } 20 | 21 | api { 22 | processes [ announce-routes ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/api-multiple-api.conf: -------------------------------------------------------------------------------- 1 | process public { 2 | run ./run/api-multiple-public.run; 3 | encoder text; 4 | } 5 | 6 | process private { 7 | run ./run/api-multiple-private.run; 8 | encoder text; 9 | } 10 | 11 | template { 12 | neighbor public { 13 | local-as 1; 14 | peer-as 1; 15 | group-updates false; 16 | 17 | family { 18 | ipv4 unicast; 19 | } 20 | 21 | api { 22 | processes [ public ]; 23 | } 24 | } 25 | neighbor private { 26 | local-as 2; 27 | peer-as 2; 28 | group-updates false; 29 | 30 | family { 31 | ipv4 unicast; 32 | } 33 | 34 | api { 35 | processes [ private ]; 36 | } 37 | } 38 | } 39 | 40 | neighbor 127.0.0.1 { 41 | router-id 1.2.3.4; 42 | local-address 127.0.0.1; 43 | inherit public; 44 | } 45 | 46 | neighbor 192.168.0.1 { 47 | router-id 1.2.3.4; 48 | local-address 127.0.0.1; 49 | inherit private; 50 | } 51 | -------------------------------------------------------------------------------- /etc/exabgp/api-multisession.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-multisession.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | capability { 14 | multi-session; 15 | } 16 | 17 | family { 18 | ipv4 unicast; 19 | } 20 | 21 | api { 22 | processes [ announce-routes ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/api-mvpn.conf: -------------------------------------------------------------------------------- 1 | process mvpn { 2 | run ./run/api-mvpn.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 32.32.32.32; 8 | local-address 127.0.0.1; 9 | local-as 65000; 10 | peer-as 65000; 11 | group-updates false; 12 | auto-flush true; 13 | 14 | family { 15 | ipv4 mcast-vpn; 16 | ipv6 mcast-vpn; 17 | } 18 | api { 19 | processes [ mvpn ]; 20 | } 21 | } -------------------------------------------------------------------------------- /etc/exabgp/api-nexthop-self.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-nexthop-self.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | api { 18 | processes [ announce-routes ]; 19 | } 20 | announce { 21 | ipv4 { 22 | unicast 10.0.0.1 next-hop self; 23 | } 24 | } 25 | static { 26 | route 10.0.0.2 { 27 | next-hop self; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /etc/exabgp/api-nexthop.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-nexthop.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | local-as 65512; 8 | peer-as 65512; 9 | hold-time 30; 10 | local-address 127.0.0.1; 11 | router-id 10.0.0.139; 12 | 13 | family { 14 | ipv6 unicast; 15 | } 16 | 17 | api { 18 | processes [ announce-routes ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /etc/exabgp/api-no-respawn.conf: -------------------------------------------------------------------------------- 1 | process one-shot { 2 | run ./run/api-no-respawn-1.run; 3 | encoder json; 4 | respawn false; 5 | } 6 | 7 | process respawn { 8 | run ./run/api-no-respawn-2.run; 9 | encoder json; 10 | } 11 | 12 | neighbor 127.0.0.1 { 13 | router-id 1.2.3.4; 14 | local-address 127.0.0.1; 15 | local-as 1; 16 | peer-as 1; 17 | group-updates false; 18 | 19 | family { 20 | ipv4 unicast; 21 | } 22 | 23 | capability { 24 | graceful-restart; 25 | } 26 | 27 | api { 28 | processes [ one-shot respawn ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /etc/exabgp/api-notification.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-notification.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | capability { 14 | graceful-restart disable; 15 | } 16 | api { 17 | processes [ announce-routes ]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /etc/exabgp/api-open.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-open.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | nexthop { 18 | ipv4 unicast ipv6; 19 | ipv6 unicast ipv4; 20 | } 21 | 22 | capability { 23 | asn4 enable; 24 | aigp enable; 25 | operational enable; 26 | multi-session enable; 27 | route-refresh enable; 28 | graceful-restart 360; 29 | add-path send/receive; 30 | } 31 | 32 | api announce { 33 | processes [ announce-routes ]; 34 | send { 35 | parsed; 36 | open; 37 | } 38 | receive { 39 | packets; 40 | consolidate; 41 | open; 42 | update; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /etc/exabgp/api-reload.1.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-reload.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | hold-time 600; 12 | group-updates false; 13 | 14 | capability { 15 | graceful-restart; 16 | } 17 | family { 18 | ipv4 unicast; 19 | } 20 | api { 21 | processes [ announce-routes ]; 22 | } 23 | static { 24 | route 1.0.0.0/24 next-hop 4.0.0.0; 25 | route 2.0.0.0/24 next-hop 4.0.0.0; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /etc/exabgp/api-reload.2.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-reload.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | hold-time 600; 12 | group-updates false; 13 | 14 | capability { 15 | graceful-restart; 16 | } 17 | family { 18 | ipv4 unicast; 19 | } 20 | api { 21 | processes [ announce-routes ]; 22 | } 23 | static { 24 | route 1.0.0.0/24 next-hop 4.0.0.0; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /etc/exabgp/api-rib.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-rib.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | } 19 | api { 20 | processes [ announce-routes ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /etc/exabgp/api-rr-rib.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-rr-rib.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | route-refresh; 19 | } 20 | api { 21 | processes [ announce-routes ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /etc/exabgp/api-rr.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-rr.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | route-refresh; 19 | } 20 | api { 21 | processes [ announce-routes ]; 22 | receive { 23 | parsed; 24 | update; 25 | } 26 | send { 27 | packets; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /etc/exabgp/api-teardown.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-teardown.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | capability { 13 | graceful-restart disable; 14 | } 15 | 16 | family { 17 | ipv4 unicast; 18 | } 19 | api { 20 | processes [ announce-routes ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /etc/exabgp/api-vpls.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-vpls.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | capability { 14 | graceful-restart; 15 | } 16 | family { 17 | l2vpn vpls; 18 | } 19 | api { 20 | processes [ announce-routes ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /etc/exabgp/api-vpnv4.conf: -------------------------------------------------------------------------------- 1 | process announce-routes { 2 | run ./run/api-vpnv4.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | group-updates false; 12 | 13 | family { 14 | ipv4 mpls-vpn; 15 | } 16 | capability { 17 | graceful-restart; 18 | } 19 | api { 20 | processes [ announce-routes ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /etc/exabgp/api-watchdog.conf: -------------------------------------------------------------------------------- 1 | process service-watchdog { 2 | run ./run/watchdog.run; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 10.0.0.10; 8 | local-address 127.0.0.1; 9 | local-as 65533; 10 | peer-as 65533; 11 | 12 | family { 13 | ipv4 unicast; 14 | } 15 | 16 | api { 17 | processes [ service-watchdog ]; 18 | } 19 | 20 | static { 21 | route 66.66.66.66 next-hop 1.2.3.4; 22 | route 77.77.77.77 next-hop 1.2.3.4 watchdog dnsr withdraw; 23 | route 88.88.88.88 next-hop 1.2.3.4; 24 | route 100.100.100.100 next-hop 192.168.1.100; 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /etc/exabgp/conf-addpath.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | group-updates false; 7 | 8 | capability { 9 | add-path send/receive; 10 | } 11 | 12 | family { 13 | ipv4 unicast; 14 | ipv4 mpls-vpn; 15 | ipv6 unicast; 16 | } 17 | 18 | add-path { 19 | ipv4 unicast; 20 | ipv4 mpls-vpn; 21 | } 22 | 23 | static { 24 | route 193.0.2.1 path-information 1.2.3.4 next-hop 10.0.0.1 extended-community 72:0.0.0.1; 25 | route 10.0.0.0/24 origin igp next-hop 192.168.0.1 extended-community [ target:0:0 target:1:1 ] label 20012 rd 100:100 local-preference 100 path-information 10; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /etc/exabgp/conf-aggregator.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | description "a quagga test peer"; 3 | router-id 10.0.0.2; 4 | local-address 127.0.0.1; 5 | local-as 65533; 6 | peer-as 65533; 7 | hold-time 180; 8 | 9 | static { 10 | route 1.0.64.0/18 as-path [ 57821 6939 ] atomic-aggregate aggregator ( 18144:219.118.225.189 ) next-hop 192.168.1.254; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /etc/exabgp/conf-attributes.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | group-updates false; 7 | 8 | family { 9 | ipv4 unicast; 10 | ipv6 unicast; 11 | } 12 | 13 | static { 14 | route 10.0.0.7/32 { 15 | # 0x0c: Flag for LargeCommunity 16 | # 0x20: Attribute value for LargeCommunity 17 | # 1:2:3 10:11:12 as long 18 | next-hop 255.255.255.255; 19 | attribute [ 0x20 0xc0 0x0000000100000002000000030000000A0000000B0000000C ]; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /etc/exabgp/conf-bgpls.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | 7 | family { 8 | bgp-ls bgp-ls; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /etc/exabgp/conf-cap-software-version.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 10.0.0.2; 3 | local-address 127.0.0.1; 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | 8 | capability { 9 | software-version enable; 10 | } 11 | 12 | family { 13 | ipv4 unicast; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /etc/exabgp/conf-ebgp.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 10.0.0.2; 3 | local-address 127.0.0.1; 4 | local-as 65533; 5 | peer-as 65000; 6 | hold-time 180; 7 | 8 | family { 9 | ipv4 unicast; 10 | } 11 | 12 | announce { 13 | ipv4 { 14 | unicast 10.0.0.0/24 next-hop 10.0.1.254 local-preference 200; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /etc/exabgp/conf-generic-attribute.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 10.0.0.10; 3 | local-address 127.0.0.1; 4 | local-as 65533; 5 | peer-as 65533; 6 | group-updates false; 7 | 8 | family { 9 | ipv4 unicast; 10 | } 11 | 12 | static { 13 | # this will cause the following to be created (we detect this is a known attribute) 14 | # route 100.100.100.100 next-hop 192.168.1.100 med 100; 15 | route 100.100.100.100 next-hop 192.168.1.100 attribute [0x04 0x80 0x00000064]; 16 | 17 | # we set the PARTIAL flag (0x20) otherwise selfcheck is not happy 18 | # we set the TRANSITIVE flag (0x40) otherwise selfcheck is not happy 19 | 20 | # non transitive attribute, we will not even try to decode it 21 | route 101.101.101.101 next-hop 192.168.1.100 attribute [0x99 0x60 0x00000064]; 22 | 23 | # transitive attribute, we will decode it 24 | route 111.111.111.111 next-hop 192.168.1.100 attribute [0x99 0x70 0x00000064]; 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /etc/exabgp/conf-group-limit.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | 7 | family { 8 | ipv4 unicast; 9 | ipv6 unicast; 10 | } 11 | 12 | static { 13 | route 193.0.2.1 next-hop 10.0.0.1; 14 | route 193.0.2.2 next-hop 10.0.0.1; 15 | route 2A02:B80:0:1::1/128 next-hop 2A02:B80:1::1; 16 | route 2A02:B80:0:2::2/128 next-hop 2A02:B80:1::1; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /etc/exabgp/conf-group.conf: -------------------------------------------------------------------------------- 1 | template { 2 | neighbor test { 3 | local-as 65533; 4 | peer-as 65533; 5 | hold-time 180; 6 | group-updates false; 7 | 8 | family { 9 | ipv4 unicast; 10 | } 11 | 12 | capability { 13 | graceful-restart 1200; 14 | } 15 | 16 | static { 17 | route 1.0.0.0/8 next-hop 1.1.1.1; 18 | route 2.0.0.0/8 next-hop 1.1.1.1; 19 | route 3.0.0.0/8 next-hop 1.1.1.1; 20 | route 4.0.0.0/8 next-hop 1.1.1.1; 21 | } 22 | } 23 | } 24 | 25 | neighbor 127.0.0.1 { 26 | inherit test; 27 | description "router 2 with four routes"; 28 | router-id 127.0.0.0; 29 | local-address 127.0.0.1; 30 | } 31 | -------------------------------------------------------------------------------- /etc/exabgp/conf-hostname.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 10.0.0.2; 3 | local-address 127.0.0.1; 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | host-name my-host-name; 8 | domain-name my-domain-name.com; 9 | 10 | family { 11 | ipv4 unicast; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /etc/exabgp/conf-ipself4.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 127.0.0.2; 3 | local-address 127.0.0.1; 4 | local-as 12345; 5 | peer-as 12345; 6 | 7 | family { 8 | ipv4 unicast; 9 | } 10 | 11 | static { 12 | route 10.0.0.0/32 next-hop self; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /etc/exabgp/conf-ipself6.conf: -------------------------------------------------------------------------------- 1 | neighbor ::1 { 2 | router-id 127.0.0.2; 3 | local-address ::1; 4 | local-as 12345; 5 | peer-as 12345; 6 | 7 | family { 8 | ipv6 unicast; 9 | } 10 | 11 | static { 12 | route 2a04:6d80::1/128 next-hop self; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /etc/exabgp/conf-ipv46routes4family.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | group-updates false; 7 | 8 | family { 9 | ipv4 unicast; 10 | } 11 | 12 | static { 13 | # route 2A02:B80:0:1::/64 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740] local-preference 200; 14 | route 193.0.2.1 next-hop 10.0.0.1 extended-community 72:0.0.0.1; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /etc/exabgp/conf-ipv46routes6family.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | group-updates false; 7 | 8 | family { 9 | ipv6 unicast; 10 | } 11 | 12 | static { 13 | # route 193.0.2.1 next-hop 10.0.0.1 extended-community 72:0.0.0.1; 14 | route 2A02:B80:0:1::1/128 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740] local-preference 200; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /etc/exabgp/conf-ipv6grouping.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | 7 | family { 8 | ipv6 unicast; 9 | } 10 | 11 | static { 12 | route 2A02:B80:0:1::1/128 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740] local-preference 200; 13 | route 2A02:B80:0:1::2/128 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740] local-preference 200; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /etc/exabgp/conf-largecommunity.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 65000; 5 | peer-as 65000; 6 | group-updates false; 7 | 8 | family { 9 | ipv4 unicast; 10 | } 11 | 12 | static { 13 | route 8.8.8.10/32 next-hop 192.0.2.1 large-community [ 2914:0:666 2914:3320:123 ]; 14 | route 9.9.9.10/32 next-hop 192.0.2.1 large-community [ 2914:0:666 2914:3320:123 2914:3320:123 ]; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /etc/exabgp/conf-name.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 127.0.0.2; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | hold-time 180; 7 | 8 | family { 9 | ipv4 unicast; 10 | } 11 | 12 | static { 13 | route 1.0.0.0/24 next-hop 1.2.3.4 name this-is-a-test-route; 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /etc/exabgp/conf-new-v6.conf: -------------------------------------------------------------------------------- 1 | template { 2 | neighbor a-few-routes { 3 | announce { 4 | ipv6 { 5 | unicast 2A02:B80:0:1::1/128 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740] local-preference 200; 6 | } 7 | } 8 | } 9 | } 10 | 11 | neighbor 127.0.0.1 { 12 | description "a simple test for the new configuration format name"; 13 | inherit a-few-routes; 14 | router-id 10.0.0.2; 15 | local-address 127.0.0.1; 16 | local-as 65533; 17 | peer-as 65533; 18 | hold-time 180; 19 | 20 | family { 21 | ipv6 unicast; 22 | } 23 | 24 | announce { 25 | ipv6 { 26 | unicast 2A02:B80:0:1::2/128 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740] local-preference 200; 27 | } 28 | } 29 | announce { 30 | ipv6 { 31 | } 32 | } 33 | announce { 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /etc/exabgp/conf-no-asn4.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 127.0.0.1; 3 | local-address 127.0.0.1; 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | 8 | capability { 9 | asn4 disable; 10 | } 11 | 12 | static { 13 | route 10.0.1.0/24 next-hop 10.0.255.254 as-path [ 100 ]; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /etc/exabgp/conf-parity.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | 7 | family { 8 | ipv6 mpls-vpn; 9 | } 10 | 11 | static { 12 | route 2001:4B50:20C0::/48 { 13 | rd 3215:583457597; 14 | as-path [ 25186 65000 64512 ]; 15 | next-hop ::FFFF:81.52.17.146; 16 | originator-id 57.35.2.240; 17 | local-preference 100; 18 | community [ 65000:33 ]; 19 | extended-community [ target:10283:4.249.92.120 ]; 20 | label 926; 21 | } 22 | route 2001:4B50:20D0::/48 rd 3215:583457597 as-path [ 25186 65000 64512 ] next-hop ::FFFF:81.52.17.146 originator-id 57.35.2.240 local-preference 100 community [ 65000:33 ] extended-community [ target:10283:4.249.92.120 ] label 926; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/conf-path-information.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 127.0.0.1; 3 | local-address 127.0.0.1; 4 | local-as 55219; 5 | peer-as 55219; 6 | 7 | family { 8 | ipv4 unicast; 9 | } 10 | 11 | capability { 12 | add-path send/receive; 13 | } 14 | 15 | static { 16 | route 10.0.0.10 next-hop 10.10.1.1 path-information 0.0.0.1; 17 | route 10.0.0.10 next-hop 10.10.1.2 path-information 0.0.0.2; 18 | route 10.1.0.10 next-hop 10.10.1.3 path-information 0.0.0.3; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /etc/exabgp/conf-prefix-sid.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 198.51.100.200; 3 | local-address 127.0.0.1; 4 | local-as 65000; 5 | peer-as 65000; 6 | group-updates false; 7 | 8 | family { 9 | ipv4 unicast; 10 | ipv4 nlri-mpls; 11 | } 12 | 13 | static { 14 | route 198.51.100.100/32 next-hop 198.51.100.1 label [ 800001 ] bgp-prefix-sid [ 777 ]; 15 | route 198.51.100.101/32 next-hop 198.51.100.2 label [ 800002 ] bgp-prefix-sid [ 300, [ ( 800000,4096 ), ( 1000000,5000 ) ] ]; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /etc/exabgp/conf-split.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | description "will announce 4 /24"; 3 | router-id 198.111.227.39; 4 | local-address 127.0.0.1; 5 | local-as 65533; 6 | peer-as 65533; 7 | group-updates disable; 8 | 9 | family { 10 | ipv4 unicast; 11 | } 12 | 13 | static { 14 | route 172.10.0.0/22 next-hop 192.0.2.1 med 200 community [174:666] split /24; 15 | route 172.10.4.0/22 { 16 | next-hop 192.0.2.1; 17 | med 200; 18 | community [174:666]; 19 | split /24; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /etc/exabgp/conf-srv6-mup-v3.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 10.0.0.1; 3 | local-address 127.0.0.1; 4 | local-as 65000; 5 | peer-as 65000; 6 | 7 | family { 8 | ipv4 mup; 9 | ipv6 mup; 10 | } 11 | announce { 12 | ipv4 { 13 | mup \ 14 | mup-t1st 192.168.0.2/32 rd 100:100 teid 12345 qfi 9 endpoint 10.0.0.1 source 10.0.1.1 \ 15 | next-hop 10.0.0.2 \ 16 | extended-community [ target:10:10 ]; 17 | } 18 | ipv6 { 19 | mup \ 20 | mup-t1st 2001:db8:1:1::2/128 rd 100:100 teid 12345 qfi 9 endpoint 2001::1 source 2002::2 \ 21 | next-hop 10.0.0.2 \ 22 | extended-community [ target:10:10 ]; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /etc/exabgp/conf-template.conf: -------------------------------------------------------------------------------- 1 | template { 2 | neighbor test { 3 | local-as 65533; 4 | peer-as 65533; 5 | hold-time 180; 6 | group-updates false; 7 | 8 | family { 9 | ipv4 unicast; 10 | } 11 | 12 | capability { 13 | graceful-restart 1200; 14 | } 15 | 16 | static { 17 | route 1.0.0.0/8 next-hop 1.1.1.1; 18 | } 19 | } 20 | } 21 | 22 | neighbor 127.0.0.1 { 23 | inherit test; 24 | description "router 2 with two routes from inheritance"; 25 | router-id 127.0.0.0; 26 | local-address 127.0.0.1; 27 | 28 | static { 29 | route 2.0.0.0/8 { 30 | next-hop 1.1.1.1; 31 | } 32 | route 3.0.0.0/8 next-hop 1.2.3.4; 33 | } 34 | static { 35 | route 4.0.0.0/8 next-hop 2.2.2.2; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /etc/exabgp/conf-unknowncap.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | 7 | family { 8 | ipv4 unicast; 9 | } 10 | 11 | static { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /etc/exabgp/conf-vpn.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 127.1.1.1 ; 3 | local-address 127.0.0.1 ; 4 | local-as 65000 ; 5 | peer-as 65000 ; 6 | hold-time 180 ; 7 | group-updates false; 8 | capability { 9 | route-refresh ; 10 | graceful-restart ; 11 | } 12 | static { 13 | route 10.0.0.0/24 rd 65000:1 next-hop 200.10.0.101 extended-community [ 0x0002fde800000001 0x0002271000000001 ] label 1000 split /25 ; 14 | route 20.0.0.0/24 rd 65000:1 next-hop 200.10.0.101 extended-community [ 0x0002fde800000001 0x0002271000000001 ] label 1000 split /25 ; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /etc/exabgp/example-healthcheck.conf: -------------------------------------------------------------------------------- 1 | # Check if the service is available to announce a route to 2 | # it. Since the purpose is high availability, it is expected 3 | # that another host is present with a similar 4 | # configuration. IP address for the service is expected to be 5 | # configured on the loopback interface. You can run the 6 | # healthcheck process manually to check if it works as 7 | # expected (-h flag will give you available options) 8 | 9 | process service-nginx { 10 | run python3 -m exabgp healthcheck -s --name nginx --cmd "curl --fail --verbose --max-time 2 http://localhost" --start-ip 0; 11 | encoder text; 12 | } 13 | 14 | neighbor 10.0.0.3 { 15 | description "will announce a route to a service"; 16 | router-id 198.111.227.39; 17 | local-address 10.0.0.2; 18 | local-as 65533; 19 | peer-as 65533; 20 | 21 | api services { 22 | processes [ service-nginx ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /etc/exabgp/extended-nexthop.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 127.0.0.2; 3 | local-address 127.0.0.1; 4 | local-as 12345; 5 | peer-as 12345; 6 | 7 | capability { 8 | nexthop true; 9 | } 10 | 11 | 12 | family { 13 | ipv4 unicast; 14 | ipv4 mpls-vpn; 15 | ipv6 unicast; 16 | ipv6 mpls-vpn; 17 | } 18 | 19 | nexthop { 20 | ipv4 unicast ipv6; 21 | ipv4 mpls-vpn ipv6; 22 | ipv6 unicast ipv4; 23 | } 24 | 25 | static { 26 | route 153.153.153.153 next-hop BAD:CAFE:BAD:CAFE:BAD:CAFE:BAD:CAFE; 27 | route DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF next-hop 170.170.170.170; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /etc/exabgp/parse-community.conf: -------------------------------------------------------------------------------- 1 | neighbor 10.0.200.1 { 2 | router-id 1.2.3.4; 3 | local-address 3.3.3.3; 4 | local-as 65000; 5 | peer-as 65000; 6 | group-updates false; 7 | 8 | static { 9 | route 9.9.9.9/32 next-hop 192.0.2.1 extended-community [ target:120000L:123 origin:130000:1234 ]; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /etc/exabgp/parse-md5.conf: -------------------------------------------------------------------------------- 1 | neighbor 10.0.0.3 { 2 | description "will announce a route protected by a MD5"; 3 | router-id 198.111.227.39; 4 | local-address 10.0.0.2; 5 | local-as 65533; 6 | peer-as 65533; 7 | hold-time 180; 8 | group-updates false; 9 | md5-password abc123; 10 | # md5-password "my md5 of the day"; 11 | # md5-password 'another md5 valid syntax'; 12 | # md5-password oh ! quotes are optional; 13 | # md5-password "oh ! quotes are optional"; 14 | # can not recall what happens with the start and end spaces/tabs .. check it. 15 | # optional (otherwise it uses the local-address) 16 | md5-ip 10.0.0.2; 17 | 18 | static { 19 | route 172.10.0.0/16 next-hop 192.0.2.1 med 200 community [174:666]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /etc/exabgp/parse-multiple-process.conf: -------------------------------------------------------------------------------- 1 | process my-process { 2 | run ./run/syslog-1.py; 3 | encoder json; 4 | } 5 | 6 | process my-second-process { 7 | run ./run/stderr-1.py; 8 | encoder json; 9 | } 10 | 11 | template { 12 | neighbor test { 13 | api { 14 | processes [ my-process, my-second-process ]; 15 | neighbor-changes; 16 | receive { 17 | parsed; 18 | update; 19 | } 20 | send { 21 | packets; 22 | } 23 | } 24 | } 25 | } 26 | neighbor 10.0.0.3 { 27 | inherit test; 28 | description "will pass received routes to the program"; 29 | router-id 10.0.0.2; 30 | local-address 10.0.0.2; 31 | local-as 65533; 32 | peer-as 65533; 33 | hold-time 180; 34 | 35 | static { 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /etc/exabgp/parse-multisession.conf: -------------------------------------------------------------------------------- 1 | process parsed-route-backend { 2 | run ./run/syslog-1.py; 3 | encoder json; 4 | } 5 | 6 | neighbor 10.0.0.3 { 7 | description "will pass received routes to the program"; 8 | router-id 10.0.0.2; 9 | local-address 10.0.0.2; 10 | local-as 123456; 11 | peer-as 123456; 12 | hold-time 180; 13 | 14 | capability { 15 | multi-session; 16 | } 17 | 18 | api { 19 | processes [ parsed-route-backend ]; 20 | receive { 21 | parsed; 22 | update; 23 | } 24 | } 25 | 26 | static { 27 | route 10.0.0.0/24 next-hop 192.0.2.1; 28 | route 10.0.1.0/24 next-hop 192.0.2.1; 29 | route 10.0.2.0/24 next-hop 192.0.2.1; 30 | route 10.0.3.0/24 next-hop 192.0.2.1; 31 | 32 | route 2A02:B80:0:1::/64 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740] local-preference 200; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /etc/exabgp/parse-process.conf: -------------------------------------------------------------------------------- 1 | process my-process { 2 | run ./run/syslog-1.py; 3 | encoder json; 4 | } 5 | 6 | template { 7 | neighbor test { 8 | api { 9 | processes [ my-process ]; 10 | neighbor-changes; 11 | receive { 12 | parsed; 13 | update; 14 | } 15 | send { 16 | packets; 17 | } 18 | } 19 | } 20 | } 21 | neighbor 10.0.0.3 { 22 | description "will pass received routes to the program"; 23 | router-id 10.0.0.2; 24 | local-address 10.0.0.2; 25 | local-as 65533; 26 | peer-as 65533; 27 | hold-time 180; 28 | 29 | static { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /etc/exabgp/parse-simple-v6.conf: -------------------------------------------------------------------------------- 1 | neighbor 2a02:b80::2 { 2 | description "a quagga test peer over ipv6"; 3 | router-id 10.0.0.2; 4 | local-address 2a02:b80::1; 5 | local-as 65533; 6 | peer-as 65533; 7 | 8 | static { 9 | route 1.2.3.4/32 next-hop 5.6.7.8; 10 | route 2A02:B80:0:1::/64 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740] local-preference 200; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /etc/exabgp/parse-ttl.conf: -------------------------------------------------------------------------------- 1 | neighbor 10.0.0.3 { 2 | description "will announce 256 /24"; 3 | router-id 198.111.227.39; 4 | local-address 10.0.0.2; 5 | local-as 65533; 6 | peer-as 65533; 7 | hold-time 180; 8 | outgoing-ttl 1; 9 | 10 | static { 11 | route 172.10.0.0/16 next-hop 192.0.2.1 med 200 community [174:666]; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-add-remove.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce route 1.1.0.0/24 next-hop 101.1.101.1', 9 | 'announce route 1.1.0.0/25 next-hop 101.1.101.1', 10 | 'sleep', 11 | 'withdraw route 1.1.0.0/24', 12 | 'withdraw route 1.1.0.0/25 next-hop 0.0.0.0', 13 | ] 14 | 15 | while messages: 16 | message = messages.pop(0) 17 | if message == 'sleep': 18 | time.sleep(0.2) 19 | continue 20 | sys.stdout.write(message + '\n') 21 | sys.stdout.flush() 22 | 23 | try: 24 | now = time.time() 25 | while os.getppid() != 1 and time.time() < now + 5: 26 | line = sys.stdin.readline().strip() 27 | if not line or 'shutdown' in line: 28 | break 29 | time.sleep(1) 30 | except IOError: 31 | pass 32 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-announce-star.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'neighbor * announce route 1.1.0.0/24 next-hop 101.1.101.1', 9 | 'neighbor * announce route 1.2.0.0/25 next-hop 101.1.101.1', 10 | ] 11 | 12 | while messages: 13 | message = messages.pop(0) 14 | sys.stdout.write(message + '\n') 15 | sys.stdout.flush() 16 | time.sleep(0.1) 17 | 18 | try: 19 | now = time.time() 20 | while os.getppid() != 1 and time.time() < now + 5: 21 | line = sys.stdin.readline().strip() 22 | if not line or 'shutdown' in line: 23 | break 24 | time.sleep(1) 25 | except IOError: 26 | pass 27 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-announce.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce route 1.1.0.0/24 next-hop 101.1.101.1', 9 | 'announce route 1.2.0.0/25 next-hop 101.1.101.1', 10 | ] 11 | 12 | while messages: 13 | message = messages.pop(0) 14 | sys.stdout.write(message + '\n') 15 | sys.stdout.flush() 16 | time.sleep(0.1) 17 | 18 | try: 19 | now = time.time() 20 | while os.getppid() != 1 and time.time() < now + 5: 21 | line = sys.stdin.readline().strip() 22 | if not line or 'shutdown' in line: 23 | break 24 | time.sleep(1) 25 | except IOError: 26 | pass 27 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-api.nothing.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | line = sys.stdin.readline().strip() 8 | 9 | if 'shutdown' in line: 10 | sys.stderr.write(' (ok) api.nothing shutdown %s\n' % line) 11 | sys.stderr.flush() 12 | time.sleep(3) 13 | sys.exit(1) 14 | 15 | sys.stderr.write(' (failure) api.noting received data: %s\n' % line) 16 | sys.stderr.flush() 17 | sys.stdout.write('announce route 6.6.6.0/24 next-hop 9.9.9.9\n') 18 | sys.stdout.flush() 19 | 20 | try: 21 | now = time.time() 22 | while os.getppid() != 1 and time.time() < now + 5: 23 | line = sys.stdin.readline().strip() 24 | if not line or 'shutdown' in line: 25 | break 26 | time.sleep(1) 27 | except IOError: 28 | pass 29 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-attributes-path.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'neighbor 127.0.0.1 announce attributes path-information 1.2.3.4 next-hop 10.11.12.13 community [14:15] local-preference 16 nlri 16.17.18.19/32 20.21.22.23/32', 9 | 'neighbor 127.0.0.1 announce attributes path-information 4.3.2.1 next-hop 10.11.12.13 community [14:15] local-preference 16 nlri 16.17.18.19/32 20.21.22.23/32', 10 | ] 11 | 12 | while messages: 13 | message = messages.pop(0) 14 | sys.stdout.write(message + '\n') 15 | sys.stdout.flush() 16 | time.sleep(0.2) 17 | 18 | try: 19 | now = time.time() 20 | while os.getppid() != 1 and time.time() < now + 5: 21 | line = sys.stdin.readline().strip() 22 | if not line or 'shutdown' in line: 23 | break 24 | time.sleep(1) 25 | except IOError: 26 | pass 27 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-attributes-vpn.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce attribute route-distinguisher 63333:100 label [ 110 ] next-hop 10.0.99.12 origin igp as-path [100, 500] local-preference 100 extended-community 0:0 originator-id 10.0.99.12 nlri 128.0.64.0/18 128.0.0.0/18', 9 | ] 10 | 11 | while messages: 12 | message = messages.pop(0) 13 | sys.stdout.write(message + '\n') 14 | sys.stdout.flush() 15 | time.sleep(0.2) 16 | 17 | try: 18 | now = time.time() 19 | while os.getppid() != 1 and time.time() < now + 5: 20 | line = sys.stdin.readline().strip() 21 | if not line or 'shutdown' in line: 22 | break 23 | time.sleep(1) 24 | except IOError: 25 | pass 26 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-attributes.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce attributes med 100 next-hop 101.1.101.1 nlri 1.0.0.1/32 1.0.0.2/32', 9 | 'announce attributes local-preference 200 as-path [ 1 2 3 4 ] next-hop 202.2.202.2 nlri 2.0.0.1/32 2.0.0.2/32', 10 | ] 11 | 12 | while messages: 13 | message = messages.pop(0) 14 | sys.stdout.write(message + '\n') 15 | sys.stdout.flush() 16 | time.sleep(0.2) 17 | 18 | try: 19 | now = time.time() 20 | while os.getppid() != 1 and time.time() < now + 5: 21 | line = sys.stdin.readline().strip() 22 | if not line or 'shutdown' in line: 23 | break 24 | time.sleep(1) 25 | except IOError: 26 | pass 27 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-eor.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce eor', 9 | 'announce eor ipv6 unicast', 10 | 'announce eor ipv4 unicast', 11 | ] 12 | 13 | time.sleep(2) 14 | 15 | while messages: 16 | message = messages.pop(0) 17 | sys.stdout.write(message + '\n') 18 | sys.stdout.flush() 19 | time.sleep(0.2) 20 | 21 | try: 22 | now = time.time() 23 | while os.getppid() != 1 and time.time() < now + 5: 24 | line = sys.stdin.readline().strip() 25 | if not line or 'shutdown' in line: 26 | break 27 | time.sleep(1) 28 | except IOError: 29 | pass 30 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-manual-eor.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce eor', 9 | 'announce eor ipv6 unicast', 10 | 'announce eor ipv4 unicast', 11 | ] 12 | 13 | time.sleep(1) 14 | 15 | while messages: 16 | message = messages.pop(0) 17 | sys.stdout.write(message + '\n') 18 | sys.stdout.flush() 19 | 20 | try: 21 | now = time.time() 22 | while os.getppid() != 1 and time.time() < now + 5: 23 | line = sys.stdin.readline().strip() 24 | if not line or 'shutdown' in line: 25 | break 26 | time.sleep(1) 27 | except IOError: 28 | pass 29 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-multi-neighbor.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'neighbor 127.0.0.1 announce route 1.1.0.0/24 next-hop 101.1.101.1', 9 | 'neighbor 127.0.0.1 router-id 1.2.3.4, neighbor 127.0.0.1 announce route 1.1.0.0/25 next-hop 101.1.101.1', 10 | 'withdraw route 1.1.0.0/24 next-hop 101.1.101.1', 11 | ] 12 | 13 | while messages: 14 | message = messages.pop(0) 15 | sys.stdout.write(message + '\n') 16 | sys.stdout.flush() 17 | time.sleep(0.2) 18 | 19 | try: 20 | now = time.time() 21 | while os.getppid() != 1 and time.time() < now + 5: 22 | line = sys.stdin.readline().strip() 23 | if not line or 'shutdown' in line: 24 | break 25 | time.sleep(1) 26 | except IOError: 27 | pass 28 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-multiple-private.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce route 2.2.2.2/32 next-hop 127.0.0.1', 9 | 'shutdown', 10 | ] 11 | 12 | while messages: 13 | message = messages.pop(0) 14 | sys.stdout.write(message + '\n') 15 | sys.stdout.flush() 16 | time.sleep(1) 17 | 18 | try: 19 | now = time.time() 20 | while os.getppid() != 1 and time.time() < now + 5: 21 | line = sys.stdin.readline().strip() 22 | if not line or 'shutdown' in line: 23 | break 24 | time.sleep(1) 25 | except IOError: 26 | pass 27 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-multiple-public.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce route 1.1.1.1/32 next-hop 127.0.0.1', 9 | 'announce route 3.3.3.3/32 next-hop 127.0.0.1', 10 | ] 11 | 12 | while messages: 13 | message = messages.pop(0) 14 | sys.stdout.write(message + '\n') 15 | sys.stdout.flush() 16 | time.sleep(0.2) 17 | 18 | try: 19 | now = time.time() 20 | while os.getppid() != 1 and time.time() < now + 5: 21 | line = sys.stdin.readline().strip() 22 | if not line or 'shutdown' in line: 23 | break 24 | time.sleep(1) 25 | except IOError: 26 | pass 27 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-nexthop-self.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'neighbor 127.0.0.1 announce route 1.1.0.0/16 next-hop self', 9 | 'announce route 2.2.0.0/16 next-hop self', 10 | 'announce route 2.2.0.1/32 next-hop 127.0.0.1', 11 | 'announce route 2.2.0.1/32 next-hop self', 12 | 'announce route 2.2.0.1/32 next-hop self', 13 | 'announce route 3.3.0.3/32 next-hop self', # Non duplicate route, signals server that test is over 14 | ] 15 | 16 | while messages: 17 | message = messages.pop(0) 18 | sys.stdout.write(message + '\n') 19 | sys.stdout.flush() 20 | time.sleep(0.2) 21 | 22 | try: 23 | now = time.time() 24 | while os.getppid() != 1 and time.time() < now + 5: 25 | line = sys.stdin.readline().strip() 26 | if not line or 'shutdown' in line: 27 | break 28 | time.sleep(1) 29 | except IOError: 30 | pass 31 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-nexthop.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | sys.stdout.write('neighbor 127.0.0.1 announce route 2605::2/128 next-hop 2001::1 local-preference 500\n') 8 | sys.stdout.flush() 9 | time.sleep(0.2) 10 | 11 | sys.stdout.write('neighbor 127.0.0.1 announce route 2605::2/128 next-hop 2001::2 local-preference 500\n') 12 | sys.stdout.flush() 13 | time.sleep(0.2) 14 | 15 | sys.stdout.write('neighbor 127.0.0.1 announce route 2605::2/128 next-hop 2001::1 local-preference 500\n') 16 | sys.stdout.flush() 17 | 18 | try: 19 | now = time.time() 20 | while os.getppid() != 1 and time.time() < now + 5: 21 | line = sys.stdin.readline().strip() 22 | if not line or 'shutdown' in line: 23 | break 24 | time.sleep(1) 25 | except IOError: 26 | pass 27 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-no-respawn-1.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | messages = [ 6 | 'announce route 1.1.1.1/32 next-hop 11.11.11.11', 7 | ] 8 | 9 | message = messages.pop(0) 10 | sys.stdout.write(message + '\n') 11 | sys.stdout.flush() 12 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-no-respawn-2.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce route 2.2.2.2/32 next-hop 22.22.22.22', 9 | 'announce route 3.3.3.3/32 next-hop 33.33.33.33', 10 | ] 11 | 12 | time.sleep(0.2) 13 | while messages: 14 | message = messages.pop(0) 15 | sys.stdout.write(message + '\n') 16 | sys.stdout.flush() 17 | time.sleep(0.2) 18 | 19 | try: 20 | now = time.time() 21 | while os.getppid() != 1 and time.time() < now + 5: 22 | line = sys.stdin.readline().strip() 23 | if not line or 'shutdown' in line: 24 | break 25 | time.sleep(1) 26 | except IOError: 27 | pass 28 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-notification.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | try: 8 | time.sleep(0.2) 9 | # this will never be received by the peer 10 | sys.stdout.write('announce route 1.2.3.4 next-hop 5.6.7.8\n') 11 | now = time.time() 12 | while os.getppid() != 1 and time.time() < now + 5: 13 | line = sys.stdin.readline().strip() 14 | if not line or 'shutdown' in line: 15 | break 16 | time.sleep(1) 17 | # This route will never be sent 18 | except IOError: 19 | pass 20 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-reload.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | 'announce route 3.0.0.0/24 next-hop 4.0.0.0', 9 | ] 10 | 11 | time.sleep(2) # let some time for the config to be sent 12 | 13 | while messages: 14 | message = messages.pop(0) 15 | sys.stdout.write(message + '\n') 16 | sys.stdout.flush() 17 | time.sleep(0.2) 18 | 19 | try: 20 | now = time.time() 21 | while os.getppid() != 1 and time.time() < now + 5: 22 | line = sys.stdin.readline().strip() 23 | if not line or 'shutdown' in line: 24 | break 25 | time.sleep(1) 26 | except IOError: 27 | pass 28 | -------------------------------------------------------------------------------- /etc/exabgp/run/api-teardown.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | messages = [ 8 | ('announce route 1.1.0.0/16 next-hop 1.1.1.1', 1), 9 | ('neighbor 127.0.0.1 teardown 4', 2.5), 10 | ('announce route 2.2.0.0/16 next-hop 2.2.2.2', 1), 11 | ('neighbor 127.0.0.1 teardown 4', 2.5), 12 | ('announce route 3.3.0.0/16 next-hop 3.3.3.3', 1), 13 | ] 14 | 15 | while messages: 16 | message, sleep = messages.pop(0) 17 | sys.stdout.write(message + '\n') 18 | sys.stdout.flush() 19 | time.sleep(sleep) 20 | 21 | try: 22 | now = time.time() 23 | while os.getppid() != 1 and time.time() < now + 5: 24 | line = sys.stdin.readline().strip() 25 | if not line or 'shutdown' in line: 26 | break 27 | time.sleep(1) 28 | except IOError: 29 | pass 30 | -------------------------------------------------------------------------------- /etc/exabgp/run/dynamic-1.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | # Ignore Control C 7 | # allow exabgp to send us a SIGTERM when it is time 8 | $SIG{'INT'} = sub {}; 9 | 10 | # make STDOUT unbuffered 11 | select STDOUT; $| = 1; 12 | 13 | while (1) { 14 | # commands are case sensitive 15 | print "announce flow route {\\\\n match {\\\\n source 10.0.0.1/32;\\\\n destination 1.2.3.4/32;\\\\n }\\\\n then {\\\\n discard;\\\\n }\\\\n }\\\\n"; 16 | sleep 10; 17 | print "announce route 192.0.2.1 next-hop 10.0.0.1"; 18 | sleep 10; 19 | print "withdraw route 192.0.2.1 next-hop 10.0.0.1"; 20 | sleep 10; 21 | print "withdraw flow route {\\\\n match {\\\\n source 10.0.0.1/32;\\\\n destination 1.2.3.4/32;\\\\n }\\\\n then {\\\\n discard;\\\\n }\\\\n }\\\\n"; 22 | sleep 10; 23 | } 24 | -------------------------------------------------------------------------------- /etc/exabgp/run/dynamic-1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ignore Control C 4 | # if the user ^C exabgp we will get that signal too, ignore it and let exabgp send us a SIGTERM 5 | trap '' SIGINT 6 | 7 | # command and watchdog name are case sensitive 8 | 9 | while `true`; 10 | do 11 | echo "announce flow route {\\\\n match {\\\\n source 10.0.0.1/32;\\\\n destination 1.2.3.4/32;\\\\n }\\\\n then {\\\\n discard;\\\\n }\\\\n }\\\\n" 12 | sleep 10 13 | echo "announce route 192.0.2.1 next-hop 10.0.0.1" 14 | sleep 10 15 | echo "withdraw route 192.0.2.1 next-hop 10.0.0.1" 16 | sleep 10 17 | echo "withdraw flow route {\\\\n match {\\\\n source 10.0.0.1/32;\\\\n destination 1.2.3.4/32;\\\\n }\\\\n then {\\\\n discard;\\\\n }\\\\n }\\\\n" 18 | sleep 10 19 | done 20 | -------------------------------------------------------------------------------- /etc/exabgp/run/stderr-1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | 8 | def _prefixed(level, message): 9 | now = time.strftime('%a, %d %b %Y %H:%M:%S\n', time.localtime()) 10 | return '%s %-8s %-6d %s\n' % (now, level, os.getpid(), message) 11 | 12 | 13 | # When the parent dies we are seeing continual newlines, so we only access so many before stopping 14 | counter = 0 15 | 16 | 17 | while os.getppid() != 1: 18 | try: 19 | line = sys.stdin.readline().strip() 20 | sys.stdout.flush() 21 | if line == '': 22 | counter += 1 23 | if counter > 100: 24 | break 25 | continue 26 | 27 | counter = 0 28 | 29 | sys.stderr.write(_prefixed(sys.argv[1] if len(sys.argv) >= 2 else 'EXABGP PROCESS', line)) 30 | except KeyboardInterrupt: 31 | pass 32 | except IOError: 33 | # most likely a signal during readline 34 | pass 35 | -------------------------------------------------------------------------------- /etc/exabgp/run/syslog-1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | import syslog 7 | 8 | 9 | def _prefixed(level, message): 10 | now = time.strftime('%a, %d %b %Y %H:%M:%S', time.localtime()) 11 | return '%s %-8s %-6d %s' % (now, level, os.getpid(), message) 12 | 13 | 14 | syslog.openlog('ExaBGP') 15 | 16 | # When the parent dies we are seeing continual newlines, so we only access so many before stopping 17 | counter = 0 18 | 19 | while os.getppid() != 1: 20 | try: 21 | line = sys.stdin.readline().strip() 22 | if line == '': 23 | counter += 1 24 | if counter > 100: 25 | break 26 | continue 27 | 28 | counter = 0 29 | 30 | syslog.syslog(syslog.LOG_ALERT, _prefixed('INFO', line)) 31 | except KeyboardInterrupt: 32 | pass 33 | except IOError: 34 | # most likely a signal during readline 35 | pass 36 | -------------------------------------------------------------------------------- /etc/exabgp/run/watchdog-1.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | # Ignore Control C 7 | $SIG{'INT'} = sub {}; 8 | 9 | # make STDOUT unbuffered 10 | select STDOUT; $| = 1; 11 | 12 | while (1) { 13 | 14 | # Give exabgp time to establish the session :) 15 | sleep 10; 16 | 17 | # without a name, exabgp will use the name of the service as the name of the watchdog 18 | print "withdraw watchdog\n"; 19 | sleep 5; 20 | 21 | # specify a watchdog name (which may be the same or different each time) 22 | print "withdraw watchdog watchdog-one\n"; 23 | sleep 5; 24 | 25 | print "announce watchdog\n"; 26 | sleep 5; 27 | 28 | print "announce watchdog watchdog-one\n"; 29 | sleep 5; 30 | 31 | # In our example, there are no routes that are tied to these watchdogs, but we may after a future config reload 32 | print "announce watchdog watchdog-two\n"; 33 | print "withdraw watchdog watchdog-two\n"; 34 | } 35 | -------------------------------------------------------------------------------- /etc/exabgp/run/watchdog-1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ignore Control C 4 | # if the user ^C exabgp we will get that signal too, ignore it and let exabgp send us a SIGTERM 5 | trap '' SIGINT 6 | 7 | # command and watchdog name are case sensitive 8 | 9 | while `true`; 10 | do 11 | 12 | # Let give exabgp the time to setup the BGP session :) 13 | # But we do not have too, exabgp will record the changes and update the routes once up otherwise 14 | 15 | sleep 10 16 | 17 | # without name exabgp will use the name of the service as watchdog name 18 | echo "withdraw watchdog" 19 | sleep 5 20 | 21 | # specify a watchdog name (which may be the same or different each time) 22 | echo "withdraw watchdog watchdog-one" 23 | sleep 5 24 | 25 | echo "announce watchdog" 26 | sleep 5 27 | 28 | echo "announce watchdog watchdog-one" 29 | sleep 5 30 | 31 | # we have no route with that watchdog but it does not matter, we could have after a configuration reload 32 | 33 | echo "announce watchdog watchdog-two" 34 | echo "withdraw watchdog watchdog-two" 35 | 36 | done 37 | -------------------------------------------------------------------------------- /etc/exabgp/run/watchdog.run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | 7 | time.sleep(1) # time for configuration routes to pass 8 | 9 | while os.getppid() != 1: 10 | sys.stdout.write('announce watchdog dnsr\n') 11 | sys.stdout.flush() 12 | time.sleep(0.2) 13 | 14 | sys.stdout.write('withdraw watchdog dnsr\n') 15 | sys.stdout.flush() 16 | time.sleep(0.2) 17 | -------------------------------------------------------------------------------- /etc/exabgp/unknown-message.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | 7 | family { 8 | ipv4 unicast; 9 | } 10 | 11 | static { 12 | } 13 | } -------------------------------------------------------------------------------- /etc/systemd/exabgp.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=ExaBGP 3 | Documentation=man:exabgp(1) 4 | Documentation=man:exabgp.conf(5) 5 | Documentation=https://github.com/Exa-Networks/exabgp/wiki 6 | After=network.target 7 | ConditionPathExists=/etc/exabgp/exabgp.conf 8 | 9 | [Service] 10 | User=exabgp 11 | Group=exabgp 12 | Environment=exabgp_daemon_daemonize=false 13 | RuntimeDirectory=exabgp 14 | RuntimeDirectoryMode=0750 15 | ExecStartPre=-/usr/bin/mkfifo /run/exabgp/exabgp.in 16 | ExecStartPre=-/usr/bin/mkfifo /run/exabgp/exabgp.out 17 | ExecStart=/usr/sbin/exabgp /etc/exabgp/exabgp.conf 18 | ExecReload=/bin/kill -USR1 $MAINPID 19 | Restart=always 20 | CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE 21 | AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE 22 | 23 | [Install] 24 | WantedBy=multi-user.target 25 | -------------------------------------------------------------------------------- /etc/systemd/exabgp@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=ExaBGP for instance %i 3 | Documentation=man:exabgp(1) 4 | Documentation=man:exabgp.conf(5) 5 | Documentation=https://github.com/Exa-Networks/exabgp/wiki 6 | After=network.target 7 | ConditionPathExists=/etc/exabgp/exabgp-%i.conf 8 | 9 | [Service] 10 | User=exabgp 11 | Group=exabgp 12 | Environment=exabgp_daemon_daemonize=false 13 | Environment=exabgp_api_pipename=exabgp-%i 14 | RuntimeDirectory=exabgp 15 | RuntimeDirectoryMode=0750 16 | ExecStartPre=-/usr/bin/mkfifo /run/exabgp/exabgp-%i.in 17 | ExecStartPre=-/usr/bin/mkfifo /run/exabgp/exabgp-%i.out 18 | ExecStart=/usr/sbin/exabgp /etc/exabgp/exabgp-%i.conf 19 | ExecReload=/bin/kill -USR1 $MAINPID 20 | Restart=always 21 | CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE 22 | AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE 23 | 24 | [Install] 25 | WantedBy=multi-user.target 26 | -------------------------------------------------------------------------------- /etc/sysusers.d/exabgp.conf: -------------------------------------------------------------------------------- 1 | u exabgp - "ExaBGP" 2 | -------------------------------------------------------------------------------- /logo/ExaBGP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/logo/ExaBGP.png -------------------------------------------------------------------------------- /logo/Twitter.indd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/logo/Twitter.indd -------------------------------------------------------------------------------- /logo/Twitter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/logo/Twitter.jpg -------------------------------------------------------------------------------- /qa/add-path-receive.conf: -------------------------------------------------------------------------------- 1 | neighbor 82.219.119.133 { 2 | description "addpath route reception"; 3 | router-id 82.219.212.34; 4 | local-address 82.219.212.34; 5 | local-as 30636; 6 | peer-as 30636; 7 | hold-time 180; 8 | add-path receive; 9 | 10 | process parsed-route-backend { 11 | receive { 12 | update; 13 | neighbor-changes; 14 | } 15 | run etc/exabgp/run/syslog-1.py; 16 | } 17 | 18 | static { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /qa/add-path-sendreceive.conf: -------------------------------------------------------------------------------- 1 | neighbor 82.219.119.133 { 2 | description "addpath route sending"; 3 | router-id 82.219.212.34; 4 | local-address 82.219.212.34; 5 | local-as 30636; 6 | peer-as 30636; 7 | hold-time 180; 8 | add-path send/receive; 9 | 10 | process parsed-route-backend { 11 | receive { 12 | parsed; 13 | update; 14 | neighbor-changes; 15 | } 16 | run etc/exabgp/run/syslog-1.py; 17 | } 18 | 19 | static { 20 | route 82.219.0.0/16 { 21 | # 17 34 51 68 -> 0x11 0x22 0x33 0x44 22 | path-information 17.34.51.68; 23 | next-hop 127.0.0.1; 24 | origin igp; 25 | local-preference 1; 26 | med 2000; 27 | community [ no-export ]; 28 | as-path [ 30740 30740 30740 30740 30740 30740 (30740)]; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /qa/bin/cover: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | env exabgp_log_enable=false pytest --cov --cov-reset --cov-report=html ./tests/*_test.py 3 | -------------------------------------------------------------------------------- /qa/bin/rmpyc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | path="$(cd "$(dirname "$0")"/../.. ; pwd)" 4 | 5 | export PYTHONPATH="$path"/src 6 | 7 | for INTERPRETER in "$INTERPRETER" pypy python2.7 python2.6 python2 python; do 8 | INTERPRETER="$(command -v "$INTERPRETER")" && break 9 | done 10 | 11 | APPLICATION="$("$INTERPRETER" -c " 12 | import sys 13 | import os 14 | 15 | path = [os.path.join(_,'exabgp') 16 | for _ in sys.path 17 | if os.path.isfile('/'.join((_, 'exabgp', 'application', 'bgp.py')))][0] 18 | 19 | def remove (file): 20 | try: os.remove(file) 21 | except: pass 22 | 23 | [remove(os.path.join(r,f)) for r,d,fs in os.walk(path) for f in fs if f.endswith('.pyc')] 24 | 25 | ")" 26 | 27 | echo done 28 | -------------------------------------------------------------------------------- /qa/decoding/bgp-flow-1: -------------------------------------------------------------------------------- 1 | update ipv6 flow 2 | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0056:02:0000003F4001010040020040050400000064800E2E0002850000280180002A0229B8192500000000000000002E69024000BEEFF00E000000000381060C000400028008 3 | { "exabgp": "5.0.0", "time": 1655420577.632025, "host" : "MacBook-Pro-2.local", "pid" : 96104, "ppid" : 72222, "counter": 1, "type": "update", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "message": { "update": { "attribute": { "origin": "igp", "local-preference": 100 }, "announce": { "ipv6 flow": { "no-nexthop": [ { "destination-ipv6": [ "2a02:29b8:1925::2e69/128/0" ], "source-ipv6": [ "beef:f00e::/64/0" ], "next-header": [ "=tcp" ], "fragment": [ "first-fragment", "is-fragment", "last-fragment" ], "string": "flow destination-ipv6 2a02:29b8:1925::2e69/128/0 source-ipv6 beef:f00e::/64/0 next-header =tcp fragment [ first-fragment is-fragment last-fragment ]" } ] } } } } } } -------------------------------------------------------------------------------- /qa/decoding/bgp-flow-2: -------------------------------------------------------------------------------- 1 | update ipv4 flow 2 | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003E:02:000000274001010040020040050400000064C010088006000000000000800E0B0001850000050901048109 3 | { "exabgp": "5.0.0", "time": 1681807093.9168482, "host" : "MacBook-Pro-2.local", "pid" : 2730, "ppid" : 864, "counter": 1, "type": "update", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "message": { "update": { "attribute": { "origin": "igp", "local-preference": 100, "extended-community": [ { "value": 9225060886715039744, "string": "rate-limit:0" } ] }, "announce": { "ipv4 flow": { "no-nexthop": [ { "tcp-flags": [ "=rst", "=fin+push" ], "string": "flow tcp-flags [ =rst =fin+push ]" } ] } } } } } } 4 | -------------------------------------------------------------------------------- /qa/decoding/bgp-flow-3: -------------------------------------------------------------------------------- 1 | update ipv4 flow 2 | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0042:02:0000002B4001010040020040050400000064C010088006000000000000800E0F00018500000909001000804201C240 3 | { "exabgp": "5.0.0", "time": 1681807751.949034, "host" : "MacBook-Pro-2.local", "pid" : 4499, "ppid" : 4496, "counter": 1, "type": "update", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "message": { "update": { "attribute": { "origin": "igp", "local-preference": 100, "extended-community": [ { "value": 9225060886715039744, "string": "rate-limit:0" } ] }, "announce": { "ipv4 flow": { "no-nexthop": [ { "tcp-flags": [ "ack", "cwr&!fin&!ece" ], "string": "flow tcp-flags [ ack cwr&!fin&!ece ]" } ] } } } } } } 4 | -------------------------------------------------------------------------------- /qa/decoding/bgp-flow-4: -------------------------------------------------------------------------------- 1 | update ipv4 flow 2 | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003E:02:000000274001010040020040050400000064C010088006000000000000800E0B000185000005090090C241 3 | { "exabgp": "5.0.0", "time": 1681904638.920432, "host" : "MacBook-Pro-2.local", "pid" : 50775, "ppid" : 50442, "counter": 1, "type": "update", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "message": { "update": { "attribute": { "origin": "igp", "local-preference": 100, "extended-community": [ { "value": 9225060886715039744, "string": "rate-limit:0" } ] }, "announce": { "ipv4 flow": { "no-nexthop": [ { "tcp-flags": [ "ack+cwr&!fin+ece" ], "string": "flow tcp-flags [ ack+cwr&!fin+ece ]" } ] } } } } } } -------------------------------------------------------------------------------- /qa/decoding/bgp-ls-1: -------------------------------------------------------------------------------- 1 | nlri bgp-ls bgp-ls 2 | 0002FFFF03000000000000000001000020020000040000000102010004C0A87A7E0202000400000000020300040A0A0A0A01010020020000040000000102010004C0A87A7E0202000400000000020300040A020202 3 | { "ls-nlri-type": "bgpls-link", "l3-routing-topology": 0, "protocol-id": 3, "local-node-descriptors": [ { "autonomous-system": 1 }, { "bgp-ls-identifier": "3232266878" }, { "ospf-area-id": "0.0.0.0" }, { "router-id": "10.10.10.10" } ], "remote-node-descriptors": [ { "autonomous-system": 1 }, { "bgp-ls-identifier": "3232266878" }, { "ospf-area-id": "0.0.0.0" }, { "router-id": "10.2.2.2" } ], "interface-addresses": [ ], "neighbor-addresses": [ ], "multi-topology-ids": [ ], "link-identifiers": [ ] } 4 | -------------------------------------------------------------------------------- /qa/decoding/bgp-open-sofware-version: -------------------------------------------------------------------------------- 1 | open 2 | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00510104FFFD00B40A000002340206010400010001020641040000FFFD02224B201F4578614247502F6D61696E2D633261326561386562642D3230323430373135 3 | { "exabgp": "5.0.0", "time": 1721069327.773314, "host" : "MacBook-Pro-3.local", "pid" : 23259, "ppid" : 52865, "counter": 1, "type": "open", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "open": { "version": 4, "asn": 65533, "hold_time": 180, "router_id": "10.0.0.2", "capabilities": { "1": { "name": "multiprotocol", "families": [ "ipv4/unicast" ] }, "65": { "name": "asn4", "asn4": 65533 }, "75": { "software": "ExaBGP/main-c2a2ea8ebd-20240715" } } } } } 4 | -------------------------------------------------------------------------------- /qa/decoding/ipv4-unicast-1: -------------------------------------------------------------------------------- 1 | update ipv4 unicast 2 | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF003C020000001C4001010040020040030465016501800404000000C840050400000064000000002001010101 3 | { "exabgp": "5.0.0", "time": 1653384088.2516758, "host" : "MacBook-Pro-2.local", "pid" : 32060, "ppid" : 55846, "counter": 1, "type": "update", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "message": { "update": { "attribute": { "origin": "igp", "med": 200, "local-preference": 100 }, "announce": { "ipv4 unicast": { "101.1.101.1": [ { "nlri": "0.0.0.0/0" }, { "nlri": "0.0.0.0/0" }, { "nlri": "0.0.0.0/0" }, { "nlri": "0.0.0.0/0" }, { "nlri": "1.1.1.1/32" } ] } } } } } } 4 | -------------------------------------------------------------------------------- /qa/decoding/ipv4-unicast-2: -------------------------------------------------------------------------------- 1 | update ipv4 unicast 2 | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF004F02000000384001010040020E02030000AAAA0000AAAA0000AAAAC0070800AA00AA0A0A0A0A4006004003040A0A0A0A8004040000000040050400000064 3 | { "exabgp": "5.0.0", "time": 1653383995.997971, "host" : "MacBook-Pro-2.local", "pid" : 31843, "ppid" : 55846, "counter": 1, "type": "update", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "message": { "update": { "attribute": { "origin": "igp", "as-path": {"0": {"element": "as-sequence", "value": [43690, 43690, 43690]}}, "med": 0, "local-preference": 100, "atomic-aggregate": true, "aggregator": "11141290:10.10.10.10" } } } } } -------------------------------------------------------------------------------- /qa/encoding/api-add-remove.ci: -------------------------------------------------------------------------------- 1 | api-add-remove.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-add-remove.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418010100 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:000000154001010040020040030465016501400504000000641901010000 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001B:02:0004180101000000 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001C:02:000519010100000000 6 | -------------------------------------------------------------------------------- /qa/encoding/api-announce-processes-match.ci: -------------------------------------------------------------------------------- 1 | api-announce-processes-match.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-announce-processes-match.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418010100 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:000000154001010040020040030465016501400504000000641901020000 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 4 | -------------------------------------------------------------------------------- /qa/encoding/api-announce-star.ci: -------------------------------------------------------------------------------- 1 | api-announce-star.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-announce-star.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418010100 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:000000154001010040020040030465016501400504000000641901020000 4 | -------------------------------------------------------------------------------- /qa/encoding/api-announce.ci: -------------------------------------------------------------------------------- 1 | api-announce.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-announce.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418010100 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:000000154001010040020040030465016501400504000000641901020000 4 | -------------------------------------------------------------------------------- /qa/encoding/api-announcement.ci: -------------------------------------------------------------------------------- 1 | api-announcement.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-api.ci: -------------------------------------------------------------------------------- 1 | api-api.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-api.msg: -------------------------------------------------------------------------------- 1 | option:update:send-default-route 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000104 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304010101014005040000006418060606 5 | -------------------------------------------------------------------------------- /qa/encoding/api-attributes-path.ci: -------------------------------------------------------------------------------- 1 | api-attributes-path.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-attributes-path.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001702:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000201 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0045:02:0000001C400101004002004003040A0B0C0D40050400000010C00804000E000F010203042010111213010203042014151617 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0045:02:0000001C400101004002004003040A0B0C0D40050400000010C00804000E000F040302012010111213040302012014151617 -------------------------------------------------------------------------------- /qa/encoding/api-attributes-vpn.ci: -------------------------------------------------------------------------------- 1 | api-attributes-vpn.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-attributes-vpn.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001702:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000104 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000180 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:006B:02:000000544001010040020A020200000064000001F44003040A00630C400504000000648009040A00630CC010080002000000000000800E200001800C00000000000000000A00630C006A0006E10000F76500000064800040 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:006B:02:000000544001010040020A020200000064000001F44003040A00630C400504000000648009040A00630CC010080002000000000000800E200001800C00000000000000000A00630C006A0006E10000F76500000064800000 6 | -------------------------------------------------------------------------------- /qa/encoding/api-attributes.ci: -------------------------------------------------------------------------------- 1 | api-attributes.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-attributes.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001702:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003802:0000001C400101004002004003046501650180040400000064400504000000642001000001 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003802:0000001C400101004002004003046501650180040400000064400504000000642001000002 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004302:0000002740010100400212020400000001000000020000000300000004400304CA02CA02400504000000C82002000001 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004302:0000002740010100400212020400000001000000020000000300000004400304CA02CA02400504000000C82002000002 6 | -------------------------------------------------------------------------------- /qa/encoding/api-broken-flow.ci: -------------------------------------------------------------------------------- 1 | api-broken-flow.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-check.ci: -------------------------------------------------------------------------------- 1 | api-check.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-check.msg: -------------------------------------------------------------------------------- 1 | option:update:send-default-route 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001702:00000000 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E02:00000007900F0003000201 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004E02:000000374001010040020040050400000064800E260002011000000000000000000000000000000001008000000000000000000000000000000001 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003102:00000015400101004002004003047F00000240050400000064207F000001 6 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003102:000000154001010040020040030405060708400504000000642001020304 7 | -------------------------------------------------------------------------------- /qa/encoding/api-eor.ci: -------------------------------------------------------------------------------- 1 | api-eor.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-eor.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF001702:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF001E02:00000007900F0003000201 3 | 3:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF001702:00000000 4 | 4:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF001E02:00000007900F0003000201 5 | 5:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF001702:00000000 6 | -------------------------------------------------------------------------------- /qa/encoding/api-fast.ci: -------------------------------------------------------------------------------- 1 | api-fast.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-fast.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:000000154001010040020040030465016501400504000000641901010000 3 | 4 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001C:02:000519020200000000 5 | 6 | 3:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418020200 7 | 3:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002D:02:0000001540010100400200400304016501654005040000006400 8 | -------------------------------------------------------------------------------- /qa/encoding/api-flow-merge.ci: -------------------------------------------------------------------------------- 1 | api-flow-merge.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-flow.ci: -------------------------------------------------------------------------------- 1 | api-flow.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-flow.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000185 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0025:02:0000000E4001010040020040050400000064 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003F:02:000000284001010040020040050400000064800F170001851301200000000002200000000003810605910C38 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004C:02:000000354001010040020040050400000064C010088006000000000000800E1900018500001301200000000002200000000003810605910C38 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0045:02:0000002E4001010040020040050400000064C0100880060000477FFF00800E1200018500000C0120FFFFFFFF0220FFFFFFFF 6 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003F:02:000000284001010040020040050400000064800F170001851301200000000002200000000003810605910C38 7 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004C:02:000000354001010040020040050400000064C010088006000000000000800E1900018500001301200000000002200000000003810605910C38 8 | -------------------------------------------------------------------------------- /qa/encoding/api-ipv4.ci: -------------------------------------------------------------------------------- 1 | api-ipv4.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-ipv4.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000155 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:00000015400101004002004003040A0001FE400504000000C8180A0001 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0080:02:000000694001010040020040050400000064C010080002000A0000000AC028250500220001001E0020010DB800010001000000000000000000004800010006401810000000800E250001551020010000000000000000000000000001000100010C0000006400000064180A0001 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001B:02:0004180A00010000 6 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:006E:02:000000574001010040020040050400000064C010080002000A0000000AC028250500220001001E0020010DB800010001000000000000000000004800010006401810000000800F130001550100010C0000006400000064180A0001 7 | -------------------------------------------------------------------------------- /qa/encoding/api-ipv6.ci: -------------------------------------------------------------------------------- 1 | api-ipv6.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-ipv6.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000201 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000255 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0046:02:0000002F40010100400200400504000000C8800E1E00020110200100000000000000000000000000110040FC00000100000000 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0085:02:0000006E4001010040020040050400000064C010080002000A0000000AC028250500220001001E0020010DB800010001000000000000000000004700010006401810000000800E2A000255102001000000000000000000000000000200010001110000006400000064402001000000000000 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0026:02:0000000F800F0C00020140FC00000100000000 6 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0073:02:0000005C4001010040020040050400000064C010080002000A0000000AC028250500220001001E0020010DB800010001000000000000000000004700010006401810000000800F18000255010001110000006400000064402001000000000000 7 | -------------------------------------------------------------------------------- /qa/encoding/api-manual-eor.ci: -------------------------------------------------------------------------------- 1 | api-manual-eor.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-manual-eor.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF001702:00000000 2 | -------------------------------------------------------------------------------- /qa/encoding/api-multi-neighbor.ci: -------------------------------------------------------------------------------- 1 | api-multi-neighbor.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-multi-neighbor.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418010100 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:000000154001010040020040030465016501400504000000641901010000 4 | 5 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001B:02:0004180101000000 6 | -------------------------------------------------------------------------------- /qa/encoding/api-multiple-api.ci: -------------------------------------------------------------------------------- 1 | api-multiple-api.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-multiple-api.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003047F000001400504000000642001010101 3 | # should never receive a route for 2.2.2.2/32 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003047F000001400504000000642003030303 -------------------------------------------------------------------------------- /qa/encoding/api-multisession.ci: -------------------------------------------------------------------------------- 1 | api-multisession.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-multisession.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003E:02:000000234001010040020040030465016501800404000000C840050400000064C008040002000118010000 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418010100 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418010200 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304650165014005040000006418010300 6 | -------------------------------------------------------------------------------- /qa/encoding/api-mvpn.ci: -------------------------------------------------------------------------------- 1 | api-mvpn.conf -------------------------------------------------------------------------------- /qa/encoding/api-nexthop-self.ci: -------------------------------------------------------------------------------- 1 | api-nexthop-self.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-nexthop-self.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003047F00000140050400000064200A000001 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003047F00000140050400000064200A000002 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002F:02:00000015400101004002004003047F00000140050400000064100101 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002F:02:00000015400101004002004003047F00000140050400000064100202 6 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003047F000001400504000000642002020001 7 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003047F000001400504000000642003030003 8 | -------------------------------------------------------------------------------- /qa/encoding/api-nexthop.ci: -------------------------------------------------------------------------------- 1 | api-nexthop.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-nexthop.msg: -------------------------------------------------------------------------------- 1 | # 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000201 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004E:02:0000003740010100400200400504000001F4800E260002011020010000000000000000000000000001008026050000000000000000000000000002 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004E:02:0000003740010100400200400504000001F4800E260002011020010000000000000000000000000002008026050000000000000000000000000002 5 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004E:02:0000003740010100400200400504000001F4800E260002011020010000000000000000000000000001008026050000000000000000000000000002 6 | -------------------------------------------------------------------------------- /qa/encoding/api-no-respawn.ci: -------------------------------------------------------------------------------- 1 | api-no-respawn.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-no-respawn.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003040B0B0B0B400504000000642001010101 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:000000154001010040020040030416161616400504000000642002020202 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:000000154001010040020040030421212121400504000000642003030303 5 | -------------------------------------------------------------------------------- /qa/encoding/api-notification.ci: -------------------------------------------------------------------------------- 1 | api-notification.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-notification.msg: -------------------------------------------------------------------------------- 1 | A1:notification:closing session because we can 2 | 3 | -------------------------------------------------------------------------------- /qa/encoding/api-open.ci: -------------------------------------------------------------------------------- 1 | api-open.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-open.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003C:02:0000001C4001010040020040030465016501800404000000C840050400000064000000002001010101 3 | -------------------------------------------------------------------------------- /qa/encoding/api-reload.ci: -------------------------------------------------------------------------------- 1 | api-reload.1.conf api-reload.2.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-reload.msg: -------------------------------------------------------------------------------- 1 | A1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304040000004005040000006418010000 2 | A1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304040000004005040000006418020000 3 | A1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 4 | 5 | A2:signal:SIGUSR1 6 | 7 | A3:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001B:02:0004180200000000 8 | A3:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304040000004005040000006418030000 9 | -------------------------------------------------------------------------------- /qa/encoding/api-rib.ci: -------------------------------------------------------------------------------- 1 | api-rib.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-rr-rib.ci: -------------------------------------------------------------------------------- 1 | api-rr-rib.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-rr.ci: -------------------------------------------------------------------------------- 1 | api-rr.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-rr.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003040A0000004005040000006420C0A80000 3 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003040A0000014005040000006420C0A80001 4 | 3:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:05:00010001 5 | 4:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003040A0000014005040000006420C0A80002 6 | -------------------------------------------------------------------------------- /qa/encoding/api-teardown.ci: -------------------------------------------------------------------------------- 1 | api-teardown.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-vpls.ci: -------------------------------------------------------------------------------- 1 | api-vpls.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-vpls.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003001941 2 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0095:02:0000007E4001010040021E020700007814000078140000781400007814000078140000781400007814800404000007D040050400000064C00804D53F007B800904C0A81601800A0803030303C0A8C901C010100002D53F00000006800A130005DC006F800E1C00194104C0A8C9010000110001C0A8C901007B000500010008029CE1 3 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003E:02:000000274001010040020040050400000064800F1600194100110001C0A8C901007B000500010008029CE1 4 | -------------------------------------------------------------------------------- /qa/encoding/api-vpnv4.ci: -------------------------------------------------------------------------------- 1 | api-vpnv4.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/api-vpnv4.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000180 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0060:02:00000049400101004002004003046501650140050400000064C0080400640001C010080002FDE900000001800E1F0001800C0000000000000000650165010068003E810000FDE8000000010104 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0052:02:0000003B400101004002004003046501650140050400000064C0080400640001C010080002FDE900000001800F1100018068003E810000FDE8000000010104 4 | # 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002B:02:00000014800F1100018068003E810000FDE8000000010104 5 | -------------------------------------------------------------------------------- /qa/encoding/conf-addpath.ci: -------------------------------------------------------------------------------- 1 | conf-addpath.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-addpath.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0040:02:00000020400101004002004003040A00000140050400000064C0100800020048000000010102030420C1000201 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0066:02:0000004F40010100400200400304C0A8000140050400000064C0101000020000000000000002000100000001800E240001800C0000000000000000C0A80001000000000A7004E2C100000064000000640A0000 3 | -------------------------------------------------------------------------------- /qa/encoding/conf-aggregator.ci: -------------------------------------------------------------------------------- 1 | conf-aggregator.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-aggregator.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004802:0000002D4001010040020A02020000E1DD00001B1B400304C0A801FE40050400000064400600C00708000046E0DB76E1BD12010040 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-attributes.ci: -------------------------------------------------------------------------------- 1 | conf-attributes.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-attributes.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000201 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004C:02:0000003040010100400200400304FFFFFFFF40050400000064C020180000000100000002000000030000000A0000000B0000000C200A000007 4 | -------------------------------------------------------------------------------- /qa/encoding/conf-cap-software-version.ci: -------------------------------------------------------------------------------- 1 | conf-cap-software-version.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-cap-software-version.msg: -------------------------------------------------------------------------------- 1 | option:open:inspect-open-message 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0045:01:04FFFD00B40A000002280206010400010001020641040000FFFD02164B14134578614247502F352E302E302D302B74657374 -------------------------------------------------------------------------------- /qa/encoding/conf-ebgp.ci: -------------------------------------------------------------------------------- 1 | conf-ebgp.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-ebgp.msg: -------------------------------------------------------------------------------- 1 | option:asn:65000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002F:02:000000144001010040020602010000FFFD4003040A0001FE180A0000 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 4 | -------------------------------------------------------------------------------- /qa/encoding/conf-extended-attributes.ci: -------------------------------------------------------------------------------- 1 | conf-extended-attributes.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-flow-redirect.ci: -------------------------------------------------------------------------------- 1 | conf-flow-redirect.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-flow.ci: -------------------------------------------------------------------------------- 1 | conf-flow.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-generic-attribute.ci: -------------------------------------------------------------------------------- 1 | conf-generic-attribute.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-generic-attribute.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0038:02:0000001C40010100400200400304C0A8016480040400000064400504000000642064646464 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0038:02:0000001C40010100400200400304C0A8016440050400000064609904000000642065656565 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0039:02:0000001D40010100400200400304C0A80164400504000000647099000400000064206F6F6F6F 4 | -------------------------------------------------------------------------------- /qa/encoding/conf-group-limit.ci: -------------------------------------------------------------------------------- 1 | conf-group-limit.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-group-limit.msg: -------------------------------------------------------------------------------- 1 | # EOR 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000201 4 | 5 | # Two IPv4 6 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0036:02:00000015400101004002004003040A0000014005040000006420C100020120C1000202 7 | 8 | # Two IPv6 9 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004E:02:000000374001010040020040050400000064800E26000201102A020B8000010000000000000000000100802A020B80000000010000000000000001 10 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004E:02:000000374001010040020040050400000064800E26000201102A020B8000010000000000000000000100802A020B80000000020000000000000002 11 | -------------------------------------------------------------------------------- /qa/encoding/conf-group.ci: -------------------------------------------------------------------------------- 1 | conf-group.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-group.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002E:02:000000154001010040020040030401010101400504000000640801 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002E:02:000000154001010040020040030401010101400504000000640802 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002E:02:000000154001010040020040030401010101400504000000640803 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002E:02:000000154001010040020040030401010101400504000000640804 6 | -------------------------------------------------------------------------------- /qa/encoding/conf-hostname.ci: -------------------------------------------------------------------------------- 1 | conf-hostname.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-hostname.msg: -------------------------------------------------------------------------------- 1 | option:open:inspect-open-message 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0051:01:04FFFD00B40A000002340206010400010001020641040000FFFD022249200C6D792D686F73742D6E616D65126D792D646F6D61696E2D6E616D652E636F6D 3 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipself4.ci: -------------------------------------------------------------------------------- 1 | conf-ipself4.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipself4.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003047F00000140050400000064200A000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 3 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipself6.ci: -------------------------------------------------------------------------------- 1 | conf-ipself6.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipself6.msg: -------------------------------------------------------------------------------- 1 | option:bind:ipv6 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004E02:000000374001010040020040050400000064800E26000201100000000000000000000000000000000100802A046D80000000000000000000000001 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E02:00000007900F0003000201 4 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipv46routes4family.ci: -------------------------------------------------------------------------------- 1 | conf-ipv46routes4family.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipv46routes4family.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003C02:00000020400101004002004003040A00000140050400000064C01008000200480000000120C1000201 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipv46routes6family.ci: -------------------------------------------------------------------------------- 1 | conf-ipv46routes6family.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipv46routes6family.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:005902:0000004240010100400200400504000000C8C008087814000078147814800E26000201102A020B8000000002000000000000000100802A020B80000000010000000000000001 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E02:00000007900F0003000201 3 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipv6grouping.ci: -------------------------------------------------------------------------------- 1 | conf-ipv6grouping.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-ipv6grouping.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0059:02:0000004240010100400200400504000000C8C008087814000078147814800E26000201102A020B8000000002000000000000000100802A020B80000000010000000000000001 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0059:02:0000004240010100400200400504000000C8C008087814000078147814800E26000201102A020B8000000002000000000000000100802A020B80000000010000000000000002 3 | -------------------------------------------------------------------------------- /qa/encoding/conf-l2vpn.ci: -------------------------------------------------------------------------------- 1 | conf-l2vpn.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-l2vpn.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0095:02:0000007E4001010040021E020700007814000078140000781400007814000078140000781400007814800404000007D040050400000001C00804D53F007B800904C0A81601800A0803030303C0A8C901C010100002D53F00000006800A130005DC006F800E1C00194104C0A8C9010000110001C0A8C901007B000500010008029CE1 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0095:02:0000007E4001010040021E020700007814000078140000781400007814000078140000781400007814800404000007D040050400000001C00804D53F007B800904C0A81601800A0803030303C0A8C901C010100002D53F00000006800A130005DC006F800E1C00194104C0A8C9010000110001C0A8C901007C000500010008029EC1 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0095:02:0000007E4001010040021E020700007814000078140000781400007814000078140000781400007814800404000007D040050400000064C00804D53F007B800904C0A81601800A0803030303C0A8C901C010100002D53F00000006800A130005DC006F800E1C00194104C0A8C9010000110001C0A8C901007B000500010008029CE1 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003001941 5 | -------------------------------------------------------------------------------- /qa/encoding/conf-largecommunity.ci: -------------------------------------------------------------------------------- 1 | conf-largecommunity.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-largecommunity.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004C:02:0000003040010100400200400304C000020140050400000064C0201800000B62000000000000029A00000B6200000CF80000007B200808080A 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004C:02:0000003040010100400200400304C000020140050400000064C0201800000B62000000000000029A00000B6200000CF80000007B200909090A 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 4 | -------------------------------------------------------------------------------- /qa/encoding/conf-mvpn.ci: -------------------------------------------------------------------------------- 1 | conf-mvpn.conf -------------------------------------------------------------------------------- /qa/encoding/conf-mvpn.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0073:02:0000005C400101004002004003040A0A060340050400000064C010080102C0A85E0C0005800E39000105040A0A06030006160000FDE80001869F0000FDE8200A63C70120EFFBFFE407160000FDE80001869F0000FDE8200A630C0220EFFBFFE4 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:00A3:02:0000008C400101004002004003040A0A060340050400000064C010080102C0A85E0C0005800E69000205040A0A060300062E0000FDE80001869F0000FDE880FD00000000000000000000000000000180FF0E0000000000000000000000000001072E0000FDE80001869F0000FDE880FD12000000000000000000000000000280FF0E0000000000000000000000000001 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0057:02:00000040400101004002004003040A0A060440050400000064C010080002FDE80001869F800E1D000105040A0A06040005120000FDE80001869F200A630C0420EFFBFFE4 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:006F:02:00000058400101004002004003040A0A060440050400000064C010080002FDE80001869F800E35000205040A0A060400052A0000FDE80001869F80FD12000000000000000000000000000480FF0E0000000000000000000000000001 -------------------------------------------------------------------------------- /qa/encoding/conf-name.ci: -------------------------------------------------------------------------------- 1 | conf-name.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-name.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0030:02:0000001540010100400200400304010203044005040000006418010000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 -------------------------------------------------------------------------------- /qa/encoding/conf-new-v4.ci: -------------------------------------------------------------------------------- 1 | conf-new-v4.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-new-v4.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003B:02:0000001C400101004002004003040A00FFFE40050400000064C0080478147814180A0002180A0006 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0034:02:00000015400101004002004003040A00FFFE400504000000C8180A0004180A0005 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003B:02:0000001C400101004002004003040A00FFFE400504000000C8C0080478147814180A0007180A0008 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0037:02:0000001C400101004002004003040A00FFFE40050400000064C0080400000000180A0001 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003B:02:00000020400101004002004003040A00FFFE40050400000064C008087814000078147814180A0003 6 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 7 | -------------------------------------------------------------------------------- /qa/encoding/conf-new-v6.ci: -------------------------------------------------------------------------------- 1 | conf-new-v6.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-new-v6.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0059:02:0000004240010100400200400504000000C8C008087814000078147814800E26000201102A020B8000000002000000000000000100802A020B80000000010000000000000001 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0059:02:0000004240010100400200400504000000C8C008087814000078147814800E26000201102A020B8000000002000000000000000100802A020B80000000010000000000000002 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000201 4 | -------------------------------------------------------------------------------- /qa/encoding/conf-no-asn4.ci: -------------------------------------------------------------------------------- 1 | conf-no-asn4.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-no-asn4.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:003402:0000001940010100400204020100644003040A00FFFE40050400000064180A0001 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-parity.ci: -------------------------------------------------------------------------------- 1 | conf-parity.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-parity.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:007E:02:000000674001010040020E0203000062620000FDE80000FC0040050400000064C00804FDE80021800904392302F0C010080002282B04F95C78800E2F00028018000000000000000000000000000000000000FFFF5134119200880039E100000C8F22C6DB3D20014B5020C0 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:007E:02:000000674001010040020E0203000062620000FDE80000FC0040050400000064C00804FDE80021800904392302F0C010080002282B04F95C78800E2F00028018000000000000000000000000000000000000FFFF5134119200880039E100000C8F22C6DB3D20014B5020D0 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E02:00000007900F0003000280 4 | -------------------------------------------------------------------------------- /qa/encoding/conf-path-information.ci: -------------------------------------------------------------------------------- 1 | conf-path-information.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-path-information.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0035:02:00000015400101004002004003040:A0A0101:40050400000064:00000001:200A00000A 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0035:02:00000015400101004002004003040:A0A0102:40050400000064:00000002:200A00000A 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0035:02:00000015400101004002004003040:A0A0103:40050400000064:00000003:200A01000A 4 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 5 | #2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000101 6 | -------------------------------------------------------------------------------- /qa/encoding/conf-prefix-sid.ci: -------------------------------------------------------------------------------- 1 | conf-prefix-sid.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-prefix-sid.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:004D:02:0000003640010100400200400304C633640140050400000064C0280A01000700000000000309800E1100010404C63364010038C35011C6336464 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:005E:02:0000004740010100400200400304C633640240050400000064C0281B0100070000000000012C03000E00000C35000010000F4240001388800E1100010404C63364020038C35021C6336465 3 | -------------------------------------------------------------------------------- /qa/encoding/conf-split.ci: -------------------------------------------------------------------------------- 1 | conf-split.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-srv6-mup-v3.ci: -------------------------------------------------------------------------------- 1 | conf-srv6-mup-v3.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-srv6-mup-v3.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0063:02:0000004C400101004002004003040A00000240050400000064C010080002000A0000000A800E29000155040A000002000100031C000000640000006420C0A800020000303909200A000001200A000101 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:008C:02:000000754001010040020040050400000064C010080002000A0000000A800E590002551000000000000000000000FFFF0A000002000100034000000064000000648020010DB8000100010000000000000002000030390980200100000000000000000000000000018020020000000000000000000000000002 3 | -------------------------------------------------------------------------------- /qa/encoding/conf-srv6-mup.ci: -------------------------------------------------------------------------------- 1 | conf-srv6-mup.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-template.ci: -------------------------------------------------------------------------------- 1 | conf-template.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-template.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002E:02:000000154001010040020040030401010101400504000000640801 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002E:02:000000154001010040020040030401010101400504000000640802 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002E:02:000000154001010040020040030401020304400504000000640803 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:002E:02:000000154001010040020040030402020202400504000000640804 6 | -------------------------------------------------------------------------------- /qa/encoding/conf-unknowncap.ci: -------------------------------------------------------------------------------- 1 | conf-unknowncap.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-unknowncap.msg: -------------------------------------------------------------------------------- 1 | option:open:send-unknown-capability 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 3 | -------------------------------------------------------------------------------- /qa/encoding/conf-vpn.ci: -------------------------------------------------------------------------------- 1 | conf-vpn.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-vpn.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0063:02:0000004C40010100400200400304C80A006540050400000064C0101000022710000000010002FDE800000001800E210001800C0000000000000000C80A00650071003E810000FDE8000000010A000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0063:02:0000004C40010100400200400304C80A006540050400000064C0101000022710000000010002FDE800000001800E210001800C0000000000000000C80A00650071003E810000FDE8000000010A000080 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0063:02:0000004C40010100400200400304C80A006540050400000064C0101000022710000000010002FDE800000001800E210001800C0000000000000000C80A00650071003E810000FDE80000000114000000 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0063:02:0000004C40010100400200400304C80A006540050400000064C0101000022710000000010002FDE800000001800E210001800C0000000000000000C80A00650071003E810000FDE80000000114000080 5 | -------------------------------------------------------------------------------- /qa/encoding/conf-watchdog.ci: -------------------------------------------------------------------------------- 1 | api-watchdog.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/conf-watchdog.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0036:02:0000001540010100400200400304010203044005040000006420424242422058585858 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:0000001540010100400200400304C0A80164400504000000642064646464 4 | 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003040102030440050400000064204D4D4D4D 6 | 2:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001C:02:0005204D4D4D4D0000 7 | 8 | 3:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003040102030440050400000064204D4D4D4D 9 | 4:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001C:02:0005204D4D4D4D0000 10 | 11 | 5:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0031:02:00000015400101004002004003040102030440050400000064204D4D4D4D 12 | 6:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001C:02:0005204D4D4D4D0000 13 | -------------------------------------------------------------------------------- /qa/encoding/extended-nexthop.ci: -------------------------------------------------------------------------------- 1 | extended-nexthop.conf 2 | -------------------------------------------------------------------------------- /qa/encoding/extended-nexthop.msg: -------------------------------------------------------------------------------- 1 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0042:02:0000002B4001010040020040050400000064800E1A000101100BADCAFE0BADCAFE0BADCAFE0BADCAFE002099999999 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0049:02:0000003240010100400200400304AAAAAAAA40050400000064800E1A00020104AAAAAAAA0080DEADBEEFDEADBEEFDEADBEEFDEADBEEF 3 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0017:02:00000000 4 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000180 5 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000201 6 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:001E:02:00000007900F0003000280 7 | -------------------------------------------------------------------------------- /qa/encoding/skip-large-mp.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 127.0.0.1; 3 | local-address 127.0.0.1; 4 | 5 | local-as 100; 6 | peer-as 100; 7 | 8 | group-updates false; 9 | 10 | capability { 11 | graceful-restart; 12 | } 13 | 14 | family { 15 | ipv4 mpls-vpn; 16 | } 17 | 18 | static { 19 | route 11.0.0.0/18 rd 100:254 next-hop 100.100.100.7 extended-community [ 0x0002FDE800000001 0x0002271000000001 ] label 1000 split /32; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /qa/encoding/unknown-message.ci: -------------------------------------------------------------------------------- 1 | unknown-message.conf -------------------------------------------------------------------------------- /qa/encoding/unknown-message.msg: -------------------------------------------------------------------------------- 1 | option:open:send-unknown-message 2 | 1:raw:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:0040:03:010063616E206E6F74206465636F646520757064617465206D657373616765206F662074797065202232353522 3 | -------------------------------------------------------------------------------- /qa/requirements.txt: -------------------------------------------------------------------------------- 1 | # running the test suite/code 2 | ruff 3 | flake8 4 | coveralls 5 | nose 6 | psutil 7 | pytest 8 | pytest-cov 9 | -------------------------------------------------------------------------------- /qa/self/api/receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat receive.template | sed -e "s/IP/$ip/" > receive.conf 15 | env exabgp.tcp.bind="$ip" exabgp.tcp.port=1790 ../../../sbin/exabgp receive.conf 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/api/receive.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65534; 5 | peer-as 65533; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | process dump-all-text { 10 | receive { 11 | parsed; 12 | updates; 13 | neighbor-changes; 14 | } 15 | run ./receive.py; 16 | } 17 | 18 | neighbor 127.0.0.1 { 19 | description "router 2 with four routes"; 20 | router-id 128.0.0.0; 21 | local-address IP; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /qa/self/api/send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat send.template | sed -e "s/IP/$ip/" > send.conf 15 | env exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp send.conf 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/api/send.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65533; 5 | peer-as 65534; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | static { 10 | route 11.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 11 | route 22.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 12 | route 33.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 13 | route 44.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 14 | route 55.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 15 | route 66.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 16 | route 77.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 17 | route 88.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 18 | route 99.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 19 | } 20 | 21 | neighbor IP { 22 | description "router 2 with four routes"; 23 | router-id 127.0.0.0; 24 | local-address 127.0.0.1; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /qa/self/attribute/api-internet.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import time 5 | 6 | 7 | def write(data): 8 | sys.stdout.write(data + '\n') 9 | sys.stdout.flush() 10 | 11 | 12 | def main(): 13 | msg = 'announce attribute next-hop 1.2.3.4 med 100 as-path [ 100 101 102 103 104 105 106 107 108 109 110 ] nlri %s' 14 | write(msg % ' '.join('%d.0.0.0/8' % ip for ip in range(0, 224))) 15 | write(msg % ' '.join('10.%d.0.0/16' % ip for ip in range(0, 256))) 16 | 17 | time.sleep(2) 18 | 19 | write( 20 | 'withdraw attribute next-hop 1.2.3.4 med 100 as-path [ 100 101 102 103 104 105 106 107 108 109 110 ] nlri 0.0.0.0/8 1.0.0.0/8' 21 | ) 22 | 23 | time.sleep(10000) 24 | 25 | 26 | if __name__ == '__main__': 27 | try: 28 | main() 29 | except KeyboardInterrupt: 30 | pass 31 | -------------------------------------------------------------------------------- /qa/self/attribute/receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | env exabgp.tcp.port=1790 wires=1 ../../bin/ibgp 4 | -------------------------------------------------------------------------------- /qa/self/attribute/send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat send.template | sed -e "s/IP/$ip/" > send.conf 15 | env exabgp.log.processes=false exabgp.log.reactor=false exabgp.tcp.bind="" exabgp.tcp.port=1790 ../../../sbin/exabgp send.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/attribute/send.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | process similate-the-intenet { 10 | run ./api-internet.py 500000 20; 11 | } 12 | 13 | neighbor 127.0.0.1 { 14 | description "router 2 with four routes"; 15 | router-id 128.0.0.0; 16 | group-updates; 17 | local-address IP; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /qa/self/big/dump-all.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | count = 0 6 | 7 | while True: 8 | line = sys.stdin.readline() 9 | sys.stderr.write(line) 10 | sys.stderr.flush() 11 | -------------------------------------------------------------------------------- /qa/self/big/dump-number.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | count = 0 6 | 7 | while True: 8 | line = sys.stdin.readline() 9 | if ' route' in line: 10 | count += 1 11 | if count % 100 == 0: 12 | sys.stderr.write('received %-10d\n' % count) 13 | sys.stderr.flush() 14 | -------------------------------------------------------------------------------- /qa/self/big/dump-to-screen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | count = 0 6 | 7 | while True: 8 | line = sys.stdin.readline() 9 | if ' route' in line: 10 | count += 1 11 | if count % 100 == 0: 12 | sys.stderr.write('received %-10d\n' % count) 13 | sys.stderr.flush() 14 | -------------------------------------------------------------------------------- /qa/self/big/receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat receive.template | sed -e "s/IP/$ip/" > receive.conf 15 | env exabgp.log.processes=false exabgp.log.reactor=false exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp receive.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/big/receive.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | process similate-the-intenet { 10 | receive { 11 | parsed; 12 | updates; 13 | } 14 | run ./dump-to-screen.py 100 20; 15 | } 16 | 17 | neighbor IP { 18 | description "router 2 with four routes"; 19 | router-id 127.0.0.0; 20 | local-address 127.0.0.1; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /qa/self/big/send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat send.template | sed -e "s/IP/$ip/" > send.conf 15 | env exabgp.log.processes=false exabgp.log.reactor=false exabgp.tcp.bind="$ip" exabgp.tcp.port=1790 ../../../sbin/exabgp send.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/big/send.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | process similate-the-intenet { 10 | run ./api-internet.py 500000 20; 11 | } 12 | 13 | neighbor 127.0.0.1 { 14 | description "router 2 with four routes"; 15 | router-id 128.0.0.0; 16 | group-updates; 17 | local-address IP; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /qa/self/flow/first: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat first.template | sed -e "s/IP/$ip/" > first.conf 15 | env exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp first.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/flow/first.template: -------------------------------------------------------------------------------- 1 | process stdout { 2 | encoder json; 3 | run "./flow-change.py"; 4 | } 5 | 6 | neighbor IP { 7 | description "router"; 8 | router-id 127.0.0.0; 9 | local-address 127.0.0.1; 10 | local-as 65533; 11 | peer-as 65534; 12 | hold-time 9; 13 | # graceful-restart 1200; 14 | # host-name my.localhost; 15 | # domain-name mangin.com; 16 | 17 | family { 18 | ipv4 unicast; 19 | ipv4 flow; 20 | ipv4 flow-vpn; 21 | } 22 | 23 | api { 24 | processes [stdout ]; 25 | receive { 26 | parsed; 27 | operational; 28 | } 29 | } 30 | 31 | flow { 32 | # route first-vpn-route { 33 | # rd 65535:65536; 34 | # match { 35 | # source 10.0.0.1/32; 36 | # } 37 | # then { 38 | # discard; 39 | # } 40 | # } 41 | 42 | route block_traffic_to_proxy { 43 | match { 44 | source 10.0.0.1/32; 45 | destination 10.0.0.2/32; 46 | destination-port >=80&<=90; 47 | protocol tcp; 48 | } 49 | then { 50 | discard; 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /qa/self/flow/flow-change.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from __future__ import print_function 4 | import sys 5 | import time 6 | 7 | flow = 'flow route { match { source 10.0.0.1/32; destination 10.0.0.2/32; destination-port =3128; protocol tcp; } then { discard; } }' 8 | 9 | # When the parent dies we are seeing continual newlines, so we only access so many before stopping 10 | counter = 1 11 | 12 | # sleep a little bit or we will never see the asm in the configuration file 13 | # and the message received just before we go to the established loop will be printed twice 14 | time.sleep(1) 15 | 16 | while True: 17 | try: 18 | time.sleep(1) 19 | if counter % 2: 20 | print('announce', flow) 21 | sys.stdout.flush() 22 | else: 23 | print('withdraw', flow) 24 | sys.stdout.flush() 25 | 26 | counter += 1 27 | except KeyboardInterrupt: 28 | pass 29 | except IOError: 30 | break 31 | -------------------------------------------------------------------------------- /qa/self/flow/log-syslog.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | import syslog 7 | 8 | 9 | def _prefixed(level, message): 10 | now = time.strftime('%a, %d %b %Y %H:%M:%S', time.localtime()) 11 | return '%s %-8s %-6d %s' % (now, level, os.getpid(), message) 12 | 13 | 14 | syslog.openlog('ExaBGP') 15 | 16 | # When the parent dies we are seeing continual newlines, so we only access so many before stopping 17 | counter = 0 18 | 19 | while True: 20 | try: 21 | line = sys.stdin.readline().strip() 22 | if line == '': 23 | counter += 1 24 | if counter > 100: 25 | break 26 | continue 27 | 28 | counter = 0 29 | 30 | sys.sterr.write(f'{line}\n') 31 | syslog.syslog(syslog.LOG_ALERT, _prefixed('INFO', line)) 32 | except KeyboardInterrupt: 33 | pass 34 | except IOError: 35 | # most likely a signal during readline 36 | pass 37 | -------------------------------------------------------------------------------- /qa/self/flow/second: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat second.template | sed -e "s/IP/$ip/" > second.conf 15 | env exabgp.tcp.bind="$ip" exabgp.tcp.port=1790 ../../../sbin/exabgp -d second.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/flow/second.template: -------------------------------------------------------------------------------- 1 | process parsed-route-backend { 2 | encoder json; 3 | run ./log-syslog.py; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | description "router 2"; 8 | router-id 128.0.0.0; 9 | local-address IP; 10 | local-as 65534; 11 | peer-as 65533; 12 | hold-time 9; 13 | 14 | capability { 15 | graceful-restart; 16 | } 17 | 18 | api { 19 | processes [ parsed-route-backend ]; 20 | receive { 21 | parsed; 22 | update; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /qa/self/json/receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat receive.template | sed -e "s/IP/$ip/" > receive.conf 15 | env exabgp.tcp.bind="$ip" exabgp.tcp.port=1790 ../../../sbin/exabgp receive.conf 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/json/receive.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import json 5 | import pprint 6 | 7 | exit = False 8 | 9 | while True: 10 | line = sys.stdin.readline().strip() 11 | 12 | if not line: 13 | if exit: 14 | sys.exit(0) 15 | exit = True 16 | else: 17 | exit = False 18 | 19 | sys.sterr.write(f'\n=====\n{line}\n---\n') 20 | sys.stderr.write(pprint.pformat(json.loads(line), indent=3).replace("u'", "'")) 21 | sys.sterr.write('\n') 22 | sys.stderr.flush() 23 | -------------------------------------------------------------------------------- /qa/self/json/receive.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65534; 5 | peer-as 65533; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | process dump-all-text { 10 | neighbor-changes; 11 | receive { 12 | packets; 13 | open; 14 | update; 15 | } 16 | send { 17 | packets; 18 | open; 19 | update; 20 | } 21 | run ./receive.py; 22 | } 23 | 24 | neighbor 127.0.0.1 { 25 | description "router 2 with four routes"; 26 | router-id 128.0.0.0; 27 | local-address IP; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /qa/self/json/send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat send.template | sed -e "s/IP/$ip/" > send.conf 15 | env exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp send.conf 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/json/send.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65533; 5 | peer-as 65534; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | static { 10 | route 11.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 11 | route 22.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 12 | route 33.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 13 | route 44.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 14 | route 55.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 15 | route 66.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 16 | route 77.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 17 | route 88.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 18 | route 99.0.0.0/8 next-hop 1.1.1.1 med 100 as-path [ 1 2 3 4 ]; 19 | } 20 | 21 | neighbor IP { 22 | description "router 2 with four routes"; 23 | router-id 127.0.0.0; 24 | local-address 127.0.0.1; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /qa/self/ka/ka-receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | env exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp -p -d ka-receive.conf $* 4 | 5 | -------------------------------------------------------------------------------- /qa/self/ka/ka-receive.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 4.3.2.1; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | hold-time 6; 7 | passive; 8 | 9 | flow { 10 | } 11 | static { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /qa/self/ka/ka-send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | env exabgp.tcp.port=1790 ../../../sbin/exabgp -p -d ka-send.conf $* 4 | -------------------------------------------------------------------------------- /qa/self/ka/ka-send.conf: -------------------------------------------------------------------------------- 1 | neighbor 127.0.0.1 { 2 | router-id 1.2.3.4; 3 | local-address 127.0.0.1; 4 | local-as 1; 5 | peer-as 1; 6 | hold-time 6; 7 | } 8 | -------------------------------------------------------------------------------- /qa/self/load/dump-all.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | count = 0 6 | 7 | while True: 8 | line = sys.stdin.readline() 9 | sys.stderr.write(line) 10 | sys.stderr.flush() 11 | -------------------------------------------------------------------------------- /qa/self/load/dump-number.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | count = 0 6 | 7 | while True: 8 | line = sys.stdin.readline() 9 | if ' route' in line: 10 | count += 1 11 | if count % 100 == 0: 12 | sys.stderr.write('received %-10d\n' % count) 13 | sys.stderr.flush() 14 | -------------------------------------------------------------------------------- /qa/self/load/dump-to-screen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | count = 0 6 | 7 | while True: 8 | line = sys.stdin.readline() 9 | if ' route' in line: 10 | count += 1 11 | if count % 100 == 0: 12 | sys.stderr.write('received %-10d\n' % count) 13 | sys.stderr.flush() 14 | -------------------------------------------------------------------------------- /qa/self/load/receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat receive.template | sed -e "s/IP/$ip/" > receive.conf 15 | env exabgp.log.processes=false exabgp.log.reactor=false exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp receive.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/load/receive.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | process similate-the-intenet { 10 | receive { 11 | parsed; 12 | updates; 13 | } 14 | run ./dump-to-screen.py 100 20; 15 | } 16 | 17 | neighbor IP { 18 | description "router 2 with four routes"; 19 | router-id 127.0.0.0; 20 | local-address 127.0.0.1; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /qa/self/load/send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat send.template | sed -e "s/IP/$ip/" > send.conf 15 | env exabgp.log.processes=false exabgp.log.reactor=false exabgp.tcp.bind="$ip" exabgp.tcp.port=1790 ../../../sbin/exabgp send.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/load/send.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | group test { 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | graceful-restart 1200; 8 | 9 | process similate-the-intenet { 10 | run ./api-internet.py 500000 20; 11 | } 12 | 13 | neighbor 127.0.0.1 { 14 | description "router 2 with four routes"; 15 | router-id 128.0.0.0; 16 | group-updates; 17 | local-address IP; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /qa/self/operational/.landscape.yaml: -------------------------------------------------------------------------------- 1 | doc-warnings: false 2 | max-line-length: 120 3 | ignore-paths: 4 | - dev 5 | - lib/exabgp/dep 6 | -------------------------------------------------------------------------------- /qa/self/operational/operational-print.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | # When the parent dies we are seeing continual newlines, so we only access so many before stopping 6 | counter = 0 7 | 8 | while True: 9 | try: 10 | line = sys.stdin.readline().strip() 11 | if line == '': 12 | counter += 1 13 | if counter > 100: 14 | break 15 | continue 16 | 17 | counter = 0 18 | 19 | send = '\n%s %s %s\n' % ('-' * 10, line, '-' * 10) 20 | sys.stderr.write(f'{send}\n') 21 | sys.stderr.flush() 22 | except KeyboardInterrupt: 23 | pass 24 | except IOError: 25 | # most likely a signal during readline 26 | pass 27 | -------------------------------------------------------------------------------- /qa/self/operational/operational-receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | env exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp -p -d operational-receive.conf $* 4 | 5 | -------------------------------------------------------------------------------- /qa/self/operational/operational-receive.conf: -------------------------------------------------------------------------------- 1 | process stdout { 2 | encoder json; 3 | run "./operational-print.py"; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 4.3.2.1; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | passive; 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | capability { 18 | operational; 19 | } 20 | 21 | api { 22 | processes [ stdout ]; 23 | receive { 24 | parsed; 25 | operational; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /qa/self/operational/operational-send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | env exabgp.tcp.port=1790 ../../../sbin/exabgp -p -d operational-send.conf $* 4 | -------------------------------------------------------------------------------- /qa/self/operational/operational-send.conf: -------------------------------------------------------------------------------- 1 | process operational-chatter { 2 | run ./operational-send.py; 3 | encoder json; 4 | } 5 | 6 | neighbor 127.0.0.1 { 7 | router-id 1.2.3.4; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | 12 | family { 13 | ipv4 unicast; 14 | } 15 | 16 | capability { 17 | operational; 18 | } 19 | 20 | api { 21 | processes [ operational-chatter ]; 22 | } 23 | 24 | operational { 25 | asm afi ipv4 safi unicast advisory 'Thank you for peering, noc email is noc@isp.com'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /qa/self/refresh/first: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat first.template | sed -e "s/IP/$ip/" > first.conf 15 | env exabgp.log.processes=false exabgp.log.reactor=false exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp first.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/refresh/first.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | process similate-the-intenet { 4 | run ./re-ask.py; 5 | encoder text; 6 | } 7 | 8 | template test { 9 | local-as 65533; 10 | peer-as 65533; 11 | hold-time 180; 12 | 13 | capability { 14 | route-refresh; 15 | graceful-restart 1200; 16 | } 17 | 18 | family { 19 | ipv4 unicast; 20 | } 21 | 22 | api similate-the-intenet { 23 | processes [ similate-the-intenet ]; 24 | } 25 | } 26 | 27 | neighbor IP { 28 | inherit test; 29 | description "router 2 with four routes"; 30 | router-id 127.0.0.0; 31 | local-address 127.0.0.1; 32 | } 33 | -------------------------------------------------------------------------------- /qa/self/refresh/re-ask.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from __future__ import print_function 4 | import sys 5 | import signal 6 | 7 | 8 | class TimeError(Exception): 9 | pass 10 | 11 | 12 | def handler(signum, frame): 13 | raise TimeError() 14 | 15 | 16 | count = 0 17 | 18 | while True: 19 | try: 20 | signal.signal(signal.SIGALRM, handler) 21 | signal.alarm(4) 22 | 23 | line = sys.stdin.readline() 24 | sys.stderr.write('received %s\n' % line.strip()) 25 | sys.stderr.flush() 26 | except TimeError: 27 | print('announce route-refresh ipv4 unicast') 28 | sys.stdout.flush() 29 | print('announce route-refresh ipv4 unicast', file=sys.stderr) 30 | sys.stderr.flush() 31 | -------------------------------------------------------------------------------- /qa/self/refresh/second: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat second.template | sed -e "s/IP/$ip/" > second.conf 15 | env exabgp.log.processes=false exabgp.log.reactor=false exabgp.tcp.bind="$ip" exabgp.tcp.port=1790 ../../../sbin/exabgp second.conf -d 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/refresh/second.template: -------------------------------------------------------------------------------- 1 | #route 77.93.35.15/32 next-hop 10.0.0.2; 2 | 3 | template test { 4 | local-as 65533; 5 | peer-as 65533; 6 | hold-time 180; 7 | 8 | capability { 9 | route-refresh; 10 | graceful-restart 1200; 11 | } 12 | 13 | family { 14 | ipv4 unicast; 15 | } 16 | 17 | static { 18 | route 1.0.0.0/24 next-hop 9.9.9.9 split /25; 19 | } 20 | } 21 | 22 | neighbor 127.0.0.1 { 23 | inherit test; 24 | description "router 2 with four routes"; 25 | router-id 128.0.0.0; 26 | local-address IP; 27 | } 28 | -------------------------------------------------------------------------------- /qa/self/simple/first: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat first.template | sed -e "s/IP/$ip/" > first.conf 15 | env exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp first.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/simple/log-syslog.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import time 6 | import syslog 7 | 8 | 9 | def _prefixed(level, message): 10 | now = time.strftime('%a, %d %b %Y %H:%M:%S', time.localtime()) 11 | return '%s %-8s %-6d %s' % (now, level, os.getpid(), message) 12 | 13 | 14 | syslog.openlog('ExaBGP') 15 | 16 | # When the parent dies we are seeing continual newlines, so we only access so many before stopping 17 | counter = 0 18 | 19 | while True: 20 | try: 21 | line = sys.stdin.readline().strip() 22 | if line == '': 23 | counter += 1 24 | if counter > 100: 25 | break 26 | continue 27 | 28 | counter = 0 29 | 30 | syslog.syslog(syslog.LOG_ALERT, _prefixed('INFO', line)) 31 | except KeyboardInterrupt: 32 | pass 33 | except IOError: 34 | # most likely a signal during readline 35 | pass 36 | -------------------------------------------------------------------------------- /qa/self/simple/second: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'` 4 | if [ "$ip" = "" ] 5 | then 6 | ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'` 7 | fi 8 | if [ "$ip" = "" ] 9 | then 10 | ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'` 11 | fi 12 | if [ "$ip" != "" ] 13 | then 14 | cat second.template | sed -e "s/IP/$ip/" > second.conf 15 | env exabgp.tcp.bind="$ip" exabgp.tcp.port=1790 ../../../sbin/exabgp second.conf $* 16 | else 17 | echo "get some IP somewhere on this machine please" 18 | fi 19 | -------------------------------------------------------------------------------- /qa/self/update/update-receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | env exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp -p -d update-receive.conf $* 4 | 5 | -------------------------------------------------------------------------------- /qa/self/update/update-receive.conf: -------------------------------------------------------------------------------- 1 | process stdout { 2 | encoder json; 3 | run "./update-receive.py"; 4 | } 5 | 6 | neighbor 82.219.212.34 { 7 | router-id 4.3.2.1; 8 | local-address 127.0.0.1; 9 | local-as 1; 10 | peer-as 1; 11 | passive; 12 | 13 | api listening { 14 | processes [ stdout ]; 15 | receive { 16 | parsed; 17 | update; 18 | } 19 | } 20 | flow { 21 | } 22 | static { 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /qa/self/update/update-receive.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | # When the parent dies we are seeing continual newlines, so we only access so many before stopping 6 | counter = 0 7 | 8 | while True: 9 | try: 10 | line = sys.stdin.readline().strip() 11 | if line == '': 12 | counter += 1 13 | if counter > 100: 14 | break 15 | continue 16 | 17 | counter = 0 18 | 19 | send = '\n%s %s %s\n' % ('-' * 10, line, '-' * 10) 20 | sys.stderr.write(f'{send}\n') 21 | sys.stderr.flush() 22 | except KeyboardInterrupt: 23 | pass 24 | except IOError: 25 | # most likely a signal during readline 26 | pass 27 | -------------------------------------------------------------------------------- /qa/self/update/update-send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | env exabgp.tcp.port=1790 ../../../sbin/exabgp -p -d update-send.conf $* 4 | -------------------------------------------------------------------------------- /qa/self/update/update-send.conf: -------------------------------------------------------------------------------- 1 | process operational-chatter { 2 | encoder json; 3 | run ./update-send.py; 4 | } 5 | 6 | process echo-chatter { 7 | encoder json; 8 | run ./update-receive.py; 9 | } 10 | 11 | neighbor 127.0.0.1 { 12 | router-id 1.2.3.4; 13 | local-address 82.219.212.34; 14 | local-as 1; 15 | peer-as 1; 16 | 17 | api speaking { 18 | processes [ operational-chatter ]; 19 | } 20 | api parroting { 21 | processes [ echo-chatter ]; 22 | send { 23 | parsed; 24 | update; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # ExaBGP dependencies are included in its code tree 2 | -------------------------------------------------------------------------------- /run/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/run/.empty -------------------------------------------------------------------------------- /service/bgp-service-ip/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec multilog s2500000 n20 ./main 3 | -------------------------------------------------------------------------------- /service/bgp-service-ip/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec nice --4 env PYTHONPATH=/opt/exabgp/src setuidgid nobody `which python` /opt/exabgp/src/exabgp/application/bgp.py /opt/exabgp/etc/exabgp/service-ip.txt 2>&1 3 | -------------------------------------------------------------------------------- /src/exabgp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/__init__.py -------------------------------------------------------------------------------- /src/exabgp/__main__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | if __name__ == '__main__': 4 | from exabgp.application.main import main 5 | 6 | main() 7 | -------------------------------------------------------------------------------- /src/exabgp/application/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/application/__init__.py -------------------------------------------------------------------------------- /src/exabgp/application/version.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | """exabgp current version""" 4 | 5 | from __future__ import annotations 6 | 7 | import sys 8 | import argparse 9 | import platform 10 | 11 | from exabgp.version import version, get_root 12 | 13 | 14 | def setargs(sub): 15 | # fmt:off 16 | pass 17 | # fmt:on 18 | 19 | 20 | def main(): 21 | parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__) 22 | setargs(parser) 23 | cmdline(parser.parse_args()) 24 | 25 | 26 | def cmdline(cmdarg): 27 | sys.stdout.write('ExaBGP : %s\n' % version) 28 | sys.stdout.write('Python : %s\n' % sys.version.replace('\n', ' ')) 29 | sys.stdout.write('Uname : %s\n' % ' '.join(platform.uname()[:5])) 30 | sys.stdout.write('From : %s\n' % get_root()) 31 | sys.stdout.flush() 32 | 33 | 34 | if __name__ == '__main__': 35 | main() 36 | -------------------------------------------------------------------------------- /src/exabgp/bgp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/bgp/__init__.py -------------------------------------------------------------------------------- /src/exabgp/bgp/message/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | update/__init__.py 4 | 5 | Created by Thomas Mangin on 2010-01-15. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | # Every Message should be imported from this file 11 | # as it makes sure that all the registering decorator are run 12 | 13 | # flake8: noqa: F401,E261 14 | 15 | from __future__ import annotations 16 | 17 | from exabgp.bgp.message.action import Action 18 | 19 | from exabgp.bgp.message.message import Message 20 | from exabgp.bgp.message.nop import NOP 21 | from exabgp.bgp.message.nop import _NOP 22 | from exabgp.bgp.message.open import Open 23 | from exabgp.bgp.message.update import Update 24 | from exabgp.bgp.message.update import EOR 25 | from exabgp.bgp.message.keepalive import KeepAlive 26 | from exabgp.bgp.message.notification import Notification 27 | from exabgp.bgp.message.notification import Notify 28 | from exabgp.bgp.message.operational import Operational 29 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/action.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | action.py 4 | 5 | Created by Thomas Mangin on 2022-05-19. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | # =================================================================== Direction 11 | # 12 | 13 | from __future__ import annotations 14 | 15 | from enum import IntEnum 16 | 17 | 18 | class Action(IntEnum): 19 | UNSET = 0x00 20 | ANNOUNCE = 0x01 21 | WITHDRAW = 0x02 22 | 23 | def __str__(self): 24 | return self.__format__('s') 25 | 26 | def __format__(self, what): 27 | if what == 's': 28 | if self is Action.ANNOUNCE: 29 | return 'announce' 30 | if self is Action.WITHDRAW: 31 | return 'withdraw' 32 | if self is Action.UNSET: 33 | return 'unset' 34 | return 'invalid' 35 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/direction.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | direction.py 4 | 5 | Created by Thomas Mangin on 2010-01-15. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | # =================================================================== Direction 11 | # 12 | 13 | from __future__ import annotations 14 | 15 | from enum import Enum 16 | 17 | 18 | class Direction(Enum): 19 | IN = 1 20 | OUT = 2 21 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/nop.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | nop.py 4 | 5 | Created by Thomas Mangin on 2009-11-06. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | from exabgp.bgp.message.message import Message 13 | 14 | # ========================================================================= NOP 15 | # 16 | 17 | 18 | class NOP(Message): 19 | ID = Message.CODE.NOP 20 | TYPE = bytes([Message.CODE.NOP]) 21 | 22 | def message(self, negotiated=None): 23 | raise RuntimeError('NOP messages can not be sent on the wire') 24 | 25 | def __str__(self): 26 | return 'NOP' 27 | 28 | @classmethod 29 | def unpack_message(cls, data, direction, negotiated): # pylint: disable=W0613 30 | return NOP() 31 | 32 | 33 | _NOP = NOP() 34 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/open/holdtime.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | holdtime.py 4 | 5 | Created by Thomas Mangin on 2012-07-17. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | from struct import pack 13 | 14 | # =================================================================== HoldTime 15 | 16 | 17 | class HoldTime(int): 18 | MAX = 0xFFFF 19 | 20 | def pack(self): 21 | return pack('!H', self) 22 | 23 | def keepalive(self): 24 | return int(self / 3) 25 | 26 | def __len__(self): 27 | return 2 28 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/open/routerid.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | routerid.py 4 | 5 | Created by Thomas Mangin on 2012-07-17. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | from exabgp.protocol.family import AFI 13 | from exabgp.protocol.ip import IPv4 14 | 15 | # ===================================================================== RouterID 16 | # 17 | 18 | 19 | class RouterID(IPv4): 20 | def __init__(self, ip, packed=None): 21 | if IPv4.toafi(ip) != AFI.ipv4: 22 | raise ValueError('wrong address family') 23 | IPv4.__init__(self, ip, packed) 24 | 25 | @classmethod 26 | def unpack(cls, data): # pylint: disable=W0221 27 | return cls('.'.join(str(_) for _ in data), data) 28 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/open/version.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | version.py 4 | 5 | Created by Thomas Mangin on 2012-07-17. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | 11 | class Version(int): 12 | def pack(self): 13 | return bytes([self]) 14 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/source.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | change.py 4 | 5 | Created by Thomas Mangin on 2022-10-28. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | 11 | class Source(object): 12 | UNSET = 0x00 13 | CONFIGURATION = 0x01 14 | API = 0x02 15 | NETWORK = 0x04 16 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/attribute/bgpls/link/admingroup.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | admingroup.py 4 | 5 | Created by Evelio Vila on 2016-12-01. 6 | Copyright (c) 2014-2017 Exa Networks. All rights reserved. 7 | """ 8 | 9 | from __future__ import annotations 10 | 11 | from struct import unpack 12 | 13 | from exabgp.bgp.message.update.attribute.bgpls.linkstate import LinkState 14 | from exabgp.bgp.message.update.attribute.bgpls.linkstate import BaseLS 15 | 16 | 17 | @LinkState.register() 18 | class AdminGroup(BaseLS): 19 | TLV = 1088 20 | REPR = 'Admin Group mask' 21 | JSON = 'admin-group-mask' 22 | LEN = 4 23 | 24 | @classmethod 25 | def unpack(cls, data): 26 | cls.check(data) 27 | return cls(unpack('!L', data[:4])[0]) 28 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/attribute/community/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | community.py 4 | 5 | Created by Thomas Mangin on 2009-11-05. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | # flake8: noqa: F401,E261 11 | 12 | from __future__ import annotations 13 | 14 | from exabgp.bgp.message.update.attribute.community.initial.community import Community 15 | from exabgp.bgp.message.update.attribute.community.initial.communities import Communities 16 | 17 | from exabgp.bgp.message.update.attribute.community.large.community import LargeCommunity 18 | from exabgp.bgp.message.update.attribute.community.large.communities import LargeCommunities 19 | 20 | from exabgp.bgp.message.update.attribute.community.extended.community import ExtendedCommunity 21 | from exabgp.bgp.message.update.attribute.community.extended.communities import ExtendedCommunities 22 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/attribute/sr/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | sr/__init__.py 4 | 5 | Created by Evelio Vila 2017-02-16 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | """ 8 | 9 | # draft-ietf-idr-bgp-prefix-sid 10 | 11 | # flake8: noqa: F401,E261 12 | 13 | from __future__ import annotations 14 | 15 | from exabgp.bgp.message.update.attribute.sr.prefixsid import PrefixSid 16 | from exabgp.bgp.message.update.attribute.sr.labelindex import SrLabelIndex 17 | from exabgp.bgp.message.update.attribute.sr.srgb import SrGb 18 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/attribute/sr/srv6/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | srv6/__init__.py 4 | 5 | Created by Ryoga Saito 2022-02-24 6 | Copyright (c) 2022 Ryoga Saito. All rights reserved. 7 | """ 8 | 9 | # draft-ietf-bess-srv6-services-11 10 | 11 | # flake8: noqa: F401,E261 12 | 13 | from __future__ import annotations 14 | 15 | from exabgp.bgp.message.update.attribute.sr.srv6.l2service import Srv6L2Service 16 | from exabgp.bgp.message.update.attribute.sr.srv6.l3service import Srv6L3Service 17 | from exabgp.bgp.message.update.attribute.sr.srv6.sidinformation import Srv6SidInformation 18 | from exabgp.bgp.message.update.attribute.sr.srv6.sidstructure import Srv6SidStructure 19 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/nlri/bgpls/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | bgpls/__init__.py 3 | 4 | Created by Evelio Vila on 2016-11-26. eveliovila@gmail.com 5 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 6 | License: 3-clause BSD. (See the COPYRIGHT file) 7 | """ 8 | 9 | # Every BGP LINK_STATE NLRI should be imported from this file 10 | # as it makes sure that all the registering decorator are run 11 | 12 | # flake8: noqa: F401,E261 13 | 14 | from __future__ import annotations 15 | 16 | from exabgp.bgp.message.update.nlri.bgpls.nlri import BGPLS 17 | 18 | from exabgp.bgp.message.update.nlri.bgpls.node import NODE 19 | from exabgp.bgp.message.update.nlri.bgpls.link import LINK 20 | from exabgp.bgp.message.update.nlri.bgpls.prefixv4 import PREFIXv4 21 | from exabgp.bgp.message.update.nlri.bgpls.prefixv6 import PREFIXv6 22 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/nlri/bgpls/tlvs/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | bgpls/tlvs/__init__.py 3 | 4 | Created by Evelio Vila on 2016-11-26. eveliovila@gmail.com 5 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 6 | License: 3-clause BSD. (See the COPYRIGHT file) 7 | """ 8 | 9 | # flake8: noqa: F401,E261 10 | 11 | from __future__ import annotations 12 | 13 | from exabgp.bgp.message.update.nlri.bgpls.tlvs.node import NodeDescriptor 14 | from exabgp.bgp.message.update.nlri.bgpls.tlvs.neighaddr import NeighAddr 15 | from exabgp.bgp.message.update.nlri.bgpls.tlvs.ifaceaddr import IfaceAddr 16 | from exabgp.bgp.message.update.nlri.bgpls.tlvs.linkid import LinkIdentifier 17 | from exabgp.bgp.message.update.nlri.bgpls.tlvs.ipreach import IpReach 18 | from exabgp.bgp.message.update.nlri.bgpls.tlvs.ospfroute import OspfRoute 19 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/nlri/evpn/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | evpn/__init__.py 3 | 4 | Created by Thomas Mangin on 2014-06-27. 5 | Copyright (c) 2014-2017 Orange. All rights reserved. 6 | License: 3-clause BSD. (See the COPYRIGHT file) 7 | """ 8 | 9 | # Every EVPN should be imported from this file 10 | # as it makes sure that all the registering decorator are run 11 | 12 | # flake8: noqa: F401,E261 13 | 14 | from __future__ import annotations 15 | 16 | from exabgp.bgp.message.update.nlri.evpn.nlri import EVPN 17 | 18 | from exabgp.bgp.message.update.nlri.evpn.ethernetad import EthernetAD 19 | from exabgp.bgp.message.update.nlri.evpn.mac import MAC 20 | from exabgp.bgp.message.update.nlri.evpn.multicast import Multicast 21 | from exabgp.bgp.message.update.nlri.evpn.segment import EthernetSegment 22 | from exabgp.bgp.message.update.nlri.evpn.prefix import Prefix 23 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/nlri/mup/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | mup/__init__.py 3 | 4 | Created by Takeru Hayasaka on 2023-01-21. 5 | Copyright (c) 2023 BBSakura Networks Inc. All rights reserved. 6 | """ 7 | 8 | # Every MUP should be imported from this file 9 | # as it makes sure that all the registering decorator are run 10 | 11 | # flake8: noqa: F401,E261 12 | 13 | from __future__ import annotations 14 | 15 | from exabgp.bgp.message.update.nlri.mup.nlri import MUP 16 | 17 | from exabgp.bgp.message.update.nlri.mup.isd import InterworkSegmentDiscoveryRoute 18 | from exabgp.bgp.message.update.nlri.mup.dsd import DirectSegmentDiscoveryRoute 19 | from exabgp.bgp.message.update.nlri.mup.t1st import Type1SessionTransformedRoute 20 | from exabgp.bgp.message.update.nlri.mup.t2st import Type2SessionTransformedRoute 21 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/nlri/mvpn/__init__.py: -------------------------------------------------------------------------------- 1 | # Every MVPN should be imported from this file 2 | # as it makes sure that all the registering decorator are run 3 | 4 | # flake8: noqa: F401,E261 5 | 6 | from __future__ import annotations 7 | 8 | from exabgp.bgp.message.update.nlri.mvpn.nlri import MVPN 9 | 10 | from exabgp.bgp.message.update.nlri.mvpn.sourcead import SourceAD 11 | from exabgp.bgp.message.update.nlri.mvpn.sourcejoin import SourceJoin 12 | from exabgp.bgp.message.update.nlri.mvpn.sharedjoin import SharedJoin 13 | -------------------------------------------------------------------------------- /src/exabgp/bgp/message/update/nlri/qualifier/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | qualifier/__init__.py 4 | 5 | Created by Thomas Mangin on 2015-06-01. 6 | Copyright (c) 2015-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | # Every Qualifier should be imported from this file 11 | 12 | # flake8: noqa: F401,E261 13 | 14 | from __future__ import annotations 15 | 16 | from exabgp.bgp.message.update.nlri.qualifier.esi import ESI 17 | from exabgp.bgp.message.update.nlri.qualifier.etag import EthernetTag 18 | from exabgp.bgp.message.update.nlri.qualifier.labels import Labels 19 | from exabgp.bgp.message.update.nlri.qualifier.mac import MAC 20 | from exabgp.bgp.message.update.nlri.qualifier.path import PathInfo 21 | from exabgp.bgp.message.update.nlri.qualifier.rd import RouteDistinguisher 22 | -------------------------------------------------------------------------------- /src/exabgp/cli/__init__.py: -------------------------------------------------------------------------------- 1 | class msg(dict): 2 | command = '[command]' 3 | help = '[help]' 4 | validation = '[validation]' 5 | 6 | _keys = [command, help, validation] 7 | 8 | def __init__(self): 9 | self[self.help] = '' 10 | self[self.command] = '' 11 | self[self.validation] = '' 12 | 13 | def __str__(self): 14 | return ' '.join(f'{k}:{self[k]}' for k in self._keys if self[k]) 15 | -------------------------------------------------------------------------------- /src/exabgp/conf/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | # from exabgp.conf.config import Config 4 | # from exabgp.conf.local import init_modules 5 | -------------------------------------------------------------------------------- /src/exabgp/conf/yang/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | yang/__init__.py 4 | 5 | Created by Thomas Mangin on 2020-09-01. 6 | Copyright (c) 2020 Exa Networks. All rights reserved. 7 | """ 8 | 9 | # from __future__ import annotations 10 | 11 | # from exabgp.conf.yang.model import Model 12 | # from exabgp.conf.yang.code import Code 13 | # from exabgp.conf.yang.tree import Parser 14 | 15 | # from exabgp.conf.yang.datatypes import kw 16 | -------------------------------------------------------------------------------- /src/exabgp/configuration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/configuration/__init__.py -------------------------------------------------------------------------------- /src/exabgp/configuration/core/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | core/__init__.py 4 | 5 | Created by Thomas Mangin on 2015-06-19. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | # flake8: noqa: F401,E261 11 | 12 | from __future__ import annotations 13 | 14 | from exabgp.configuration.core.error import Error 15 | from exabgp.configuration.core.scope import Scope 16 | from exabgp.configuration.core.section import Section 17 | from exabgp.configuration.core.tokeniser import Tokeniser 18 | -------------------------------------------------------------------------------- /src/exabgp/configuration/core/error.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import pdb 4 | 5 | from exabgp.environment import getenv 6 | 7 | 8 | class Error(Exception): 9 | def __init__(self): 10 | self.message = '' 11 | self.debug = getenv().debug.configuration 12 | 13 | def set(self, message): 14 | self.message = message 15 | if self.debug: 16 | error = False 17 | print('\n%s\n' % self.message) 18 | pdb.set_trace() 19 | return error 20 | return False 21 | 22 | def throw(self, message): 23 | self.message = message 24 | if self.debug: 25 | print('\n%s\n' % message) 26 | pdb.set_trace() 27 | else: 28 | raise self 29 | 30 | def clear(self): 31 | self.message = '' 32 | 33 | def __repr__(self): 34 | return self.message 35 | 36 | def __str__(self): 37 | return self.message 38 | -------------------------------------------------------------------------------- /src/exabgp/configuration/flow/scope.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | scope.py 4 | 5 | Created by Stephane Litkowski on 2017-02-24. 6 | """ 7 | 8 | from __future__ import annotations 9 | 10 | from exabgp.configuration.core import Section 11 | 12 | from exabgp.configuration.flow.parser import interface_set 13 | 14 | 15 | class ParseFlowScope(Section): 16 | definition = ['interface-set transitive:input:1234:1234'] 17 | 18 | syntax = 'scope {\n %s;\n}' % ';\n '.join(definition) 19 | 20 | known = { 21 | 'interface-set': interface_set, 22 | } 23 | 24 | # 'community','extended-community' 25 | 26 | action = { 27 | 'interface-set': 'attribute-add', 28 | } 29 | 30 | name = 'flow/scope' 31 | 32 | def __init__(self, tokeniser, scope, error): 33 | Section.__init__(self, tokeniser, scope, error) 34 | 35 | def clear(self): 36 | pass 37 | 38 | def pre(self): 39 | return True 40 | 41 | def post(self): 42 | return True 43 | -------------------------------------------------------------------------------- /src/exabgp/configuration/template/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | template.py 4 | 5 | Created by Thomas Mangin on 2015-06-16. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | from exabgp.configuration.core import Section 13 | 14 | 15 | class ParseTemplate(Section): 16 | syntax = '' 17 | 18 | name = 'template' 19 | 20 | def __init__(self, tokeniser, scope, error): 21 | Section.__init__(self, tokeniser, scope, error) 22 | 23 | def clear(self): 24 | self._names = [] 25 | 26 | def pre(self): 27 | return True 28 | 29 | def post(self): 30 | return True 31 | -------------------------------------------------------------------------------- /src/exabgp/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/data/__init__.py -------------------------------------------------------------------------------- /src/exabgp/debug/intercept.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | debug.py 4 | 5 | Created by Thomas Mangin on 2011-03-29. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | import os 13 | import sys 14 | import pdb 15 | 16 | from exabgp.debug.report import format_panic 17 | 18 | 19 | def bug_report(dtype, value, trace): 20 | sys.stdout.flush() 21 | sys.stderr.flush() 22 | print(format_panic(dtype, value, trace)) 23 | sys.stdout.flush() 24 | 25 | 26 | def intercept(dtype, value, trace): 27 | bug_report(dtype, value, trace) 28 | if os.environ.get('PDB', None) not in [None, '0', '']: 29 | pdb.pm() 30 | 31 | 32 | def trace_interceptor(with_pdb): 33 | if with_pdb: 34 | os.environ['PDB'] = '1' 35 | sys.excepthook = intercept 36 | -------------------------------------------------------------------------------- /src/exabgp/environment/base.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import os 4 | import sys 5 | 6 | 7 | def _find_root(): 8 | app_folder = 'src/exabgp/application' 9 | root = os.environ.get('EXABGP_ROOT', '') 10 | 11 | if not root: 12 | root = os.path.dirname(sys.argv[0]) 13 | root = os.path.normpath(os.path.abspath((root))) 14 | 15 | if root.endswith('/bin') or root.endswith('/sbin'): 16 | root = os.path.normpath(os.path.join(root, '..')) 17 | 18 | _index = root.find(app_folder) 19 | if _index >= 0: 20 | root = root[:_index] 21 | 22 | if root.endswith('/'): 23 | root = root[:-1] 24 | 25 | return root 26 | 27 | 28 | APPLICATION = 'exabgp' 29 | ROOT = _find_root() 30 | ETC = os.path.join(ROOT, 'etc', APPLICATION) 31 | ENVFILE = os.path.join(ETC, f'{APPLICATION}.env') 32 | -------------------------------------------------------------------------------- /src/exabgp/environment/hashtable.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | hashtable.py 4 | 5 | Created by Thomas Mangin on 2009-09-06. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | 11 | def _(key): 12 | return key.replace('_', '-') 13 | 14 | 15 | class HashTable(dict): 16 | def __getitem__(self, key): 17 | return dict.__getitem__(self, _(key)) 18 | 19 | def __setitem__(self, key, value): 20 | return dict.__setitem__(self, _(key), value) 21 | 22 | def __getattr__(self, key): 23 | return dict.__getitem__(self, _(key)) 24 | 25 | def __setattr__(self, key, value): 26 | return dict.__setitem__(self, _(key), value) 27 | 28 | 29 | class GlobalHashTable(HashTable): 30 | _instance = None 31 | 32 | def __new__(cls): 33 | if cls._instance is None: 34 | cls._instance = super(GlobalHashTable, cls).__new__(cls) 35 | return cls._instance 36 | -------------------------------------------------------------------------------- /src/exabgp/logger/color.py: -------------------------------------------------------------------------------- 1 | # 'FATAL CRITICAL ERROR WARNING INFO DEBUG NOTSET' 2 | _RECORD = { 3 | 'FATAL': '\033[00;31m', # Strong Red 4 | 'CRITICAL': '\033[00;31m', # Strong Red 5 | 'ERROR': '\033[01;31m', # Red 6 | 'WARNING': '\033[01;33m', # Yellow 7 | 'INFO': '\033[01;32m', # Green 8 | 'DEBUG': '', 9 | 'NOTSET': '\033[01;34m', # Blue 10 | } 11 | 12 | _MESSAGE = { 13 | 'FATAL': '\033[1m', 14 | 'CRITICAL': '', 15 | 'ERROR': '\033[1m', 16 | 'WARNING': '\033[1m', 17 | 'INFO': '\033[1m', 18 | 'DEBUG': '', 19 | 'NOTSET': '', 20 | } 21 | 22 | _END = '\033[0m' 23 | 24 | 25 | def source(level, message): 26 | color = _RECORD.get(level, '') 27 | if color: 28 | return f'{color}{message:<15}{_END}' 29 | return message 30 | 31 | 32 | def message(level, message): 33 | color = _MESSAGE.get(level, '') 34 | if color: 35 | return f'{color}{message:<8}{_END}' 36 | return message 37 | -------------------------------------------------------------------------------- /src/exabgp/logger/history.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from collections import deque 4 | 5 | from exabgp.logger.format import _long_color_formater as formater 6 | 7 | _history = deque() 8 | _max_history = 20 9 | 10 | 11 | def history(): 12 | return '\n'.join(formater(*_) for _ in _history) 13 | 14 | 15 | def record(message, source, level, timestamp): 16 | if len(_history) > _max_history: 17 | _history.popleft() 18 | _history.append((message, source, level, timestamp)) 19 | -------------------------------------------------------------------------------- /src/exabgp/logger/tty.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import sys 4 | 5 | 6 | def _istty(std): 7 | try: 8 | return std.isatty() 9 | except Exception: 10 | return False 11 | 12 | 13 | _std = { 14 | 'stderr': sys.stderr, 15 | 'stdout': sys.stdout, 16 | 'out': sys.stdout, 17 | } 18 | 19 | 20 | def istty(std): 21 | return _istty(_std[std]) 22 | -------------------------------------------------------------------------------- /src/exabgp/netlink/route/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from exabgp.netlink import NetLinkError 4 | 5 | 6 | class NetLinkRouteError(NetLinkError): 7 | pass 8 | -------------------------------------------------------------------------------- /src/exabgp/netlink/sequence.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | sequence.py 4 | 5 | Created by Thomas Mangin on 2015-03-31. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from typing import Dict 11 | 12 | class Sequence(int): 13 | _instance: Dict[str, int] = dict() 14 | 15 | def __new__(cls): 16 | cls._instance['next'] = cls._instance.get('next', 0) + 1 17 | return cls._instance['next'] 18 | -------------------------------------------------------------------------------- /src/exabgp/protocol/ip/tcp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/protocol/ip/tcp/__init__.py -------------------------------------------------------------------------------- /src/exabgp/protocol/iso/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | iso 4 | 5 | Created by Evelio Vila on 2016-11-26. eveliovila@gmail.com 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | """ 8 | 9 | from __future__ import annotations 10 | 11 | 12 | # =========================================================================== ISO 13 | # 14 | 15 | 16 | class ISO(object): 17 | def __init__(self, sysid, selector=None, area_id=None, afi=49): 18 | self.sysid = sysid 19 | self.area_id = area_id 20 | self.selector = selector 21 | self.afi = afi 22 | 23 | @classmethod 24 | def unpack_sysid(cls, data): 25 | return data.hex() 26 | 27 | def json(self, compact=None): 28 | return self.sysid 29 | -------------------------------------------------------------------------------- /src/exabgp/reactor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/reactor/__init__.py -------------------------------------------------------------------------------- /src/exabgp/reactor/api/command/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from exabgp.reactor.api.command.command import Command # noqa: F401,E261 4 | 5 | from exabgp.reactor.api.command.reactor import register_reactor 6 | from exabgp.reactor.api.command.neighbor import register_neighbor 7 | from exabgp.reactor.api.command.announce import register_announce 8 | from exabgp.reactor.api.command.rib import register_rib 9 | from exabgp.reactor.api.command.watchdog import register_watchdog 10 | 11 | register_reactor() 12 | register_neighbor() 13 | register_announce() 14 | register_rib() 15 | register_watchdog() 16 | -------------------------------------------------------------------------------- /src/exabgp/reactor/api/response/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | 4 | class Response(object): 5 | from exabgp.reactor.api.response.text import Text 6 | from exabgp.reactor.api.response.json import JSON 7 | -------------------------------------------------------------------------------- /src/exabgp/reactor/api/response/answer.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | 4 | class Answer: 5 | text_error = 'error' 6 | json_error = '{ "answer": "error", "message": "this command does not support json output" }' 7 | text_done = 'done' 8 | json_done = '{ "answer": "done", "message": "command completed" }' 9 | text_shutdown = 'shutdown' 10 | json_shutdown = '{ "answer": "shutdown", "message": "exbgp exited" }' 11 | 12 | text_buffer_size = max(len(text_error), len(text_done), len(text_shutdown)) 13 | json_buffer_size = max(len(json_error), len(json_done), len(json_shutdown)) 14 | buffer_size = max(text_buffer_size, json_buffer_size) 15 | -------------------------------------------------------------------------------- /src/exabgp/reactor/delay.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | delay.py 4 | 5 | Created by Thomas Mangin on 2009-08-25. 6 | Copyright (c) 2017-2017 Exa Networks. All rights reserved. 7 | """ 8 | 9 | from __future__ import annotations 10 | 11 | import time 12 | 13 | 14 | # ======================================================================== Delay 15 | # Exponential backup for outgoing connection 16 | 17 | 18 | class Delay(object): 19 | def __init__(self): 20 | self._time = time.time() 21 | self._next = 0 22 | 23 | def reset(self): 24 | self._time = time.time() 25 | self._next = 0 26 | 27 | def increase(self): 28 | self._time = time.time() + self._next 29 | self._next = min(int(1 + self._next * 1.2), 60) 30 | 31 | def backoff(self): 32 | return time.time() <= self._time 33 | -------------------------------------------------------------------------------- /src/exabgp/reactor/network/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/reactor/network/__init__.py -------------------------------------------------------------------------------- /src/exabgp/rib/incoming.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | store.py 4 | 5 | Created by Thomas Mangin on 2009-11-05. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | from exabgp.rib.cache import Cache 13 | 14 | 15 | class IncomingRIB(Cache): 16 | def __init__(self, cache, families): 17 | Cache.__init__(self, cache, families) 18 | 19 | # back to square one, all the routes are removed 20 | def clear(self): 21 | self.clear_cache() 22 | 23 | def reset(self): 24 | pass 25 | -------------------------------------------------------------------------------- /src/exabgp/util/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | __init__.py 4 | 5 | Created by Thomas Mangin on 2015-05-15. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | import string 13 | 14 | 15 | def hexstring(value): 16 | def spaced(value): 17 | for v in value: 18 | yield '%02X' % v 19 | 20 | return '0x' + ''.join(spaced(value)) 21 | 22 | 23 | def hexbytes(value): 24 | return bytes(hexstring(str(value, 'ascii')), 'ascii') 25 | 26 | 27 | def string_is_hex(s): 28 | if s[:2].lower() != '0x': 29 | return False 30 | if len(s) <= 2: 31 | return False 32 | return all(c in string.hexdigits for c in s[2:]) 33 | 34 | 35 | def split(data, step): 36 | return (data[i : i + step] for i in range(0, len(data), step)) 37 | -------------------------------------------------------------------------------- /src/exabgp/util/coroutine.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | coroutine.py 4 | 5 | Created by Thomas Mangin on 2013-07-01. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | from functools import wraps 13 | 14 | 15 | def each(function): 16 | @wraps(function) 17 | def start(*args, **kwargs): 18 | generator = function(*args, **kwargs) 19 | return lambda: next(generator) # noqa 20 | 21 | return start 22 | 23 | 24 | def join(function): 25 | @wraps(function) 26 | def start(*args, **kwargs): 27 | return ''.join(function(*args, **kwargs)) 28 | 29 | return start 30 | -------------------------------------------------------------------------------- /src/exabgp/util/dictionary.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | dictionary.py 4 | 5 | Created by Thomas Mangin on 2015-01-17. 6 | Copyright (c) 2014-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | from collections import defaultdict 13 | 14 | 15 | # ===================================================================== dictdict 16 | # an Hardcoded defaultdict with dict as method 17 | 18 | 19 | class Dictionary(defaultdict): 20 | def __init__(self): 21 | self.default_factory = dict 22 | -------------------------------------------------------------------------------- /src/exabgp/util/enumeration.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | enumeration.py 4 | 5 | Created by Thomas Mangin on 2013-03-18. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | 13 | # int are immutable once created: can not set ._str in __init__ 14 | class _integer(int): 15 | def __str__(self): 16 | return self._str 17 | 18 | 19 | class Enumeration(object): 20 | def __init__(self, *names): 21 | for number, name in enumerate(names): 22 | # doing the .parent thing here instead 23 | number = _integer(pow(2, number)) 24 | number._str = name 25 | setattr(self, name, number) 26 | 27 | 28 | # Taken from Vincent Bernat 29 | def enum(*sequential): 30 | return type(str('Enum'), (), dict(zip(sequential, sequential))) 31 | -------------------------------------------------------------------------------- /src/exabgp/util/errstr.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | errstr.py 4 | 5 | Created by Thomas Mangin on 2011-03-29. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | import errno 13 | 14 | 15 | def errstr(exc): 16 | try: 17 | code = exc.args[0] if exc.args else exc.errno 18 | return '[Errno %s] %s' % (errno.errorcode.get(code, str(code)), str(exc)) 19 | except KeyError: 20 | return '[Errno unknown (key)] %s' % str(exc) 21 | except AttributeError: 22 | return '[Errno unknown (attr)] %s' % str(exc) 23 | -------------------------------------------------------------------------------- /src/exabgp/util/ip.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | ip.py 4 | 5 | Created by Thomas Mangin on 2009-09-12. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | import socket 13 | 14 | 15 | def isipv4(address): 16 | try: 17 | socket.inet_pton(socket.AF_INET, address) 18 | return True 19 | except socket.error: 20 | return False 21 | 22 | 23 | def isipv6(address): 24 | try: 25 | socket.inet_pton(socket.AF_INET6, address) 26 | return True 27 | except socket.error: 28 | return False 29 | 30 | 31 | def isip(address): 32 | return isipv4(address) or isipv6(address) 33 | -------------------------------------------------------------------------------- /src/exabgp/util/od.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | od.py 4 | 5 | Created by Thomas Mangin on 2009-09-06. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | 11 | def od(value): 12 | def spaced(value): 13 | even = None 14 | for v in value: 15 | if even is False: 16 | yield ' ' 17 | yield '%02X' % v 18 | even = not even 19 | 20 | return ''.join(spaced(value)) 21 | -------------------------------------------------------------------------------- /src/exabgp/util/usage.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | usage.py 4 | 5 | Created by Thomas Mangin on 2009-09-06. 6 | Copyright (c) 2009-2017 Exa Networks. All rights reserved. 7 | License: 3-clause BSD. (See the COPYRIGHT file) 8 | """ 9 | 10 | from __future__ import annotations 11 | 12 | import sys 13 | import resource 14 | 15 | 16 | if sys.platform == 'darwin': 17 | # darwin returns bytes 18 | DIVISOR = 1024.0 * 1024.0 19 | else: 20 | # other OS (AFAIK) return a number of pages 21 | DIVISOR = 1024.0 * 1024.0 / resource.getpagesize() 22 | 23 | 24 | def usage(label='usage'): 25 | rusage = resource.getrusage(resource.RUSAGE_SELF) 26 | return '%s: usertime=%s systime=%s mem=%s mb' % ( 27 | label, 28 | rusage.ru_utime, 29 | rusage.ru_stime, 30 | (rusage.ru_maxrss / DIVISOR), 31 | ) 32 | -------------------------------------------------------------------------------- /src/exabgp/vendoring/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Exa-Networks/exabgp/c272d3c845b51d861ebe66ab692a717d900626f4/src/exabgp/vendoring/__init__.py --------------------------------------------------------------------------------