Commit graph

175 commits

Author SHA1 Message Date
David Lamparter b84493132c pimd: allow restricting neighbors per interface
Just filter incoming packets against a specified prefix-list.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-02-19 09:49:06 -03:00
David Lamparter df9517c95a pimd: add IGMPv2/MLDv1 immediate-leave
(Somewhat) useful when dealing with an interface that has only one host
attached.  Only works for IGMPv2 and MLDv1, other protocol versions have
no leave message.

Co-authored-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-02-13 12:45:47 -03:00
Rafael Zalamena a98f2b86c4 pim6d: implement MLD source/group limits
Let user configure a source/group limit for MLD protocol.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-02-10 15:40:07 -03:00
David Lamparter f07d379b74 pimd: implement IGMP group/source count limit
For groups we can just look at the length of the list, for sources we
need to count them on a per-interface level.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-02-10 15:40:07 -03:00
Nathan Bahr 8b00575fbb pimd,yang: Expand rpf-lookup-mode command
Add options for group-list and source-list, both of which take a prefix list name.
The prefix list is used to determine the lookup mode for specific sources and/or groups.
Any number of lookup modes can be configured as long as the combination of group
and source list is unique.
A global lookup mode (empty group and source lists) is always added and defaults to mrib-then-urib
as it currently functions. The global lookup mode can be changed as it current exists with the command
`rpf-lookup-mode MODE`.
When determinig which mode to use, match source (and group if provided) against the lists, if they are set.
If a lookup does not specify a group, then only use lookup modes that do not have a group list defined.
A lookup by definition will have a source, so no special handling there.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2025-01-09 21:58:22 +00:00
Nathan Bahr 10e2df6530 pimd,yang: Reimplement RPF lookup vty in router pim
Add rpf-lookup-mode MODE vty command under router pim block.
Including NB piping and config write. Using the mode still pending.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-12-13 17:36:34 +00:00
Rafael Zalamena 6d759deea1 pimd: move MSDP configuration and initialization
Reorganize the MSDP initialization code and configuration writing code
to its appropriated place.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-12-11 11:58:25 -03:00
Corey Siltala 8465ba1dde pimd: Convert boundary_oil_plist to struct prefix_list
Rather than storing the prefix-list name and looking it up every time we use it, store a pointer to the prefix-list itself.

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:52 -06:00
Corey Siltala 4de4017d64 pimd,yang: Extend multicast boundary functionality
Add new interface command ip multicast boundary ACCESSLIST4_NAME. This
allows filtering on both source and group using the extended access-list
syntax vs. group-only as with the existing "ip multicast boundary oil"
command, which uses prefix-lists. If both are configured, the prefix-
list is evaluated first. The default behavior for both prefix-lists and
access-lists remains "deny", so the prefix-list must have a terminating
"permit" statement in order to also evaluate against the access-list.

The following example denies groups in range 229.1.1.0/24 and groups in
range 232.1.1.0/24 with source 10.0.20.2:

!
ip prefix-list pim-oil-plist seq 10 deny 229.1.1.0/24
ip prefix-list pim-oil-plist seq 20 permit any
!
access-list pim-acl seq 10 deny ip host 10.0.20.2 232.1.1.0 0.0.0.255
access-list pim-acl seq 20 permit ip any any
!
interface r1-eth0
 ip address 10.0.20.1/24
 ip igmp
 ip pim
 ip multicast boundary oil pim-oil-plist
 ip multicast boundary pim-acl
!

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:17 -06:00
Barry A. Trent d4b8a98019 pimd: igmp proxy joins should not be written as part of config
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-12-03 13:44:08 -08:00
Rafael Zalamena 23c7acd232 pim6d: support embedded-rp
Implement embedded RP support and configuration commands.

Embedded RP is disabled by default and can be globally enabled with the
command `embedded-rp` in the PIMv6 configuration node.

It supports the following options:
- Embedded RP maximum limit
- Embedded RP group filtering

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-13 12:05:35 -03:00
Nathan Bahr 3b323fc441 pimd,yang: Implement AutoRP CLI and NB config path
New CLI commands added:
router pim [vrf NAME]
  autorp discovery
  autorp announce RP-ADDR [GROUP | group-list PREFIX-LIST]
  autorp announce {scope (1-255) | interval (1-65535) | holdtime (0-65535)}

autorp discovery
  Enables Auto RP discovery for learning dynamic RP information using the
  AutoRP protocol.

autorp announce RP-ADDR [GROUP | group-list PREFIX-LIST]
  Enable announcements of a candidate RP with the given group range, or
  prefix list of group ranges, to an AutoRP mapping agent.

autorp announce {scope (1-255) | interval (1-65535) | holdtime (0-65535)}
  Configure the parameters of the AutoRP announcement messages.
  The scope sets the packet TTL.
  The interval sets the time between TX of announcements.
  The holdtime sets the hold time in the message, the time the mapping
  agent should wait before invalidating the candidate RP information.

debug pim autorp
  Enable debug logging of the AutoRP protocol

show ip pim [vrf NAME] autorp [json]
  Show details of the AutoRP protocol.
  To view learned RP info, use the existing command 'show ip pim rp-info'

Extend pim yang for new configuration:
  augment /frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-pim:pim/frr-pim:address-family:
    +--rw rp
       +--rw auto-rp
          +--rw discovery-enabled?   boolean
          +--rw announce-scope?      uint8
          +--rw announce-interval?   uint16
          +--rw announce-holdtime?   uint16
          +--rw candidate-rp-list* [rp-address]
             +--rw rp-address           inet:ip-address
             +--rw (group-or-prefix-list)?
                +--:(group)
                |  +--rw group?         frr-route-types:ip-multicast-group-prefix
                +--:(prefix-list)
                   +--rw prefix-list?   plist-ref

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-09-24 16:39:17 +00:00
Barry A. Trent 9b68853e0d pimd: add igmp proxy cli and yang configuration
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-20 13:44:48 -07:00
Jafar Al-Gharaibeh a110bb7798 pimd: Candidate-RP support
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09 12:42:28 -05:00
Nathan Bahr 0cb1bf7873 pimd, yang: Implement igmp static-group command
This will add a static IGMP group that does not rely on an underlying
socket join which sends traffic to the cpu unneccesarily. Instead, the
groups are joined directly without any IGMP interactions.
New command is under interfaces, 'ip igmp static-group ...'.
Added an alias for 'ip igmp join ...' to 'ip igmp join-group'.
Moved IGMP join groups to new yang list "join-group" and reused
the "static-group" list for the IGMP static groups.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-08-15 16:20:00 +00:00
Nathan Bahr fd8edc3dfb pimd, lib, vtysh: Added new 'router pim[6] [vrf NAME]' config node
Moved all existing global/vrf PIM config to the new subnode.
Existing configuration updated to be hidden and deprecated.
Both versions of configuration still work together.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-07-16 13:30:35 -05:00
Abhishek N R bd2c824a21 pim6d: Impelmenting "ipv6 mld join"
Fixes: #12014

Signed-off-by: Abhishek N R <abnr@vmware.com>
2023-04-03 04:05:17 -07:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Donald Sharp 00fb4b9dcd pimd: Make pimd happy with clang-16
Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2022-10-26 07:39:47 -04:00
Sai Gomathi N a25597611d pimd,pim6d: Change the show running commands based on address family
Change the show running commands for igmp and mld debug commands
based on the address family.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-09-26 00:09:45 -07:00
Abhishek N R de5dc09238 pimd, pim6d: Changing IGMP to GM in few macro's.
Changing
IGMP_DEFAULT_ROBUSTNESS_VARIABLE to GM_DEFAULT_ROBUSTNESS_VARIABLE,
IGMP_GENERAL_QUERY_INTERVAL to GM_GENERAL_QUERY_INTERVAL,
IGMP_QUERY_MAX_RESPONSE_TIME_DSEC to GM_QUERY_MAX_RESPONSE_TIME_DSEC and
IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC to GM_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC
to accomodate both igmp and mld. And moved it to common file.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-09-18 22:15:19 -07:00
Abhishek N R a96d64b0d6 pimd, pim6d: Changing IGMP to GM in debug macros.
Changed PIM_DEBUG_IGMP_TRACE to PIM_DEBUG_GM_TRACE and
PIM_DEBUG_IGMP_TRACE_DETAIL to PIM_DEBUG_GM_TRACE_DETAIL.
Hence, these macros can be used for both v6 and v4.

Issue: #11895

Co-authored-by: Sai Gomathi N <nsaigomathi@vmware.com>
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-09-13 23:29:33 -07:00
Sai Gomathi N d891fa78e4 pimd, pim6d: Changing IGMP to GM in debug macros
Changing
PIM_DO_DEBUG_IGMP_EVENTS to PIM_DO_DEBUG_GM_EVENTS
PIM_DO_DEBUG_IGMP_PACKETS to PIM_DO_DEBUG_GM_PACKETS
PIM_DO_DEBUG_IGMP_TRACE to PIM_DO_DEBUG_GM_TRACE
PIM_DO_DEBUG_IGMP_TRACE_DETAIL to PIM_DO_DEBUG_GM_TRACE_DETAIL
PIM_DONT_DEBUG_IGMP_EVENTS to PIM_DONT_DEBUG_GM_EVENTS
PIM_DONT_DEBUG_IGMP_PACKETS to PIM_DONT_DEBUG_GM_PACKETS
PIM_DONT_DEBUG_IGMP_TRACE to PIM_DONT_DEBUG_GM_TRACE
PIM_DONT_DEBUG_IGMP_TRACE_DETAIL to PIM_DONT_DEBUG_GM_TRACE_DETAIL
PIM_MASK_IGMP_EVENTS to PIM_MASK_GM_EVENTS
PIM_MASK_IGMP_PACKETS to PIM_MASK_GM_PACKETS
PIM_MASK_IGMP_TRACE to PIM_MASK_GM_TRACE
PIM_MASK_IGMP_TRACE_DETAIL to PIM_MASK_GM_TRACE_DETAIL
to be used for both IGMP and MLD debugs.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-09-06 00:15:38 -07:00
Sai Gomathi N 55eb347de9 pimd,pim6d: Modifying IGMP to GM in PIM_DEBUG_IGMP_PACKETS to PIM_DEBUG_GM_PACKETS
Changing the macros to common so that it can be used for pimv6 debugs as well
to be used for both IGMP and MLD debugs.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-09-04 22:46:09 -07:00
Sai Gomathi N 95b13dc512 pimd,pim6d: Modifying IGMP to GM in PIM_DEBUG_IGMP_EVENTS to PIM_DEBUG_GM_EVENTS
Changing the macros to common so that it can be used for pimv6 debugs as well
to be used for both IGMP and MLD debugs.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-09-04 22:46:09 -07:00
Abhishek N R 707a9e9a90 pim6d: Completing "ipv6 mld last-member-query-interval" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-08-28 23:33:07 -07:00
Abhishek N R 51b4991feb pim6d: Completing "ipv6 mld last-member-query-count" command.
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-08-28 23:33:07 -07:00
Abhishek N R 914710d79e pim6d: Completing "ipv6 mld query-max-response-time" command.
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-08-28 23:33:07 -07:00
Donatas Abraitis b32cf39d45
Merge pull request #11485 from AbhishekNR/ipv6_mld_todo
pim6d: Completing "ipv6 mld" config command.
2022-08-18 09:47:03 +03:00
Mobashshera Rasool ca8cbecd5c pim6d: Add debug mroute6 and detail commands
Adding below debug CLIs:
debug mroute6
debug mroute6 detail

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-08-16 00:55:51 -07:00
Sai Gomathi N 614b77fef5 pim6d: Change the show running commands for pimv6 debugs
Change the show running commands for bsm and vxlan pimv4 and pimv6
debug commands based on the address family.
Including bsm and vxlan in no debug pimv6 debug.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-08-02 06:34:30 -07:00
Abhishek N R 5c1b3cd2d9 pim6d: Completing "ipv6 mld" command.
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-07-07 04:36:33 -07:00
Sai Gomathi N 889d43b1e6 pim6d: Implementing mld watermark-warn CLI completely
Implementing the TBD of watermark-warn CLI for IPv6 MLD
This command can be use to warn the user
when more than the desired limit of groups gets configured.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-06-30 02:05:13 -07:00
Sai Gomathi N 229a20e2ad pimd: Modifying member of pim_instance to accomodate IPv6 changes
Modifying igmp_watermark_limit of struct pim_instance
to gm_watermark_limit which is to be used for both IGMP and MLD.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-06-30 01:49:54 -07:00
Donatas Abraitis fd878267a3
Merge pull request #11428 from SaiGomathiN/pimdebug
pimd,pim6d: Change the show running commands based on address family
2022-06-29 14:27:45 +03:00
Abhishek N R 4fecac21cb pim6d: Changing igmp_enable to gm_enable.
Modified variable name so that it can be reused in mld.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-06-27 05:52:02 -07:00
Sai Gomathi N 68a7caf4bf pimd,pim6d: Change the show running commands based on address family
Change the show running commands for pimv4 and pimv6 debug commands
based on the address family.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-06-26 23:42:47 -07:00
Donald Sharp 8a8ad459af
Merge pull request #10775 from opensourcerouting/pim6-mld-pr
pim6d: MLD code
2022-05-17 07:20:08 -04:00
sarita patra 2a66cf6309 pimd: show ip[v6] pim passive in show running config
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
David Lamparter 5afe22f5bc pim6d: show MLD in running-config
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 16:02:02 +02:00
David Lamparter e9c59240f6 pimd: add missing debug igmp trace detail
The flag was defined but there was no command to actually enable it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-26 10:49:03 +02:00
David Lamparter 92fed03c3d pimd: fix reversed logic for "debug ... detail"
The normal flag was enabling detail messages, but what we want is the
detail flag enabling normal messages.

Remove the _ONLY macro while at it, it's only used for config print &
that seems like a place where making the difference explicitly visible
is helpful regardless.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-26 10:49:03 +02:00
Balaji Gurudoss a8caf78d61 pim6d: Addition of ipv6 ssmpingd config commands
Signed-off-by: Balaji Gurudoss <G_Balaji1@dell.com>
2022-04-12 18:07:24 +05:30
David Lamparter b6fcc0b7a6 pimd: remove useless PIM_IF_* macros
The only function these macros have is to make the code confusing.
"PIM_IF_DO_PIM" sounds like it triggers some action, but it doesn't.

Replace with "bool" fields in struct pim_interface.

(Note: PIM_IF_*_IGMP_LISTEN_ALLROUTERS was always set, without any way
to unset it.  It is completely removed now and always enabled.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-04 14:11:29 +02:00
David Lamparter 34389f8886 pim6d: fix format string mistakes in ssmpingd
PR #10653 forgot to update a bunch of format specifiers.  Fix.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-25 11:36:21 +01:00
Donatas Abraitis 2efc3acd9e
Merge pull request #9476 from SaiGomathiN/pim-nht
pimd: Added new option "detail" in the "debug pim nht" CLI
2022-03-20 23:14:08 +02:00
Balaji Gurudoss 1c56018f66 pim6d: Changes done in pim_ssmpingd to support v6
Signed-off-by: Balaji Gurudoss <G_Balaji1@dell.com>
2022-03-16 13:54:24 +05:30
Sai Gomathi 6d733f0dbc pimd: Added new option "detail" in the "debug pim nht" CLI
Problem Statement:
=================
PIM Logs are coming at interval of 1 minute although pim
is not enabled.

Root Cause Analysis:
====================
By default, RCPM configures the PIM debugs when router comes up
via script. The product cannot disable PIM even though it is not required.
Hence moving these logs under a new debug option which will not be
enabled by default.

Fix:
====
Added a new option "detail" in the cli:
debug pim nht detail

Co-author: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2022-03-03 22:33:20 -08:00
Mobashshera Rasool ae97d5777c pimd: Change the show running commands based on address family
Change the show running commands for pimv4 and pimv6 based on the
address family.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00
Sai Gomathi N d17b6892fc pim6d: Adding show running for ipv6 mld commands
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-28 01:38:41 -08:00