BGP Network Origination Plugin

The bgp.originate plugin modifies the way netlab implements the origination of BGP prefixes.

The BGP Configuration Module configures static routes to the Null interface to originate additional IPv4 prefixes specified in the bgp.originate attribute. Without this plugin, that attribute cannot contain IPv6 prefixes.

This plugin recognizes IPv4 and IPv6 prefixes in the bgp.originate node attribute and creates a loopback interface for every originated prefix, replacing the static routes that would be generated by the BGP module[1]. The loopback interface gets the first IP address in the advertised prefix.

The plugin works with all platforms supporting the BGP Configuration Module and loopback interfaces.

Modified attributes

Meaning

bgp.originate (node)

A list of IPv4 or IPv6 prefixes to originate

Example

In the following topology, R1 originates four prefixes – its loopback IP address, the stub prefix, and the two prefixes (an IPv4 and an IPv6 prefix) specified in the bgp.originate list.

defaults.device: eos

module: [ bgp ]
bgp.as: 65000
plugin: [ bgp.originate ]

nodes:
  r1:
    bgp.originate:
    - 172.16.17.0/28
    - 2000:db8:cafe::0/96

links: [ r1 ]

The BGP ASN report displays all four advertised prefixes:

Node/ASN

Router ID

Advertised prefixes

AS65000

r1

10.0.0.1

10.0.0.1/32
172.16.0.0/24
172.16.17.0/28
2000:db8:cafe::/96

You can see the loopback interfaces bgp.originate creates during the netlab create process with the addressing report:

Node/Interface

IPv4 Address

IPv6 Address

Description

r1

10.0.0.1/32

Loopback

Ethernet1

172.16.0.1/24

r1 -> stub

Loopback1

172.16.17.1/28

BGP originate #1

Loopback2

2000:db8:cafe::1/96

BGP originate #2