summaryrefslogtreecommitdiff
path: root/docs/configuration/protocols/multicast.md
blob: 813a18a0b8b216ba946d001a34a3d01527308579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
myst:
  html_meta:
    description: |
      Static multicast routes (mroutes) explicitly define the expected upstream
      path for Reverse-Path Forwarding (RPF) checks on arriving multicast
      traffic.
    keywords: multicast, mroute, rpf, mrib, rib
---

(routing-static-multicast)=

# Multicast

Static multicast routes (``mroutes``) explicitly define the expected
upstream path (either a next-hop IP address or an incoming interface) for
{abbr}`RPF (Reverse-Path Forwarding)` checks on arriving multicast traffic,
overriding the default RPF behavior.

When a multicast packet arrives, the router performs the RPF check against the
matching ``mroute`` in the dedicated **multicast** routing table
({abbr}`MRIB (Multicast Routing Information Base)`), rather than looking up
the standard **unicast** routing table
({abbr}`RIB (Routing Information Base)`).

If the packet arrives via the expected upstream path defined in the MRIB, the
RPF check passes, and the packet is forwarded toward the multicast receivers.
Otherwise, the packet is dropped.

Administrators build the MRIB by manually configuring ``mroutes``. The ZEBRA
routing daemon uses these entries exclusively for multicast RPF lookups. ZEBRA
neither evaluates ``mroutes`` in the unicast RIB nor installs them into the
kernel {abbr}`FIB (Forwarding Information Base)`.

## Configuration

Use the following commands to configure ``mroutes`` for a specific multicast
source subnet.

```{note}
Because ``mroutes`` bypass standard forwarding logic, they may cause
unpredictable network behavior. Use ``mroutes`` with caution; in most cases,
overriding the default RPF check is unnecessary.
```

### Next-hop mroutes

```{cfgcmd} set protocols static mroute \<subnet\> next-hop \<address\>

**Configure the next-hop IP address for the specified source subnet.**

When multicast traffic originates from this subnet, the router expects it to
arrive from the upstream neighbor at the specified IP address.

You can configure multiple next-hop IP addresses for the same source subnet.
```

Example:

```none
set protocols static mroute 192.0.2.0/24 next-hop 203.0.113.1
```

```{cfgcmd} set protocols static mroute \<subnet\> next-hop \<address\> distance \<1-255\>

**Configure the administrative distance for the mroute via the specified
next-hop IP address.**

``Mroutes`` with a lower administrative distance are prioritized over
``mroutes`` with a higher distance.

The allowed range is 1 to 255.
```

Example:

```none
set protocols static mroute 192.0.2.0/24 next-hop 203.0.113.1 distance 50
```

```{cfgcmd} set protocols static mroute \<subnet\> next-hop \<address\> disable

**Disable the mroute via the specified next-hop IP address.**

This command temporarily deactivates the ``mroute`` while preserving the
configured subnet, next-hop, and distance parameters.
```

Example:

```none
set protocols static mroute 192.0.2.0/24 next-hop 203.0.113.1 disable
```

### Interface mroutes

```{cfgcmd} set protocols static mroute \<subnet\> interface \<interface\>

**Configure the valid interface for the specified source subnet.**

When multicast traffic originates from this subnet, the router expects it to
arrive on the specified interface.

You can configure multiple interfaces for the same source subnet.
```

Example:

```none
set protocols static mroute 192.0.2.0/24 interface eth0
```

```{cfgcmd} set protocols static mroute \<subnet\> interface \<interface\> distance \<1-255\>

**Configure the administrative distance for the mroute via the specified
interface.**

``Mroutes`` with a lower administrative distance are prioritized over
``mroutes`` with a higher distance.

The allowed range is 1 to 255.
```

Example:

```none
set protocols static mroute 192.0.2.0/24 interface eth0 distance 30
```

```{cfgcmd} set protocols static mroute \<subnet\> interface \<interface\> disable

**Disable the mroute via the specified interface.**

This command temporarily deactivates the ``mroute`` while preserving the
configured subnet, interface, and distance parameters.
```

Example:

```none
set protocols static mroute 192.0.2.0/24 interface eth0 disable
```