summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
AgeCommit message (Collapse)Author
2019-06-11Merge pull request #4494 from donaldsharp/no_src_for_youRuss White
pimd: The PIM_OIF_FLAG_PROTO_SRC flag was never used
2019-06-08pimd: The PIM_OIF_FLAG_PROTO_SRC flag was never usedDonald Sharp
Nor should it be. So remove from system. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-07lib, pimd, sharpd: Various output string cleanupsDonald Sharp
Various compilers in our CI system were complaining about various auto-conversions. Let's get these cleaned up a bit more. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-04Merge pull request #4452 from donaldsharp/mroute_countRuss White
pim: Add `clear ip mroute [vrf NAME] count` command
2019-06-03pimd: Add `clear ip mroute [vrf NAME] count` command to pimDonald Sharp
When debugging a large number of mroutes and data is changing fast it is sometimes hard to know what has actually changed. Add a `clear ip mroute count` command that resets the last data points gathered and allows you to see what has changed since the last clear. Output: donna.cumulusnetworks.com# show ip mroute count Source Group LastUsed Packets Bytes WrongIf * 224.0.1.60 272 0 0 0 10.50.11.11 239.255.255.250 2 1 203 1 10.50.11.13 239.255.255.250 66 1 203 1 10.50.11.100 239.255.255.250 68 1 203 1 10.50.11.114 239.255.255.250 62 2 406 1 10.50.11.129 239.255.255.250 10 1 199 1 10.50.11.143 239.255.255.250 44 1 203 1 10.50.11.144 239.255.255.250 44 1 203 1 10.50.11.156 239.255.255.250 66 1 203 1 10.50.11.235 239.255.255.250 149 0 0 0 10.50.11.246 239.255.255.250 54 5 965 1 donna.cumulusnetworks.com# clear ip mroute count donna.cumulusnetworks.com# show ip mroute count Source Group LastUsed Packets Bytes WrongIf * 224.0.1.60 279 0 0 0 10.50.11.11 239.255.255.250 9 0 0 0 10.50.11.13 239.255.255.250 73 0 0 0 10.50.11.100 239.255.255.250 76 0 0 0 10.50.11.114 239.255.255.250 69 0 0 0 10.50.11.129 239.255.255.250 17 0 0 0 10.50.11.143 239.255.255.250 51 0 0 0 10.50.11.144 239.255.255.250 51 0 0 0 10.50.11.156 239.255.255.250 73 0 0 0 10.50.11.235 239.255.255.250 156 0 0 0 10.50.11.246 239.255.255.250 61 0 0 0 donna.cumulusnetworks.com# show ip mroute count Source Group LastUsed Packets Bytes WrongIf * 224.0.1.60 300 0 0 0 10.50.11.11 239.255.255.250 30 0 0 0 10.50.11.13 239.255.255.250 94 0 0 0 10.50.11.100 239.255.255.250 96 0 0 0 10.50.11.114 239.255.255.250 90 0 0 0 10.50.11.119 239.255.255.250 7 1 203 1 10.50.11.127 239.255.255.250 3 2 406 1 10.50.11.129 239.255.255.250 38 0 0 0 10.50.11.143 239.255.255.250 72 0 0 0 10.50.11.144 239.255.255.250 72 0 0 0 10.50.11.156 239.255.255.250 94 0 0 0 10.50.11.197 239.255.255.250 2 1 200 1 10.50.11.235 239.255.255.250 177 0 0 0 10.50.11.246 239.255.255.250 82 0 0 0 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-03pimd: Convert strncpy to strlcpy in pim_cmd.cDonald Sharp
A couple of places of strncpy snuck in due to my confusion about if Quentin's earlier change had gotten in. Just some code in flux. This should fix the issue/warnings in our CI system.
2019-06-03pimd: Remove unused functionsDonald Sharp
Recent commits rewrote the `clear mroute` command and this caused these two two functions to no longer be used, remove. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-03Merge pull request #4274 from rgirada/fix_clear_mrouteDonald Sharp
pimd: Re-deisgn the "clear ip mroute" command.
2019-05-30Merge pull request #4369 from patrasar/lmqc_lmqtDonald Sharp
pimd: new cli to configure last-member-query-count & last-member-quer…
2019-05-29pimd: new cli to configure last-member-query-count & last-member-query-intervalSarita Patra
Introduce new cli commands ip igmp last-member-query-count <1-7> ip igmp last-member-query-interval <1-255> deciseconds. Display the config in show running config and show ip igmp interface Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-05-29Merge pull request #4267 from qlyoung/fix-misc-compile-warningsRenato Westphal
Fix misc compile warnings, remove strcpy & strcat
2019-05-29pimd: strcpy -> strlcpyQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-29pimd: new cli command show ip mroute summarySarita Patra
Introduced a new command "show ip mroute summary" to display total number of (*, G) and (S, G) mroutes created and number of mroutes installed in the kernel. Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-05-28pimd: Re-deisgn the "clear ip mroute" command.rgirada
Made changes to clean up the all upstreams and ifchannels in FRR apart from cleanup datapath mroutes when this command issued. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2019-05-28Merge pull request #4239 from sarav511/rpJafar Al-Gharaibeh
pimd: PIM Bootstrap Message Processing
2019-05-14pimd: clear pim bsm traffic counters for BSMsaravanank
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: Implement show & clear ip pim statistics commandsaravanank
This would show only bsm related statistics for now. We shall add more statistics to this later. Sw3# show ip pim statistics BSM Statistics : ---------------- Number of Received BSMs : 1584 Number of Forwared BSMs : 793 Number of Dropped BSMs : 1320 Interface : ens192 ------------------- Number of BSMs dropped due to config miss : 0 Number of unicast BSMs dropped : 0 Number of BSMs dropped due to invalid scope zone : 0 Interface : ens224 ------------------- Number of BSMs dropped due to config miss : 0 Number of unicast BSMs dropped : 0 Number of BSMs dropped due to invalid scope zone : 0 Interface : ens256 ------------------- Number of BSMs dropped due to config miss : 0 Number of unicast BSMs dropped : 0 Number of BSMs dropped due to invalid scope zone : 0 Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: Implementation of show ip pim bsrp-info.saravanank
This command displays the group to rp mappings received from BSR. Sw3# show ip pim bsrp-info BSR Address 30.0.0.100 Group Address 225.1.1.1/32 -------------------------- Rp Address priority Holdtime Hash (ACTIVE) 20.0.0.2 0 150 1533588312 2.2.2.2 0 150 1524600152 9.9.9.10 0 150 1489835248 7.7.2.7 0 150 1230207135 7.2.2.7 0 150 1093826719 7.7.9.7 0 150 897086367 7.8.9.10 0 150 811603184 7.5.2.7 0 150 746158239 9.10.9.10 0 150 658117872 (PENDING) Pending RP count :0 Partial List is empty. Group Address 226.1.1.1/32 -------------------------- Rp Address priority Holdtime Hash (ACTIVE) 9.9.9.9 0 150 326773161 (PENDING) Pending RP count :0 Partial List is empty. Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: Implement show ip pim bsm-databasesaravanank
This command shows all the fragments of the last received preferred BSM. This displayed in readable format. Sw3# sh ip pim bsm-database Scope Zone: Global Number of the fragments: 1 BSM Fragment : 1 ------------------ BSR-Address BSR-Priority Hashmask-len Fragment-Tag 30.0.0.100 0 0 3289 Group : 225.1.1.1/32 ------------------- Rp Count:9 Fragment Rp Count : 9 RpAddress HoldTime Priority 20.0.0.2 150 0 2.2.2.2 150 0 9.9.9.10 150 0 7.7.2.7 150 0 7.2.2.7 150 0 7.7.9.7 150 0 7.8.9.10 150 0 7.5.2.7 150 0 9.10.9.10 150 0 Group : 226.1.1.1/32 ------------------- Rp Count:1 Fragment Rp Count : 1 RpAddress HoldTime Priority 9.9.9.9 150 0 Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: Implementation of show ip pim bsr commandsaravanank
Command to display current bsr, last received bsm ts, bsr uptime Sw3# sh ip pim bsr PIMv2 Bootstrap information Current preferred BSR address: 30.0.0.100 Priority Fragment-Tag State UpTime 0 6390 ACCEPT_PREFERRED 91:26:24 Last BSM seen: 00:00:37 Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: rp_new & rp_del split into 2 tier functions & implement rp_changesaravanank
pim_rp_new split into pim_rp_new_config and pim_rp_new. pim_rp_new_config is called by CLI. pim_rp_new will be called by pim_rp_new_config and bsm rp config. pim_rp_del is split into pim_rp_del_config and pim_rp_del pim_rp_del_config is called by CLI. pim_rp_del is called by pim_rp_del_config and bsm rp config Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: interface commands to enable/disable bsm processingsaravanank
(intf)ip pim bsm - to enable bsm processing on the interface (intf)no ip pim bsm - to disable bsm processing on the interface (intf)ip pim unicast-bsm - to enable ucast bsm processing on the interface (intf)no ip pim unicast-bsm - to disable ucast bsm processing on the interface Note: bsm processing and ucast bsm processing is enabled by default on a pim interface. The CLI is implemented as a security feature as recommended by RFC 5059 Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: cli changes to show BSM statistics in show ip pim int trafficsaravanank
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: implement debug pim bsm commandsaravanank
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-02pimd: Stop crash in show of single interfaceDonald Sharp
There exists a possiblity that we have upstream data but at this point in time the rpf failed because there is no path. As such the rpf interface will be NULL and we should not necessarily trust it. Prevent a crash Ticket: CM-24857 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-23pimd: Add missing flags to json outputDonald Sharp
the json code has not been updated since a variety of new flags have been added to the code base. Add those flags in so we can tell what is going on sometimes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-22pimd: Add ability to select on S or G for `show ip mroute`Donald Sharp
Add the ability to select on a S or G for a `show ip mroute` command. show ip mroute 225.1.1.111 show ip mroute 4.5.6.7 225.1.1.111 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-22Merge pull request #4025 from AnuradhaKaruppiah/pim-evpnJafar Al-Gharaibeh
pim-evpn: Forwarding overlay BUM traffic via multicast VxLAN tunnels in the underlay
2019-04-20pimd: hidden command to set MLAG parametersAnuradha Karuppiah
The MLAG component on the switch is expected to provide some properties (such as peerlink-rif) to bootstrap the anycast-VTEP functionality. The final interface for this is being defined as a part of the pim-mlag functionality. This commit provides a hidden command to test the anycast-VTEP functionality independent of the MLAG component. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20pimd: display commands for the pim-vxlan-sg database and worklistAnuradha Karuppiah
Sample output: root@TORS1:~# vtysh -c "show ip pim vxlan-groups" Codes: I -> installed Source Group Input Output Flags 27.0.0.7 239.1.1.101 lo I * 239.1.1.100 - ipmr-lo I * 239.1.1.101 - ipmr-lo I 27.0.0.7 239.1.1.100 lo I root@TORS1:~# root@TORS1:~# vtysh -c "show ip pim vxlan-work" Codes: I -> installed Source Group Input Flags 27.0.0.7 239.1.1.100 lo I PS: note the worklist dump is a hidden command Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20pimd: cli changes for pim-debug-vxlanAnuradha Karuppiah
Sample: root@TORC12:~# vtysh -c "show run" |grep "debug pim vxlan" debug pim vxlan root@TORC12:~# vtysh -c "show debug" |grep "pim vxlan" debug pim vxlan root@TORC12:~# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20pimd: API for enabling pim on the vxlan term device ipmr-loAnuradha Karuppiah
ipmr-lo is a dummy netdev with no additional addressing requirements - root@TORS1:~# ip -d link show ipmr-lo 28: ipmr-lo: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 12:5a:ae:74:51:a2 brd ff:ff:ff:ff:ff:ff promiscuity 0 dummy addrgenmode eui64 root@TORS1:~# This device is used by pim-vxlan to signify multicast-vxlan-tunnel termination. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20pimd: add new OIF type in prep for vxlan supportAnuradha Karuppiah
In an anycast VTEP setup the peerlink-rif (ISL) is added as a OIF to the tunnel origination mroute. A new OIF protocol, VxLAN, has been added to allow that functionalty. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-18pimd: Add ability to select join S,G for 'show ip pim join`Donald Sharp
Add a bit of code to allow us to look at specified S,G for the upstream available to us. If one item is listed we assume Group, if both we assume Source then Group. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-18pimd: Add ability to select upstream on S,G for `show ip pim upstream`Donald Sharp
Add a bit of code to allow us to look at specified S,G for the upstreams available to us. If one item is listed we assume Group, if both we assume Source then Group. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-16Merge pull request #4096 from donaldsharp/pim_nht_cleanupRuss White
Pim nht cleanup
2019-04-11pimd: use debug pim staticMark Stapp
Replace cli 'debug static' with 'debug pim static', to make the 'debug static' node available for staticd (eventually). Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-04-05pimd: Tracking of RPF is *separate* from the lookupDonald Sharp
Start the separation of tracking a Destination from the act of looking it up. The cojoining of these two concepts led to a bunch of code that had to think about both problems leading to weird situations and code paths. Simplify the code by making pim_ecmp_nexthop_search a static function and we only ever call pim_ecmp_nexthop_lookup when we need to do a RPF(). pim_ecmp_nexthop_lookup will now attempt to find a stored pnc and if it finds one it will report on the answer from it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-04Merge pull request #4073 from donaldsharp/undebug_me_or_notLou Berger
some cleanup across multiple daemons
2019-04-03Merge pull request #4060 from donaldsharp/pim_cherrybombJafar Al-Gharaibeh
Pim cherrybomb
2019-04-03bgpd, pimd: Remove undebug commandsDonald Sharp
The undebug XXX commands were deprecated over a year ago now, time to nuke from on high. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-02pimd: pim_nexthop_lookup should return true/falseDonald Sharp
The current reverse logic led to this code construct if (!pim_nexthop_lookup(...)) { //Do something successfull } This is backwards and will cause logic errors when people use this code. Fix to use true/false for success/failure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-31pimd: Introduce mroute_creation in channel oil data structureSarita Patra
Issue: (*,G) mroute uptime is not updated in mroute table, after deleting and adding the RP Root cause: When RP gets deleted or becomes not reachable, then we un-install the entry from the kernel, but still maintains the entry in the stack. When RP gets re-configured or becomes reachable, "show ip mroute" shows the uptime, when the channel_oil gets created. Fix: Introduce a new time mroute_creation in the channel_oil, gets updated when mroute gets installed in the kernel. Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-03-26pimd: Interfaces can be upto 16 charactersDonald Sharp
The interface column in pim was limited to 8 or 9 columns all over the place in pim, fix the code up to allow interface length to be up to 16 columns. Ticket: CM-23083 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-20Merge pull request #3863 from patrasar/RP_addition_deletion_changesDonald Sharp
Rp addition deletion changes
2019-03-15pimd: Display drpriority as a unsigned intDonald Sharp
There existed output code that used %d for a uint32_t switch to a %u. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-11Merge pull request #3907 from donaldsharp/pim_electionDavid Lamparter
pimd: Ensure DR election happens when both sides change prio
2019-03-05pimd: Ensure DR election happens when both sides change prioDonald Sharp
Suppose we have 2 routers A and B. Both Router A and B have the same priority of 1000. Router A is the elected DR. Now suppose B lowers his priority to 1. He still looses the DR election and we are not sending a hello with the new priority. Immediately after this A's priority is also lowered to 1, it looses the election and sends the hello. B receives this hello and elects A as the DR( since it has the better ip address) At this point A believes B is the DR, and B believes A is the DR until such time that the normal hello from B is sent to A, which if timed correctly can be a significant amount of time). This code just causes a hello to be sent if the priority is changed. Now both sides will be able to converge quickly Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-25*: remove null check before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25*: Rename backet to bucketTim Bray
Presume typo from original author Signed-off-by: Tim Bray <tim@kooky.org>