troglobit / mrouted

The original DVMRP (dynamic multicast routing) implementation for UNIX
https://troglobit.com/projects/mrouted/
Other
83 stars 17 forks source link

Add support for static multicast routes #31

Closed troglobit closed 3 years ago

troglobit commented 4 years ago

For some use-cases where mrouted replaces SMCRoute it would be useful to support setting static routes as well. E.g., a router with three interfaces, where mrouted runs on two of them, a user might want to set up static routes from/to either of these to/from the third one.

The MROUTING stack in both Linux and *BSD does not allow for this using different daemons, since only one can do MRT_INIT for that MRT_TABLE, and each MRT_TABLE can only hold unique interfaces, i.e. no overlap is allowed.

troglobit commented 4 years ago

We could integrate the functionality of SMCRoute, which would be possible, but looking at HP ProCurve, Cisco, and others, they seems to have a syntax more centered around the RPF tree than the group:

ip mroute [vrf name] source-address mask {fallback-lookup {global | vrf name} [protocol] 
                     {rpf-address | interface-type interface-number}} [distance]

For daemons like mrouted, which maintain an RPF tree, this could be a useful feature. However, it takes more investigation, which would further delay the 4.0 release. So I'm moving this to future.

troglobit commented 4 years ago

Yeah, so that ip mroute stuff is only for building the RPF, i.e. the routing table in route.c that's usually constructed from the local vifs and that of neighbors. Probably what we need for #40

troglobit commented 4 years ago

The Cisco ip mroute, for building the RPF, is available as the phyint foo altnet network/len option.

Postponing this for future again, it seems doable but there's a lot of changes needed to make static routes fit in with everything else.

troglobit commented 3 years ago

Apparently, the way to achieve this on Cisco/Juniper is to configure a static group on the outbound interface:

Juniper have the following syntax, for emulating both IGMPv2 and IGMPv3 join:

static {
    group multicast-group-address {
        exclude;
        group-count number;
        group-increment increment;
        source ip-address {
            source-count number;
            source-increment increment;
        }
    }
}

Cisco have:

config t
int gigabitethernet 1/0/1
ip igmp static-group 239.100.100.101

So I propose a static-group GROUP phyint setting.