# Enabling PIM on an Interface

You can enable PIM on an interface in one of the PIM modes (dense, sparse, or sparse-dense) and specify how often the interface sends hello messages to neighbors.

You can configure PIM and IGMP on the same interface. If you configure IGMP and PIM on an interface, the router determines that PIM owns the interface.

| Note: You cannot configure DVMRP and PIM on the same interface.

ip pim

- Use to enable PIM on an interface; dense mode is the default.
- Example
  host1(config-if)#ip pim sparse-dense-mode
- Use the no version to disable PIM on an interface.
- See ip pim.

ip pim query-interval

- Use to specify the interval, in seconds, at which the router sends hello messages to neighbors.
- Example
  host1(config-if)#ip pim query-interval 100
- Use the no version to restore the default setting, 30 seconds.
- See ip pim query-interval.

ip pim sparse-mode graceful-restart-duration

- Use to set the graceful restart duration for IP PIM sparse mode.
- Example
  host1(config-if)#ip pim sparse-mode graceful-restart-duration 10
- Use the no version to return to the default duration of 30 seconds.
- See ip pim sparse-mode graceful-restart-duration.