ON THIS PAGE
Configuring Settings on Host OS
This chapter provides information on tuning of settings on host OS to enable advanced features or to increase the scale of cRPD functionality.
Configuring ARP Scaling
The maximum ARP entry number is controlled by the Linux host kernel. If there are
a large number of neighbors, you might need to adjust the ARP entry limitations
on the Linux host. There are options in the sysctl
command on
the Linux host to adjust the ARP or NDP entry limits.
For example, to adjust the maximum ARP entries using IPv4:
root@host:~# sysctl -w
net.ipv4.neigh.default.gc_thresh1=4096
root@host:~# sysctl -w
net.ipv4.neigh.default.gc_thresh2=8192
root@host:~# sysctl -w
net.ipv4.neigh.default.gc_thresh3=8192
For example, to adjust the maximum ND entries using IPv6:
root@host:~# sysctl -w
net.ipv6.neigh.default.gc_thresh1=4096
root@host:~# sysctl -w
net.ipv6.neigh.default.gc_thresh2=8192
root@host:~# sysctl -w
net.ipv6.neigh.default.gc_thresh3=8192
Tunning OSPF under cRPD
To allow more number of OSPFv2/v3 adjacencies with cRPD, increase the IGMP membership limit:
root@host:~# sysctl -w
net.ipv4.igmp_max_memberships=1000
Configuring MPLS
To configure MPLS in Linux kernel:
Adding MPLS Routes
Netlink messages are used to communicate (add/learn) the routes with the Linux
kernel. MPLS routes are added to the kernel using iproute2
utility which internally uses netlink socket to update the kernel. To add MPLS
routes to host using the iproute2
utility:
Adding Routes with MPLS label
To add routes to host by encapsulating the packets with MPLS label using the
iproute2
utility:
Creating a VRF device
To instantiate a VRF device and associate it with a table:
Assigning a Network Interface to a VRF
Network interfaces are assigned to a VRF by assigning the netdevice to a VRF device. The connected and local routes are automatically moved to the table associated with the VRF device.
To assign a network interface to a VRF:
root@host:~# ip link set dev <name> master
<name>
root@host:~# ip link set dev eth1 vrf
test
Viewing the Devices assigned to VRF
To view the devices:
root@host:~# ip link show vrf
<name>
root@host:~# ip link show vrf
red
Viewing Neighbor Entries to VRF
To list the neighbor entries associated with devices enslaved to a VRF device:
root@host:~# ip -6 neigh show vrf
<NAME>
root@host:~# ip neigh show vrf
red
root@host:~# ip -6 neigh show vrf
red
Viewing Addresses for a VRF
To show addresses for interfaces associated with a VRF:
root@host:~# ip addr show vrf
<NAME>
root@host:~# ip addr show vrf
red
Viewing Routes for a VRF
To view routes for a VRF:
Removing Network Interface from a VRF
Network interfaces are removed from a VRF by breaking the enslavement to the VRF device
root@host:~# ip link set dev NAME
nomaster
After removing the network interface, connected routes are moved to the default table and local entries are moved to the local table.
Hash Field Selection for ECMP Load Balancing on Linux
You can select the ECMP hash policy (fib_multipath_hash_policy
)
for both forwarded and locally generated traffic (IPv4/IPv6).
IPv4 Traffic
wECMP using BGP on Linux
Unequal cost load balancing is a way to distribute traffic unequally among different paths (comprising the multipath next-hop); when the paths have different bandwidth capabilities. BGP protocol achieves this by tagging each route/path with the bandwidth of the link using the link bandwidth extended community. The bandwidth of the corresponding link can be encoded as part of this link bandwidth community. RPD uses this bandwidth information of each path to program the multipath next-hops with appropriate linux::weights. A next-hop with linux::weight allows linux kernel to load balance traffic asymmetrically.
BGP forms a multipath next-hop and uses the bandwidth values of individual paths to find out the proportion of traffic that each of the next-hops that form the ECMP next-hop should receive. The bandwidth values specified in the link bandwidth need not be the absolute bandwidth of the interface. These values need to reflect the relative bandwidth of one path from the another. For details, see Understanding How to Define BGP Communities and Extended Communities and How BGP Communities and Extended Communities Are Evaluated in Routing Policy Match Conditions.
Consider a network with R1 receiving equal cost paths from R2 and R3 to a destination R4; if you want to send 90% of the load balanced traffic over the path R1-R2 and the remaining 10% of the traffic over the path R1-R3 using wECMP, you need to tag routes received from the two BGP peers with link bandwidth community by configuring policy-options.
Enable SRv6 on cRPD
You can enable IPv6 segment routing capability on cRPD using the following sysctl command: