FastNetMon has complete support for GoBGP for BGP announce and includes compatible GoBGP in our official packages.
NB! For FastNetMon Advanced edition please use this guide instead.
We have following configuration options for GoBGP in /etc/fastnetmon.conf:
gobgp = on gobgp_next_hop = 1.2.3.4 gobgp_announce_host = on gobgp_announce_whole_subnet = off gobgp_community_host = 65001:666 gobgp_community_subnet = 65001:777 # Configuration for IPv6 announces gobgp_next_hop_ipv6 = 100::1 gobgp_next_hop_host_ipv6 = 100::1 gobgp_next_hop_subnet_ipv6 = 100::1 gobgp_announce_host_ipv6 = on # Not supported yet gobgp_announce_whole_subnet_ipv6 = off gobgp_community_host_ipv6 = 65001:666 gobgp_community_subnet_ipv6 = 65001:777
To establish BGP session with your network equipment you need to create configuration for GoBGP in /etc/gobgpd.conf file:
[global.config] as = 65001 router-id = "192.168.1.134" [[neighbors]] [neighbors.config] neighbor-address = "192.168.1.188" peer-as = 65001 [neighbors.ebgp-multihop.config] enabled = true [[neighbors.afi-safis]] [neighbors.afi-safis.config] afi-safi-name = "ipv4-unicast" [[neighbors.afi-safis]] [neighbors.afi-safis.config] afi-safi-name = "ipv6-unicast" [neighbors.transport.config] local-address = "192.168.1.134"
Run it:
sudo /opt/fastnetmon-community/libraries/gobgp_3_12_0/gobgpd -f /etc/gobgpd.conf
After that, you will see following log message when BGP session was established successfully:
{"Key":"192.168.1.188","State":"BGP_FSM_OPENCONFIRM","Topic":"Peer","level":"info","msg":"Peer Up","time":"2020-05-24T14:42:12+01:00"}
You may check neighbor’s status this way:
/opt/fastnetmon-community/libraries/gobgp_3_12_0/gobgp nei 192.168.1.188
Example output:
BGP neighbor is 192.168.1.188, remote AS 65001 BGP version 4, remote router ID 192.168.1.188 BGP state = ESTABLISHED, up for 00:01:24 BGP OutQ = 0, Flops = 0 Hold time is 90, keepalive interval is 30 seconds Configured hold time is 90, keepalive interval is 30 seconds Neighbor capabilities: multiprotocol: ipv4-unicast: advertised and received ipv6-unicast: received route-refresh: advertised and received 4-octet-as: advertised and received Message statistics: Sent Rcvd Opens: 1 1 Notifications: 0 0 Updates: 0 0 Keepalives: 3 4 Route Refresh: 0 0 Discarded: 0 0 Total: 4 5 Route statistics: Advertised: 0 Received: 0 Accepted: 0
Check announced routes:
/opt/fastnetmon-community/libraries/gobgp_3_12_0/gobgp global rib Network Next Hop AS_PATH Age Attrs *> 192.168.1.1/32 0.0.0.0 00:00:08 [{Origin: ?}]
Announce custom route:
/opt/fastnetmon-community/libraries/gobgp_3_12_0/gobgp global rib add 10.33.0.0/32 -a ipv4
Withdraw route:
/opt/fastnetmon-community/libraries/gobgp_3_12_0/gobgp global rib del 10.33.0.0/32 -a ipv4
To control BGP announces directly from FastNetMon you may consider using command line tool.