GROUT-FRR(7)

# INTRODUCTION

This guide demonstrates how to configure FRR (Free Range Routing) and Linux
networking to establish BGP peering between Grout and an upstream router,
without assigning IP addresses directly to the Linux interface.

# CONTEXT

By default, FRR daemons such as _bgpd_ require binding to a local IP address to
accept incoming peer connections. This necessitates explicitly adding all Grout
"local" IPs to the _main_ interface. However, this approach is cumbersome
and not ideal.

The objective is to run _bgpd_ without assigning any IP address to the
_main_ network device. This is achieved by utilizing the _IP_TRANSPARENT_
socket option and FRR's capability to bind to a specific interface.

# PACKETS FROM GROUT TO main

All packets received to a *local* IP configured in grout will be processed by
the node _ip_input_local_/_ip6_input_local_. If the protocol isn't handled
locally (ICMP, Neighbor Disc, ...), the packets are forwarded to
_l4_input_local_. If still unhandled (e.g., VXLAN Tunnel), the packet is sent to
the corresponding _gr-loopX_ interface associated with the VRF.

# FRR CONFIGURATION OVERVIEW

Zebra must be run with the _-M_ option to load the plugin:
Edit the file _/etc/frr/daemons_, for example:

```
zebra_options="  -A 127.0.0.1 -s 90000000 -M dplane_grout"
```

And the corresponding _frr.conf_:

```
service integrated-vtysh-config
!
interface cv0
	ip address 192.168.210.1/24
exit
!
router bgp 64513
	neighbor 192.168.210.3 remote-as 64513
	neighbor 192.168.210.3 interface main
	neighbor 192.168.210.3 update-source 192.168.210.1
exit
!
end
```

Two additional configurations for a neighbor are required:

- source interface, _main_, only required for the default VRF
- update source IP, local Grout IP

With that configuration, BGP messages are properly exchanged, and routes are
visible in grout:

```
vtysh# show bgp summary

IPv4 Unicast Summary:
BGP router identifier 192.168.211.0, local AS number 64513 VRF default vrf-id 0
BGP table version 15
RIB entries 28, using 3584 bytes of memory
Peers 2, using 47 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.210.3   4      64513        50        48       15    0    0 00:43:31           14        2 N/A

Total number of neighbors 1
```

```
grout# route show
VRF  DESTINATION        NEXT_HOP
0    192.168.1.0/24     type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.2.0/24     type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.11.254/32  type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.11.0/24    type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.20.0/24    type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.94.0/24    type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.95.0/24    type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.200.0/24   type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.201.0/24   type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.203.0/24   type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.210.0/24   type=L3 iface=p0 vrf=0 origin=link af=IPv4 addr=192.168.210.1/24 mac=f0:0d:ac:dc:00:00 static local link
0    192.168.211.0/24   type=L3 iface=p1 vrf=0 origin=link af=IPv4 addr=192.168.211.1/24 mac=f0:0d:ac:dc:00:01 static local link
0    192.168.239.0/24   type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.254.0/24   type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
0    192.168.255.10/32  type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new
```

# AUTHORS

Created by Christophe Fontaine
Updated by Maxime Leroy
