LinuxCommandLibrary

ip-mroute

Display IP multicast routing cache information

SYNOPSIS

ip mroute [ show | add | del | flush ] [ dev IFACE ] [ from ADDRESS ] [ group ADDRESS ] [ to ADDRESS ] [ iif IFACE ] [ oif IFACE ] [ ttl TTL ]

PARAMETERS

show
    Display the multicast routing cache.

add
    Add a new multicast routing entry.

del
    Delete an existing multicast routing entry.

flush
    Flush all multicast routing entries.
Use with caution!

dev IFACE
    Specifies the interface to use for querying the mroute cache. If omitted, all interfaces are considered.

from ADDRESS
    Specifies the source address of the multicast traffic.

group ADDRESS
    Specifies the multicast group address.

to ADDRESS
    Specifies the destination address (relevant for PIM-SM).

iif IFACE
    Specifies the incoming interface for the multicast traffic.

oif IFACE
    Specifies the outgoing interface for the multicast traffic.

ttl TTL
    Specifies the TTL (Time-To-Live) for the multicast packets.

DESCRIPTION

The ip-mroute command in Linux is used to manage the multicast routing cache in the kernel. Multicast routing is a mechanism for efficiently sending data to multiple recipients simultaneously. The ip-mroute command allows you to view, add, and delete multicast routes. This is crucial for applications and services that rely on multicast communication, such as video streaming, IPTV, and some network protocols. It provides tools for inspecting the multicast routing table, enabling administrators to configure and troubleshoot multicast forwarding. Proper configuration ensures efficient multicast delivery, preventing unnecessary network traffic and optimizing resource utilization. The command interacts directly with the kernel's multicast routing functionality, offering fine-grained control over multicast packet forwarding. Different options allow listing existing entries, or modifying or deleting those entries.

CAVEATS

Modifying the multicast routing table incorrectly can disrupt network communication. Understanding multicast routing protocols (e.g., PIM-SM, PIM-DM) is essential before making changes.

MULTICAST FORWARDING CACHE

The multicast forwarding cache is a kernel-level data structure that stores information about active multicast streams. The ip mroute command interacts with this cache to manage multicast routing decisions.

PIM (PROTOCOL INDEPENDENT MULTICAST)

Multicast protocols like PIM-SM (Sparse Mode) and PIM-DM (Dense Mode) influence how the mroute cache is populated and managed. The `ip mroute` command can be used to observe and configure routes learned and installed by PIM daemons.

HISTORY

The iproute2 suite, including ip-mroute, replaced the older net-tools. It was developed to provide a more modern and feature-rich interface for network configuration. It became prevalent with the wider adoption of Linux for networking and routing roles.

SEE ALSO

ip(8), route(8), ss(8), netstat(8)

Copied to clipboard