wiki:Realisations/2007-2008/Projet/Core2/Juniper12

Version 2 (modified by oriol, 17 years ago) (diff)

--

Configuration Routeur Juniper 1 (version complète)

version 8.2R2.4;
system {
    host-name juniper1;
    domain-name AS3;
    time-zone CET;
    root-authentication {
        encrypted-password "$1$EFu46VG8$TCmKtr6x2UFvvh2O5c30V/"; ## SECRET-DATA
    }
    login {
        user david {
            full-name "David Oriol";
            uid 777;
            class super-user;
            authentication {
                encrypted-password "$1$AadwKnmW$3xjsir/SfmSyRXmxxPNtZ/"; ## SECRET-DATA
            }
        }
        user fama {
            full-name "Fama Diagne";
            uid 555;
            class super-user;
            authentication {
                encrypted-password "$1$tg4Lp.wq$nlJcPT0gBN0TYuZjKMQ6H0"; ## SECRET-DATA
            }
        }
        user flok {
            full-name "Florent Signorello";
            uid 666;
            class super-user;
            authentication {
                encrypted-password "$1$I.dKkx.t$CbxgTsDy8jNrzkiwVIGi00"; ## SECRET-DATA
            }
        }
    }
    services {
        ftp;
        ssh {
            root-login deny;
            connection-limit 4;
        }
        telnet;
        web-management {
            http {
                interface ge-0/0/3.0;
            }
        }
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any any;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
interfaces {
    ge-0/0/0 {
        unit 0 {
            description toMIR;
            family inet {
                address 10.20.2.2/30;
            }
            family inet6 {
                address 2001:db8:8000:1::2/64;
            }
        }
    }
    ge-0/0/1 {
        unit 0 {
            description toR2;
            family inet {
                address 10.30.254.1/30;
            }
            family inet6 {
                address 2001:db8:0:2000::1/64;
            }
            family mpls;
        }
    }
    ge-0/0/2 {
        unit 0 {
            description toR4;
            family inet {
                address 10.30.254.14/30;
            }
            family inet6 {
                address 2001:db8:0:2003::2/64;
            }
        }
    }
    ge-0/0/3 {
        unit 0 {
            description toPC1;
            family inet {
                address 10.30.1.254/24;
            }
            family inet6 {
                address 2001:db8:0:4001::ffff/64;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 192.168.0.1/32;
            }
            family inet6 {
                address ::1/128;
            }
        }
    }
}
snmp {
    description Juniper1;
    location "AS3 / salle 747 / LIP6";
    contact "David / Florent";
    community public {
        authorization read-only;
    }
}
routing-options {
    rib inet6.0 {
        aggregate {
            route 2001:db8:0::/33;
        }
    }
    static {
        route 10.30.0.0/16 discard;
    }
    router-id 192.168.0.1;
    autonomous-system 65003;
}
protocols {
    igmp {
        interface all {
            version 3;
        }
    }
    router-advertisement {
        interface ge-0/0/3.0 {
            max-advertisement-interval 6;
            min-advertisement-interval 3;
            no-managed-configuration;
            prefix 2001:db8:0:4001::/64;
        }
    }
    rsvp {
        interface ge-0/0/0.0 {
            bandwidth 50k;
        }
        interface ge-0/0/1.0 {
            bandwidth 50k;
        }
        interface ge-0/0/2.0 {
            bandwidth 50k;
        }
        interface fe-0/0/0.0 {
            disable;
        }
    }
    mpls {
        inactive: label-switched-path R1-to-R3 {
            to 192.168.0.3;
        }
        label-switched-path R1-to-R3-rsvp {
            to 192.168.0.3;
        }
        interface all;
        interface fe-0/0/0.0 {
            disable;
        }
        interface ge-0/0/1.0;
    }
    bgp {
        family inet {
            unicast;
            multicast;
        }
        local-as 65003;
        group external {
            type external;
            import filters;
            export [ next-hop-self exp-ospf ];
            peer-as 65002;
            neighbor 10.20.2.1;
        }
        group internal {
            type internal;
            local-address 192.168.0.1;
            neighbor 10.30.254.2;
            neighbor 10.30.254.13;
        }
        group core1-ebgp-v6 {
            type external;
            family inet6 {
                unicast;
            }
            export expv6;
            peer-as 65002;
            neighbor 2001:db8:8000:1::1;
        }
        group core2-ibgp-v6 {
            type internal;
            family inet6 {
                unicast;
            }
            neighbor 2001:db8:0:2000::2;
            neighbor 2001:db8:0:2003::1;
        }
    }
    ospf {
        traffic-engineering;
        area 0.0.0.0 {
            interface ge-0/0/1.0;
            interface ge-0/0/2.0;
            interface lo0.0 {
                passive;
            }
        }
        area 3.3.3.3 {
            interface ge-0/0/0.0 {
                passive;
            }
        }
        area 7.7.7.7 {
            stub;
            interface ge-0/0/3.0 {
                passive;
            }
        }
    }
    ospf3 {
        area 0.0.0.0 {
            interface ge-0/0/1.0;
            interface ge-0/0/2.0;
        }
        area 3.3.3.3 {
            interface ge-0/0/0.0 {
                passive;
            }
        }
        area 7.7.7.7 {
            stub;
            interface ge-0/0/3.0 {
                passive;
            }
        }
    }
    ldp {
        traceoptions {
            file ldp-log;
            flag packets;
        }
        interface ge-0/0/1.0;
    }
    pim {
        interface ge-0/0/0.0 {
            mode dense;
        }
        interface ge-0/0/1.0 {
            mode dense;
        }
        interface ge-0/0/2.0 {
            mode dense;
        }
        interface ge-0/0/3.0 {
            mode dense;
        }
    }
}
policy-options {
    policy-statement exp-ospf {
        term 1 {
            from protocol ospf;
            then accept;
        }
    }
    policy-statement expv6 {
        term 1 {
            from {
                rib inet6.0;
                route-filter 2001:db8::/33 exact accept;
            }
        }
        term 2 {
            then reject;
        }
    }
    policy-statement filters {
        term 1 {
            from {
                route-filter 10.10.0.0/16 orlonger accept;
                route-filter 10.20.0.0/16 orlonger accept;
            }
        }
        term 2 {
            from {
                route-filter 0.0.0.0/16 orlonger reject;
            }
        }
    }
    policy-statement next-hop-self {
        term 1 {
            from protocol bgp;
            then {
                next-hop self;
                accept;
            }
        }
    }
}
class-of-service {
    classifiers {
        dscp pfres {
            import default;
            forwarding-class best-effort {
                loss-priority medium-high code-points be;
            }
            forwarding-class assured-forwarding {
                loss-priority low code-points af41;
            }
            forwarding-class expedited-forwarding {
                loss-priority medium-low code-points ef;
            }
        }
    }
    forwarding-classes {
        queue 0 expedited-forwarding;
        queue 1 assured-forwarding;
        queue 2 best-effort;
    }
    interfaces {
        ge-0/0/0 {
            unit 0 {
                classifiers {
                    dscp pfres;
                }
            }
        }
        ge-0/0/1 {
            unit 0 {
                classifiers {
                    dscp pfres;
                }
            }
        }
        ge-0/0/2 {
            unit 0 {
                classifiers {
                    dscp pfres;
                }
            }
        }
        ge-0/0/3 {
            unit 0 {
                classifiers {
                    dscp pfres;
                }
            }
        }
    }
    scheduler-maps {
        pfres {
            forwarding-class best-effort scheduler best-effort-scheduler;
            forwarding-class expedited-forwarding scheduler expedited-forwarding-scheduler;
            forwarding-class assured-forwarding scheduler assured-forwarding-scheduler;
        }
    }
    schedulers {
        best-effort-scheduler {
            priority low;
        }
        expedited-forwarding-scheduler {
            priority medium-high;
        }
        assured-forwarding-scheduler {
            priority high;
        }
    }
}