diff options
| -rw-r--r-- | doc/Useful_Sysctl_Settings.md | 61 | ||||
| -rw-r--r-- | ospf6d/ospf6_interface.c | 13 | ||||
| -rw-r--r-- | pimd/pim_iface.c | 13 |
3 files changed, 76 insertions, 11 deletions
diff --git a/doc/Useful_Sysctl_Settings.md b/doc/Useful_Sysctl_Settings.md new file mode 100644 index 0000000000..4244b5fdfb --- /dev/null +++ b/doc/Useful_Sysctl_Settings.md @@ -0,0 +1,61 @@ +# Useful Sysctl Settings +Sysctl on Linux systems can tweak many useful behaviors. When it comes to a routing protocol suite like FRRouting there are numerous values depending on your use case that make sense to optimize. + +The below sysctl values provide a logical set of defaults which can be further optimized. + + +``` +# /etc/sysctl.d/99frr_defaults.conf +# Place this file at the location above and reload the device. +# or run the sysctl -p /etc/sysctl.d/99frr_defaults.conf + +# Enables IPv4/IPv6 Routing +net.ipv4.ip_forward = 1 +net.ipv6.conf.all.forwarding=1 + +# Routing +net.ipv6.route.max_size=131072 +net.ipv4.conf.all.ignore_routes_with_linkdown=1 +net.ipv6.conf.all.ignore_routes_with_linkdown=1 + +# Best Settings for Peering w/ BGP Unnumbered +# and OSPF Neighbors +net.ipv4.conf.all.rp_filter = 0 +net.ipv4.conf.default.rp_filter = 0 +net.ipv4.conf.lo.rp_filter = 0 +net.ipv4.conf.all.forwarding = 1 +net.ipv4.conf.default.forwarding = 1 +net.ipv4.conf.default.arp_announce = 2 +net.ipv4.conf.default.arp_notify = 1 +net.ipv4.conf.default.arp_ignore=1 +net.ipv4.conf.all.arp_announce = 2 +net.ipv4.conf.all.arp_notify = 1 +net.ipv4.conf.all.arp_ignore=1 +net.ipv4.icmp_errors_use_inbound_ifaddr=1 + +# Miscellaneous Settings + +# Keep ipv6 permanent addresses on an admin down +net.ipv6.conf.all.keep_addr_on_down=1 + +# igmp +net.ipv4.igmp_max_memberships=1000 +net.ipv4.neigh.default.mcast_solicit = 10 + +# MLD +net.ipv6.mld_max_msf=512 + +# Garbage Collection Settings for ARP and Neighbors +net.ipv4.neigh.default.gc_thresh2=7168 +net.ipv4.neigh.default.gc_thresh3=8192 +net.ipv4.neigh.default.base_reachable_time_ms=14400000 +net.ipv6.neigh.default.gc_thresh2=3584 +net.ipv6.neigh.default.gc_thresh3=4096 +net.ipv6.neigh.default.base_reachable_time_ms=14400000 + +# Use neigh information on selection of nexthop for multipath hops +net.ipv4.fib_multipath_use_neigh=1 + +# Allows Apps to Work with VRF +net.ipv4.tcp_l3mdev_accept=1 +``` diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 8cfed81a81..8e01cb4379 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -117,8 +117,17 @@ static u_int32_t ospf6_interface_get_cost(struct ospf6_interface *oi) u_int32_t cost; u_int32_t bw, refbw; - bw = oi->interface->bandwidth ? oi->interface->bandwidth - : OSPF6_INTERFACE_BANDWIDTH; + /* interface speed and bw can be 0 in some platforms, + * use ospf default bw. If bw is configured then it would + * be used. + */ + if (!oi->interface->bandwidth && oi->interface->speed) { + bw = oi->interface->speed; + } else { + bw = oi->interface->bandwidth ? oi->interface->bandwidth + : OSPF6_INTERFACE_BANDWIDTH; + } + refbw = ospf6 ? ospf6->ref_bandwidth : OSPF6_REFERENCE_BANDWIDTH; /* A specifed ip ospf cost overrides a calculated one. */ diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index f0b89396b3..d98e5f1f66 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -1292,16 +1292,11 @@ ferr_r pim_if_igmp_join_add(struct interface *ifp, struct in_addr group_addr, } ij = igmp_join_find(pim_ifp->igmp_join_list, group_addr, source_addr); + + /* This interface has already been configured to join this IGMP group + */ if (ij) { - char group_str[INET_ADDRSTRLEN]; - char source_str[INET_ADDRSTRLEN]; - pim_inet4_dump("<grp?>", group_addr, group_str, - sizeof(group_str)); - pim_inet4_dump("<src?>", source_addr, source_str, - sizeof(source_str)); - return ferr_cfg_invalid( - "can't re-join existing IGMP group %s source %s on interface %s", - group_str, source_str, ifp->name); + return ferr_ok(); } ij = igmp_join_new(ifp, group_addr, source_addr); |
