summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
AgeCommit message (Collapse)Author
2017-05-02Merge pull request #440 from donaldsharp/afi_safi3Jafar Al-Gharaibeh
Afi safi3
2017-05-02pimd: Fix cli uplift mistakesDonald Sharp
When we uplifted the cli from old -> new, I did not properly handle the switch from <1-3> to (1-3) for number ranges. Also fix some minor variable renaming that happened? Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-02pimd: fix compilation failure.Chirag Shah
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02pimd: fix extra space at the endChirag Shah
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02pimd: fix help string for intf cntrs show cmdChirag Shah
Fix show interface traffic single command help string. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02Fix: reverse logic of when to pass the supplied group addressJafar Al-Gharaibeh
This was causing a crash when no group address was passed because a garbage pointer valuse was used. It also was ignoring the group address when passing one. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-05-02pimd: fix show command for protocol counterChirag Shah
Fix the command syntex for single interface command Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-01pimd: Introduce show command for protocol countersChirag Shah
For all pim enabled interfaces and single pim enable interface command. Clear command to clear protocol counters stats. 'show ip pim interface traffic {WORD} {json}' 'clear ip pim interface traffic' Testing Done: bringup Pim configuration and form RPT and SPT and check show ip pim interface traffic command output, perform clear form of interface traffic command and verified all counters reset via show form of command. tor-21# show ip pim interface traffic swp2 Interface HELLO JOIN PRUNE REGISTER REGISTER-STOP ASSERT Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx --------------------------------------------------------------------------------------------------------------- swp2 22/22 0/10 0/0 0/0 0/0 0/0 leaf-22# show ip pim interface traffic swp3 Interface HELLO JOIN PRUNE REGISTER REGISTER-STOP ASSERT Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx --------------------------------------------------------------------------------------------------------------- swp3 23/22 10/0 0/0 0/0 0/0 0/0 spine-1#show ip pim interface traffic Interface HELLO JOIN PRUNE REGISTER REGISTER-STOP ASSERT Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx --------------------------------------------------------------------------------------------------------------- br1 0/1 0/0 0/0 0/0 0/0 0/0 lo 0/0 0/0 0/0 0/0 0/0 0/0 swp1 0/1 0/0 0/0 0/0 0/0 0/0 swp2 0/1 0/0 0/0 0/0 0/0 0/0 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-04-28Merge branch 'stable/3.0' into pim_dev_3_0Jafar Al-Gharaibeh
2017-04-25pimd: Enable igmp on igmp version change cliChirag Shah
Execute ip igmp version 3 under swp interface, verified show running displayed 'ip igmp' configuration. Continuous sending group membership, performed 'no ip igmp' and verified, group membership flushed. Performed 'ip igmp version 3', verified 'show ip igmp groups' displaying igmp membership re-populated. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-04-25pimd: Pim Nexthop Tracking support with ECMPChirag Shah
In this patch, PIM nexthop tracking uses locally populated nexthop cached list to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks the first nexthop as RPF. Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob. By default, PIM ECMP is disabled. Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache entry to switch new path based on hash chosen path. Introduced, show command to display pim registered addresses and respective nexthops. Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G). Re-Register an address with nexthop when Interface UP event received, to ensure the PIM nexthop cache is updated (being PIM enabled). During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if any of nexthop's IPv4 address changes/resolves due to neigbor UP event. Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events. Executed pim-smoke with knob disabled. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com> (cherry picked from commit cba444817883b8b3b22a7ed9958dc9ed77f76230)
2017-04-24Merge pull request #345 from chiragshah6/pim_devRenato Westphal
pimd: Pim ECMP changes along with nexthop tracking using cached DB
2017-04-20pimd: Add prefix list handling to spt-switchoverDonald Sharp
To the 'ip pim spt-switchover infinity-and-beyond' command add 'prefix-list <PLIST>'. To the command. Use this as the basis to deny (Not immediate switchover) or permit (Immediate switchover), based upon matching the group address and the prefix-list. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-17pimd: fix 'show ip msdp sa ...'Quentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-04-15pimd: fix off-by-one in `no ip pim rp ...`Quentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-04-10Merge pull request #304 from donaldsharp/pim_5549Jafar Al-Gharaibeh
Pim 5549 Additions
2017-04-06pimd: Fix various sizeof and buffer length issuesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-06pimd: Pim Nexthop Tracking support with ECMPChirag Shah
In this patch, PIM nexthop tracking uses locally populated nexthop cached list to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks the first nexthop as RPF. Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob. By default, PIM ECMP is disabled. Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache entry to switch new path based on hash chosen path. Introduced, show command to display pim registered addresses and respective nexthops. Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G). Re-Register an address with nexthop when Interface UP event received, to ensure the PIM nexthop cache is updated (being PIM enabled). During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if any of nexthop's IPv4 address changes/resolves due to neigbor UP event. Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events. Executed pim-smoke with knob disabled. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-04-05pimd: Add the ability to never SPT switchoverDonald Sharp
Add the ability to allow pim to determine if we should allow spt-switchover or not on the LHR. Signed-off-by: Donald Sharp
2017-04-05pimd: Add # of ifchannels to 'show ip pim int'Donald Sharp
Add the ability to see the number of ifchannels associated with a particular interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-01Merge branch 'master' into pim_5549Donald Sharp
2017-03-30pimd: Receive incoming v6 addresses and place in pim_ifp listDonald Sharp
Add code to properly receive v6 addresses up from zebra and to properly place them into our interface secondary address list. Additionally cleanup some code in pim_cmd.c that was broken by these changes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-30pimd: Add code to allow backwards compatibilityDonald Sharp
This code change adds the ability to specify that we should be able to work with older versions of PIM. In future commits we will actually use this data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-23pimd: Remove interface type SSM.anuradhak
Interface type has been replaced with the SSM range config. And SSM groups can now co-exists with ASM groups. I have left the pim ssm per-interface cli control hidden. It now enables pim-sm with a warning. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-15344 Testing Done: pim-smoke
2017-03-23pimd: Allow SSM groups to co-exist with ASM groups.anuradhak
SSM groups (232/8 or user configured SSM range) can exist in the same multicast network as ASM groups. For such groups all RPT related state machine operations have to be skipped as defined by section 4.8 of RFC4601 - 1. Source registration is skipped for SSM groups. For SSM groups mroute is setup on the FHR when a new multicast flow is rxed; however source registration (i.e. pimreg join) is skipped. This will let the ASIC black hole the traffic till a valid OIL is added to the mroute. 2. (*,G) IGMP registrations are ignored for SSM groups. Sample output: ============= fhr# sh ip pim group-type SSM group range : 232.0.0.0/8 fhr# sh ip pim group-type 232.1.1.1 Group type: SSM fhr# sh ip pim group-type 239.1.1.1 Group type: ASM fhr# Sample config: ============= fhr(config)# ip pim ssm prefix-list ssm-ranges fhr(config)# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-15344 Testing Done: 1. SSM/ASM source-registration/igmp-joins. 2. On the fly multicast group type changes. 3. pim-smoke.
2017-03-21Merge pull request #280 from donaldsharp/more_pimJafar Al-Gharaibeh
More pim
2017-03-17pimd: Add display of SGRpt state for ifchannelDonald Sharp
When we get a SGrpt Prune embedded in the *,G Join, Display the created ifchannel as being SGRpt state. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-16pimd: Add additional output to 'show ip pim state json'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-15*: Refactor if_lookup_by_name to be VRF awareDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-10pimd: display reg-state and join-state info in the pim_upstream outputanuradhak
Changed the state field in the "sh ip pim upstream" output to include register and join state info as a comma separated value. Register info is supressed if reg-state=NoInfo. Sample output: ============= root@fhr:/home/cumulus# net show pim upstream Iif Source Group State Uptime JoinTimer RSTimer KATimer RefCnt swp1 33.1.1.1 239.1.1.2 J,RegP 00:00:18 --:--:-- 00:00:44 00:03:24 2 root@fhr:/home/cumulus# root@rp:/home/cumulus# net show pim upstream Iif Source Group State Uptime JoinTimer RSTimer KATimer RefCnt lo * 239.1.1.2 J 00:02:08 00:00:52 --:--:-- --:--:-- 1 swp1 33.1.1.1 239.1.1.2 J 00:00:16 00:00:11 --:--:-- 00:03:26 1 root@rp:/home/cumulus# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-14700 Testing Done: pim-smoke
2017-03-10pimd: add new/distinct enumeration for pim register stateanuradhak
With the separation of register-state and upstream-join-state we no longer need an enumeration that covers both states. This commit includes the following - 1. Defined new enumeration for reg state (this 1:1 with RFC4601). 2. Dropped JOIN_PENDING enum value from upstream join state. RFC4601 only define two values NOT_JOINED and JOINED for this state. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-14700 Testing Done: Verified register setup manually and ran pim-smoke
2017-03-10pimd: Separate the register and upstream join states on the FHRanuradhak
On the FHR upstream-join-state is not particularly relevant as we don't need to send upstream JPs for the SG. So that field was being overloaded with the register-state. However some of the events that triggered changes to the JoinDesired macro were accidentally overwriting the state with join info (instead of treating it as register info) confusing the register state machine. To make the PIM RFC macros' implemention simple I have separated out the register-state. And upstream->state now solely describes the upstream-join-state independent of the role of the PIM router. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-14700 Testing Done: verified pim-register state-machine with separate and combined FHR/RP routers. Also ran pim-smoke.
2017-03-07Merge branch 'frr/pull/243' ("Pim jp agg")David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-02pimd: Fix 'show ip pim state' commandDonald Sharp
The 'show ip pim state' command was not working quite correctly from when we moved over to the new vtysh-grammar. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02pimd: Hide 'ip multicast-routing' commandDonald Sharp
Automatically turn on pim if the daemon is turned on. Hide the 'ip multicast-routing' command Disable the 'no ip multicast-routing' command Do not display the 'ip multicast-routing' command. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02pimd: Turn on igmp when igmp commands are enteredDonald Sharp
When you enter these commands, under an interface: ip igmp version ... ip igmp query-interval ... ip igmp query-max-response-time ... ip igmp query-max-response-time-dsec ... These commands will now just turn on igmp for the interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02pimd: Join/Prune AggregationDonald Sharp
Add the ability for PIM to send Join/Prunes as an aggregated message instead of individual messages for each S,G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-10*: fix ambiguous commandsDavid Lamparter
Some "show [ip] bgp ipv4 encap ..." commands remaining ambiguous. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-07pimd: Cleanup dest buffer to smallDonald Sharp
Cleanup the in_ifname and out_ifname buffers to be large enough to hold the actual interface names. Additionally move the common variables to be defined once, instead of inside of multiple for loops Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-01pimd: Fix cmd issuesDonald Sharp
Fix possible buffer overwrite and uninitialized idx access. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30pimd: Handle assignment of vif index betterDonald Sharp
PIM was handling vif creation deletion poorly for interface down and up events. Fix this issue by keeping track of which vif index'es we have issued and allow the wholes to be filled in. Ticket: CM-14556 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30pimd: Fixup tracking of where we got OIF's from.Donald Sharp
This commit does these three things: 1) Add code to 'show ip pim state' to show where OIF's got their decision to include that interface 2) Add code in pim_mroute_[add|del] to display what we think we are adding to the kernel 3) Add code to properly track where we got the incoming request from and to appropriately not remove a OIL if we have state still Ticket: CM-14034 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-01-30pimd: Start abstraction of zclient data structure for pim_zebra.cDonald Sharp
Start the abstraction of the zclient data structure out from a global variable for the entire program to a global variable to the pim_zebra.c file. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-26pimd: More pim cli fixupDonald Sharp
Found some additional issues with the pim cli. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-25pimd: Cleanup some missing help strings.Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-25pimd: Fix double add of commandDonald Sharp
We were adding the 'ip msdp ...' command to the parser 2x. Some new code added to the parser apparently catches this for us now. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-19pimd: Cleanup the headers.Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-18pimd: Remove bad mergesDonald Sharp
Two functions were accidentally left around as part of the merge operation. Remove them. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-17Merge remote-tracking branch 'origin/master' into pim_lib_work2Donald Sharp
2017-01-06Merge remote-tracking branch 'origin/stable/2.0'Donald Sharp