Package: inet.routing.pim.modes
PimSm
simple moduleImplementation of PIM-SM protocol (RFC 4601).
PIM-SM is a multicast routing protocol which build a shared multicast forwarding three rooted at a Rendezvous Point (RP) per group, and a source specific forwarding trees from the sources to the RP. It is also capable to switch to a shortest path tree, so that traffic from sources to receivers do not have to pass through the RP.
The module must access the PimInterfaceTable and PimNeighborTable modules, their path is given as the 'pimInterfaceTableModule' and 'pimNeighborTableModule' parameters.
The 'RP' parameter specifies the address of the Rendezvous Point. Currently only one global RP is supported.
If there are multiple PIM routers on a multi-access LAN, only one of them will be responsible for forwarding datagrams to the LAN. This will be the router with the highest IP address except if all routers has 'designatedRouterPriority' set, in which case the highest priority wins (or highest IP address on ties).
Other parameters set the time constants to the values specified in RFC 4601. They should not be changed except for testing.
Limitations:
- Only one global RP is supported and it must be specified statically. PIM Bootstrap and RP discovery is not yet implemented.
- Switchover to the shortest path tree is not supported.
- Source specific excludes in the shared tree are not supported.
Used in compound modules
Name | Type | Description |
---|---|---|
Pim | compound module | (no description) |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
interfaceTableModule | string | ||
routingTableModule | string | ||
pimInterfaceTableModule | string | ||
pimNeighborTableModule | string | ||
RP | string | "" | |
designatedRouterPriority | int | -1 | |
triggeredHelloDelay | double | uniform(0s,5s) | |
helloPeriod | double | 30s | |
holdTime | double | 3.5 * helloPeriod | |
joinPrunePeriod | double | 60s |
period between Join/Prune messages (called t_periodic in the RFC) |
defaultOverrideInterval | double | 2.5s | |
defaultPropagationDelay | double | 0.5s | |
keepAlivePeriod | double | 210s | |
rpKeepAlivePeriod | double | 3 * registerSuppressionTime + registerProbeTime | |
registerSuppressionTime | double | 60s | |
registerProbeTime | double | 5s | |
assertTime | double | 180s | |
assertOverrideInterval | double | 3s |
Properties
Name | Value | Description |
---|---|---|
display | i=block/network2 |
Gates
Name | Direction | Size | Description |
---|---|---|---|
ipIn | input | ||
ipOut | output |
Signals
Name | Type | Unit |
---|---|---|
sentRegisterPk | cPacket | |
sentHelloPk | cPacket | |
sentJoinPrunePk | cPacket | |
rcvdHelloPk | cPacket | |
rcvdJoinPrunePk | cPacket | |
sentRegisterStopPk | cPacket | |
rcvdRegisterPk | cPacket | |
sentAssertPk | cPacket | |
rcvdRegisterStopPk | cPacket | |
rcvdAssertPk | cPacket |
Scheduled messages (observed)
msg | kind | ctrl | tags | msgname | context |
---|---|---|---|---|---|
omnetpp::cMessage | 1 | PIM HelloTimer | |||
omnetpp::cMessage | 12 | PIMRegisterStopTimer | filled | ||
omnetpp::cMessage | 14 | PIMJoinTimer | filled | ||
omnetpp::cMessage | 5 | PIMPrunePendingTimer | filled |
Direct method calls (observed)
call to | function | info |
---|---|---|
InterfaceTable | inet::InterfaceTable::interfaceChanged | interfaceChanged |
Igmpv2 | inet::Igmpv2::receiveSignal | ipv4MulticastGroupJoined |
Ipv4RoutingTable | inet::Ipv4RoutingTable::addMulticastRoute | addMulticastRoute(...) |
Ipv4RoutingTable | inet::Ipv4RoutingTable::findBestMatchingRoute | findBestMatchingRoute(%u.%u.%u.%u) |
Ipv4RoutingTable | inet::Ipv4RoutingTable::getInterfaceForDestAddr | getInterfaceForDestAddr(%u.%u.%u.%u) |
Ipv4RoutingTable | inet::Ipv4RoutingTable::isLocalAddress | isLocalAddress(%u.%u.%u.%u) |
PimSm | inet::PimSm::receiveSignal | pimNeighborChanged |
PimNeighborTable | inet::PimNeighborTable::addNeighbor | addNeighbor |
PimNeighborTable | inet::PimNeighborTable::restartLivenessTimer | restartLivenessTimer |
Called methods (observed)
function | info | call from |
---|---|---|
inet::PimSm::receiveSignal | ipv4DataOnRpf | Ipv4 |
inet::PimSm::receiveSignal | ipv4MdataRegister | Ipv4 |
inet::PimSm::receiveSignal | ipv4MulticastGroupRegistered | Igmpv2 |
inet::PimSm::receiveSignal | ipv4MulticastGroupUnregistered | Igmpv2 |
inet::PimSm::receiveSignal | ipv4NewMulticast | Ipv4 |
inet::PimSm::receiveSignal | pimNeighborAdded | PimNeighborTable |
inet::PimSm::receiveSignal | pimNeighborChanged | PimSm |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
ipIn | Packet | 0 | PimSplitter | DispatchProtocolReq, DscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, TosInd |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
ipOut | Packet | 0 | PimSplitter | DispatchProtocolReq, HopLimitReq, InterfaceReq, L3AddressReq, PacketProtocolTag, DispatchProtocolInd?, DscpInd?, EcnInd?, HopLimitInd?, InterfaceInd?, L3AddressInd?, MacAddressInd?, NetworkProtocolInd?, TosInd? |
Packet operations (observed)
chunkType | packetAction |
---|---|
peekDataAt, trim | |
Ipv4Header | insertAtBack, peekAtFront, popAtFront |
PimHello | insertAtFront, peekAtFront |
PimJoinPrune | insertAtFront, peekAtFront |
PimPacket | peekAtFront |
PimRegister | insertAtFront, popAtFront |
PimRegisterStop | insertAtFront, peekAtFront |
SequenceChunk | insertAtBack |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolInd | addTag, addTagIfAbsent |
DispatchProtocolReq | addTag, addTagIfAbsent |
HopLimitReq | addTag, addTagIfAbsent |
InterfaceInd | getTag |
InterfaceReq | addTag, addTagIfAbsent |
L3AddressInd | getTag |
L3AddressReq | addTag, addTagIfAbsent |
PacketProtocolTag | addTag, addTagIfAbsent |
Tagging operations (observed)
tagType | tagAction |
---|---|
inet::Ipv4InterfaceData | getTag, getTagForUpdate |
Source code
// // Implementation of PIM-SM protocol (RFC 4601). // // PIM-SM is a multicast routing protocol which // build a shared multicast forwarding three rooted at a Rendezvous Point (RP) // per group, and a source specific forwarding trees from the sources to the RP. // It is also capable to switch to a shortest path tree, so that traffic from // sources to receivers do not have to pass through the RP. // // The module must access the ~PimInterfaceTable and ~PimNeighborTable // modules, their path is given as the 'pimInterfaceTableModule' and // 'pimNeighborTableModule' parameters. // // The 'RP' parameter specifies the address of the Rendezvous Point. // Currently only one global RP is supported. // // If there are multiple PIM routers on a multi-access LAN, only one // of them will be responsible for forwarding datagrams to the LAN. // This will be the router with the highest IP address except if // all routers has 'designatedRouterPriority' set, in which case // the highest priority wins (or highest IP address on ties). // // Other parameters set the time constants to the values specified // in RFC 4601. They should not be changed except for testing. // // Limitations: // - Only one global RP is supported and it must be specified statically. // PIM Bootstrap and RP discovery is not yet implemented. // - Switchover to the shortest path tree is not supported. // - Source specific excludes in the shared tree are not supported. // simple PimSm { parameters: @display("i=block/network2"); string interfaceTableModule; string routingTableModule; string pimInterfaceTableModule; string pimNeighborTableModule; string RP = default(""); int designatedRouterPriority = default(-1); volatile double triggeredHelloDelay @unit(s) = uniform(0s,5s); double helloPeriod @unit(s) = 30s; double holdTime @unit(s) = default(3.5 * helloPeriod); double joinPrunePeriod @unit(s) = default(60s); // period between Join/Prune messages (called t_periodic in the RFC) double defaultOverrideInterval @unit(s) = 2.5s; double defaultPropagationDelay @unit(s) = 0.5s; double keepAlivePeriod @unit(s) = 210s; double rpKeepAlivePeriod @unit(s) = 3 * registerSuppressionTime + registerProbeTime; double registerSuppressionTime @unit(s) = 60s; double registerProbeTime @unit(s) = 5s; double assertTime @unit(s) = 180s; double assertOverrideInterval @unit(s) = 3s; @signal[sentHelloPk](type=cPacket); @signal[rcvdHelloPk](type=cPacket); @signal[sentRegisterPk](type=cPacket); @signal[rcvdRegisterPk](type=cPacket); @signal[sentRegisterStopPk](type=cPacket); @signal[rcvdRegisterStopPk](type=cPacket); @signal[sentJoinPrunePk](type=cPacket); @signal[rcvdJoinPrunePk](type=cPacket); @signal[sentAssertPk](type=cPacket); @signal[rcvdAssertPk](type=cPacket); gates: input ipIn; output ipOut; }File: src/inet/routing/pim/modes/PimSm.ned