github.com/osrg/gobgp@v2.0.0+incompatible/docs/sources/zebra.md (about) 1 # FIB manipulation 2 3 This page explains how to perform FIB manipulation; kernel routing 4 table updates, interface lookups, and redistribution of routes between 5 different routing protocols. GoBGP uses zebra included in 6 [Quagga](http://www.nongnu.org/quagga/) or [FRRouting](https://frrouting.org/). 7 8 ## Prerequisites 9 10 Assume you finished [Getting Started](getting-started.md) 11 and installing Quagga or FRRouting on the same host with GoBGP. 12 13 **Note:** For the integration with FRRouting, ONLY version 3.0.x is supported, 14 because the API (using Zebra protocol) of FRRouging is updated so fast and its 15 backward compatibility is not been kept. 16 17 ## Contents 18 19 - [Configuration](#configuration) 20 - [Check routes from zebra](#check-routes-from-zebra) 21 22 ## Configuration 23 24 You need to enable the zebra feature in the Global configuration as follows. 25 26 ```toml 27 [zebra] 28 [zebra.config] 29 enabled = true 30 url = "unix:/var/run/quagga/zserv.api" 31 redistribute-route-type-list = ["connect"] 32 version = 2 33 ``` 34 35 - `url` specifies the path to the unix domain socket or the TCP port for 36 connecting to Zebra API. 37 If omitted, GoBGP will use `"unix:/var/run/quagga/zserv.api"` by the default. 38 Please note that with FRRouting, the path to the unix domain socket would be 39 like `"unix:/var/run/frr/zserv.api"`. 40 To specify the TCP port, `url` value would be like `"tcp:192.168.24.1:2600"`. 41 42 - `redistribute-route-type-list` specifies which route types you want to 43 receive from Zebra daemon. 44 For example, with `["connect"]`, GoBGP will receive the connected routes and 45 redistribute them. 46 47 - `version` specifies Zebra API version. 48 `2` is the version used by Quagga on Ubuntu 16.04 LTS. 49 To enable the Next-Hop Tracking features, please specify `3` or later. 50 For connecting to FRRouting, please specify `4`. 51 52 ## Check Routes from zebra 53 54 Zebra has 3 connected routes in this example's environment. 55 56 - 172.16.1.100/30 57 - 172.16.6.100/30 58 - 192.168.31.0/24 59 60 Let's check these routes with GoBGP cli. 61 62 ```bash 63 $ gobgp global rib 64 Network Next Hop AS_PATH Age Attrs 65 *> 172.16.1.100/30 0.0.0.0 00:00:02 [{Origin: i} {Med: 1}] 66 *> 172.16.6.100/30 0.0.0.0 00:00:02 [{Origin: i} {Med: 1}] 67 *> 192.168.31.0/24 0.0.0.0 00:00:02 [{Origin: i} {Med: 1}] 68 ``` 69 70 You can see connected routes stored in the GoBGP global rib.