| 1 | README for pimd, the PIM-SM v2 multicast daemon |
|---|
| 2 | =============================================== |
|---|
| 3 | This is pimd, a lightweight, stand-alone implementation of Protocol Independent |
|---|
| 4 | Multicast-Sparse Mode that may be freely distributed and/or deployed under the |
|---|
| 5 | BSD license. The project implements the full PIM-SM specification according to |
|---|
| 6 | RFC 2362 with a few noted exceptions (see the RELEASE.NOTES for details). |
|---|
| 7 | |
|---|
| 8 | The software should compile and run on most UNIX varieties, including FreeBSD, |
|---|
| 9 | BSDi, NetBSD, OpenBSD, SunOS, IRIX, Solaris 2.5, Solaris 2.6, and GNU/Linux. |
|---|
| 10 | It has, however, not been thoroughly tested on all these. |
|---|
| 11 | |
|---|
| 12 | If you have any questions, suggestions, bug reports, patches, or pull requests, |
|---|
| 13 | please do NOT send them to the PIM IETF Working Group mailing list! Instead, |
|---|
| 14 | contact the current maintainer, see the file AUTHORS, or use the github issue |
|---|
| 15 | tracker at: |
|---|
| 16 | |
|---|
| 17 | http://github.com/troglobit/pimd/issues |
|---|
| 18 | |
|---|
| 19 | The following helpful text is a rip-off from the book Linux Routing. See |
|---|
| 20 | http://linux-networks.net/New.Riders-Linux.Routing/tindex.htm for more. |
|---|
| 21 | |
|---|
| 22 | Configuring pimd |
|---|
| 23 | ---------------- |
|---|
| 24 | Since pimd is a single-function daemon, the configuration is really not that |
|---|
| 25 | complex -- at least when compared to a monster tool such as gated. The |
|---|
| 26 | configuration data is kept in the file /etc/pimd.conf. While the order of the |
|---|
| 27 | statements does not have to strictly follow what is about to be presented, |
|---|
| 28 | I'll walk you through the contents you might want to add to this file. |
|---|
| 29 | |
|---|
| 30 | The /etc/pimd.conf file begins with the following statement: |
|---|
| 31 | |
|---|
| 32 | default_source_preference value |
|---|
| 33 | |
|---|
| 34 | Routers hold elections to determine which gets to be a site's upstream router. |
|---|
| 35 | Because pimd is such a focused tool, you generally don't want it to win over |
|---|
| 36 | something more general. Using a value of 101 here is a minimum for making |
|---|
| 37 | sure that gated and other routing tools are going to win the election and |
|---|
| 38 | leave pimd to do its PIM-SM handling. The next line is: |
|---|
| 39 | |
|---|
| 40 | default_source_metric value |
|---|
| 41 | |
|---|
| 42 | This item sets the cost for sending data through this router. You want only |
|---|
| 43 | PIM-SM data to go to this daemon; so once again, a high value is recommended |
|---|
| 44 | to prevent accidental usage. The preferred default value is 1024. |
|---|
| 45 | |
|---|
| 46 | Though you can swap the first two statements around, you must have the next |
|---|
| 47 | statement after you set default_source_metric. This item starts with: |
|---|
| 48 | |
|---|
| 49 | phyint interface |
|---|
| 50 | |
|---|
| 51 | phyint refers to physical interface. You fill in interface with a reference to |
|---|
| 52 | the ethernet card or other network interface you're telling pimd about, either |
|---|
| 53 | with the device's IP address or name (for example, eth0). If you just want to |
|---|
| 54 | activate this interface with default values, you don't need to put anything |
|---|
| 55 | else on the line. However, you do have some additional items you can add. The |
|---|
| 56 | items are, in the order you would need to use them, as follows: |
|---|
| 57 | |
|---|
| 58 | * _disable_. Do not send PIM-SM traffic through this interface nor listen |
|---|
| 59 | for PIM-SM traffic from this interface. |
|---|
| 60 | |
|---|
| 61 | * preference pref. This interface's value in an election. It will have the |
|---|
| 62 | default_source_preference if not assigned. |
|---|
| 63 | |
|---|
| 64 | * metric cost. The cost of sending data through this interface. It will |
|---|
| 65 | have the default_source_metric if not assigned. |
|---|
| 66 | |
|---|
| 67 | Add one phyint line per interface on this router. If you don't do this, pimd |
|---|
| 68 | will simply assume that you want it to utilize all interfaces on the machine |
|---|
| 69 | with the default values. If you set phyint for one or more interfaces but not |
|---|
| 70 | for all, the missing ones will be assigned the defaults. After you have done |
|---|
| 71 | this, start the next line with: |
|---|
| 72 | |
|---|
| 73 | cand_rp |
|---|
| 74 | |
|---|
| 75 | cand_rp refers to Candidate Rendezvous Point (CRP). This statement specifies |
|---|
| 76 | which interface on this machine should be included in RP elections. Additional |
|---|
| 77 | options to choose from are, listed in the order used, as follows: |
|---|
| 78 | |
|---|
| 79 | * ipadd. The default is the largest activated IP address. If you don't want |
|---|
| 80 | to utilize that interface, add the IP address of the interface to use as |
|---|
| 81 | the next term. |
|---|
| 82 | |
|---|
| 83 | * time value. The number of seconds to wait between advertising this |
|---|
| 84 | CRP. The default value is 60 seconds. |
|---|
| 85 | |
|---|
| 86 | * priority num. How important this CRP is compared to others. The lower the |
|---|
| 87 | value here, the more important the CRP. |
|---|
| 88 | |
|---|
| 89 | The next line begins with: |
|---|
| 90 | |
|---|
| 91 | cand_bootstrap_router |
|---|
| 92 | |
|---|
| 93 | Here you give the information for how this machine advertises itself as a |
|---|
| 94 | Candidate BootStrap Router (CBSR). If you need to, add the ipaddr and/or |
|---|
| 95 | priority items as defined earlier after cand_bootstrap_router. What follows |
|---|
| 96 | is a series of statements that start with: |
|---|
| 97 | |
|---|
| 98 | group_prefix |
|---|
| 99 | |
|---|
| 100 | Each group_prefix statement outlines the set of multicast addresses that CRP, |
|---|
| 101 | if it wins an election, will advertise to other routers. The two items you |
|---|
| 102 | might include here are, listed in order, as follows: |
|---|
| 103 | |
|---|
| 104 | * groupaddr. A specific IP or network range this router will handle. |
|---|
| 105 | Remember that a single multicast network is written as a single IP |
|---|
| 106 | address. |
|---|
| 107 | |
|---|
| 108 | * masklen len. The number of IP address segments taken up by the netmask. |
|---|
| 109 | Remember that a multicast address is a Class D and has a netmask of |
|---|
| 110 | 255.255.255.255, which means its length is 4. |
|---|
| 111 | |
|---|
| 112 | Max group_prefix multicast addresses supported in pimd is 255. |
|---|
| 113 | |
|---|
| 114 | After this comes: |
|---|
| 115 | |
|---|
| 116 | switch_data_threshold rate rvalue interval ivalue |
|---|
| 117 | |
|---|
| 118 | This statement defines the threshold at which transmission rates trigger the |
|---|
| 119 | changeover from the shared tree to the RP tree; starting the line with |
|---|
| 120 | switch_register_threshold does the opposite in the same format. (See Chapter |
|---|
| 121 | 2, "Multicast Protocols," for more details on the two PIM-SM trees.) |
|---|
| 122 | Regardless of which of these you choose, the rvalue stands for the |
|---|
| 123 | transmission rate in bits per second, and ivalue sets how often to sample the |
|---|
| 124 | rate in seconds -- with a recommended minimum of five seconds. It's |
|---|
| 125 | recommended by the pimd programmers to have ivalue the same in both |
|---|
| 126 | statements. |
|---|
| 127 | |
|---|
| 128 | For example, I might end up with the following (these are real IP addresses; |
|---|
| 129 | don't use them for actual testing purposes): |
|---|
| 130 | |
|---|
| 131 | default_source_preference 105 |
|---|
| 132 | |
|---|
| 133 | phyint 199.60.103.90 disable |
|---|
| 134 | phyint 199.60.103.91 preference 1029 |
|---|
| 135 | phyint 199.60.103.92 preference 1024 |
|---|
| 136 | cand_rp 199.60.103.91 |
|---|
| 137 | cand_bootstrap_router 199.60.103.92 |
|---|
| 138 | group_prefix 199.60.103.0 masklen 4 |
|---|
| 139 | switch_data_threshold rate 60000 interval 10 |
|---|
| 140 | switch_register_threshold rate 60000 interval 10 |
|---|
| 141 | |
|---|
| 142 | Running pimd |
|---|
| 143 | ------------ |
|---|
| 144 | After you've set up the configuration file, you're ready to actually run the |
|---|
| 145 | PIM-SM daemon, pimd. As usual, we tend to recommend that you run this by hand |
|---|
| 146 | for testing purposes and then later add the daemon, with any startup flags it |
|---|
| 147 | needs, to your system's startup scripts. |
|---|
| 148 | |
|---|
| 149 | The format for running this daemon is: |
|---|
| 150 | |
|---|
| 151 | pimd -c file -d level1,...,levelN |
|---|
| 152 | |
|---|
| 153 | Both of the flags with their values are optional: |
|---|
| 154 | |
|---|
| 155 | * -c file. Utilize the specified configuration file rather than the |
|---|
| 156 | default, /etc/pimd.conf. |
|---|
| 157 | |
|---|
| 158 | * -d level1,...,levelN. Specifies the debug level(s) to utilize when |
|---|
| 159 | running this daemon. Type pimd -h for a full list of these levels. |
|---|