interfaces {
    fxp2 {
        unit 57 {
            description "R5 to R7";
            vlan-id 57;
            family inet {
                address 10.5.7.5/24;
            }
        }
        unit 58 {
            description "R5 to R8";
            vlan-id 58;
            family inet {
                address 10.5.8.5/24;
            }
        }
    }
    fxp3 {
        unit 35 {
            description "R5 to R3";
            vlan-id 35;
            family inet {
                address 10.3.5.5/24;
            }
        }
        unit 45 {
            description "R5 to R4";
            vlan-id 45;
            family inet {
                address 10.4.5.5/24;
            }
        }
    }
}
protocols {
    ospf {
        export [ REDISTRIBUTE-RIP REDISTRIBUTE-CONNECTED ];
        area 4.5.6.7 {
            interface fxp2.57;
        }
        area 0.0.0.0 {
            interface fxp3.45;
        }
    }
    rip {
        group BACKBONE {
            export [ REDISTRIBUTE-OSPF REDISTRIBUTE-RIP ];
            neighbor fxp3.35;
            neighbor fxp3.45;
            neighbor fxp2.58;
        }
    }
}
policy-options {
    policy-statement REDISTRIBUTE-CONNECTED {
        from protocol direct;
        then accept;
    }
    policy-statement REDISTRIBUTE-OSPF {
        from protocol ospf;
        then accept;
    }
    policy-statement REDISTRIBUTE-RIP {
        from protocol rip;
        then accept;
    }
}
