PE1 @ 9 – Inter-AS Option B

## Last commit: 2015-07-26 13:19:48 UTC by juniper
version 15.1-20150327_ib_15_1_psd.1;
system {
    host-name 00-PE1;
    root-authentication {
        encrypted-password “$5$UtCgvITo$qB7eJZA5VvexJa8ADdmn.avTjkJQ47SC.Q/i.lzWhc9”; ## SECRET-DATA
    }
    login {
        user juniper {
            uid 2000;
            class super-user;
            authentication {
                encrypted-password “$5$L9yJNREr$Gz.PM4rZ5.KrxWUmBhTUHv9lnglXHirebGrBCyN0tO6”; ## SECRET-DATA
            }
        }
    }
    static-host-mapping {
        CE1 inet [ 192.168.10.1 10.1.12.1 10.1.0.0 10.1.0.4 ];
        CE2 inet [ 192.168.10.2 10.1.12.2 10.1.0.6 10.1.0.2 ];
        PE1 inet [ 172.16.0.11 10.1.0.1 10.1.0.7 10.0.0.0 10.0.0.2 10.2.34.3 ];
        PE2 inet [ 172.16.0.22 10.1.0.3 10.1.0.5 10.0.0.1 10.0.0.4 10.2.34.4 ];
        PE3 inet [ 172.16.0.33 10.0.0.9 10.0.0.12 10.2.0.33 ];
        PE4 inet [ 172.16.0.44 10.0.0.11 10.0.0.13 10.2.0.44 ];
        P1 inet [ 172.16.0.1 10.0.0.3 10.0.0.16 10.0.0.6 10.0.0.20 10.0.0.8 10.0.0.24 ];
        P2 inet [ 172.16.0.2 10.0.0.5 10.0.0.18 10.0.0.7 10.0.0.22 10.0.0.10 10.0.0.25 ];
        RR1 inet [ 172.16.0.201 10.0.0.17 10.0.0.14 10.0.0.19 ];
        RR2 inet [ 172.16.0.202 10.0.0.21 10.0.0.15 10.0.0.23 ];
        CE3 inet [ 192.168.20.3 10.2.0.3 10.2.34.3 ];
        CE4 inet [ 192.168.20.4 10.2.0.4 10.2.34.4 ];
    }
    services {
        ftp;
        ssh;
        telnet;
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
interfaces {
    ge-2/0/0 {
        mac 00:50:56:8b:1a:2b;
        unit 0 {
            family inet {
                address 10.255.0.21/16;
            }
        }
    }
    ge-2/0/1 {
        vlan-tagging;
        mac 00:50:56:8b:c0:62;
        unit 1001 {
            vlan-id 1001;
            family inet {
                address 10.1.0.1/31;
            }
            family inet6 {
                address fc00::10:1:0:1/127;
            }
        }
        unit 1002 {
            vlan-id 1002;
            family inet {
                address 10.1.0.1/31;
            }
            family inet6 {
                address fc00::10:1:0:1/127;
            }
        }
        unit 1003 {
            vlan-id 1003;
            family inet {
                address 10.10.0.1/31;
            }
            family inet6 {
                address fc00::10:10:0:1/127;
            }
        }
    }
    ge-2/0/2 {
        vlan-tagging;
        mac 00:50:56:8b:12:02;
        unit 1001 {
            vlan-id 1001;
            family inet {
                address 10.1.0.7/31;
            }
            family inet6 {
                address fc00::10:1:0:7/127;
            }
        }
        unit 1002 {
            vlan-id 1002;
            family inet {
                address 10.1.0.7/31;
            }
            family inet6 {
                address fc00::10:1:0:7/127;
            }
        }
        unit 1003 {
            vlan-id 1003;
            family inet {
                address 10.10.0.7/31;
            }
            family inet6 {
                address fc00::10:10:0:7/127;
            }
        }
    }
    ge-2/0/3 {
        mac 00:50:56:8b:d2:e9;
        unit 0 {
            family inet {
                address 10.0.0.0/31;
            }
            family iso;
            family inet6;
            family mpls;
        }
    }
    ge-2/0/4 {
        mac 00:50:56:8b:21:67;
        unit 0 {
            family inet {
                address 10.0.0.2/31;
            }
            family iso;
            family inet6;
            family mpls;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 172.16.0.11/32 {
                    primary;
                }
            }
            family iso {
                address 49.0000.1720.1600.0011.00;
            }
        }
    }
}
forwarding-options {
    no-load-balance-label-capability;
}
routing-options {
    rib inet.3 {
        static {
            route 172.16.0.201/32 discard;
            route 172.16.0.202/32 discard;
        }
    }
    static {
        route 0.0.0.0/0 discard;
    }
    router-id 172.16.0.11;
    autonomous-system 65100;
    forwarding-table {
        export PL-LB;
    }
}
protocols {
    rsvp {
        interface ge-2/0/3.0;
        interface ge-2/0/4.0;
    }
    mpls {
        ipv6-tunneling;
        icmp-tunneling;
        label-switched-path PE1–>ASBR1 {
            to 172.16.0.101;
        }
        label-switched-path PE1–>ASBR2 {
            to 172.16.0.102;
        }
        interface ge-2/0/3.0;
        interface ge-2/0/4.0;
    }
    bgp {
        group IBGP-RR {
            type internal;
            local-address 172.16.0.11;
            family inet-vpn {
                unicast;
            }
            family inet6-vpn {
                unicast;
            }
            family route-target;
            export PL-IBGP-RR-OUT;
            neighbor 172.16.0.201;
            neighbor 172.16.0.202;
        }
    }
    isis {
        no-ipv6-routing;
        level 1 disable;
        level 2 wide-metrics-only;
        interface ge-2/0/3.0 {
            point-to-point;
            level 2 metric 100;
        }
        interface ge-2/0/4.0 {
            point-to-point;
        }
        interface lo0.0;
    }
    lldp {
        interface all;
    }
}
policy-options {
    policy-statement PL-EBGP-CE1-OUT {
        term BGP {
            then {
                metric 100;
            }
        }
        term IPv6 {
            from family inet6;
            then {
                next-hop fc00::10:1:0:1;
            }
        }
    }
    policy-statement PL-EBGP-CE2-OUT {
        term BGP {
            then {
                metric 200;
            }
        }
        term IPv6 {
            from family inet6;
            then {
                next-hop fc00::10:1:0:7;
            }
        }
    }
    policy-statement PL-IBGP-RR-OUT {
        term NHS {
            from family inet;
            then {
                next-hop self;
            }
        }
    }
    policy-statement PL-LB {
        then {
            load-balance per-packet;
        }
    }
    policy-statement PL-LDP-EGRESS {
        term LOOPBACK-B-C {
            from {
                route-filter 172.16.1.11/32 exact;
                route-filter 172.16.2.11/32 exact;
            }
            then accept;
        }
        term REST {
            then reject;
        }
    }
    policy-statement PL-VRF-A-EBGP-65001-CE1-IN {
        term EBGP {
            then {
                community set SOO-A-1;
            }
        }
    }
    policy-statement PL-VRF-A-EBGP-65001-CE1-OUT {
        term SOO {
            from community SOO-A-1;
            then reject;
        }
        term BGP {
            from protocol bgp;
            then {
                metric 100;
                community delete RT-ALL;
            }
        }
        term IPv6 {
            from family inet6;
            then {
                next-hop fc00::10:1:0:1;
            }
        }
    }
    policy-statement PL-VRF-A-EBGP-65001-CE2-IN {
        term SOO {
            then {
                community set SOO-A-1;
            }
        }
    }
    policy-statement PL-VRF-A-EBGP-65001-CE2-OUT {
        term SOO {
            from community SOO-A-1;
            then reject;
        }
        term BGP {
            from protocol bgp;
            then {
                metric 200;
                community delete RT-ALL;
            }
        }
        term IPv6 {
            from family inet6;
            then {
                next-hop fc00::10:1:0:7;
            }
        }
    }
    policy-statement PL-VRF-A-EXP {
        term EBGP {
            from protocol bgp;
            then {
                community add RT-VPN-A;
                accept;
            }
        }
    }
    policy-statement PL-VRF-A-IMP {
        term EBGP {
            from community RT-VPN-A;
            then accept;
        }
    }
    policy-statement PL-VRF-B-EBGP-65001-CE1-OUT {
        term BGP {
            from protocol bgp;
            then {
                metric 100;
                community delete RT-ALL;
            }
        }
        term IPv6 {
            from family inet6;
            then {
                next-hop fc00::10:10:0:1;
            }
        }
    }
    policy-statement PL-VRF-B-EBGP-65001-CE2-OUT {
        term BGP {
            from protocol bgp;
            then {
                metric 200;
                community delete RT-ALL;
            }
        }
        term IPv6 {
            from family inet6;
            then {
                next-hop fc00::10:10:0:7;
            }
        }
    }
    policy-statement PL-VRF-B-EXP {
        term EBGP {
            from protocol bgp;
            then {
                community add RT-VPN-B;
                accept;
            }
        }
    }
    policy-statement PL-VRF-B-IMP {
        term EBGP {
            from community RT-VPN-B;
            then accept;
        }
    }
    community RT-ALL members target:*:*;
    community RT-VPN-A members target:65000:1001;
    community RT-VPN-B members target:65000:1002;
    community SOO-A-1 members origin:65000:10112;
}
routing-instances {
    VRF-A {
        instance-type vrf;
        interface ge-2/0/1.1002;
        interface ge-2/0/2.1002;
        route-distinguisher 172.16.0.11:101;
        vrf-import PL-VRF-A-IMP;
        vrf-export PL-VRF-A-EXP;
        vrf-table-label;
        protocols {
            bgp {
                group EBGP-65001 {
                    family inet {
                        unicast;
                    }
                    family inet6 {
                        unicast;
                    }
                    peer-as 65001;
                    as-override;
                    neighbor 10.1.0.0 {
                        import PL-VRF-A-EBGP-65001-CE1-IN;
                        export PL-VRF-A-EBGP-65001-CE1-OUT;
                    }
                    neighbor 10.1.0.6 {
                        import PL-VRF-A-EBGP-65001-CE2-IN;
                        export PL-VRF-A-EBGP-65001-CE2-OUT;
                    }
                }
            }
        }
    }
    VRF-B {
        instance-type vrf;
        interface ge-2/0/1.1003;
        interface ge-2/0/2.1003;
        route-distinguisher 172.16.0.11:102;
        vrf-import PL-VRF-B-IMP;
        vrf-export PL-VRF-B-EXP;
        protocols {
            bgp {
                group EBGP-65001 {
                    family inet {
                        unicast;
                    }
                    family inet6 {
                        unicast;
                    }
                    peer-as 65001;
                    as-override;
                    neighbor 10.10.0.0 {
                        export PL-VRF-B-EBGP-65001-CE1-OUT;
                    }
                    neighbor 10.10.0.6 {
                        export PL-VRF-B-EBGP-65001-CE2-OUT;
                    }
                }
            }
        }
    }
}

Advertisements