bgp

package
v0.0.0-...-a9890c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 10 Imported by: 0

README

Example

Running GoBGP in standalone (sudo) gobgpd -f ./reflector.yaml

global:
  config:
    as: 65000
    router-id: 192.168.122.1
    local-address-list:
      - 192.168.122.1
peer-groups:
  - config:
      peer-group-name: l2vpn
    afi-safis:
      - config:
          afi-safi-name: l2vpn-evpn
    route-reflector:
      config:
        route-reflector-client: true
        route-reflector-cluster-id: 192.168.122.1
dynamic-neighbors:
  - config:
      peer-group: l2vpn
      prefix: 192.168.122.0/24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EVPNController

type EVPNController struct {
	// contains filtered or unexported fields
}

EVPNController contains a small gobgp server to advertise communities and routes between subnets

func NewEVPNController

func NewEVPNController(rID net.IP, peers []string) (*EVPNController, error)

NewEVPNController inits a new BGP server. rID must match VTEP pub ip

func (*EVPNController) AddPeer

func (rbgp *EVPNController) AddPeer(addr string) error

AddPeer adds a bgp neighbor with l2vpn-evpn capabilities

func (*EVPNController) BroadcastEndpoints

func (rbgp *EVPNController) BroadcastEndpoints(vni uint32) ([]net.IP, error)

BroadcastEndpoints adds all known vteps for a given VNI to the VTEP FDB for broadcast traffic

func (*EVPNController) DeregisterEP

func (rbgp *EVPNController) DeregisterEP(vni uint32) error

DeregisterEP removes the Type-3 EVPN route to the VTEP

func (*EVPNController) DeregisterMacIP

func (rbgp *EVPNController) DeregisterMacIP(vni uint32, vlan uint32, mac net.HardwareAddr, ip net.IP) error

DeregisterMacIP removes the Type-2 EVPN route to a local mac/ip

func (*EVPNController) LookupIP

func (rbgp *EVPNController) LookupIP(vni uint32, vlan uint16, ip net.IP) (net.HardwareAddr, net.IP, error)

LookupIP resolve l3 requests from bridge

func (*EVPNController) LookupMac

func (rbgp *EVPNController) LookupMac(vni uint32, mac net.HardwareAddr) (net.IP, error)

LookupMac resolves l2 requets for VTEP forwarding

func (*EVPNController) RegisterEP

func (rbgp *EVPNController) RegisterEP(vni uint32) error

RegisterEP adds a Type-3 EVPN route to the VTEP

func (*EVPNController) RegisterMacIP

func (rbgp *EVPNController) RegisterMacIP(vni uint32, vlan uint32, mac net.HardwareAddr, ip net.IP) error

RegisterMacIP adds a Type-2 EVPN route to a local mac/ip

func (*EVPNController) Start

func (rbgp *EVPNController) Start() error

Start begins the bgp session and start advertising

func (*EVPNController) Stop

func (rbgp *EVPNController) Stop()

Stop stops all bgp sessions and terminates the bgp speaker

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL