github.com/osrg/gobgp/v3@v3.30.0/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, version 3.0.x (Zebra API 14 version 4), 5.0.x (Zebra API version 5), and 8.1.x (Zebra API version 15 6) are supported as default. If you need to integrate with other 16 version of FRRouting, please use `software-name` configuration. 17 18 ## Contents 19 20 - [Configuration](#configuration) 21 - [Check routes from zebra](#check-routes-from-zebra) 22 23 ## Configuration 24 25 You need to enable the zebra feature in the Global configuration as follows. 26 27 ```toml 28 [zebra] 29 [zebra.config] 30 enabled = true 31 url = "unix:/var/run/quagga/zserv.api" 32 redistribute-route-type-list = ["connect"] 33 version = 2 34 ``` 35 36 - `url` specifies the path to the unix domain socket or the TCP port for 37 connecting to Zebra API. 38 If omitted, GoBGP will use `"unix:/var/run/quagga/zserv.api"` by the default. 39 Please note that with FRRouting, the path to the unix domain socket would be 40 like `"unix:/var/run/frr/zserv.api"`. 41 To specify the TCP port, `url` value would be like `"tcp:192.168.24.1:2600"`. 42 43 - `redistribute-route-type-list` specifies which route types you want to 44 receive from Zebra daemon. 45 For example, with `["connect"]`, GoBGP will receive the connected routes and 46 redistribute them. 47 48 - `version` specifies Zebra API version. 49 `2` is the version used by Quagga on Ubuntu 16.04 LTS. 50 To enable the Next-Hop Tracking features, please specify `3` or later. 51 For connecting to FRRouting 3.0.x, please specify `4`. 52 For connecting to FRRouting 5.0.x, please specify `5`. 53 For connecting to FRRouting 8.1.x, please specify `6`. 54 55 - `mpls-label-range-size` specifies mpls label range size for 56 requesting to Zebra. It works with FRRouting 5.0.x, and newer versions. 57 58 - `sotware-name` specifies software name for zebra when only `version` 59 configuration cannot specify software uniquely. This configuration 60 is used with 'version' configuration. For connecting to FRRouting 61 7.2.x, please specify `6` as `version` and `frr7.2` as 62 `software-name`. For connecting to FRRouting 4.0.x, please specify 63 `5` as `version` and `frr4` as `software-name`. For connecting to 64 Cumulus Linux please specify `5` as `version` and `cumulus` as 65 `software-name`. GoBGP is tested with Cumulus Linux VX 3.7.7 whose 66 zebra version is 4.0+cl3u13 and its Zebra API version is 5. 67 68 ### Summary of combination of version and software-name configrations 69 70 |version|software-name|software |remarks | 71 |-------|-------------|--------------------------------|--------------------------------------------| 72 |2 | |quagga |Ubuntu 16.04, CentOS7 | 73 |3 | |quagga |Ubuntu 18.04 | 74 |4 | |FRRouting 3.0.x |(deprecated) | 75 |5 | |FRRouting 5.0.x |(deprecated) | 76 |5 |cumulus |Cumulus Linux VX 3.7.7 |(deprecated) | 77 |5 |frr4 |FRRouting 4.0.x |(deprecated) | 78 |6 | |FRRouting 8.0.x, 8.1x, and 7.5.x|Ubunut 22.04 (FRR8.1), AlmaLinux8.5 (FRR7.5)| 79 |6 |frr7.3 |FRRouting 7.3.x |(deprecated) | 80 |6 |frr7.2 |FRRouting 7.2.x |Ubuntu 20.04 | 81 |6 |frr7 |FRRouting 7.0.x and 7.1.x |(deprecated) | 82 |6 |frr6 |FRRouting 6.0.x |(deprecated) | 83 84 ## Check Routes from zebra 85 86 Zebra has 3 connected routes in this example's environment. 87 88 - 172.16.1.100/30 89 - 172.16.6.100/30 90 - 192.168.31.0/24 91 92 Let's check these routes with GoBGP cli. 93 94 ```bash 95 $ gobgp global rib 96 Network Next Hop AS_PATH Age Attrs 97 *> 172.16.1.100/30 0.0.0.0 00:00:02 [{Origin: i} {Med: 1}] 98 *> 172.16.6.100/30 0.0.0.0 00:00:02 [{Origin: i} {Med: 1}] 99 *> 192.168.31.0/24 0.0.0.0 00:00:02 [{Origin: i} {Med: 1}] 100 ``` 101 102 You can see connected routes stored in the GoBGP global rib.