Difference between revisions of "VPP/MFIB"

From fd.io
< VPP
Jump to: navigation, search
Line 1: Line 1:
=== Basics ===
+
= MFIB =
 +
 
 +
== Basics ==
  
 
An IP multicast FIB (mFIB) is a data-structure that holds entries that represent a (S,G) or a (*,G) multicast group. There is one IPv4 and one IPv6 mFIB per IP table, i.e. each time the user calls 'ip[6] table add X' an mFIB is created.
 
An IP multicast FIB (mFIB) is a data-structure that holds entries that represent a (S,G) or a (*,G) multicast group. There is one IPv4 and one IPv6 mFIB per IP table, i.e. each time the user calls 'ip[6] table add X' an mFIB is created.
Line 6: Line 8:
  
 
To add an entry to the default mFIB for the group (1.1.1.1, 239.1.1.1) that will replicate packets to Eth0/0 and Eth0/1, do:
 
To add an entry to the default mFIB for the group (1.1.1.1, 239.1.1.1) that will replicate packets to Eth0/0 and Eth0/1, do:
   ip mroute add 1.1.1.1 239.1.1.1 via Eth0/0 Forwarding
+
   ip mroute add 1.1.1.1 239.1.1.1 via Eth0/0 Forward
   ip mroute add 1.1.1.1 239.1.1.1 via Eth0/1 Forwarding
+
   ip mroute add 1.1.1.1 239.1.1.1 via Eth0/1 Forward
  
 
the flag 'Forwarding' passed with the path specifies this path to be part of the replication set.
 
the flag 'Forwarding' passed with the path specifies this path to be part of the replication set.
 
To add a path from Eth0/2 to the accepting (RPF) set do:
 
To add a path from Eth0/2 to the accepting (RPF) set do:
    ip mroute add 1.1.1.1 239.1.1.1 via Eth0/2 Accept
+
  ip mroute add 1.1.1.1 239.1.1.1 via Eth0/2 Accept
 +
 
 +
A (*,G) entry is added by not specifying a source address:
 +
  ip mroute add 232.2.2.2 via Eth0/2 Forward
 +
 
 +
A (*,G/m) entry is added by not specifying a source address and giving the group address a mask:
 +
  ip mroute add 232.2.2.0/24 via Eth0/2 Forward

Revision as of 16:07, 5 December 2018

MFIB

Basics

An IP multicast FIB (mFIB) is a data-structure that holds entries that represent a (S,G) or a (*,G) multicast group. There is one IPv4 and one IPv6 mFIB per IP table, i.e. each time the user calls 'ip[6] table add X' an mFIB is created.

A path describes either where a packet is sent to or where a packet is received from. mFIB entries maintain two sets of 'paths'; the forwarding set and the accepting set. Each path in the forwarding set will output a replica of a received packet. A received packet is only accepted for forwarding if it ingresses on a path that matches in the accepting set - this is the RPF check.

To add an entry to the default mFIB for the group (1.1.1.1, 239.1.1.1) that will replicate packets to Eth0/0 and Eth0/1, do:

 ip mroute add 1.1.1.1 239.1.1.1 via Eth0/0 Forward
 ip mroute add 1.1.1.1 239.1.1.1 via Eth0/1 Forward

the flag 'Forwarding' passed with the path specifies this path to be part of the replication set. To add a path from Eth0/2 to the accepting (RPF) set do:

 ip mroute add 1.1.1.1 239.1.1.1 via Eth0/2 Accept

A (*,G) entry is added by not specifying a source address:

 ip mroute add 232.2.2.2 via Eth0/2 Forward

A (*,G/m) entry is added by not specifying a source address and giving the group address a mask:

 ip mroute add 232.2.2.0/24 via Eth0/2 Forward