README

NAME

Net::BGP - BGP Server Support

SYNOPSIS

use Net::BGP

my $bgp = Net::BGP.new( port => 179 );  # Create a server object

DESCRIPTION

This provides framework to support the BGP protocol within a Raku application.

This is a pre-release of the final version, and as such the interface may change. The best way of seeing how this module works is to look at bin/bgpmon.pl6 and examining it. If you are interested in using this module, and have any suggestions at all, please let me know!

ATTRIBUTES

port

The port attribute defaults to 179 (the IETF assigned port default), but can be set to any value between 0 and 65535. It can also be set to Nil, meaning that it will be an ephimeral port that will be set once the listener is started.

listen-host

The host to listen on (defaults to the IPv4 any-host IP, 0.0.0.0).

server-channel

Returns the channel communicate to command the BGP server process. This will not be defined until listen() is executed. It is intended that user code will send messages to the BGP server.

user-channel

Returns the channel communicate for the BGP server process to communicate to user code.

add-unknown-peers

If this is True (default is False), connections from unknown peers are allowed. When they first connect, a new peer is added to the peer list using the remote address and the ASN sent in the peer's OPEN message.

METHODS

listen

$bgp.listen();

Starts BGP listener, on the port provided in the port attribute.

For a given instance of the BGP class, only one listener can be active at any point in time.

peer-add

$bgp.peer-add(
              :peer-asn(65001),
              :peer-ip("192.0.2.1"),
              :peer-port(179),
              :passive(False),
              :ipv4(True),
              :ipv6(False),
              :md5($key),
);

Add a new peer to the BGP server.

Providing peer-asn and peer-ip is required. However, if the peer-port is not provided, 179 will be used. If passive is not used, the connection will not be configured as a passive connection. If ipv4 is not provided, it defaults to True (enabling the IPv4 address family), while ipv6 defaults to False (disabling the IPv6 address family). If an md5 parameter is provided, this is used to set up MD5 associations (on OSes that support this via the TCP::LowLevel module).

PATRONS

Mythic Beasts, a managed and unmanaged VPS, dedicated server, web and email hosting company (among many other services) generously donated the use of a VPS host with IPv4 and IPv6 BGP feeds for the development of this module. Check them out at https://www.mythic-beasts.com/.

AUTHOR

Joelle Maslak [email protected]

COPYRIGHT AND LICENSE

Copyright Ā© 2018-2020 Joelle Maslak

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Net::BGP v0.9.0

BGP Server Support

Authors

  • Joelle Maslak

License

Artistic-2.0

Dependencies

ifDateTime::MonotonicDigestNativeHelpers::BlobOO::MonitorsStrictClassSys::DomainnameSys::HostAddrTCP::LowLevelTerminal::ANSIColor

Test Dependencies

Provides

  • Net::BGP
  • Net::BGP::AFI
  • Net::BGP::AFI-SAFI
  • Net::BGP::AS-List
  • Net::BGP::CIDR
  • Net::BGP::Capability
  • Net::BGP::Capability::ASN32
  • Net::BGP::Capability::Deprecated-Dynamic-Capability
  • Net::BGP::Capability::FQDN
  • Net::BGP::Capability::Generic
  • Net::BGP::Capability::Graceful-Restart
  • Net::BGP::Capability::Graceful-Restart::Per-AF
  • Net::BGP::Capability::MPBGP
  • Net::BGP::Capability::Route-Refresh
  • Net::BGP::Capability::Route-Refresh-Cisco
  • Net::BGP::Command
  • Net::BGP::Command::BGP-Message
  • Net::BGP::Command::Dead-Child
  • Net::BGP::Command::Stop
  • Net::BGP::Connection
  • Net::BGP::Connection-List
  • Net::BGP::Connection-Role
  • Net::BGP::Controller
  • Net::BGP::Controller-Handle-BGP
  • Net::BGP::Conversions
  • Net::BGP::Conversions-Post201812
  • Net::BGP::Conversions-Pre201812
  • Net::BGP::Error
  • Net::BGP::Error::Bad-Option-Length
  • Net::BGP::Error::Bad-Parameter-Length
  • Net::BGP::Error::Hold-Time-Too-Short
  • Net::BGP::Error::Length-Too-Long
  • Net::BGP::Error::Length-Too-Short
  • Net::BGP::Error::Marker-Format
  • Net::BGP::Error::Unknown-Version
  • Net::BGP::Event
  • Net::BGP::Event::BGP-Message
  • Net::BGP::Event::Closed-Connection
  • Net::BGP::Event::New-Connection
  • Net::BGP::IP
  • Net::BGP::Message
  • Net::BGP::Message::Generic
  • Net::BGP::Message::Keep-Alive
  • Net::BGP::Message::Notify
  • Net::BGP::Message::Notify::Cease
  • Net::BGP::Message::Notify::Cease::Administrative-Reset
  • Net::BGP::Message::Notify::Cease::Administrative-Shutdown
  • Net::BGP::Message::Notify::Cease::Connection-Rejected
  • Net::BGP::Message::Notify::Cease::Generic
  • Net::BGP::Message::Notify::Cease::Peer-Deconfigured
  • Net::BGP::Message::Notify::Generic
  • Net::BGP::Message::Notify::Header
  • Net::BGP::Message::Notify::Header::Connection-Not-Syncronized
  • Net::BGP::Message::Notify::Header::Generic
  • Net::BGP::Message::Notify::Hold-Timer-Expired
  • Net::BGP::Message::Notify::Open
  • Net::BGP::Message::Notify::Open::Bad-Peer-AS
  • Net::BGP::Message::Notify::Open::Generic
  • Net::BGP::Message::Notify::Open::Unsupported-Optional-Parameter
  • Net::BGP::Message::Notify::Open::Unsupported-Version
  • Net::BGP::Message::Open
  • Net::BGP::Message::Update
  • Net::BGP::Parameter
  • Net::BGP::Parameter::Capabilities
  • Net::BGP::Parameter::Generic
  • Net::BGP::Path-Attribute
  • Net::BGP::Path-Attribute::AS-Path
  • Net::BGP::Path-Attribute::AS4-Aggregator
  • Net::BGP::Path-Attribute::AS4-Path
  • Net::BGP::Path-Attribute::Aggregator
  • Net::BGP::Path-Attribute::Atomic-Aggregate
  • Net::BGP::Path-Attribute::Cluster-List
  • Net::BGP::Path-Attribute::Community
  • Net::BGP::Path-Attribute::Extended-Community
  • Net::BGP::Path-Attribute::Generic
  • Net::BGP::Path-Attribute::Local-Pref
  • Net::BGP::Path-Attribute::Long-Community
  • Net::BGP::Path-Attribute::MED
  • Net::BGP::Path-Attribute::MP-NLRI
  • Net::BGP::Path-Attribute::MP-Unreachable
  • Net::BGP::Path-Attribute::Next-Hop
  • Net::BGP::Path-Attribute::Origin
  • Net::BGP::Path-Attribute::Originator-ID
  • Net::BGP::Peer
  • Net::BGP::Peer-List
  • Net::BGP::SAFI
  • Net::BGP::Speaker
  • Net::BGP::Speaker::Display
  • Net::BGP::Time
  • Net::BGP::Validation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.