Skip to content

Configuring a VRF to work properly for FRR

Raymond P. Burkholder edited this page Feb 12, 2018 · 5 revisions

Linux Kernel Documentation

https://www.kernel.org/doc/Documentation/networking/vrf.txt

Special Consideration of Default Route in the VRF

Set the default route for the table (and hence default route for the VRF).

ip route add table 10 unreachable default metric 4278198272

high metric value ensures that the default unreachable route can be overridden by a routing protocol suite. FRRouting interprets kernel metrics as a combined admin distance (upper byte) and priority (lower 3 bytes). Thus the above metric translates to [255/8192].

Tutorial for VRF's

https://schd.ws/hosted_files/ossna2017/fe/vrf-tutorial-oss.pdf

small example:

router bgp 64900 vrf vrf1012
  bgp router-id 192.0.2.1
  no bgp default ipv4-unicast
  neighbor 192.0.2.3 remote-as 65321
  !
  address-family ipv4 unicast
    neighbor 192.0.2.3 activate
  exit-address-family
  !

To establish a session with a neighbor in a VRF, FRRouting needs to be able to listen on the BGP TCP port in the VRF. In order to be allowed to do so by the kernel, the following sysctl is required:

sysctl -w net.ipv4.tcp_l3mdev_accept=1

Relates to Issue #1177

You can’t perform that action at this time.