Saturday, July 2, 2011

Woohoo, 3-way!

I added my third router and machine, but couldn't get multicast to go more than one hop... it turns out that when I tried to test msdp and pim without tunneling them, msdp worked, pim didn't, so only pim got changed back to the tunneled address. Changing msdp to the tunnelled address made it work almost immediately!

Config dump

interfaces {
    em0 {
        unit 0 {
            family inet {
                address 10.1.1.198/8;
            }
        }
    }
    em1 {
        unit 0 {
            family inet {
                address 192.168.11.1/24;
            }
        }
    }
    em2 {
        unit 0 {
            family inet {
                address 192.168.2.1/24;
            }
        }
    }
    em3 {
        unit 0;
    }
    gre {
        unit 0 {
            tunnel {
                source 192.168.11.1;
                destination 192.168.11.2;
            }
            family inet {
                address 192.168.101.1/30;
            }
            family inet6 {
                address 2001:4428:251:2::1:1/120;
            }
        }
    }
    ipip {
        unit 0 {
            tunnel {
                source 192.168.2.1;
                destination 192.168.2.2;
            }
            family inet {
                address 192.168.201.1/30;
            }
            family inet6 {
                address 2001:4428:251:2::1/120;
            }
        }
        unit 1 {
            tunnel {
                source 192.168.2.1;
                destination 192.168.2.3;
            }
            family inet {
                address 192.168.202.1/30;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.1/32;
            }
        }
    }
}
routing-options {
    interface-routes {
        rib-group inet if-rib;
    }
    rib-groups {
        multicast-rpf-rib {
            export-rib inet.2;
            import-rib inet.2;
        }
        if-rib {
            import-rib [ inet.2 inet.0 ];
        }
    }
    autonomous-system 65000;
}
protocols {
    igmp {
        interface all {
            version 3;
        }
    }
    bgp {
        local-as 65000;
        group branch1 {
            type external;
            export [ to-branch1 allow-all ];
            peer-as 65001;
            neighbor 192.168.201.2 {
                family inet {
                    any;
                }
            }
            neighbor 2001:4428:251:2::2 {
                family inet6 {
                    any;
                }
            }
        }
        group branch2 {
            type external;
            export [ to-branch1 allow-all ];
            peer-as 65002;
            neighbor 192.168.202.2 {
                family inet {
                    any;
                }
            }
        }
    }
    msdp {
        rib-group inet multicast-rpf-rib;
        export allow-all;
        import allow-all;
        group test {
            peer 192.168.202.2 {
                local-address 192.168.202.1;
            }
            peer 192.168.201.2 {
                local-address 192.168.201.1;
            }
        }
    }
    pim {
        rib-group inet multicast-rpf-rib;
        rp {
            local {
                address 192.168.101.1;
                group-ranges {
                    224.0.0.0/4;
                }
            }
        }
        interface all {
            mode sparse;
            version 2;
        }
        dr-election-on-p2p;
    }
    rip {
        group gateway {
            export gateway-rip;
            neighbor em0.0;
        }
    }
}
policy-options {
    policy-statement allow-all {
        then accept;
    }
    policy-statement gateway-rip {
        from protocol [ direct bgp ];
        then accept;
    }
    policy-statement reject-all {
        from protocol rip;
        then reject;
    }
    policy-statement to-branch {
        from protocol [ direct local ospf bgp static rip pim ];
        then accept;
    }
    policy-statement to-branch1 {
        from protocol [ direct local ospf bgp static rip pim ];
        then accept;
    }
}

As you can see, I've started setting up IPv6 addresses on the routers. I've got RA and stateful DHCPv6 working on my real network, so there's no point muddying up the config here. By the way, it turns out you can have as many tunnels as you like - turns out stacking routed gre/ipip interfaces is totally okay. I hope to have some IPv6 multicast results this evening, so stay tuned

Clockwork Olive: multicast update

After much pissing around it turns out multicast does work, but emcast has been having problems. Dbeacon runs well in super verbose mode, emcast receives the info, but just doesn't seem to send very well - it could be that the olives are just being shit and dropping packets though.

Want to see the config?


interfaces {
    em0 {
        unit 0 {
            family inet {
                address 192.168.2.2/24;
            }
        }
    }
    em1 {
        unit 0 {
            family inet {
                address 192.168.12.1/24;
            }
        }
    }
    gre {
        unit 0 {
            tunnel {
                source 192.168.12.1;
                destination 192.168.12.2;
            }
            family inet {
                address 192.168.102.1/30;
            }
        }
    }
    ipip {
        unit 0 {
            tunnel {
                source 192.168.2.2;
                destination 192.168.2.1;
            }
            family inet {
                address 192.168.201.2/30;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.2/32;
            }
        }
    }
}
routing-options {
    interface-routes {
        rib-group inet if-rib;
    }
    rib-groups {
        multicast-rpf-rib {
            export-rib inet.2;
            import-rib inet.2;
        }
        if-rib {
            import-rib [ inet.2 inet.0 ];
        }
    }
    autonomous-system 65001;
}
protocols {
    igmp {
        interface all {
            version 3;
        }
    }
    bgp {
        local-as 65001;
        group olive {
            type external;
            family inet {
                any;
            }
            export to-branch1;
            peer-as 65000;
            neighbor 192.168.201.1;
        }
    }
    msdp {
        rib-group inet multicast-rpf-rib;
        group test {
            peer 192.168.201.1 {
                local-address 192.168.201.2;
            }
        }
    }
    pim {
        rib-group inet multicast-rpf-rib;
        rp {
            local {
                address 192.168.102.1;
                group-ranges {
                    224.0.0.0/4;
                }
            }
        }
        interface all {
            mode sparse;
            version 2;
        }
        dr-election-on-p2p;
    }
}
policy-options {
    policy-statement allow-all {
        then accept;
    }
    policy-statement to-branch1 {
        from protocol [ direct local ospf bgp pim ];
        then accept;
    }
}


I'm going to be a bastard any sources except this one. I'm tempted to chalk the emcast send failure down to packets simply being dropped, and maybe try a test VLC stream if I can be bothered with that, but this was only meant to be a means to an end - the next step is IPv6 multicast!